[vlc-devel] how can i change ssize_t in "typedef ssize_t (*libvlc_media_read_cb)(void *opaque, unsigned char *buf, size_t len); " to compile in vs2019

Alexandre Janniaux ajanni at videolabs.io
Mon Dec 21 10:19:02 UTC 2020


Hi,

ssize_t (and size_t iirc) are not defined by msvc headers,
but the Windows SDK defines SIZE_T and SSIZE_T, so you can
typedef/define them when compiling with MSVC, before
including VLC headers.

Other windows developers might have a more precise code
snippet but I fear they might be unavailable currently.

Regards,
--
Alexandre Janniaux
Videolabs

On Mon, Dec 21, 2020 at 01:31:32PM +0800, Mashomii wrote:
> Hello Everyone!
> I've been using the excellent VLC sdk to display a RTSP stream in a winform application.
>
>
> The callback declaration
>
> "typedef ssize_t (*libvlc_media_read_cb)(void *opaque, unsigned char *buf,  size_t len);"
> in header file
>
> "vlc-3.0.11-win32\vlc-3.0.11\sdk\include\vlc\libvlc_media.h"
> doesn't compile in VS2019.
>
>
> It seems the "ssize_t" doesn't exits on vc++ compiler headers.
>
>
> How should I change the type "ssize_t" to using the sdk?

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list