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

Unified Diff: media/filters/stream_parser_factory.cc

Issue 23566013: Mpeg2 TS stream parser for media source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better naming: mp2t namespace & class names Created 7 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 | « no previous file | media/media.gyp » ('j') | media/mp2t/es_parser.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/stream_parser_factory.cc
diff --git a/media/filters/stream_parser_factory.cc b/media/filters/stream_parser_factory.cc
index 2b2ec9cbcee42a04cac673c9ef16f89a5237c19b..43c855fe0953b1ae08b0a52bd5006109e6350030 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -16,6 +16,9 @@
#if defined(USE_PROPRIETARY_CODECS)
#include "media/mp4/es_descriptor.h"
#include "media/mp4/mp4_stream_parser.h"
+#if defined(ENABLE_MPEG2TS_STREAM_PARSER)
+#include "media/mp2t/mp2t_stream_parser.h"
damienv1 2013/09/12 20:43:02 Order (should be before mp4).
damienv1 2013/09/12 20:53:51 Done.
+#endif
#endif
namespace media {
@@ -198,6 +201,19 @@ static StreamParser* BuildMP3Parser(
return new MP3StreamParser();
}
+#if defined(ENABLE_MPEG2TS_STREAM_PARSER)
+static const CodecInfo* kVideoMP2TCodecs[] = {
+ &kH264CodecInfo,
+ &kMPEG4AACCodecInfo,
+ &kMPEG2AACLCCodecInfo,
+ NULL
+};
+
+static StreamParser* BuildMP2TParser(
+ const std::vector<std::string>& codecs, const media::LogCB& log_cb) {
+ return new media::mp2t::Mp2tStreamParser();
+}
+#endif
#endif
@@ -208,6 +224,9 @@ static const SupportedTypeInfo kSupportedTypeInfo[] = {
{ "audio/mpeg", &BuildMP3Parser, kAudioMP3Codecs },
{ "video/mp4", &BuildMP4Parser, kVideoMP4Codecs },
{ "audio/mp4", &BuildMP4Parser, kAudioMP4Codecs },
+#if defined(ENABLE_MPEG2TS_STREAM_PARSER)
+ { "video/mp2t", &BuildMP2TParser, kVideoMP2TCodecs },
+#endif
#endif
};
« no previous file with comments | « no previous file | media/media.gyp » ('j') | media/mp2t/es_parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698