After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 462544 - Be compatible with the vlc plugin
Be compatible with the vlc plugin
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Browser plugin (obsolete)
unspecified
Other Linux
: Normal normal
: ---
Assigned To: totem-browser-maint
totem-browser-maint
Depends on: 516653
Blocks: 469568
 
 
Reported: 2007-08-01 17:20 UTC by Vincent Untz
Modified: 2008-02-16 21:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
totem-support-vlc.patch (526 bytes, patch)
2007-08-09 17:20 UTC, Bastien Nocera
none Details | Review
Tarball of the freebox tv web page (33.82 KB, application/x-compressed-tar)
2007-08-30 02:03 UTC, Vincent Untz
  Details
JS stubs (2.50 KB, patch)
2007-09-02 21:23 UTC, Christian Persch
committed Details | Review

Description Vincent Untz 2007-08-01 17:20:10 UTC
Free (french ISP) provides a new service: some tv channels are accessible at http://tv.freebox.fr/ for their customers.

However, on this page, the plugin that is used is the vlc one:

<EMBED pluginspage="http://www.videolan.org"
	type="application/x-vlc-plugin"
	progid="VideoLAN.VLCPlugin.2"
	width="400"
	height="300"
	name="vlc"
	autoplay="yes"
	loop="yes"
	target="logo_freebox.jpg">			</EMBED>

It seems like the plugin should also implement some javascript API or something like this so it can be controlled by the buttons on the webpage (I know nothing about all this, so I can be wrong ;-)). I can provide the webpage if you need it.
Comment 1 Bastien Nocera 2007-08-09 17:20:36 UTC
Created attachment 93378 [details] [review]
totem-support-vlc.patch

Simple patch to make Totem handle the mime-type.
Comment 2 Bastien Nocera 2007-08-09 17:25:18 UTC
We probably need more Javascript than what's supported by the Basic plugin though, so we might need to create a separate plugin.

Vincent, could you go to the website, and check which Javascript-commands are used but unimplemented in the "Javascript console" of Firefox?

I believe this is the "new" API:
http://trac.videolan.org/vlc/browser/trunk/activex/axvlc.idl
With an implementation for Mozilla:
http://trac.videolan.org/vlc/browser/trunk/mozilla/control/npolibvlc.cpp
Comment 3 Bastien Nocera 2007-08-09 17:26:56 UTC
The API mentioned in the docs look quite a bit more straight-forward:
http://www.videolan.org/doc/vlc-user-guide/en/ch07.html#id308026
Comment 4 Vincent Untz 2007-08-09 18:13:32 UTC
Okay, I can't get a full list of commands in the error console of Firefox. But it looks more like what you linked to in comment #2 than the doc you point to in comment #3.

Here's what I can find in the file:
vlc.playlist.stop()
vlc.playlist.items.clear()
vlc.playlist.add()
vlc.playlist.play()
vlc.input.state
vlc.audio.toggleMute()
vlc.audio.volume
vlc.video.toggleFullscreen()

