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

Unified Diff: media/formats/mp2t/mp2t_stream_parser.cc

Issue 506943003: Support MPEG1 audio in the MPEG2-TS stream parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments from patch set #5. Created 6 years, 3 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/mp2t/es_parser_test_base.cc ('k') | media/formats/mpeg/mp3_stream_parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp2t/mp2t_stream_parser.cc
diff --git a/media/formats/mp2t/mp2t_stream_parser.cc b/media/formats/mp2t/mp2t_stream_parser.cc
index 35c61d6bde0bf20d6e4caf59a4d47e769ca79a99..673f78742d35a3d7b342059356ae63c381424e7e 100644
--- a/media/formats/mp2t/mp2t_stream_parser.cc
+++ b/media/formats/mp2t/mp2t_stream_parser.cc
@@ -16,6 +16,7 @@
#include "media/formats/mp2t/es_parser.h"
#include "media/formats/mp2t/es_parser_adts.h"
#include "media/formats/mp2t/es_parser_h264.h"
+#include "media/formats/mp2t/es_parser_mpeg1audio.h"
#include "media/formats/mp2t/mp2t_common.h"
#include "media/formats/mp2t/ts_packet.h"
#include "media/formats/mp2t/ts_section.h"
@@ -349,6 +350,17 @@ void Mp2tStreamParser::RegisterPes(int pmt_pid,
pes_pid),
sbr_in_mimetype_));
is_audio = true;
+ } else if (stream_type == kStreamTypeMpeg1Audio) {
+ es_parser.reset(
+ new EsParserMpeg1Audio(
+ base::Bind(&Mp2tStreamParser::OnAudioConfigChanged,
+ base::Unretained(this),
+ pes_pid),
+ base::Bind(&Mp2tStreamParser::OnEmitAudioBuffer,
+ base::Unretained(this),
+ pes_pid),
+ log_cb_));
+ is_audio = true;
} else {
return;
}
« no previous file with comments | « media/formats/mp2t/es_parser_test_base.cc ('k') | media/formats/mpeg/mp3_stream_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698