Changeset 78571 in webkit
- Timestamp:
- Feb 15, 2011 8:59:06 AM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r78569 r78571 1 2011-02-15 Philippe Normand <pnormand@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GStreamer] Video player sets system volume to 100% 6 https://bugs.webkit.org/show_bug.cgi?id=54140 7 8 Don't explicitely set volume at startup and use the 9 GstStreamVolume interface with cubic volume scale when 10 updating/retrieving the volume value. This gives a much better 11 user-experience. 12 13 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 14 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): 15 1 16 2011-02-15 Adam Barth <abarth@webkit.org> 2 17 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r77494 r78571 47 47 #include <GOwnPtr.h> 48 48 #include <gst/gst.h> 49 #include <gst/interfaces/streamvolume.h> 49 50 #include <gst/video/video.h> 50 51 #include <limits> … … 641 642 return; 642 643 643 g_object_set(m_playBin, "volume", static_cast<double>(volume), NULL); 644 gst_stream_volume_set_volume(GST_STREAM_VOLUME(m_playBin), GST_STREAM_VOLUME_FORMAT_CUBIC, 645 static_cast<double>(volume)); 644 646 } 645 647 … … 651 653 return; 652 654 double volume; 653 g_object_get(m_playBin, "volume", &volume, NULL); 655 volume = gst_stream_volume_get_volume(GST_STREAM_VOLUME(m_playBin), GST_STREAM_VOLUME_FORMAT_CUBIC); 656 // get_volume() can return values superior to 1.0 if the user 657 // applies software user gain via third party application (GNOME 658 // volume control for instance). 659 volume = CLAMP(volume, 0.0, 1.0); 654 660 m_player->volumeChanged(static_cast<float>(volume)); 655 661 } … … 1562 1568 gst_object_unref(bus); 1563 1569 1564 g_object_set(m_playBin, "mute", m_player->muted(), "volume", m_player->volume(),NULL);1570 g_object_set(m_playBin, "mute", m_player->muted(), NULL); 1565 1571 1566 1572 g_signal_connect(m_playBin, "notify::volume", G_CALLBACK(mediaPlayerPrivateVolumeChangedCallback), this);
Note: See TracChangeset
for help on using the changeset viewer.