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

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: Add basic unit tests + Cleanup 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/mpeg2/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 c883f967d9e37b6f9ac8d8f94ea9ca95bfddc1ca..83415d8db56df7bde746e4b457161ba21a567a4f 100644
--- a/media/filters/stream_parser_factory.cc
+++ b/media/filters/stream_parser_factory.cc
@@ -15,6 +15,9 @@
#if defined(GOOGLE_CHROME_BUILD) || 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/mpeg2/mpeg2ts_stream_parser.h"
+#endif
#endif
namespace media {
@@ -176,6 +179,20 @@ static media::StreamParser* BuildMP4Parser(
return new media::mp4::MP4StreamParser(audio_object_types, has_sbr);
}
+
+#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
#endif
static const SupportedTypeInfo kSupportedTypeInfo[] = {
@@ -184,6 +201,9 @@ static const SupportedTypeInfo kSupportedTypeInfo[] = {
#if defined(GOOGLE_CHROME_BUILD) || defined(USE_PROPRIETARY_CODECS)
{ "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/mpeg2/es_parser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698