[Webkit-unassigned] [Bug 34318] [GStreamer] Should show an error to the user if something goes wrong

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 7 04:48:05 PST 2010


https://bugs.webkit.org/show_bug.cgi?id=34318


Philippe Normand <pnormand at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gns at gnome.org




--- Comment #7 from Philippe Normand <pnormand at igalia.com>  2010-12-07 04:48:05 PST ---
After discussing with Gustavo during the WebKitGTK+ hackfest, here is a proposed plan (I hope I got it right :D).

At WebKit level we'd like to be notified of the MediaPlayer various state changes, errors and so on. The idea is to add a new class in WebCore called MediaPlayerPlatformClient, attached to the MediaPlayer. In the case of the GTK+ port there would be a WebMediaPlayerClientGtk in WebCoreSupport which would create a GObject that can be delivered by a WebView signal each time a new MediaPlayer is created.

Here's a dump of my notes about the proposed changes:

WebCore
=======

MediaPlayer:
------------

  when created get the ChromeClient and call ::mediaPlayerCreated()

  public:
    MediaPlayerPlatformClient* platformClient() const;

  private:
    MediaPlayerPlatformClient* m_platformClient;

ChromeClient:
-------------

virtual mediaPlayerCreated(Frame*, MediaPlayer*);

MediaPlayerPlatformClient:
--------------------------

#if ENABLE(GLIB_SUPPORT)
  handleError(GError*) { m_client->handleError(err) }
  handleInfo(...)
  handleWarning(...)
#endif

  volume notifications
  state notifications
  ... like MediaPlayer API

  created(Frame*);

  private:
    MediaPlayer* m_player;



MediaPlayerPrivateGStreamer:
----------------------------

example use-case:

  m_player->platformClient()->handleError(err)

WebKit/gtk/WebCoreSupport
=========================

ChromeClientGtk:
----------------

mediaPlayerCreated(Frame*, MediaPlayer*) {
   playerClient = new WebKitMediaPlayerClient();
   mediaPlayer->platformClient()->setWebKitMediaPlayerPlatformClient(playerClient);
   g_signal_emit(webView, "media-player-created", playerClient);
}



WebMediaPlayerClientGtk:
------------------------

  public:
    setWebKitMediaPlayerPlatformClient(WebKitMediaPlayerClient*);
    handleError(GError*) { g_signal_emit(m_webkitMediaPlayerClient, "error", ...); }

  private:
    WebKitMediaPlayerClient* m_webkitMediaPlayerClient;

WebKit/gtk/webkit
=================

WebKitMediaPlayerClient:
 Signals:
   void error (GObject *o, GError *error, const gchar *debug)
   void warning (GObject *o, GError *error, const gchar *debug)
   void info (GObject *o, GError *error, const gchar *debug)


WebKitWebView:
 Signal:
  media-player-created(WebKitMediaPlayerClient*)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list