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

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: Clang warning fix 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') | no next file with comments »
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..bad3128b797f2bd6be8242b982519d9c49807af6 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -14,6 +14,9 @@
#include "media/webm/webm_stream_parser.h"
#if defined(USE_PROPRIETARY_CODECS)
+#if defined(ENABLE_MPEG2TS_STREAM_PARSER)
+#include "media/mp2t/mp2t_stream_parser.h"
+#endif
#include "media/mp4/es_descriptor.h"
#include "media/mp4/mp4_stream_parser.h"
#endif
@@ -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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698