WebRTC: OWR: Add support for the muted state in the mediaplayer
authoralex@webkit.org <alex@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Aug 2016 09:26:16 +0000 (09:26 +0000)
committeralex@webkit.org <alex@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Aug 2016 09:26:16 +0000 (09:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=160502

Modified the load, play and stop methods to handle the new
situation where the mediaSource could be empty, until the remote
side sends the information to create the receiver.

Reviewed by Philippe Normand.

No new tests, we need to upstream the owr endpoint to check this
situation.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
(WebCore::MediaPlayerPrivateGStreamerOwr::play): Check the muted
state of the tracks if required, we do it using the new
maybeHandleChangeMutedState function.
(WebCore::MediaPlayerPrivateGStreamerOwr::load): Add always the
observer of the track to check when it is unmuted, and we delay
enabling/setting the source until the play or the unmute.
(WebCore::MediaPlayerPrivateGStreamerOwr::internalLoad): Removed,
we now do all in the load method.
(WebCore::MediaPlayerPrivateGStreamerOwr::stop): Remove the
mediasource when disabling. Removed the m_stopped state, it was
there because the internalLoad was called multiple times.
(WebCore::MediaPlayerPrivateGStreamerOwr::trackMutedChanged):
Check the muted state and handle it, we use the new method
maybeHandleChangeMutedState.
(WebCore::MediaPlayerPrivateGStreamerOwr::maybeHandleChangeMutedState):
Check if the track is muted or not, in case it is muted disable
the the renderer and remove its mediasource. If it is not muted
enable the renderer and set the mediasource.
(WebCore::MediaPlayerPrivateGStreamerOwr::createVideoSink): Move
the workaround for the renderer to this method when it is created.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
Removed internalLoad method and the m_stopped attribute used to
call internalLoad multiple times.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204118 268f45cc-cd09-0410-ab3c-d52691b4dbfc


No differences found