зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1216417 - Add logging for audio and video output changes in MSG. r=roc
--HG-- extra : commitid : 22iTDWGdkKT extra : rebase_source : fe30f433900b8e685f6c1d525c1b279babbb8079
This commit is contained in:
Родитель
72945ba2fb
Коммит
cd79c1257d
|
@ -585,6 +585,8 @@ MediaStreamGraphImpl::CreateOrDestroyAudioStreams(MediaStream* aStream)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STREAM_LOG(LogLevel::Debug, ("Updating AudioOutputStreams for MediaStream %p", aStream));
|
||||||
|
|
||||||
nsAutoTArray<bool,2> audioOutputStreamsFound;
|
nsAutoTArray<bool,2> audioOutputStreamsFound;
|
||||||
for (uint32_t i = 0; i < aStream->mAudioOutputStreams.Length(); ++i) {
|
for (uint32_t i = 0; i < aStream->mAudioOutputStreams.Length(); ++i) {
|
||||||
audioOutputStreamsFound.AppendElement(false);
|
audioOutputStreamsFound.AppendElement(false);
|
||||||
|
@ -1805,9 +1807,19 @@ MediaStream::SetAudioOutputVolume(void* aKey, float aVolume)
|
||||||
GraphImpl()->AppendMessage(new Message(this, aKey, aVolume));
|
GraphImpl()->AppendMessage(new Message(this, aKey, aVolume));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MediaStream::AddAudioOutputImpl(void* aKey)
|
||||||
|
{
|
||||||
|
STREAM_LOG(LogLevel::Info, ("MediaStream %p Adding AudioOutput for key %p",
|
||||||
|
this, aKey));
|
||||||
|
mAudioOutputs.AppendElement(AudioOutput(aKey));
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MediaStream::RemoveAudioOutputImpl(void* aKey)
|
MediaStream::RemoveAudioOutputImpl(void* aKey)
|
||||||
{
|
{
|
||||||
|
STREAM_LOG(LogLevel::Info, ("MediaStream %p Removing AudioOutput for key %p",
|
||||||
|
this, aKey));
|
||||||
for (uint32_t i = 0; i < mAudioOutputs.Length(); ++i) {
|
for (uint32_t i = 0; i < mAudioOutputs.Length(); ++i) {
|
||||||
if (mAudioOutputs[i].mKey == aKey) {
|
if (mAudioOutputs[i].mKey == aKey) {
|
||||||
mAudioOutputs.RemoveElementAt(i);
|
mAudioOutputs.RemoveElementAt(i);
|
||||||
|
@ -1833,6 +1845,26 @@ MediaStream::RemoveAudioOutput(void* aKey)
|
||||||
GraphImpl()->AppendMessage(new Message(this, aKey));
|
GraphImpl()->AppendMessage(new Message(this, aKey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MediaStream::AddVideoOutputImpl(already_AddRefed<VideoFrameContainer> aContainer)
|
||||||
|
{
|
||||||
|
RefPtr<VideoFrameContainer> container = aContainer;
|
||||||
|
STREAM_LOG(LogLevel::Info, ("MediaStream %p Adding VideoFrameContainer %p as output",
|
||||||
|
this, container.get()));
|
||||||
|
*mVideoOutputs.AppendElement() = container.forget();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MediaStream::RemoveVideoOutputImpl(VideoFrameContainer* aContainer)
|
||||||
|
{
|
||||||
|
STREAM_LOG(LogLevel::Info, ("MediaStream %p Removing VideoFrameContainer %p as output",
|
||||||
|
this, aContainer));
|
||||||
|
// Ensure that any frames currently queued for playback by the compositor
|
||||||
|
// are removed.
|
||||||
|
aContainer->ClearFutureFrames();
|
||||||
|
mVideoOutputs.RemoveElement(aContainer);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MediaStream::AddVideoOutput(VideoFrameContainer* aContainer)
|
MediaStream::AddVideoOutput(VideoFrameContainer* aContainer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -440,27 +440,15 @@ public:
|
||||||
void DumpTrackInfo() { return mBuffer.DumpTrackInfo(); }
|
void DumpTrackInfo() { return mBuffer.DumpTrackInfo(); }
|
||||||
#endif
|
#endif
|
||||||
void SetAudioOutputVolumeImpl(void* aKey, float aVolume);
|
void SetAudioOutputVolumeImpl(void* aKey, float aVolume);
|
||||||
void AddAudioOutputImpl(void* aKey)
|
void AddAudioOutputImpl(void* aKey);
|
||||||
{
|
|
||||||
mAudioOutputs.AppendElement(AudioOutput(aKey));
|
|
||||||
}
|
|
||||||
// Returns true if this stream has an audio output.
|
// Returns true if this stream has an audio output.
|
||||||
bool HasAudioOutput()
|
bool HasAudioOutput()
|
||||||
{
|
{
|
||||||
return !mAudioOutputs.IsEmpty();
|
return !mAudioOutputs.IsEmpty();
|
||||||
}
|
}
|
||||||
void RemoveAudioOutputImpl(void* aKey);
|
void RemoveAudioOutputImpl(void* aKey);
|
||||||
void AddVideoOutputImpl(already_AddRefed<VideoFrameContainer> aContainer)
|
void AddVideoOutputImpl(already_AddRefed<VideoFrameContainer> aContainer);
|
||||||
{
|
void RemoveVideoOutputImpl(VideoFrameContainer* aContainer);
|
||||||
*mVideoOutputs.AppendElement() = aContainer;
|
|
||||||
}
|
|
||||||
void RemoveVideoOutputImpl(VideoFrameContainer* aContainer)
|
|
||||||
{
|
|
||||||
// Ensure that any frames currently queued for playback by the compositor
|
|
||||||
// are removed.
|
|
||||||
aContainer->ClearFutureFrames();
|
|
||||||
mVideoOutputs.RemoveElement(aContainer);
|
|
||||||
}
|
|
||||||
void AddListenerImpl(already_AddRefed<MediaStreamListener> aListener);
|
void AddListenerImpl(already_AddRefed<MediaStreamListener> aListener);
|
||||||
void RemoveListenerImpl(MediaStreamListener* aListener);
|
void RemoveListenerImpl(MediaStreamListener* aListener);
|
||||||
void RemoveAllListenersImpl();
|
void RemoveAllListenersImpl();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче