Beispiel #1
0
from weakref import ref
from kivy.core.video import VideoBase

# install the gobject iteration
from kivy.support import install_gobject_iteration
install_gobject_iteration()

BUF_SAMPLE = 'buffer'
_VIDEO_CAPS = ','.join([
    'video/x-raw-rgb',
    'red_mask=(int)0xff0000',
    'green_mask=(int)0x00ff00',
    'blue_mask=(int)0x0000ff'])

if not PY2:
    gst.init(None)
    gst.STATE_NULL = gst.State.NULL
    gst.STATE_READY = gst.State.READY
    gst.STATE_PLAYING = gst.State.PLAYING
    gst.STATE_PAUSED = gst.State.PAUSED
    gst.FORMAT_TIME = gst.Format.TIME
    gst.SEEK_FLAG_FLUSH = gst.SeekFlags.KEY_UNIT
    gst.SEEK_FLAG_KEY_UNIT = gst.SeekFlags.KEY_UNIT
    gst.MESSAGE_ERROR = gst.MessageType.ERROR
    BUF_SAMPLE = 'sample'

    _VIDEO_CAPS = ','.join([
        'video/x-raw',
        'format=RGB',
        'red_mask=(int)0xff0000',
        'green_mask=(int)0x00ff00',
Beispiel #2
0
from functools import partial
from weakref import ref
from kivy.core.video import VideoBase

# install the gobject iteration
from kivy.support import install_gobject_iteration
install_gobject_iteration()

BUF_SAMPLE = 'buffer'
_VIDEO_CAPS = ','.join([
    'video/x-raw-rgb', 'red_mask=(int)0xff0000', 'green_mask=(int)0x00ff00',
    'blue_mask=(int)0x0000ff'
])

if not PY2:
    gst.init(None)
    gst.STATE_NULL = gst.State.NULL
    gst.STATE_READY = gst.State.READY
    gst.STATE_PLAYING = gst.State.PLAYING
    gst.STATE_PAUSED = gst.State.PAUSED
    gst.FORMAT_TIME = gst.Format.TIME
    gst.SEEK_FLAG_FLUSH = gst.SeekFlags.KEY_UNIT
    gst.SEEK_FLAG_KEY_UNIT = gst.SeekFlags.KEY_UNIT
    gst.MESSAGE_ERROR = gst.MessageType.ERROR
    BUF_SAMPLE = 'sample'

    _VIDEO_CAPS = ','.join([
        'video/x-raw', 'format=RGB', 'red_mask=(int)0xff0000',
        'green_mask=(int)0x00ff00', 'blue_mask=(int)0x0000ff'
    ])