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

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: comments addressed. 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
« no previous file with comments | « webrtc/modules/video_coding/session_info.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..eb053ac2c93231ad122f8b6c51981d7cc473de95 100644
--- a/webrtc/modules/video_coding/session_info.cc
+++ b/webrtc/modules/video_coding/session_info.cc
@@ -111,6 +111,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) {
« no previous file with comments | « 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