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

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

Issue 2640113004: Introduce Dolby Vision video codec and Demuxer support (Closed)
Patch Set: fix build break on Android Created 3 years, 10 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 | « media/filters/stream_parser_factory.cc ('k') | media/formats/mp4/avc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/avc.h
diff --git a/media/formats/mp4/avc.h b/media/formats/mp4/avc.h
index b85d56e5b04cd6a025b72a48ceb345a71e462584..f2476ea3233151acd17d7307339787a33c437a49 100644
--- a/media/formats/mp4/avc.h
+++ b/media/formats/mp4/avc.h
@@ -32,11 +32,14 @@ class MEDIA_EXPORT AVC {
// |buffer| is expected to contain AnnexB conformant data.
// |subsamples| contains the SubsampleEntry info if |buffer| contains
// encrypted data.
+ // |annexb_validation| indicates if it should perform Annex B validation after
+ // the operation.
// Returns true if the param sets were successfully inserted.
static bool InsertParamSetsAnnexB(
const AVCDecoderConfigurationRecord& avc_config,
std::vector<uint8_t>* buffer,
- std::vector<SubsampleEntry>* subsamples);
+ std::vector<SubsampleEntry>* subsamples,
+ bool annexb_validation);
static bool ConvertConfigToAnnexB(
const AVCDecoderConfigurationRecord& avc_config,
@@ -70,6 +73,8 @@ class AVCBitstreamConverter : public BitstreamConverter {
public:
explicit AVCBitstreamConverter(
std::unique_ptr<AVCDecoderConfigurationRecord> avc_config);
+ // Overrides |post_annexb_validation_| to disable Annex B validation
+ void DisablePostAnnexbValidation() { post_annexb_validation_ = false; }
// BitstreamConverter interface
bool ConvertFrame(std::vector<uint8_t>* frame_buf,
@@ -79,6 +84,9 @@ class AVCBitstreamConverter : public BitstreamConverter {
private:
~AVCBitstreamConverter() override;
std::unique_ptr<AVCDecoderConfigurationRecord> avc_config_;
+ // Indicates if it needs to do AnnexB validation on bitstream after performing
+ // ConvertFrame() operation.
+ bool post_annexb_validation_;
};
} // namespace mp4
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | media/formats/mp4/avc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698