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

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: Refactoring to reuse code from MP3StreamParser. 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
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..9b304b37ee5c9cd99e8e751b4a1c2cc13146ada5 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,16 @@ 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)));
+ is_audio = true;
} else {
return;
}

Powered by Google App Engine
This is Rietveld 408576698