How to use the ffpyplayer.tools.set_log_callback function in ffpyplayer

To help you get started, we’ve selected a few ffpyplayer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BillBillBillBill / Tickeys-linux / tickeys / kivy / core / audio / audio_ffpyplayer.py View on Github external
def __del__(self):
        self.unload()
        if self._log_callback_set:
            set_log_callback(None)
github kivy / kivy / kivy / core / audio / audio_ffpyplayer.py View on Github external
def __del__(self):
        self.unload()
        if self._log_callback_set:
            set_log_callback(None)
github BillBillBillBill / Tickeys-linux / tickeys / kivy / core / video / video_ffpyplayer.py View on Github external
def __del__(self):
        self.unload()
        if self._log_callback_set:
            set_log_callback(None)
github BillBillBillBill / Tickeys-linux / tickeys / kivy / core / video / video_ffpyplayer.py View on Github external
Logger.info('VideoFFPy: Using ffpyplayer {}'.format(ffpyplayer.version))


logger_func = {'quiet': Logger.critical, 'panic': Logger.critical,
               'fatal': Logger.critical, 'error': Logger.error,
               'warning': Logger.warning, 'info': Logger.info,
               'verbose': Logger.debug, 'debug': Logger.debug}


def _log_callback(message, level):
    message = message.strip()
    if message:
        logger_func[level]('ffpyplayer: {}'.format(message))

if not get_log_callback():
    set_log_callback(_log_callback)


class VideoFFPy(VideoBase):

    YUV_RGB_FS = """
    $HEADER$
    uniform sampler2D tex_y;
    uniform sampler2D tex_u;
    uniform sampler2D tex_v;

    void main(void) {
        float y = texture2D(tex_y, tex_coord0).r;
        float u = texture2D(tex_u, tex_coord0).r - 0.5;
        float v = texture2D(tex_v, tex_coord0).r - 0.5;
        float r = y +             1.402 * v;
        float g = y - 0.344 * u - 0.714 * v;
github kivy / kivy / kivy / core / video / video_ffpyplayer.py View on Github external
logger_func = {'quiet': Logger.critical, 'panic': Logger.critical,
               'fatal': Logger.critical, 'error': Logger.error,
               'warning': Logger.warning, 'info': Logger.info,
               'verbose': Logger.debug, 'debug': Logger.debug}


def _log_callback(message, level):
    message = message.strip()
    if message:
        logger_func[level]('ffpyplayer: {}'.format(message))


if not get_log_callback():
    set_log_callback(_log_callback)


class VideoFFPy(VideoBase):

    YUV_RGB_FS = """
    $HEADER$
    uniform sampler2D tex_y;
    uniform sampler2D tex_u;
    uniform sampler2D tex_v;

    void main(void) {
        float y = texture2D(tex_y, tex_coord0).r;
        float u = texture2D(tex_u, tex_coord0).r - 0.5;
        float v = texture2D(tex_v, tex_coord0).r - 0.5;
        float r = y +             1.402 * v;
        float g = y - 0.344 * u - 0.714 * v;
github kivy / kivy / kivy / core / image / img_ffpyplayer.py View on Github external
Logger.info('ImageLoaderFFPy: Using ffpyplayer {}'.format(ffpyplayer.version))


logger_func = {'quiet': Logger.critical, 'panic': Logger.critical,
               'fatal': Logger.critical, 'error': Logger.error,
               'warning': Logger.warning, 'info': Logger.info,
               'verbose': Logger.debug, 'debug': Logger.debug}


def _log_callback(message, level):
    message = message.strip()
    if message:
        logger_func[level]('ffpyplayer: {}'.format(message))

if not get_log_callback():
    set_log_callback(_log_callback)


class ImageLoaderFFPy(ImageLoaderBase):
    '''Image loader based on the ffpyplayer library.

    .. versionadded:: 1.9.0

    .. note:
        This provider may support more formats than what is listed in
        :meth:`extensions`.
    '''

    @staticmethod
    def extensions():
        '''Return accepted extensions for this loader'''
        # See https://www.ffmpeg.org/general.html#Image-Formats
github kivy / kivy / kivy / core / audio / audio_ffpyplayer.py View on Github external
def __init__(self, **kwargs):
        self._ffplayer = None
        self.quitted = False
        self._log_callback_set = False
        self._state = ''
        self.state = 'stop'

        if not get_log_callback():
            set_log_callback(_log_callback)
            self._log_callback_set = True

        super(SoundFFPy, self).__init__(**kwargs)
github BillBillBillBill / Tickeys-linux / tickeys / kivy / core / image / img_ffpyplayer.py View on Github external
Logger.info('ImageLoaderFFPy: Using ffpyplayer {}'.format(ffpyplayer.version))


logger_func = {'quiet': Logger.critical, 'panic': Logger.critical,
               'fatal': Logger.critical, 'error': Logger.error,
               'warning': Logger.warning, 'info': Logger.info,
               'verbose': Logger.debug, 'debug': Logger.debug}


def _log_callback(message, level):
    message = message.strip()
    if message:
        logger_func[level]('ffpyplayer: {}'.format(message))

if not get_log_callback():
    set_log_callback(_log_callback)


class ImageLoaderFFPy(ImageLoaderBase):
    '''Image loader based on the ffpyplayer library.

    .. versionadded:: 1.9.0

    .. note:
        This provider may support more formats than what is listed in
        :meth:`extensions`.
    '''

    @staticmethod
    def extensions():
        '''Return accepted extensions for this loader'''
        # See https://www.ffmpeg.org/general.html#Image-Formats
github BillBillBillBill / Tickeys-linux / tickeys / kivy / core / audio / audio_ffpyplayer.py View on Github external
def __init__(self, **kwargs):
        self._ffplayer = None
        self.quitted = False
        self._log_callback_set = False
        self._state = ''
        self.state = 'stop'
        self._callback_ref = WeakMethod(self._player_callback)

        if not get_log_callback():
            set_log_callback(_log_callback)
            self._log_callback_set = True

        super(SoundFFPy, self).__init__(**kwargs)
github pyKy / kivy-doc-ja / kivy / core / video / video_ffpyplayer.py View on Github external
logger_func = {'quiet': Logger.critical, 'panic': Logger.critical,
               'fatal': Logger.critical, 'error': Logger.error,
               'warning': Logger.warning, 'info': Logger.info,
               'verbose': Logger.debug, 'debug': Logger.debug}


def _log_callback(message, level):
    message = message.strip()
    if message:
        logger_func[level]('ffpyplayer: {}'.format(message))


if not get_log_callback():
    set_log_callback(_log_callback)


class VideoFFPy(VideoBase):

    YUV_RGB_FS = """
    $HEADER$
    uniform sampler2D tex_y;
    uniform sampler2D tex_u;
    uniform sampler2D tex_v;

    void main(void) {
        float y = texture2D(tex_y, tex_coord0).r;
        float u = texture2D(tex_u, tex_coord0).r - 0.5;
        float v = texture2D(tex_v, tex_coord0).r - 0.5;
        float r = y +             1.402 * v;
        float g = y - 0.344 * u - 0.714 * v;

ffpyplayer

A cython implementation of an ffmpeg based player.

LGPL-3.0
Latest version published 23 days ago

Package Health Score

61 / 100
Full package analysis

Similar packages