[vlc-devel] [PATCH] Add a libvlc_set_video_output function
remi at remlab.net
Wed Feb 12 23:06:19 CET 2014
Le mercredi 12 février 2014, 23:10:10 Hugo Beauzée-Luyssen a écrit :
> I beg to differ since there's no way to do what I want right now
Your patch does not work either since it makes unwarranted assumptions about
the dummy vout...
> (without rendering to a hidden widget, or into some ephemeral buffers)
> It might be seen as a hack, though using vmem as a way to disable any
> kind of rendering to a window/widget also is.
...unlike vmem. Yes, using vmem to discard the video signal is a hack and I
would hate it in my code. Likewise, setting vout to dummy is a hack and I
would dislike it in LibVLC code.
> Yes it does things unrelated to a media player, that's because I'm not
> writing a media player.
The libvlc_media_player_t is not meant to snapshot a video. It is meant to
play it, and optionally generate snapshots as it plays.
> Quoting https://wiki.videolan.org/LibVLC/,
> «The libVLC (VLC SDK) media framework can be embedded into an
> application to get multimedia capabilities.». Those capabilities being
> getting some video informations such as width/height/fps, grabbing a
> snapshot, among other things.
It is a media PLAYBACK framework so far. If you want to extend it cleanly, you
can, but I fail to see how this fits with the media player part.
> > No. LibVLC is enough bloated and confusing as it is, I do not want that
> > kind of hacks. There has to be a sanity limit somewhere and this would be
> > an absolutely terrible precedent.
> So what about the alternative from the original propose? Providing a
> way to "disable" video output (so actually using the dummy one
I fail to see how disabling video explicitly would be a hack. Selecting a
video output instead of disabling video is a hack, but that is quite different
in terms of API design.
Disabling video would make a lot of sense to build an audio player without
wasting CPU and memory on the video, and still fit the purpose of the LibVLC
media player object. (Obviously, snapshots will not work.)
More information about the vlc-devel