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

Unified Diff: media/formats/mp4/avc.h

Issue 246853005: Fix SPS/PPS insertion logic in MP4StreamParser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments Created 6 years, 8 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: media/formats/mp4/avc.h
diff --git a/media/formats/mp4/avc.h b/media/formats/mp4/avc.h
index 731e4012b4079347d12e7596488906c3efdcfa4b..6c5d82b97009c8cf54c0c2ea7f842758ad10d5d5 100644
--- a/media/formats/mp4/avc.h
+++ b/media/formats/mp4/avc.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/basictypes.h"
+#include "media/base/decrypt_config.h"
#include "media/base/media_export.h"
namespace media {
@@ -19,9 +20,25 @@ class MEDIA_EXPORT AVC {
public:
static bool ConvertFrameToAnnexB(int length_size, std::vector<uint8>* buffer);
+ // Inserts the SPS & PPS data from |avc_config| into |buffer|.
+ // |buffer| is expected to contain AnnexB conformant data.
+ // |subsamples| contains the SubsampleEntry info if |buffer| contains
+ // encrypted data.
+ // Returns true if the param sets were successfully inserted.
+ static bool InsertParamSetsAnnexB(
+ const AVCDecoderConfigurationRecord& avc_config,
+ std::vector<uint8>* buffer,
+ std::vector<SubsampleEntry>* subsamples);
damienv1 2014/04/24 00:03:58 nit: From http://www.chromium.org/developers/codin
acolwell GONE FROM CHROMIUM 2014/04/24 23:52:15 Done.
+
static bool ConvertConfigToAnnexB(
const AVCDecoderConfigurationRecord& avc_config,
- std::vector<uint8>* buffer);
+ std::vector<uint8>* buffer,
+ std::vector<SubsampleEntry>* subsamples);
+
+ // Verifies that the contents of |buffer| conform to
+ // Section 7.4.1.2.3 of ISO/IEC 14496-10.
+ // Returns true if |buffer| contains conformant AnnexB data.
+ static bool IsValidAnnexB(const std::vector<uint8>& buffer);
};
} // namespace mp4
« no previous file with comments | « media/filters/h264_parser.h ('k') | media/formats/mp4/avc.cc » ('j') | media/formats/mp4/avc.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698