equal
deleted
inserted
replaced
1 # HG changeset patch |
1 # HG changeset patch |
2 # Parent 9fe99f8a584f2369a88bfb5281fd6bc95eb2593c |
2 # Parent 74ba8ebd0dc72be84280bd4806f84d9ec1f4e130 |
3 Bug 760140 - Query the GstRegistry for the required demuxers/decoders from canPlayType |
3 Bug 760140 - Query the GstRegistry for the required demuxers/decoders from canPlayType (TM: 22) |
4 |
|
5 |
4 |
6 diff --git a/content/media/DecoderTraits.cpp b/content/media/DecoderTraits.cpp |
5 diff --git a/content/media/DecoderTraits.cpp b/content/media/DecoderTraits.cpp |
7 --- a/content/media/DecoderTraits.cpp |
6 --- a/content/media/DecoderTraits.cpp |
8 +++ b/content/media/DecoderTraits.cpp |
7 +++ b/content/media/DecoderTraits.cpp |
9 @@ -7,16 +7,18 @@ |
8 @@ -7,16 +7,18 @@ |
23 #endif |
22 #endif |
24 |
23 |
25 namespace mozilla |
24 namespace mozilla |
26 { |
25 { |
27 |
26 |
28 @@ -137,48 +139,35 @@ |
27 @@ -137,48 +139,35 @@ DecoderTraits::IsWebMType(const nsACStri |
29 return false; |
28 return false; |
30 } |
29 } |
31 |
30 |
32 return CodecListContains(gWebMTypes, aType); |
31 return CodecListContains(gWebMTypes, aType); |
33 } |
32 } |
73 static const char* const gOmxTypes[6] = { |
72 static const char* const gOmxTypes[6] = { |
74 "audio/mpeg", |
73 "audio/mpeg", |
75 "audio/mp4", |
74 "audio/mp4", |
76 "video/mp4", |
75 "video/mp4", |
77 "video/3gpp", |
76 "video/3gpp", |
78 @@ -190,19 +179,17 @@ |
77 @@ -190,19 +179,17 @@ bool |
79 DecoderTraits::IsOmxSupportedType(const nsACString& aType) |
78 DecoderTraits::IsOmxSupportedType(const nsACString& aType) |
80 { |
79 { |
81 if (!MediaDecoder::IsOmxEnabled()) { |
80 if (!MediaDecoder::IsOmxEnabled()) { |
82 return false; |
81 return false; |
83 } |
82 } |
93 "avc1.58A01E", // H.264 Extended Profile Level 3.0 |
92 "avc1.58A01E", // H.264 Extended Profile Level 3.0 |
94 "avc1.4D401E", // H.264 Main Profile Level 3.0 |
93 "avc1.4D401E", // H.264 Main Profile Level 3.0 |
95 "avc1.64001E", // H.264 High Profile Level 3.0 |
94 "avc1.64001E", // H.264 High Profile Level 3.0 |
96 "avc1.64001F", // H.264 High Profile Level 3.1 |
95 "avc1.64001F", // H.264 High Profile Level 3.1 |
97 "mp4v.20.3", // 3GPP |
96 "mp4v.20.3", // 3GPP |
98 @@ -303,19 +290,19 @@ |
97 @@ -303,19 +290,19 @@ DecoderTraits::CanHandleMediaType(const |
99 #ifdef MOZ_DASH |
98 #ifdef MOZ_DASH |
100 if (IsDASHMPDType(nsDependentCString(aMIMEType))) { |
99 if (IsDASHMPDType(nsDependentCString(aMIMEType))) { |
101 // DASH manifest uses WebM codecs only. |
100 // DASH manifest uses WebM codecs only. |
102 codecList = gWebMCodecs; |
101 codecList = gWebMCodecs; |
103 result = CANPLAY_YES; |
102 result = CANPLAY_YES; |
116 if (IsOmxSupportedType(nsDependentCString(aMIMEType))) { |
115 if (IsOmxSupportedType(nsDependentCString(aMIMEType))) { |
117 codecList = gH264Codecs; |
116 codecList = gH264Codecs; |
118 result = CANPLAY_MAYBE; |
117 result = CANPLAY_MAYBE; |
119 } |
118 } |
120 #endif |
119 #endif |
121 @@ -324,17 +311,17 @@ |
120 @@ -324,17 +311,17 @@ DecoderTraits::CanHandleMediaType(const |
122 result = CANPLAY_MAYBE; |
121 result = CANPLAY_MAYBE; |
123 } |
122 } |
124 #endif |
123 #endif |
125 #ifdef MOZ_MEDIA_PLUGINS |
124 #ifdef MOZ_MEDIA_PLUGINS |
126 if (MediaDecoder::IsMediaPluginsEnabled() && |
125 if (MediaDecoder::IsMediaPluginsEnabled() && |
138 bool expectMoreTokens = false; |
137 bool expectMoreTokens = false; |
139 while (tokenizer.hasMoreTokens()) { |
138 while (tokenizer.hasMoreTokens()) { |
140 diff --git a/content/media/DecoderTraits.h b/content/media/DecoderTraits.h |
139 diff --git a/content/media/DecoderTraits.h b/content/media/DecoderTraits.h |
141 --- a/content/media/DecoderTraits.h |
140 --- a/content/media/DecoderTraits.h |
142 +++ b/content/media/DecoderTraits.h |
141 +++ b/content/media/DecoderTraits.h |
143 @@ -49,17 +49,16 @@ |
142 @@ -51,17 +51,16 @@ public: |
144 #endif |
|
145 |
|
146 #ifdef MOZ_WEBM |
143 #ifdef MOZ_WEBM |
147 static bool IsWebMType(const nsACString& aType); |
144 static bool IsWebMType(const nsACString& aType); |
148 #endif |
145 #endif |
149 |
146 |
150 #ifdef MOZ_GSTREAMER |
147 #ifdef MOZ_GSTREAMER |
|
148 // When enabled, use GStreamer for H.264, but not for codecs handled by our |
|
149 // bundled decoders, unless the "media.prefer-gstreamer" pref is set. |
151 static bool IsGStreamerSupportedType(const nsACString& aType); |
150 static bool IsGStreamerSupportedType(const nsACString& aType); |
152 - static bool IsH264Type(const nsACString& aType); |
151 - static bool IsH264Type(const nsACString& aType); |
153 #endif |
152 #endif |
154 |
153 |
155 #ifdef MOZ_WIDGET_GONK |
154 #ifdef MOZ_WIDGET_GONK |
445 + |
444 + |
446 +#endif |
445 +#endif |
447 diff --git a/content/media/gstreamer/Makefile.in b/content/media/gstreamer/Makefile.in |
446 diff --git a/content/media/gstreamer/Makefile.in b/content/media/gstreamer/Makefile.in |
448 --- a/content/media/gstreamer/Makefile.in |
447 --- a/content/media/gstreamer/Makefile.in |
449 +++ b/content/media/gstreamer/Makefile.in |
448 +++ b/content/media/gstreamer/Makefile.in |
450 @@ -13,21 +13,23 @@ |
449 @@ -13,21 +13,23 @@ include $(DEPTH)/config/autoconf.mk |
451 MODULE = content |
450 MODULE = content |
452 LIBRARY_NAME = gkcongstreamer_s |
451 LIBRARY_NAME = gkcongstreamer_s |
453 LIBXUL_LIBRARY = 1 |
452 LIBXUL_LIBRARY = 1 |
454 |
453 |
455 |
454 |
472 CFLAGS += $(GSTREAMER_CFLAGS) |
471 CFLAGS += $(GSTREAMER_CFLAGS) |
473 CXXFLAGS += $(GSTREAMER_CFLAGS) |
472 CXXFLAGS += $(GSTREAMER_CFLAGS) |
474 diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in |
473 diff --git a/layout/build/Makefile.in b/layout/build/Makefile.in |
475 --- a/layout/build/Makefile.in |
474 --- a/layout/build/Makefile.in |
476 +++ b/layout/build/Makefile.in |
475 +++ b/layout/build/Makefile.in |
477 @@ -316,16 +316,20 @@ |
476 @@ -318,16 +318,20 @@ LOCAL_INCLUDES += -I$(srcdir)/../base \ |
478 -I$(topsrcdir)/js/xpconnect/loader \ |
477 -I$(topsrcdir)/js/xpconnect/loader \ |
479 -I$(topsrcdir)/caps/include \ |
478 -I$(topsrcdir)/caps/include \ |
480 -I$(topsrcdir)/netwerk/base/src \ |
479 -I$(topsrcdir)/netwerk/base/src \ |
481 -I$(topsrcdir)/content/svg/content/src \ |
480 -I$(topsrcdir)/content/svg/content/src \ |
482 -I$(topsrcdir)/extensions/cookie \ |
481 -I$(topsrcdir)/extensions/cookie \ |
496 endif #} |
495 endif #} |
497 |
496 |
498 diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp |
497 diff --git a/layout/build/nsLayoutStatics.cpp b/layout/build/nsLayoutStatics.cpp |
499 --- a/layout/build/nsLayoutStatics.cpp |
498 --- a/layout/build/nsLayoutStatics.cpp |
500 +++ b/layout/build/nsLayoutStatics.cpp |
499 +++ b/layout/build/nsLayoutStatics.cpp |
501 @@ -78,16 +78,20 @@ |
500 @@ -79,16 +79,20 @@ |
502 #ifdef MOZ_MEDIA_PLUGINS |
501 #ifdef MOZ_MEDIA_PLUGINS |
503 #include "MediaPluginHost.h" |
502 #include "MediaPluginHost.h" |
504 #endif |
503 #endif |
505 |
504 |
506 #ifdef MOZ_WMF |
505 #ifdef MOZ_WMF |
513 + |
512 + |
514 #ifdef MOZ_SYDNEYAUDIO |
513 #ifdef MOZ_SYDNEYAUDIO |
515 #include "AudioStream.h" |
514 #include "AudioStream.h" |
516 #endif |
515 #endif |
517 |
516 |
518 #include "nsError.h" |
517 #ifdef MOZ_WIDGET_GONK |
519 |
518 #include "nsVolumeService.h" |
520 #include "nsCycleCollector.h" |
519 using namespace mozilla::system; |
521 #include "nsJSEnvironment.h" |
520 #endif |
522 @@ -336,16 +340,20 @@ |
521 @@ -344,16 +348,20 @@ nsLayoutStatics::Shutdown() |
523 nsXBLService::Shutdown(); |
522 nsXBLService::Shutdown(); |
524 nsAutoCopyListener::Shutdown(); |
523 nsAutoCopyListener::Shutdown(); |
525 FrameLayerBuilder::Shutdown(); |
524 FrameLayerBuilder::Shutdown(); |
526 |
525 |
527 #ifdef MOZ_MEDIA_PLUGINS |
526 #ifdef MOZ_MEDIA_PLUGINS |