[vlc-devel] [PATCH] Add a libvlc_set_video_output function

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Feb 12 10:18:57 CET 2014


On Wed, Feb 12, 2014 at 10:16 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> On Wed, 12 Feb 2014 00:57:13 +0200, Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> wrote:
>> On Tue, Feb 11, 2014 at 9:20 PM, Rémi Denis-Courmont <remi at remlab.net>
>> wrote:
>>> For video, the problem never existed to begin with. We already have
>>> setters
>>> for the parent window - this also covers monitor selection. And those
>>> setters
>>
>> I'm assuming you're referring to
>> libvlc_media_player_set_{xwindow,hwnd,nsobject}, which indeed are
>> enough for most usages.
>> In my specific case however, I'd like to use the dummy vout in some
>> specific case, which is not possible (unless I missed the proper way
>> to do so), except by setting it globally, using --vout=dummy as
>> libvlc_new's argv parameter.
>
> You can achieve the same thing with output callbacks already. Or you can
> turn off the video track, which is far better. Or you can output to a
> non-visible window, which allows live toggling too.
>

In my use case, no I can't disable video. Having an invisble window
could work, but it feels weird to output to something not shown
instead of disabling.
Using callbacks, hence vmem, is doable, would probably work, but why
would I want to copy frames to not use those afterward?

> Your function has absolutely zero benefits over the libvlc_new() argv
> approach. It is dependent on the platform, version, set of available
> plugins, knowledge of the plugin names, in the exact same way (assuming we
> never rename the "vout" parameter, which we indeed probably never will).
> This is exaxctly how libvlc functions should *not* be.
>

Except the fact that without it it seems impossible to use dummy
output on a specific set of vout, sure it doesn't.

>> This works fine on linux as, when I want to render to a widget, the
>> proper vout is set by libvlc_media_player_set_xwindow. However,
>> neither _set_hwnd nor _set_nsobject are forcing the appropriate vout
>> back, thus leading dummy vout to still be used.
>
> If you think there is a bug, you are welcome to fix it.
>

I don't think it's a bug. I think in 95% of the case if not more, the
user wants to show a video and doesn't care about dummy, or whichever
vout to use, and therefor not enforcing one and letting the usual way
of selecting a plugin works fine, and also allows (why not) to have
multiple vout able to handle rendering to a widget.

Except for the dummy vout, I don't think there's much use for this,
especially since there's no way of listing available vout modules from
libvlc. So could settle for a way to disable video output?

Regards,

-- 
Hugo Beauzée-Luyssen
mail: hugo at beauzee.fr
skype: beauze.h



More information about the vlc-devel mailing list