It also checks that VersionInfo is superior than some value (I'd guess 0.8.6, but that's just a guess since I'm a bit tired ;-)).
Comment 5 Vincent Untz 2007-08-10 11:41:27 UTC
I'm wondering... Would it be worth discussing with vlc people and other people doing similar plugins to standardize an API?
Comment 6 Bastien Nocera 2007-08-29 15:45:20 UTC
Here's the first half of the grunt work done. Christian, do you fancy doing the Javascript stubs, or do you want me to take care of it?

Implementing the rest of the API should be pretty easy.

Vincent, could you please upload the HTML/javascript somewhere so I could cook a test page?

2007-08-29  Bastien Nocera  <hadess@hadess.net>

        * browser-plugin/Makefile.am:
        * browser-plugin/idl/Makefile.am:
        * browser-plugin/idl/totemICone.idl:
        * browser-plugin/idl/totemIConeAudio.idl:
        * browser-plugin/idl/totemIConeInput.idl:
        * browser-plugin/idl/totemIConePlaylist.idl:
        * browser-plugin/idl/totemIConeVideo.idl:
        * browser-plugin/totemConePlugin.cpp:
        * browser-plugin/totemConePlugin.h:
        * browser-plugin/totemPlugin.cpp:
        * browser-plugin/totemPluginGlue.h:
        * configure.in: Add the Cone plugin, a plugin to mimic the
        VLC plugin, write IDL files from the web developers 
        documentation available on their site (Helps: #462544)

        * browser-plugin/totemBasicPlugin.h:
        * browser-plugin/totemComplexPlugin.h:
        * browser-plugin/totemGMPError.h:
        * browser-plugin/totemGMPPlugin.h:
        * browser-plugin/totemMullYPlugin.h:
        * browser-plugin/totemNarrowSpacePlugin.h:
        Fix some includes #ifdef
Comment 7 Vincent Untz 2007-08-30 02:03:48 UTC
Created attachment 94587 [details]
Tarball of the freebox tv web page
Comment 8 Christian Persch 2007-09-02 21:23:18 UTC
Created attachment 94828 [details] [review]
JS stubs

Not really useful, but lets the build succeed at least.
Comment 9 Bastien Nocera 2007-09-02 21:37:52 UTC
(In reply to comment #8)
> Created an attachment (id=94828) [edit]
> JS stubs
> 
> Not really useful, but lets the build succeed at least.

Committed. Would you have the time to look at stubs for the other objects as well?
Comment 10 Christian Persch 2007-09-02 21:44:59 UTC
I think we should first look at what that web page actually uses and only implement on-demand. Vincent, could you get the output of the plugin to see which methods it calls ?
Comment 11 Bastien Nocera 2007-09-02 22:02:53 UTC
(In reply to comment #10)
> I think we should first look at what that web page actually uses and only
> implement on-demand. Vincent, could you get the output of the plugin to see
> which methods it calls ?

See comment 4, and the tarball in comment 7 :)
Comment 12 Christian Persch 2007-09-03 19:48:59 UTC
Supporting .playlist isn't going to be easy...
Comment 13 Bastien Nocera 2007-09-03 20:14:28 UTC
You mean the add()? The rest looks pretty straight forward to implement.
Comment 14 Christian Persch 2007-09-03 21:17:37 UTC
Yes. This makes it necessary to transfer the playlist to and from the plugin to the viewer.
Comment 15 Bastien Nocera 2008-02-16 00:02:43 UTC
Lucky vuntz, I went on holidays with somebody with a Freebox TV. The mute button and the play/stop buttons' states can get out of sync because the way the webpage is coded sucks, and I'm also not so certain about the volume handling (VLC uses 0-200, and the web page expects 10 steps increments).

The audio also doesn't seem to play back properly with the current versions of gstreamer and plugins. I'll file a bug about that later on when the plugins have got updated to the latest version (I captured one of the MPEGTS streams with MPEG-4 video and AAC audio).

2008-02-15  Bastien Nocera  <hadess@hadess.net>

	* browser-plugin/org_gnome_totem_PluginViewer.xml:
	* browser-plugin/totem-plugin-viewer-constants.h:
	* browser-plugin/totempluginviewer-marshal.list:
	* browser-plugin/totem-plugin-viewer.c:
	(totem_embedded_class_init), (totem_embedded_save_volume),
	(totem_embedded_stop), (totem_embedded_set_volume),
	(totem_embedded_set_fullscreen),
	(totem_embedded_toggle_fullscreen), (cb_vol), (on_tick),
	(totem_embedded_action_volume_relative),
	(totem_embedded_construct):
	Implement a property change signal when fullscreen state
	or volume changes

	* browser-plugin/totemPlugin.cpp:
	* browser-plugin/totemPlugin.h: As above and implement
	SetFullscreen()

	* browser-plugin/totemComplexPlugin.cpp:
	* browser-plugin/totemComplexPlugin.h:
	* browser-plugin/totemGMPSettings.cpp:
	* browser-plugin/totemGMPSettings.h:
	* browser-plugin/totemNarrowSpacePlugin.cpp:
	* browser-plugin/totemNarrowSpacePlugin.h:
	Fix for changes above

	* browser-plugin/totemConePlugin.cpp:
	* browser-plugin/totemConePlugin.h:
	Implement ToggleFullscreen/ToggleMute, state, mute,
	volume and fullscreen properties

	(Closes: #462544)

2008-02-14  Bastien Nocera  <hadess@hadess.net>

	* browser-plugin/totemConePlugin.cpp:
	* browser-plugin/totemConePlugin.h:
	Implement stubs for the Audio and Video objects

	* src/backend/bacon-video-widget-gst-0.10.c:
	(bacon_video_widget_stop): Fix warning when _stop()
	is called in logo mode

2008-02-14  Bastien Nocera  <hadess@hadess.net>

	* browser-plugin/org_gnome_totem_PluginViewer.xml:
	* browser-plugin/totem-plugin-viewer.c: (totem_pl_item_free),
	(totem_embedded_clear_playlist), (totem_embedded_add_item),
	(totem_embedded_open_uri), (totem_embedded_open_stream),
	(totem_embedded_set_local_file), (totem_embedded_set_playlist),
	(totem_embedded_push_parser):
	* browser-plugin/totemPlugin.h:
	* browser-plugin/totemPlugin.cpp: Implement ClearPlaylist
	and AddItem, to manipulate the playlist

	* browser-plugin/idl/totemIConePlaylist.idl: Fix prototype
	for add

	* browser-plugin/totemConePlugin.cpp: Implement ::Add,
	and ::Clear

	* browser-plugin/totemPluginGlue.cpp: Fix a compilation
	warning

2008-02-13  Bastien Nocera  <hadess@hadess.net>

	* browser-plugin/idl/Makefile.am:
	* browser-plugin/idl/totemIConeAudio.idl:
	* browser-plugin/idl/totemIConeInput.idl:
	* browser-plugin/idl/totemIConePlaylist.idl:
	* browser-plugin/idl/totemIConePlaylistItems.idl:
	* browser-plugin/idl/totemIConeVideo.idl:
	Update the IDL for VLC 0.8.6 and above

	* browser-plugin/totem-plugin-viewer.c: (totem_embedded_open_uri),
	(totem_embedded_open_stream), (totem_embedded_update_menu):
	Add more debug for some remote functions, and try to use
	the stream_uri when it's available

	* browser-plugin/totemConePlugin.cpp:
	* browser-plugin/totemConePlugin.h: Implement stubs for
	Playlist and PlaylistItems objects
Comment 16 Frederic Crozat 2008-02-16 09:02:57 UTC
Bastien, you might want to try to use fluendo MPEG demuxer (if you're not already), since it is supposed to handle MPEG TS in addition to MPEG PS.

http://core.fluendo.com/gstreamer/src/gst-fluendo-mpegdemux/
Comment 17 Bastien Nocera 2008-02-16 09:33:05 UTC
That's already what I was using, couldn't find any other TS demuxers that'd work.
Comment 18 Zaheer Abbas Merali 2008-02-16 21:49:35 UTC
Does the recently released gst-fluendo-mpegdemux 0.10.15 do it for you?