MLT  7.28.0
Data Structures | Functions
mlt_factory.h File Reference

the factory method interfaces More...

#include "mlt_profile.h"
#include "mlt_repository.h"
#include "mlt_types.h"

Go to the source code of this file.

Data Structures

struct  mlt_factory_event_data
 The event data for all factory-related events. More...
 

Functions

char * mlt_environment (const char *name)
 Get a value from the environment. More...
 
int mlt_environment_set (const char *name, const char *value)
 Set a value in the environment. More...
 
void mlt_factory_close ()
 Close the factory. More...
 
mlt_consumer mlt_factory_consumer (mlt_profile profile, const char *service, const void *input)
 Fetch a consumer from the repository. More...
 
const char * mlt_factory_directory ()
 Fetch the module directory used in this instance. More...
 
mlt_properties mlt_factory_event_object ()
 Fetch the events object. More...
 
mlt_filter mlt_factory_filter (mlt_profile profile, const char *service, const void *input)
 Fetch a filter from the repository. More...
 
mlt_repository mlt_factory_init (const char *directory)
 Construct the repository and factories. More...
 
mlt_link mlt_factory_link (const char *service, const void *input)
 Fetch a link from the repository. More...
 
mlt_producer mlt_factory_producer (mlt_profile profile, const char *service, const void *resource)
 Fetch a producer from the repository. More...
 
void mlt_factory_register_for_clean_up (void *ptr, mlt_destructor destructor)
 Register an object for clean up. More...
 
mlt_repository mlt_factory_repository ()
 Fetch the repository. More...
 
mlt_transition mlt_factory_transition (mlt_profile profile, const char *service, const void *input)
 Fetch a transition from the repository. More...
 
mlt_properties mlt_global_properties ()
 

Detailed Description

the factory method interfaces

Copyright (C) 2003-2021 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

◆ mlt_environment()

char* mlt_environment ( const char *  name)

Get a value from the environment.

Parameters
namethe name of a MLT (runtime configuration) environment variable
Returns
the value of the variable

◆ mlt_environment_set()

int mlt_environment_set ( const char *  name,
const char *  value 
)

Set a value in the environment.

Parameters
namethe name of a MLT environment variable
valuethe value of the variable
Returns
true on error

◆ mlt_factory_close()

void mlt_factory_close ( )

Close the factory.

Cleanup all resources for the session.

◆ mlt_factory_consumer()

mlt_consumer mlt_factory_consumer ( mlt_profile  profile,
const char *  service,
const void *  input 
)

Fetch a consumer from the repository.

Parameters
profilethe mlt_profile to use
servicethe name of the consumer (optional, defaults to MLT_CONSUMER)
inputan optional argument to the consumer constructor, typically a string
Returns
a new consumer

◆ mlt_factory_directory()

const char* mlt_factory_directory ( )

Fetch the module directory used in this instance.

Returns
the full path to the module directory that this session is using

◆ mlt_factory_event_object()

mlt_properties mlt_factory_event_object ( )

Fetch the events object.

Returns
the global factory event object

◆ mlt_factory_filter()

mlt_filter mlt_factory_filter ( mlt_profile  profile,
const char *  service,
const void *  input 
)

Fetch a filter from the repository.

Parameters
profilethe mlt_profile to use
servicethe name of the filter
inputan optional argument to the filter constructor, typically a string
Returns
a new filter

◆ mlt_factory_init()

mlt_repository mlt_factory_init ( const char *  directory)

Construct the repository and factories.

Environment Variable:

MLT_PRODUCER the name of a default producer often used by other services, defaults to "loader"

MLT_CONSUMER the name of a default consumer, defaults to "sdl2" followed by "sdl"

MLT_TEST_CARD the name of a producer or file to be played when nothing is available (all tracks blank)

MLT_DATA overrides the default full path to the MLT and module supplemental data files, defaults to PREFIX_DATA

MLT_PROFILE selects the default mlt_profile_s, defaults to "dv_pal"

MLT_REPOSITORY overrides the default location of the plugin modules, defaults to PREFIX_LIB.

MLT_REPOSITORY is ignored on Windows and OS X relocatable builds.

Environment Variable:

MLT_PRESETS_PATH overrides the default full path to the properties preset files, defaults to MLT_DATA/presets

MLT_REPOSITORY_DENY colon separated list of modules to skip. Example: libmltplus:libmltavformat:libmltfrei0r In case both qt5 and qt6 modules are found and none of both is blocked by MLT_REPOSITORY_DENY, qt6 will be blocked

Event:

producer-create-request fired when mlt_factory_producer is called; the event data is a pointer to mlt_factory_event_data

producer-create-done fired when a producer registers itself; the event data is a pointer to mlt_factory_event_data

filter-create-request fired when mlt_factory_filter is called; the event data is a pointer to mlt_factory_event_data

filter-create-done fired when a filter registers itself; the event data is a pointer to mlt_factory_event_data

transition-create-request fired when mlt_factory_transition is called; the event data is a pointer to mlt_factory_event_data

transition-create-done fired when a transition registers itself; the event data is a pointer to mlt_factory_event_data

consumer-create-request fired when mlt_factory_consumer is called; the event data is a pointer to mlt_factory_event_data

consumer-create-done fired when a consumer registers itself; the event data is a pointer to mlt_factory_event_data

link-create-request fired when mlt_factory_link is called; the event data is a pointer to mlt_factory_event_data

link-create-done fired when a link registers itself; the event data is a pointer to mlt_factory_event_data

Parameters
directoryan optional full path to a directory containing the modules that overrides the default and the MLT_REPOSITORY environment variable
Returns
the repository

◆ mlt_factory_link()

mlt_link mlt_factory_link ( const char *  service,
const void *  input 
)

Fetch a link from the repository.

Parameters
servicethe name of the link
inputan optional argument to the link constructor, typically a string
Returns
a new link

◆ mlt_factory_producer()

mlt_producer mlt_factory_producer ( mlt_profile  profile,
const char *  service,
const void *  resource 
)

Fetch a producer from the repository.

If you give NULL to service, then it will use core module's special "loader"producer to load resource. One can override this default producer by setting the environment variable MLT_PRODUCER.

Parameters
profilethe mlt_profile to use
servicethe name of the producer (optional, defaults to MLT_PRODUCER)
resourcean optional argument to the producer constructor, typically a string
Returns
a new producer

◆ mlt_factory_register_for_clean_up()

void mlt_factory_register_for_clean_up ( void *  ptr,
mlt_destructor  destructor 
)

Register an object for clean up.

Parameters
ptran opaque pointer to anything allocated on the heap
destructorthe function pointer of the deallocation subroutine (e.g., free or mlt_pool_release)

◆ mlt_factory_repository()

mlt_repository mlt_factory_repository ( )

Fetch the repository.

Returns
the global repository object

◆ mlt_factory_transition()

mlt_transition mlt_factory_transition ( mlt_profile  profile,
const char *  service,
const void *  input 
)

Fetch a transition from the repository.

Parameters
profilethe mlt_profile to use
servicethe name of the transition
inputan optional argument to the transition constructor, typically a string
Returns
a new transition

◆ mlt_global_properties()

mlt_properties mlt_global_properties ( )