|
MLT
7.34.0
|
the factory method interfaces More...
#include "mlt.h"#include "mlt_repository.h"#include <libgen.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Macros | |
| #define | PRESETS_DIR "/presets" |
| the default subdirectory of the datadir for holding presets 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 () |
| static void | set_common_properties (mlt_properties properties, mlt_profile profile, const char *type, const char *service) |
| Set some properties common to all services. More... | |
Variables | |
| static mlt_properties | event_object = NULL |
| the events object for the factory events More... | |
| static mlt_properties | global_properties = NULL |
| a global properties list for holding environment config data and things needing session-oriented cleanup More... | |
| static char * | mlt_directory = NULL |
| holds the full path to the modules directory - initialized and retained for the entire session More... | |
| static mlt_repository | repository = NULL |
| the global repository singleton More... | |
| static int | unique_id = 0 |
| for tracking the unique_id set on each constructed service More... | |
the factory method interfaces
Copyright (C) 2003-2024 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
| #define PRESETS_DIR "/presets" |
the default subdirectory of the datadir for holding presets
| char* mlt_environment | ( | const char * | name | ) |
Get a value from the environment.
| name | the name of a MLT (runtime configuration) environment variable |
| int mlt_environment_set | ( | const char * | name, |
| const char * | value | ||
| ) |
Set a value in the environment.
| name | the name of a MLT environment variable |
| value | the value of the variable |
| void mlt_factory_close | ( | ) |
Close the factory.
Cleanup all resources for the session.
| mlt_consumer mlt_factory_consumer | ( | mlt_profile | profile, |
| const char * | service, | ||
| const void * | input | ||
| ) |
Fetch a consumer from the repository.
| profile | the mlt_profile to use |
| service | the name of the consumer (optional, defaults to MLT_CONSUMER) |
| input | an optional argument to the consumer constructor, typically a string |
| const char* mlt_factory_directory | ( | ) |
Fetch the module directory used in this instance.
| mlt_properties mlt_factory_event_object | ( | ) |
Fetch the events object.
| mlt_filter mlt_factory_filter | ( | mlt_profile | profile, |
| const char * | service, | ||
| const void * | input | ||
| ) |
Fetch a filter from the repository.
| profile | the mlt_profile to use |
| service | the name of the filter |
| input | an optional argument to the filter constructor, typically a string |
| mlt_repository mlt_factory_init | ( | const char * | directory | ) |
Construct the repository and factories.
| directory | an optional full path to a directory containing the modules that overrides the default and the MLT_REPOSITORY environment variable |
| mlt_link mlt_factory_link | ( | const char * | service, |
| const void * | input | ||
| ) |
Fetch a link from the repository.
| service | the name of the link |
| input | an optional argument to the link constructor, typically a string |
| 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.
| profile | the mlt_profile to use |
| service | the name of the producer (optional, defaults to MLT_PRODUCER) |
| resource | an optional argument to the producer constructor, typically a string |
| void mlt_factory_register_for_clean_up | ( | void * | ptr, |
| mlt_destructor | destructor | ||
| ) |
Register an object for clean up.
| ptr | an opaque pointer to anything allocated on the heap |
| destructor | the function pointer of the deallocation subroutine (e.g., free or mlt_pool_release) |
| mlt_repository mlt_factory_repository | ( | ) |
Fetch the repository.
| mlt_transition mlt_factory_transition | ( | mlt_profile | profile, |
| const char * | service, | ||
| const void * | input | ||
| ) |
Fetch a transition from the repository.
| profile | the mlt_profile to use |
| service | the name of the transition |
| input | an optional argument to the transition constructor, typically a string |
| mlt_properties mlt_global_properties | ( | ) |
|
static |
Set some properties common to all services.
This sets _unique_id, mlt_type, mlt_service (unless _mlt_service_hidden), and _profile.
| properties | a service's properties list |
| profile | the mlt_profile supplied to the factory function |
| type | the MLT service class |
| service | the name of the service |
|
static |
the events object for the factory events
|
static |
a global properties list for holding environment config data and things needing session-oriented cleanup
|
static |
holds the full path to the modules directory - initialized and retained for the entire session
|
static |
the global repository singleton
|
static |
for tracking the unique_id set on each constructed service