Chromium Code Reviews| Index: webrtc/modules/video_coding/session_info.cc |
| diff --git a/webrtc/modules/video_coding/session_info.cc b/webrtc/modules/video_coding/session_info.cc |
| index b11f6903b96854dde54b63798bbd3f7e689d2d93..0e1398b20e2c061f8db51e7c7be0ef18edbb79b3 100644 |
| --- a/webrtc/modules/video_coding/session_info.cc |
| +++ b/webrtc/modules/video_coding/session_info.cc |
| @@ -10,6 +10,8 @@ |
| #include "webrtc/modules/video_coding/session_info.h" |
| +#include <vector> |
|
philipel
2016/09/15 12:52:46
in .h file
stefan-webrtc
2016/09/30 09:36:02
Done.
|
| + |
| #include "webrtc/base/logging.h" |
| #include "webrtc/modules/video_coding/packet.h" |
| @@ -111,6 +113,19 @@ bool VCMSessionInfo::NonReference() const { |
| return packets_.front().video_header.codecHeader.VP8.nonReference; |
| } |
| +std::vector<NaluInfo> VCMSessionInfo::GetNaluInfos() const { |
| + if (packets_.empty() || packets_.front().video_header.codec != kRtpVideoH264) |
| + return std::vector<NaluInfo>(); |
| + std::vector<NaluInfo> nalu_infos; |
| + for (const VCMPacket& packet : packets_) { |
| + for (size_t i = 0; i < packet.video_header.codecHeader.H264.nalus_length; |
| + ++i) { |
| + nalu_infos.push_back(packet.video_header.codecHeader.H264.nalus[i]); |
| + } |
| + } |
| + return nalu_infos; |
| +} |
| + |
| void VCMSessionInfo::SetGofInfo(const GofInfoVP9& gof_info, size_t idx) { |
| if (packets_.empty() || packets_.front().video_header.codec != kRtpVideoVp9 || |
| packets_.front().video_header.codecHeader.VP9.flexible_mode) { |