callbacks.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:desktop-stream-viewer 作者: AbiosGaming 项目源码 文件源码
def media_open_cb(opaque, datap, sizep):
    """LibVLC callback used to point the player to the video buffer upon opening
    the media.

    opaque: pointer to our media object.
    datap:  the libVLC video buffer.
    sizep:  length of the media stream (or sys.maxsize if unknown).
    """

    datap.contents.value = opaque
    sizep.contents.value = sys.maxsize

    container = ctypes.cast(opaque, ctypes.POINTER(
        ctypes.py_object)).contents.value

    return container.open()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号