Bug 626229 - fix trunk compilation with --disable-ogg,wave,webm - r=kinetik

--HG--
extra : rebase_source : b3baaca255dbfa2eef1a0fa4d9b400470a902f0b
This commit is contained in:
Chris Double 2011-03-24 16:23:33 +13:00
parent d89a94c4c6
commit 44d9284430
3 changed files with 30 additions and 4 deletions

View File

@ -48,7 +48,9 @@
#include "ContentChild.h"
#include "CrashReporterChild.h"
#include "TabChild.h"
#if defined(MOZ_SYDNEYAUDIO)
#include "AudioChild.h"
#endif
#include "mozilla/ipc/TestShellChild.h"
#include "mozilla/net/NeckoChild.h"
@ -58,7 +60,9 @@
#include "mozilla/dom/StorageChild.h"
#include "mozilla/dom/PCrashReporterChild.h"
#if defined(MOZ_SYDNEYAUDIO)
#include "nsAudioStream.h"
#endif
#include "nsIMemoryReporter.h"
#include "nsIObserverService.h"
#include "nsTObserverArray.h"
@ -384,16 +388,22 @@ ContentChild::AllocPAudio(const PRInt32& numChannels,
const PRInt32& rate,
const PRInt32& format)
{
#if defined(MOZ_SYDNEYAUDIO)
AudioChild *child = new AudioChild();
NS_ADDREF(child);
return child;
#else
return nsnull;
#endif
}
bool
ContentChild::DeallocPAudio(PAudioChild* doomed)
{
#if defined(MOZ_SYDNEYAUDIO)
AudioChild *child = static_cast<AudioChild*>(doomed);
NS_RELEASE(child);
#endif
return true;
}

View File

@ -68,7 +68,9 @@
#include "nsIConsoleService.h"
#include "nsIScriptError.h"
#include "nsConsoleMessage.h"
#if defined(MOZ_SYDNEYAUDIO)
#include "AudioParent.h"
#endif
#if defined(ANDROID) || defined(LINUX)
#include <sys/time.h>
@ -687,16 +689,22 @@ ContentParent::AllocPAudio(const PRInt32& numChannels,
const PRInt32& rate,
const PRInt32& format)
{
#if defined(MOZ_SYDNEYAUDIO)
AudioParent *parent = new AudioParent(numChannels, rate, format);
NS_ADDREF(parent);
return parent;
#else
return nsnull;
#endif
}
bool
ContentParent::DeallocPAudio(PAudioParent* doomed)
{
#if defined(MOZ_SYDNEYAUDIO)
AudioParent *parent = static_cast<AudioParent*>(doomed);
NS_RELEASE(parent);
#endif
return true;
}

View File

@ -56,8 +56,6 @@ EXPORTS = TabMessageUtils.h PCOMContentPermissionRequestChild.h
EXPORTS_NAMESPACES = mozilla/dom
EXPORTS_mozilla/dom = \
AudioChild.h \
AudioParent.h \
ContentChild.h \
ContentParent.h \
ContentProcess.h \
@ -68,8 +66,6 @@ EXPORTS_mozilla/dom = \
$(NULL)
CPPSRCS = \
AudioChild.cpp \
AudioParent.cpp \
ContentProcess.cpp \
ContentParent.cpp \
ContentChild.cpp \
@ -79,6 +75,18 @@ CPPSRCS = \
TabMessageUtils.cpp \
$(NULL)
ifdef MOZ_SYDNEYAUDIO
EXPORTS_mozilla/dom += \
AudioChild.h \
AudioParent.h \
$(NULL)
CPPSRCS += \
AudioChild.cpp \
AudioParent.cpp \
$(NULL)
endif
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk
include $(topsrcdir)/config/rules.mk