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

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: Created 7 years, 4 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/mpeg2/mpeg2ts_section_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 c883f967d9e37b6f9ac8d8f94ea9ca95bfddc1ca..388bf5745a8e0aa32441663a2d12220b93798d5f 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -17,6 +17,10 @@
#include "media/mp4/mp4_stream_parser.h"
#endif
+#if defined(ENABLE_MPEG2TS_STREAM_PARSER)
+#include "media/mpeg2/mpeg2ts_stream_parser.h"
acolwell GONE FROM CHROMIUM 2013/08/29 20:44:24 nit: This should be inside the USE_PROPRIETARY_COD
damienv1 2013/09/04 01:37:13 Done.
+#endif
+
namespace media {
typedef bool (*CodecIDValidatorFunction)(
@@ -178,6 +182,21 @@ static media::StreamParser* BuildMP4Parser(
}
#endif
+#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::mpeg2ts::Mpeg2TsStreamParser();
+}
+#endif
+
+
static const SupportedTypeInfo kSupportedTypeInfo[] = {
{ "video/webm", &BuildWebMParser, kVideoWebMCodecs },
{ "audio/webm", &BuildWebMParser, kAudioWebMCodecs },
@@ -185,6 +204,9 @@ static const SupportedTypeInfo kSupportedTypeInfo[] = {
{ "video/mp4", &BuildMP4Parser, kVideoMP4Codecs },
{ "audio/mp4", &BuildMP4Parser, kAudioMP4Codecs },
#endif
+#if defined(ENABLE_MPEG2TS_STREAM_PARSER)
acolwell GONE FROM CHROMIUM 2013/08/29 20:44:24 nit: This should be in the USE_PROPRIETARY_CODECS
damienv1 2013/09/04 01:37:13 Done.
+ { "video/mp2t", &BuildMP2TParser, kVideoMP2TCodecs },
+#endif
};
// Verify that |codec_info| is supported on this platform.
« no previous file with comments | « no previous file | media/media.gyp » ('j') | media/mpeg2/mpeg2ts_section_parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698