Bug 153828 - [Gstreamer] Add volume and mute support to the WebRTC mediaplayer
Summary: [Gstreamer] Add volume and mute support to the WebRTC mediaplayer
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on: 153541 164817
  Show dependency treegraph
Reported: 2016-02-03 03:58 PST by Alejandro G. Castro
Modified: 2016-11-21 01:39 PST (History)
2 users (show)

See Also:

[OpenWebRTC] audio mute/volume support (4.94 KB, patch)
2016-11-14 09:03 PST, Philippe Normand
darin: review+
Details | Formatted Diff | Diff
patch for landing (9.04 KB, patch)
2016-11-14 23:54 PST, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro G. Castro 2016-02-03 03:58:34 PST
Current mediaplayer implementation does not support volume or mute.
Comment 1 Philippe Normand 2016-08-30 06:06:37 PDT
An OpenWebRTC patch is likely needed for this, see for instance https://github.com/EricssonResearch/openwebrtc/pull/572
Comment 2 Philippe Normand 2016-11-14 09:03:42 PST
Created attachment 294703 [details]
[OpenWebRTC] audio mute/volume support

Please note this depends on a OpenWebRTC patch not upstream yet.
Comment 3 Philippe Normand 2016-11-14 09:04:05 PST
See also https://github.com/EricssonResearch/openwebrtc/pull/657
Comment 4 Darin Adler 2016-11-14 09:33:16 PST
Comment on attachment 294703 [details]
[OpenWebRTC] audio mute/volume support

View in context: https://bugs.webkit.org/attachment.cgi?id=294703&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:108
> +    if (!m_audioTrack)
> +        return;
> +
> +

Extra blank line here.

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:109
> +    auto realTimeMediaSource = reinterpret_cast<RealtimeMediaSourceOwr*>(&m_audioTrack->source());

Having to use reinterpret_cast is usually a major danger sign; is there a way to use static_cast in the three places in this file instead?

I suggest making this be a reference instead of a pointer:

    auto& realTimeMediaSource = *some_kind_of_cast<RealtimeMediaSourceOwr&>(m_audioTrack->source());

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:77
> +    void setVolume(float) override;
> +    void setMuted(bool) override;

final instead of override?
Comment 5 Philippe Normand 2016-11-14 23:54:54 PST
Created attachment 294821 [details]
patch for landing
Comment 6 Philippe Normand 2016-11-21 01:39:51 PST
Committed r208943: <http://trac.webkit.org/changeset/208943>