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

Unified Diff: media/mp4/mp4_stream_parser.cc

Issue 16114009: Add AAC codec specific data for MSE on android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« media/mp4/aac.cc ('K') | « media/mp4/aac.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mp4/mp4_stream_parser.cc
diff --git a/media/mp4/mp4_stream_parser.cc b/media/mp4/mp4_stream_parser.cc
index 77fa2b80c214d503e997fda76caac964be406f39..b92d28ab63c7790cbd750c581e2d3833362f7665 100644
--- a/media/mp4/mp4_stream_parser.cc
+++ b/media/mp4/mp4_stream_parser.cc
@@ -252,10 +252,22 @@ bool MP4StreamParser::ParseMoov(BoxReader* reader) {
is_audio_track_encrypted_ = entry.sinf.info.track_encryption.is_encrypted;
DVLOG(1) << "is_audio_track_encrypted_: " << is_audio_track_encrypted_;
+#if defined(OS_ANDROID)
+ if (ESDescriptor::IsAAC(audio_type)) {
+ std::vector<uint8> csd = aac.GetCodecSpecificData();
acolwell GONE FROM CHROMIUM 2013/05/29 22:37:25 How about something like this instead? std::vecto
qinmin 2013/05/30 03:07:55 Done.
+ CHECK_EQ(2u, csd.size());
+ audio_config.Initialize(
+ codec, sample_format,channel_layout,sample_per_second,
+ &csd[0], csd.size(), is_audio_track_encrypted_, false);
+ } else {
+#endif
audio_config.Initialize(codec, sample_format,
channel_layout,
sample_per_second,
NULL, 0, is_audio_track_encrypted_, false);
+#if defined(OS_ANDROID)
+ }
+#endif
has_audio_ = true;
audio_track_id_ = track->header.track_id;
}
« media/mp4/aac.cc ('K') | « media/mp4/aac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698