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

Unified Diff: media/mp4/mp4_stream_parser.cc

Issue 11313016: Add "type" in GenerateKeyRequest() and OnNeedKey(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments resolved Created 8 years, 2 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/mp4/mp4_stream_parser.cc
diff --git a/media/mp4/mp4_stream_parser.cc b/media/mp4/mp4_stream_parser.cc
index c600537cda2f708a82e7adf2d8abb5516d15ee99..07135d86f548047e2f17014f7f76c48b234d4a85 100644
--- a/media/mp4/mp4_stream_parser.cc
+++ b/media/mp4/mp4_stream_parser.cc
@@ -20,6 +20,9 @@
namespace media {
namespace mp4 {
+// TODO(xhwang): Figure out the init data type appropriately once it's spec'ed.
+static const char kMp4InitDataType[] = "video/mp4";
+
MP4StreamParser::MP4StreamParser(bool has_sbr)
: state_(kWaitingForInit),
moof_head_(0),
@@ -287,7 +290,7 @@ bool MP4StreamParser::EmitNeedKeyIfNecessary(
headers[i].raw_box.size());
pos += headers[i].raw_box.size();
}
- return need_key_cb_.Run(init_data.Pass(), total_size);
+ return need_key_cb_.Run(kMp4InitDataType, init_data.Pass(), total_size);
}
bool MP4StreamParser::PrepareAVCBuffer(

Powered by Google App Engine
This is Rietveld 408576698