[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

Mashomii diaxa at qq.com
Mon Dec 21 11:34:20 UTC 2020


Thank you all for your attention!
I'll do as suggested.



---Original---
From: "Hugo Beauzée-Luyssen"<hugo at beauzee.fr>
Date: Mon, Dec 21, 2020 18:29 PM
To: "Mailing list for VLC media player developers"<vlc-devel at videolan.org>;
Subject: Re: [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




On Mon, Dec 21, 2020, at 11:19 AM, Alexandre Janniaux wrote:
> Hi,
> 
> ssize_t (and size_t iirc) are not defined by msvc headers,

AFAIR size_t is not an issue, but indeed ssize_t is

> 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.
> 

#include <basetsd.h>
typedef SSIZE_T ssize_t;

is what we usually use

> 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,&nbsp; 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
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201221/fdde9b8f/attachment.html>


More information about the vlc-devel mailing list