Bug 935857 - Replace MOZ_RTSP with proper NECKO_PROTOCOL handling. r=gps,r=vchang
This commit is contained in:
@@ -50,6 +50,10 @@ ifneq (,$(filter WINNT Darwin Android,$(OS_TARGET)))
|
||||
DEFINES += -DMOZ_SHARED_MOZGLUE=1
|
||||
endif
|
||||
|
||||
ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
|
||||
DEFINES += -DMOZ_RTSP
|
||||
endif
|
||||
|
||||
ifdef MOZ_PKG_MANIFEST_P
|
||||
$(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P) FORCE
|
||||
$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) $< -o $@)
|
||||
|
||||
11
configure.in
11
configure.in
@@ -3979,6 +3979,9 @@ MOZ_DISABLE_CRYPTOLEGACY=
|
||||
NSS_DISABLE_DBM=
|
||||
NECKO_COOKIES=1
|
||||
NECKO_PROTOCOLS_DEFAULT="about app data file ftp http res viewsource websocket wyciwyg device"
|
||||
if test -n "$MOZ_RTSP"; then
|
||||
NECKO_PROTOCOLS_DEFAULT="$NECKO_PROTOCOLS_DEFAULT rtsp"
|
||||
fi
|
||||
USE_ARM_KUSER=
|
||||
BUILD_CTYPES=1
|
||||
MOZ_USE_NATIVE_POPUP_WINDOWS=
|
||||
@@ -7289,14 +7292,6 @@ if test -n "$MOZ_B2G_FM"; then
|
||||
fi
|
||||
AC_SUBST(MOZ_B2G_FM)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable Rtsp Protocol for B2G (Gonk usually)
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_RTSP"; then
|
||||
AC_DEFINE(MOZ_RTSP)
|
||||
fi
|
||||
AC_SUBST(MOZ_RTSP)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Enable Bluetooth Interface for B2G (Gonk usually)
|
||||
dnl ========================================================
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "nsIPrincipal.h"
|
||||
#include "mozilla/dom/HTMLMediaElement.h"
|
||||
#endif
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
#include "RtspOmxDecoder.h"
|
||||
#include "RtspOmxReader.h"
|
||||
#endif
|
||||
@@ -244,7 +244,7 @@ static char const *const gMpegAudioCodecs[2] = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
static const char* const gRtspTypes[2] = {
|
||||
"RTSP",
|
||||
nullptr
|
||||
@@ -260,7 +260,7 @@ IsRtspSupportedType(const nsACString& aMimeType)
|
||||
|
||||
/* static */
|
||||
bool DecoderTraits::DecoderWaitsForOnConnected(const nsACString& aMimeType) {
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
return CodecListContains(gRtspTypes, aMimeType);
|
||||
#else
|
||||
return false;
|
||||
@@ -486,7 +486,7 @@ DecoderTraits::CreateDecoder(const nsACString& aType, MediaDecoderOwner* aOwner)
|
||||
decoder = new MediaOmxDecoder();
|
||||
}
|
||||
#endif
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
if (IsRtspSupportedType(aType)) {
|
||||
decoder = new RtspOmxDecoder();
|
||||
}
|
||||
|
||||
@@ -1706,7 +1706,7 @@ MediaDecoder::IsWebMEnabled()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
bool
|
||||
MediaDecoder::IsRtspEnabled()
|
||||
{
|
||||
|
||||
@@ -188,6 +188,7 @@ destroying the MediaDecoder object.
|
||||
#include "MediaStreamGraph.h"
|
||||
#include "AudioChannelCommon.h"
|
||||
#include "AbstractMediaDecoder.h"
|
||||
#include "necko-config.h"
|
||||
|
||||
class nsIStreamListener;
|
||||
class nsIMemoryReporter;
|
||||
@@ -771,7 +772,7 @@ public:
|
||||
#ifdef MOZ_WEBM
|
||||
static bool IsWebMEnabled();
|
||||
#endif
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
static bool IsRtspEnabled();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ SOURCES += [
|
||||
'OmxDecoder.cpp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_RTSP']:
|
||||
if 'rtsp' in CONFIG['NECKO_PROTOCOLS']:
|
||||
EXPORTS += [
|
||||
'RtspOmxDecoder.h',
|
||||
'RtspOmxReader.h',
|
||||
|
||||
@@ -4,15 +4,7 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/dom/base
|
||||
|
||||
ifdef MOZ_RTSP
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/netwerk/protocol/rtsp/controller
|
||||
LOCAL_INCLUDES += -I$(topsrcdir)/netwerk/protocol/rtsp/rtsp
|
||||
endif
|
||||
|
||||
ifdef MOZ_ENABLE_QTNETWORK
|
||||
LOCAL_INCLUDES += -I$(srcdir)/../../system/qt
|
||||
OS_INCLUDES += $(MOZ_QT_CFLAGS)
|
||||
endif
|
||||
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
#include "StreamingProtocolService.h"
|
||||
#include "mozilla/net/NeckoChild.h"
|
||||
#include "nsIURI.h"
|
||||
#include "necko-config.h"
|
||||
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
#include "RtspControllerChild.h"
|
||||
#include "RtspController.h"
|
||||
#endif
|
||||
|
||||
@@ -116,3 +116,17 @@ LIBRARY_NAME = 'neckobase_s'
|
||||
|
||||
include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
]
|
||||
|
||||
if 'rtsp' in CONFIG['NECKO_PROTOCOLS']:
|
||||
LOCAL_INCLUDES += [
|
||||
'/netwerk/protocol/rtsp/controller',
|
||||
'/netwerk/protocol/rtsp/rtsp',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_ENABLE_QTNETWORK']:
|
||||
LOCAL_INCLUDES += [
|
||||
'/netwerk/system/qt',
|
||||
]
|
||||
|
||||
@@ -18,10 +18,6 @@ SHARED_LIBRARY_LIBS = \
|
||||
../ipc/$(LIB_PREFIX)neckoipc_s.$(LIB_SUFFIX) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_RTSP
|
||||
SHARED_LIBRARY_LIBS += ../protocol/rtsp/$(LIB_PREFIX)nkrtsp_s.$(LIB_SUFFIX)
|
||||
endif
|
||||
|
||||
ifdef MOZ_SRTP
|
||||
SHARED_LIBRARY_LIBS += \
|
||||
../srtp/src/$(LIB_PREFIX)nksrtp_s.$(LIB_SUFFIX) \
|
||||
|
||||
@@ -319,7 +319,7 @@ WEB_SOCKET_HANDLER_CONSTRUCTOR(WebSocketSSLChannel, true)
|
||||
} // namespace mozilla
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
#include "RtspHandler.h"
|
||||
namespace mozilla {
|
||||
namespace net {
|
||||
@@ -798,7 +798,7 @@ NS_DEFINE_NAMED_CID(NS_WYCIWYGPROTOCOLHANDLER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WEBSOCKETPROTOCOLHANDLER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_WEBSOCKETSSLPROTOCOLHANDLER_CID);
|
||||
#endif
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
NS_DEFINE_NAMED_CID(NS_RTSPPROTOCOLHANDLER_CID);
|
||||
#endif
|
||||
#if defined(XP_WIN)
|
||||
@@ -940,7 +940,7 @@ static const mozilla::Module::CIDEntry kNeckoCIDs[] = {
|
||||
{ &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID, false, nullptr,
|
||||
mozilla::net::WebSocketSSLChannelConstructor },
|
||||
#endif
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
{ &kNS_RTSPPROTOCOLHANDLER_CID, false, nullptr, mozilla::net::RtspHandlerConstructor },
|
||||
#endif
|
||||
#if defined(XP_WIN)
|
||||
@@ -1085,7 +1085,7 @@ static const mozilla::Module::ContractIDEntry kNeckoContracts[] = {
|
||||
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "ws", &kNS_WEBSOCKETPROTOCOLHANDLER_CID },
|
||||
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "wss", &kNS_WEBSOCKETSSLPROTOCOLHANDLER_CID },
|
||||
#endif
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "rtsp", &kNS_RTSPPROTOCOLHANDLER_CID },
|
||||
#endif
|
||||
#if defined(XP_WIN)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "necko-config.h"
|
||||
#include "nsHttp.h"
|
||||
#include "mozilla/net/NeckoChild.h"
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
@@ -17,7 +18,7 @@
|
||||
#include "mozilla/dom/network/TCPSocketChild.h"
|
||||
#include "mozilla/dom/network/TCPServerSocketChild.h"
|
||||
#include "mozilla/dom/network/UDPSocketChild.h"
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
#include "mozilla/net/RtspControllerChild.h"
|
||||
#endif
|
||||
#include "SerializedLoadContext.h"
|
||||
@@ -171,7 +172,7 @@ NeckoChild::AllocPRtspControllerChild()
|
||||
bool
|
||||
NeckoChild::DeallocPRtspControllerChild(PRtspControllerChild* child)
|
||||
{
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
RtspControllerChild* p = static_cast<RtspControllerChild*>(child);
|
||||
p->ReleaseIPDLReference();
|
||||
#endif
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "necko-config.h"
|
||||
#include "nsHttp.h"
|
||||
#include "mozilla/net/NeckoParent.h"
|
||||
#include "mozilla/net/HttpChannelParent.h"
|
||||
@@ -12,7 +13,7 @@
|
||||
#include "mozilla/net/WyciwygChannelParent.h"
|
||||
#include "mozilla/net/FTPChannelParent.h"
|
||||
#include "mozilla/net/WebSocketChannelParent.h"
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
#include "mozilla/net/RtspControllerParent.h"
|
||||
#endif
|
||||
#include "mozilla/net/RemoteOpenFileParent.h"
|
||||
@@ -313,7 +314,7 @@ NeckoParent::DeallocPWebSocketParent(PWebSocketParent* actor)
|
||||
PRtspControllerParent*
|
||||
NeckoParent::AllocPRtspControllerParent()
|
||||
{
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
RtspControllerParent* p = new RtspControllerParent();
|
||||
p->AddRef();
|
||||
return p;
|
||||
@@ -325,7 +326,7 @@ NeckoParent::AllocPRtspControllerParent()
|
||||
bool
|
||||
NeckoParent::DeallocPRtspControllerParent(PRtspControllerParent* actor)
|
||||
{
|
||||
#ifdef MOZ_RTSP
|
||||
#ifdef NECKO_PROTOCOL_rtsp
|
||||
RtspControllerParent* p = static_cast<RtspControllerParent*>(actor);
|
||||
p->Release();
|
||||
#endif
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#undef NECKO_PROTOCOL_ftp
|
||||
#undef NECKO_PROTOCOL_http
|
||||
#undef NECKO_PROTOCOL_res
|
||||
#undef NECKO_PROTOCOL_rtsp
|
||||
#undef NECKO_PROTOCOL_viewsource
|
||||
#undef NECKO_PROTOCOL_websocket
|
||||
#undef NECKO_PROTOCOL_wyciwyg
|
||||
|
||||
@@ -4,22 +4,4 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
PARALLEL_DIRS += [
|
||||
'about',
|
||||
'app',
|
||||
'data',
|
||||
'device',
|
||||
'file',
|
||||
'ftp',
|
||||
'http',
|
||||
'res',
|
||||
'viewsource',
|
||||
'websocket',
|
||||
'wyciwyg',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_RTSP']:
|
||||
PARALLEL_DIRS += [
|
||||
'rtsp',
|
||||
]
|
||||
|
||||
PARALLEL_DIRS += sorted(CONFIG['NECKO_PROTOCOLS'])
|
||||
|
||||
@@ -471,7 +471,7 @@ OS_LIBS += \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifdef MOZ_RTSP
|
||||
ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
|
||||
OS_LIBS += -lstagefright_foundation
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user