vlc.MediaOpenCb

class vlc.MediaOpenCb

Bases: ctypes.c_void_p

Callback prototype to open a custom bitstream input media.

The same media item can be opened multiple times. Each time, this callback is invoked. It should allocate and initialize any instance-specific resources, then store them in **datap*. The instance resources can be freed in the MediaCloseCb callback.

Note

For convenience, **datap* is initially None and **sizep* is initially 0.

Parameters:
  • opaque – private pointer as passed to libvlc_media_new_callbacks().

  • datap – storage space for a private data pointer [OUT].

  • sizep – byte length of the bitstream or UINT64_MAX if unknown [OUT].

Returns:

0 on success, non-zero on error. In case of failure, the other. callbacks will not be invoked and any value stored in **datap* and **sizep* is. discarded.

Initialize self. See help(type(self)) for accurate signature.