Changeset 147279 in webkit
- Timestamp:
- Mar 30, 2013 6:08:24 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r147278 r147279 1 2013-03-30 Philippe Normand <pnormand@igalia.com> 2 3 [GTK] Should use GStreamer codec installation infrastructure 4 https://bugs.webkit.org/show_bug.cgi?id=34085 5 6 Reviewed by Martin Robinson. 7 8 Initial support for the GStreamer codec installer. The player will 9 handle missing-plugins messages and use the pbutils codec 10 installer facilities to install the missing GStreamer 11 plugins. Once the plugins are installed reset the pipeline state. 12 13 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 14 (WebCore::mediaPlayerPrivatePluginInstallerResultFunction): This 15 method is used to notify the player that the missing plugins were installed. 16 (WebCore): 17 (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer): 18 (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ignore 19 errors while installing plugins and handle the missing-plugin message. 20 (WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult): 21 This method is invoked after the installer finished its task. 22 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: 23 (MediaPlayerPrivateGStreamer): 24 1 25 2013-03-30 Praveen R Jadhav <praveen.j@samsung.com> 2 26 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
r147206 r147279 38 38 #include "WebKitWebSourceGStreamer.h" 39 39 #include <gst/gst.h> 40 #include <gst/pbutils/missing-plugins.h> 40 41 #include <limits> 41 42 #include <wtf/gobject/GOwnPtr.h> … … 130 131 player->notifyPlayerOfVideo(); 131 132 return FALSE; 133 } 134 135 static void mediaPlayerPrivatePluginInstallerResultFunction(GstInstallPluginsReturn result, gpointer userData) 136 { 137 MediaPlayerPrivateGStreamer* player = reinterpret_cast<MediaPlayerPrivateGStreamer*>(userData); 138 player->handlePluginInstallerResult(result); 132 139 } 133 140 … … 213 220 , m_preservesPitch(false) 214 221 , m_requestedState(GST_STATE_VOID_PENDING) 222 , m_missingPlugins(false) 215 223 { 216 224 } … … 686 694 case GST_MESSAGE_ERROR: 687 695 if (m_resetPipeline) 696 break; 697 if (m_missingPlugins) 688 698 break; 689 699 gst_message_parse_error(message, &err.outPtr(), &debug.outPtr()); … … 766 776 } 767 777 break; 778 case GST_MESSAGE_ELEMENT: 779 if (gst_is_missing_plugin_message(message)) { 780 char* detail = gst_missing_plugin_message_get_installer_detail(message); 781 GstInstallPluginsReturn result = gst_install_plugins_async(&detail, 0, mediaPlayerPrivatePluginInstallerResultFunction, this); 782 m_missingPlugins = result == GST_INSTALL_PLUGINS_STARTED_OK; 783 } 784 break; 768 785 default: 769 786 LOG_MEDIA_MESSAGE("Unhandled GStreamer message type: %s", … … 772 789 } 773 790 return TRUE; 791 } 792 793 void MediaPlayerPrivateGStreamer::handlePluginInstallerResult(GstInstallPluginsReturn result) 794 { 795 m_missingPlugins = false; 796 if (result == GST_INSTALL_PLUGINS_SUCCESS) { 797 gst_element_set_state(m_playBin.get(), GST_STATE_READY); 798 gst_element_set_state(m_playBin.get(), GST_STATE_PAUSED); 799 } 774 800 } 775 801 -
trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h
r146770 r147279 31 31 #include <glib.h> 32 32 #include <gst/gst.h> 33 #include <gst/pbutils/install-plugins.h> 33 34 #include <wtf/Forward.h> 34 35 … … 44 45 static void registerMediaEngine(MediaEngineRegistrar); 45 46 gboolean handleMessage(GstMessage*); 47 void handlePluginInstallerResult(GstInstallPluginsReturn); 46 48 47 49 bool hasVideo() const { return m_hasVideo; } … … 163 165 GstState m_requestedState; 164 166 GRefPtr<GstElement> m_autoAudioSink; 167 bool m_missingPlugins; 165 168 }; 166 169 }
Note: See TracChangeset
for help on using the changeset viewer.