MLT  7.28.0
Data Structures | Functions | Variables
mlt_consumer.c File Reference

abstraction for all consumer services More...

#include "mlt_consumer.h"
#include "mlt_factory.h"
#include "mlt_frame.h"
#include "mlt_log.h"
#include "mlt_producer.h"
#include "mlt_profile.h"
#include <stdatomic.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>

Data Structures

struct  consumer_private
 private members of mlt_consumer More...
 

Functions

static void apply_profile_properties (mlt_consumer self, mlt_profile profile, mlt_properties properties)
 
static void consumer_read_ahead_start (mlt_consumer self)
 
static void mlt_consumer_property_changed (mlt_properties owner, mlt_consumer self, mlt_event_data)
 
static void mlt_thread_create (mlt_consumer self, mlt_thread_function_t function)
 
static void mlt_thread_join (mlt_consumer self)
 
static void on_consumer_frame_show (mlt_properties owner, mlt_consumer self, mlt_event_data)
 
static mlt_frame worker_get_frame (mlt_consumer self, mlt_properties properties)
 Use multiple worker threads and a work queue. More...
 

Variables

pthread_mutex_t mlt_frame_processing_mutex = PTHREAD_MUTEX_INITIALIZER
 mlt_frame_s::is_processing can not be made atomic, so protect it with a mutex. More...
 
pthread_mutex_t mlt_sdl_mutex = PTHREAD_MUTEX_INITIALIZER
 Define this if you want an automatic deinterlace (if necessary) when the consumer's producer is not running at normal speed. More...
 

Detailed Description

abstraction for all consumer services

See also
mlt_consumer_s

Copyright (C) 2003-2023 Meltytech, LLC

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Function Documentation

◆ apply_profile_properties()

static void apply_profile_properties ( mlt_consumer  self,
mlt_profile  profile,
mlt_properties  properties 
)
static

◆ consumer_read_ahead_start()

static void consumer_read_ahead_start ( mlt_consumer  self)
static

◆ mlt_consumer_property_changed()

static void mlt_consumer_property_changed ( mlt_properties  owner,
mlt_consumer  self,
mlt_event_data   
)
static

◆ mlt_thread_create()

static void mlt_thread_create ( mlt_consumer  self,
mlt_thread_function_t  function 
)
static

◆ mlt_thread_join()

static void mlt_thread_join ( mlt_consumer  self)
static

◆ on_consumer_frame_show()

static void on_consumer_frame_show ( mlt_properties  owner,
mlt_consumer  self,
mlt_event_data   
)
static

◆ worker_get_frame()

static mlt_frame worker_get_frame ( mlt_consumer  self,
mlt_properties  properties 
)
static

Use multiple worker threads and a work queue.

Variable Documentation

◆ mlt_frame_processing_mutex

pthread_mutex_t mlt_frame_processing_mutex = PTHREAD_MUTEX_INITIALIZER

mlt_frame_s::is_processing can not be made atomic, so protect it with a mutex.

◆ mlt_sdl_mutex

pthread_mutex_t mlt_sdl_mutex = PTHREAD_MUTEX_INITIALIZER

Define this if you want an automatic deinterlace (if necessary) when the consumer's producer is not running at normal speed.

This is not the ideal place for this, but it is needed by VDPAU as well.