Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Unified Diff: webrtc/modules/video_coding/session_info.cc

Issue 2341713002: Use sps and pps to determine decodability of H.264 frames. (Closed)
Patch Set: . Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {
« webrtc/modules/video_coding/session_info.h ('K') | « webrtc/modules/video_coding/session_info.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698