[vlc-devel] vlc plugin and attachment:// URIs

Rafał Chłodnicki rchl2k at gmail.com
Tue Jul 21 10:40:34 CEST 2009


On Tue, Jul 21, 2009 at 3:22 AM, Rafaël Carré<rafael.carre at gmail.com> wrote:
> On Tue, 21 Jul 2009 01:22:01 +0200
> "Rafal Chlodnicki" <rchl2k at gmail.com> wrote:
>
>> But, after making the fix to add fname instead (which looks like
>> this: "c:\OperaBeta\build10.00.1642\profile\cache\opr0006W"), file
>> still does not play for me. I'm not yet sure why, maybe plugin
>> doesn't recognize the path as it expects it in localhost:// scheme?
>> I'm not yet sure but will eventually check that.
>
> You should make sure you feed an URI to vlc
> (somethign like "file:///c/operabeta/foo%bar.avi").
>
> make_URI(fname) can do that for you

Thanks.
But that is not the exact reason why it fails. Plugin will play the
file even without converting the path.

Problem is of other kind.

When we open ogg attachment in Opera, this happens (for attachment:/34/file.ogg)
1. Page with <embed src=""> opens
2. Plugin gets file address through SRC attribute but it does not get
empty attribute because browser resolves empty SRC to document address
(attachment:/34/file.ogg). Expected behavior
3. Plugin adds this to playlist and tries to play but fails
4. Browser also creates stream and notifies plugin about it with
NPP_StreamAsFile
5. Plugin gets the address of stream and tries to play it

Point 5 fails because 3 failed. It seems that first address that was
added to playlist prevents second one from playing.

Plugin uses p_plugin->playlist_add() to add to playlist and
p_plugin->playlist_play() to play it. Maybe it should automatically
remove item from playlist when playing fails or return bool from
playlist_play to notify about problem so that plugin can remove
failing item by itself?

Same happens when embedding on pages using this way:
<embed src="" data="file.ogg" type="application/x-ogg">



More information about the vlc-devel mailing list