[vlc-devel] [PATCH] video_output: add support for Flaschen-Taschen screen protocol

François Revol revol at free.fr
Sun Jul 10 23:43:48 CEST 2016


Hi,

On 19/06/2016 08:56, Rémi Denis-Courmont wrote:
>> +        uint8_t *dst =uint8_t *)buffer + header_len;
>> +        uint8_t *src =icture->p->p_pixels;
>> +        unsigned int l, c;
>> +        for (l =; l < vd->fmt.i_height; l++)
>> +        {
>> +            for (c =; c < vd->fmt.i_width; c++)
>> +            {
>> +                uint8_t *d =dst[c*3];
>> +                uint8_t *s =src[c*3];
>> +                d[0] =[0];
>> +                d[1] =[1];
>> +                d[2] =[2];
>> +            }
>> +            dst +=d->fmt.i_width * 3;
>> +            src +=icture->p->i_pitch;
>> +        }
> 
> Memory copy is lame. Use struct iovec.

I rewrote that part, but...

It seems like mingw still lacks both writev and sendmsg :-(
I'd really like to get this to work on win32 as well.

There seems to be some vlc_sendmsg() #ifdef-ed out for win32.

I'd propose to add a net_Writev() call that'd fall back properly for
win32. This wouldn't imply any support for ancillary data and other
things that can't be done.

Also, it might be interesting to test this on a big-endian machine, it
might need some adjustment for the RGB bitmask.

>> +    switch (query) {
>> +    case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
>> +        /* We have to ignore what is requested */
>> +        vout_display_SendEventPicturesInvalid(vd);
> 
> Why do you invalidate?
> 
>> +        return VLC_SUCCESS;
>> +
>> +    case VOUT_DISPLAY_RESET_PICTURES:
>> +        if (sys->pool)
>> +            picture_pool_Release(sys->pool);
>> +        sys->pool =ULL;
>> +
>> +        vd->fmt.i_width  =ar_InheritInteger(vd, "flaschen-width");
>> +        vd->fmt.i_height =ar_InheritInteger(vd, "flaschen-height");
>> +        return VLC_SUCCESS;
> 
> Seems useless?

I just removed that all and it seems to still work.


François.


More information about the vlc-devel mailing list