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

Unified Diff: media/formats/mp4/box_definitions.cc

Issue 1718773002: Parse ELNG box in MP4 container Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
« no previous file with comments | « media/formats/mp4/box_definitions.h ('k') | media/formats/mp4/box_reader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp4/box_definitions.cc
diff --git a/media/formats/mp4/box_definitions.cc b/media/formats/mp4/box_definitions.cc
index ced31cc51dbc20dc3b552bc4bea80c259c74a1a6..11688e969b2302c19bccc2e1298efda3833b300c 100644
--- a/media/formats/mp4/box_definitions.cc
+++ b/media/formats/mp4/box_definitions.cc
@@ -776,13 +776,25 @@ bool MediaInformation::Parse(BoxReader* reader) {
reader->ReadChild(&sample_table);
}
+ExtendedLanguageTag::ExtendedLanguageTag() {}
+ExtendedLanguageTag::~ExtendedLanguageTag() {}
+FourCC ExtendedLanguageTag::BoxType() const {
+ return FOURCC_ELNG;
+}
+
+bool ExtendedLanguageTag::Parse(BoxReader* reader) {
+ RCHECK(reader->ReadFullBoxHeader());
+ RCHECK(reader->ReadString(&language_tag));
+ return true;
+}
+
Media::Media() {}
Media::~Media() {}
FourCC Media::BoxType() const { return FOURCC_MDIA; }
bool Media::Parse(BoxReader* reader) {
- RCHECK(reader->ScanChildren() &&
- reader->ReadChild(&header) &&
+ RCHECK(reader->ScanChildren() && reader->ReadChild(&header) &&
+ reader->MaybeReadChild(&extended_language_tag) &&
reader->ReadChild(&handler));
// Maddeningly, the HandlerReference box specifies how to parse the
« no previous file with comments | « media/formats/mp4/box_definitions.h ('k') | media/formats/mp4/box_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698