зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1200477 - Allow building with WebRTC disabled. r=glandium,mrbkap
This commit is contained in:
Родитель
e5aadf98af
Коммит
c3a8478c8b
|
@ -11,6 +11,7 @@
|
|||
|
||||
#undef LOG
|
||||
#undef LOG_ENABLED
|
||||
extern PRLogModuleInfo *gCamerasParentLog;
|
||||
#define LOG(args) MOZ_LOG(gCamerasParentLog, mozilla::LogLevel::Debug, args)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(gCamerasParentLog, mozilla::LogLevel::Debug)
|
||||
|
||||
|
|
|
@ -5,22 +5,22 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if CONFIG['MOZ_WEBRTC']:
|
||||
EXPORTS += ['CamerasChild.h',
|
||||
'CamerasParent.h',
|
||||
'CamerasUtils.h',
|
||||
'LoadManager.h',
|
||||
'LoadManagerFactory.h',
|
||||
'LoadMonitor.h',
|
||||
EXPORTS += [
|
||||
'CamerasChild.h',
|
||||
'CamerasParent.h',
|
||||
'CamerasUtils.h',
|
||||
'LoadManager.h',
|
||||
'LoadManagerFactory.h',
|
||||
'LoadMonitor.h',
|
||||
]
|
||||
UNIFIED_SOURCES += ['CamerasChild.cpp',
|
||||
'CamerasParent.cpp',
|
||||
'CamerasUtils.cpp',
|
||||
'LoadManager.cpp',
|
||||
'LoadManagerFactory.cpp',
|
||||
'LoadMonitor.cpp',
|
||||
]
|
||||
IPDL_SOURCES = [
|
||||
'PCameras.ipdl',
|
||||
UNIFIED_SOURCES += [
|
||||
'CamerasChild.cpp',
|
||||
'CamerasParent.cpp',
|
||||
'CamerasUtils.cpp',
|
||||
'LoadManager.cpp',
|
||||
'LoadManagerFactory.cpp',
|
||||
'LoadMonitor.cpp',
|
||||
'ShmemPool.cpp',
|
||||
]
|
||||
LOCAL_INCLUDES += [
|
||||
'/media/webrtc/signaling',
|
||||
|
@ -63,17 +63,18 @@ EXPORTS.mozilla.media += ['MediaChild.h',
|
|||
'MediaSystemResourceTypes.h',
|
||||
'MediaUtils.h',
|
||||
]
|
||||
UNIFIED_SOURCES += ['MediaChild.cpp',
|
||||
'MediaParent.cpp',
|
||||
'MediaSystemResourceClient.cpp',
|
||||
'MediaSystemResourceManager.cpp',
|
||||
'MediaSystemResourceManagerChild.cpp',
|
||||
'MediaSystemResourceManagerParent.cpp',
|
||||
'MediaSystemResourceService.cpp',
|
||||
'MediaUtils.cpp',
|
||||
'ShmemPool.cpp',
|
||||
UNIFIED_SOURCES += [
|
||||
'MediaChild.cpp',
|
||||
'MediaParent.cpp',
|
||||
'MediaSystemResourceClient.cpp',
|
||||
'MediaSystemResourceManager.cpp',
|
||||
'MediaSystemResourceManagerChild.cpp',
|
||||
'MediaSystemResourceManagerParent.cpp',
|
||||
'MediaSystemResourceService.cpp',
|
||||
'MediaUtils.cpp',
|
||||
]
|
||||
IPDL_SOURCES += [
|
||||
'PCameras.ipdl',
|
||||
'PMedia.ipdl',
|
||||
'PMediaSystemResourceManager.ipdl',
|
||||
]
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
#include "BroadcastChannelChild.h"
|
||||
#include "ServiceWorkerManagerChild.h"
|
||||
#include "FileDescriptorSetChild.h"
|
||||
#ifdef MOZ_WEBRTC
|
||||
#include "CamerasChild.h"
|
||||
#endif
|
||||
#include "mozilla/media/MediaChild.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/dom/PBlobChild.h"
|
||||
|
@ -271,17 +273,23 @@ BackgroundChildImpl::DeallocPBroadcastChannelChild(
|
|||
camera::PCamerasChild*
|
||||
BackgroundChildImpl::AllocPCamerasChild()
|
||||
{
|
||||
#ifdef MOZ_WEBRTC
|
||||
nsRefPtr<camera::CamerasChild> agent =
|
||||
new camera::CamerasChild();
|
||||
return agent.forget().take();
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
BackgroundChildImpl::DeallocPCamerasChild(camera::PCamerasChild *aActor)
|
||||
{
|
||||
#ifdef MOZ_WEBRTC
|
||||
nsRefPtr<camera::CamerasChild> child =
|
||||
dont_AddRef(static_cast<camera::CamerasChild*>(aActor));
|
||||
MOZ_ASSERT(aActor);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
|
||||
#include "BroadcastChannelParent.h"
|
||||
#include "FileDescriptorSetParent.h"
|
||||
#ifdef MOZ_WEBRTC
|
||||
#include "CamerasParent.h"
|
||||
#endif
|
||||
#include "mozilla/media/MediaParent.h"
|
||||
#include "mozilla/AppProcessChecker.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
|
@ -290,9 +292,13 @@ BackgroundParentImpl::AllocPCamerasParent()
|
|||
AssertIsInMainProcess();
|
||||
AssertIsOnBackgroundThread();
|
||||
|
||||
#ifdef MOZ_WEBRTC
|
||||
nsRefPtr<mozilla::camera::CamerasParent> actor =
|
||||
mozilla::camera::CamerasParent::Create();
|
||||
return actor.forget().take();
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -302,8 +308,10 @@ BackgroundParentImpl::DeallocPCamerasParent(camera::PCamerasParent *aActor)
|
|||
AssertIsOnBackgroundThread();
|
||||
MOZ_ASSERT(aActor);
|
||||
|
||||
#ifdef MOZ_WEBRTC
|
||||
nsRefPtr<mozilla::camera::CamerasParent> actor =
|
||||
dont_AddRef(static_cast<mozilla::camera::CamerasParent*>(aActor));
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче