зеркало из https://github.com/mozilla/gecko-dev.git
Bug 849916 - Part 1: Make it possible to send ThreeDPoint objects as commands to the MSG thread; r=padenot
This commit is contained in:
Родитель
447ade58cb
Коммит
2e3c9ba835
|
@ -11,6 +11,10 @@
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
namespace dom {
|
||||||
|
struct ThreeDPoint;
|
||||||
|
}
|
||||||
|
|
||||||
class AudioNodeStream;
|
class AudioNodeStream;
|
||||||
|
|
||||||
// We ensure that the graph advances in steps that are multiples of the Web
|
// We ensure that the graph advances in steps that are multiples of the Web
|
||||||
|
@ -133,6 +137,11 @@ public:
|
||||||
{
|
{
|
||||||
NS_ERROR("Invalid SetTimelineParameter index");
|
NS_ERROR("Invalid SetTimelineParameter index");
|
||||||
}
|
}
|
||||||
|
virtual void SetThreeDPointParameter(uint32_t aIndex,
|
||||||
|
const dom::ThreeDPoint& aValue)
|
||||||
|
{
|
||||||
|
NS_ERROR("Invalid SetThreeDPointParameter index");
|
||||||
|
}
|
||||||
virtual void SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aBuffer)
|
virtual void SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aBuffer)
|
||||||
{
|
{
|
||||||
NS_ERROR("SetBuffer called on engine that doesn't support it");
|
NS_ERROR("SetBuffer called on engine that doesn't support it");
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "MediaStreamGraphImpl.h"
|
#include "MediaStreamGraphImpl.h"
|
||||||
#include "AudioNodeEngine.h"
|
#include "AudioNodeEngine.h"
|
||||||
|
#include "ThreeDPoint.h"
|
||||||
|
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
|
@ -118,6 +119,26 @@ AudioNodeStream::SetTimelineParameter(uint32_t aIndex,
|
||||||
GraphImpl()->AppendMessage(new Message(this, aIndex, aValue));
|
GraphImpl()->AppendMessage(new Message(this, aIndex, aValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
AudioNodeStream::SetThreeDPointParameter(uint32_t aIndex, const ThreeDPoint& aValue)
|
||||||
|
{
|
||||||
|
class Message : public ControlMessage {
|
||||||
|
public:
|
||||||
|
Message(AudioNodeStream* aStream, uint32_t aIndex, const ThreeDPoint& aValue)
|
||||||
|
: ControlMessage(aStream), mValue(aValue), mIndex(aIndex) {}
|
||||||
|
virtual void Run()
|
||||||
|
{
|
||||||
|
static_cast<AudioNodeStream*>(mStream)->Engine()->
|
||||||
|
SetThreeDPointParameter(mIndex, mValue);
|
||||||
|
}
|
||||||
|
ThreeDPoint mValue;
|
||||||
|
uint32_t mIndex;
|
||||||
|
};
|
||||||
|
|
||||||
|
MOZ_ASSERT(this);
|
||||||
|
GraphImpl()->AppendMessage(new Message(this, aIndex, aValue));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
AudioNodeStream::SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aBuffer)
|
AudioNodeStream::SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aBuffer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,10 @@
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
namespace dom {
|
||||||
|
struct ThreeDPoint;
|
||||||
|
}
|
||||||
|
|
||||||
class ThreadSharedFloatArrayBufferList;
|
class ThreadSharedFloatArrayBufferList;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,6 +58,7 @@ public:
|
||||||
void SetDoubleParameter(uint32_t aIndex, double aValue);
|
void SetDoubleParameter(uint32_t aIndex, double aValue);
|
||||||
void SetInt32Parameter(uint32_t aIndex, int32_t aValue);
|
void SetInt32Parameter(uint32_t aIndex, int32_t aValue);
|
||||||
void SetTimelineParameter(uint32_t aIndex, const dom::AudioParamTimeline& aValue);
|
void SetTimelineParameter(uint32_t aIndex, const dom::AudioParamTimeline& aValue);
|
||||||
|
void SetThreeDPointParameter(uint32_t aIndex, const dom::ThreeDPoint& aValue);
|
||||||
void SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aBuffer);
|
void SetBuffer(already_AddRefed<ThreadSharedFloatArrayBufferList> aBuffer);
|
||||||
|
|
||||||
virtual AudioNodeStream* AsAudioNodeStream() { return this; }
|
virtual AudioNodeStream* AsAudioNodeStream() { return this; }
|
||||||
|
|
|
@ -54,6 +54,7 @@ EXPORTS_mozilla/dom := \
|
||||||
|
|
||||||
EXPORTS := \
|
EXPORTS := \
|
||||||
MediaBufferDecoder.h \
|
MediaBufferDecoder.h \
|
||||||
|
ThreeDPoint.h \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
FORCE_STATIC_LIB := 1
|
FORCE_STATIC_LIB := 1
|
||||||
|
|
Загрузка…
Ссылка в новой задаче