vlc.MediaReadCb
- class vlc.MediaReadCb
Bases:
ctypes.c_void_pCallback prototype to read data from a custom bitstream input media.
Note
If no data is immediately available, then the callback should sleep.
Warning
The application is responsible for avoiding deadlock situations. In particular, the callback should return an error if playback is stopped; if it does not return, then
libvlc_media_player_stop()will never return.- Parameters:
opaque – private pointer as set by the
MediaOpenCb. callback.buf – start address of the buffer to read data into.
len – bytes length of the buffer.
- Returns:
strictly positive number of bytes read, 0 on end-of-stream, or -1 on non-recoverable error.
Initialize self. See help(type(self)) for accurate signature.