From 14cd5766946da2f7ffd1e3dcc88555b24f6d20a1 Mon Sep 17 00:00:00 2001 From: ddennedy Date: Wed, 21 Jan 2009 08:41:54 +0000 Subject: [PATCH] Add doxygen documentation for mlt_profile, mlt_pool, mlt_repository, and mlt_factory. Update copyrights to 2009. Add cross references from files to data structures in doxygen. git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@1319 d19143bc-622f-0410-bfdd-b5b2a6649095 --- src/framework/mlt.h | 14 +-- src/framework/mlt_consumer.c | 3 +- src/framework/mlt_consumer.h | 3 +- src/framework/mlt_deque.c | 3 +- src/framework/mlt_deque.h | 3 +- src/framework/mlt_events.c | 3 +- src/framework/mlt_events.h | 3 +- src/framework/mlt_factory.c | 126 ++++++++++++++++++++++----- src/framework/mlt_factory.h | 21 ++++- src/framework/mlt_field.c | 4 +- src/framework/mlt_field.h | 3 +- src/framework/mlt_filter.c | 11 ++- src/framework/mlt_filter.h | 11 ++- src/framework/mlt_frame.c | 39 +++++---- src/framework/mlt_frame.h | 3 +- src/framework/mlt_multitrack.c | 3 +- src/framework/mlt_multitrack.h | 5 +- src/framework/mlt_parser.c | 3 +- src/framework/mlt_parser.h | 3 +- src/framework/mlt_playlist.c | 5 +- src/framework/mlt_playlist.h | 5 +- src/framework/mlt_pool.c | 67 +++++++++++---- src/framework/mlt_pool.h | 3 +- src/framework/mlt_producer.c | 3 +- src/framework/mlt_producer.h | 3 +- src/framework/mlt_profile.c | 80 ++++++++++++++---- src/framework/mlt_profile.h | 23 ++--- src/framework/mlt_properties.c | 5 +- src/framework/mlt_properties.h | 3 +- src/framework/mlt_property.c | 3 +- src/framework/mlt_property.h | 3 +- src/framework/mlt_repository.c | 150 ++++++++++++++++++++++++++------- src/framework/mlt_repository.h | 37 ++++---- src/framework/mlt_service.c | 3 +- src/framework/mlt_service.h | 3 +- src/framework/mlt_tokeniser.c | 3 +- src/framework/mlt_tokeniser.h | 3 +- src/framework/mlt_tractor.c | 3 +- src/framework/mlt_tractor.h | 3 +- src/framework/mlt_transition.c | 3 +- src/framework/mlt_transition.h | 3 +- src/framework/mlt_types.h | 3 +- 42 files changed, 493 insertions(+), 188 deletions(-) diff --git a/src/framework/mlt.h b/src/framework/mlt.h index 8c3dc0f6..227d4ba5 100644 --- a/src/framework/mlt.h +++ b/src/framework/mlt.h @@ -1,7 +1,9 @@ -/* - * mlt.h -- header file for lazy client and implementation code :-) - * Copyright (C) 2003-2004 Ushodaya Enterprises Limited - * Author: Charles Yates +/** + * \file mlt.h + * \brief header file for lazy client and implementation code :-) + * + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited + * \author Charles Yates * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -21,8 +23,8 @@ #ifndef _MLT_H_ #define _MLT_H_ -#define LIBMLT_VERSION_INT ((0<<16)+(2<<8)+5) -#define LIBMLT_VERSION 0.2.5 +#define LIBMLT_VERSION_INT ((0<<16)+(3<<8)+5) +#define LIBMLT_VERSION 0.3.5 #ifdef __cplusplus extern "C" diff --git a/src/framework/mlt_consumer.c b/src/framework/mlt_consumer.c index 04ef94e2..8636e4b1 100644 --- a/src/framework/mlt_consumer.c +++ b/src/framework/mlt_consumer.c @@ -1,8 +1,9 @@ /** * \file mlt_consumer.c * \brief abstraction for all consumer services + * \see mlt_consumer_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_consumer.h b/src/framework/mlt_consumer.h index 0b6bc22b..736d0a2c 100644 --- a/src/framework/mlt_consumer.h +++ b/src/framework/mlt_consumer.h @@ -1,8 +1,9 @@ /** * \file mlt_consumer.h * \brief abstraction for all consumer services + * \see mlt_consumer_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_deque.c b/src/framework/mlt_deque.c index 28dfd7f6..ad65a2b3 100644 --- a/src/framework/mlt_deque.c +++ b/src/framework/mlt_deque.c @@ -1,8 +1,9 @@ /** * \file mlt_deque.c * \brief double ended queue + * \see mlt_deque_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_deque.h b/src/framework/mlt_deque.h index 00ed30ee..d895798e 100644 --- a/src/framework/mlt_deque.h +++ b/src/framework/mlt_deque.h @@ -1,8 +1,9 @@ /** * \file mlt_deque.h * \brief double ended queue + * \see mlt_deque_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_events.c b/src/framework/mlt_events.c index 1439e3c4..4a813fe6 100644 --- a/src/framework/mlt_events.c +++ b/src/framework/mlt_events.c @@ -1,8 +1,9 @@ /** * \file mlt_events.c * \brief event handling + * \see mlt_events_struct * - * Copyright (C) 2004-2008 Ushodaya Enterprises Limited + * Copyright (C) 2004-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_events.h b/src/framework/mlt_events.h index 43a296d0..85001609 100644 --- a/src/framework/mlt_events.h +++ b/src/framework/mlt_events.h @@ -1,8 +1,9 @@ /** * \file mlt_events.h * \brief event handling + * \see mlt_events_struct * - * Copyright (C) 2004-2008 Ushodaya Enterprises Limited + * Copyright (C) 2004-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_factory.c b/src/framework/mlt_factory.c index d7c6f000..bb7619d0 100644 --- a/src/framework/mlt_factory.c +++ b/src/framework/mlt_factory.c @@ -1,7 +1,9 @@ -/* - * mlt_factory.c -- the factory method interfaces - * Copyright (C) 2003-2004 Ushodaya Enterprises Limited - * Author: Charles Yates +/** + * \file mlt_factory.c + * \brief the factory method interfaces + * + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited + * \author Charles Yates * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,20 +27,32 @@ #include #include +/** the default subdirectory of the libdir for holding modules (plugins) */ #define PREFIX_LIB LIBDIR "/mlt" +/** the default subdirectory of the install prefix for holding module (plugin) data */ #define PREFIX_DATA PREFIX "/share/mlt" -/** Singleton repositories -*/ +/** holds the full path to the modules directory - initialized and retained for the entire session */ static char *mlt_directory = NULL; +/** a global properties list for holding environment config data and things needing session-oriented cleanup */ static mlt_properties global_properties = NULL; +/** the global repository singleton */ static mlt_repository repository = NULL; +/** the events object for the factory events */ static mlt_properties event_object = NULL; +/** for tracking the unique_id set on each constructed service */ static int unique_id = 0; -/** Event transmitters. -*/ +/* Event transmitters. */ + +/** the -create-request event transmitter + * + * \param listener + * \param owner + * \param this + * \param args + */ static void mlt_factory_create_request( mlt_listener listener, mlt_properties owner, mlt_service this, void **args ) { @@ -46,14 +60,38 @@ static void mlt_factory_create_request( mlt_listener listener, mlt_properties ow listener( owner, this, ( char * )args[ 0 ], ( char * )args[ 1 ], ( mlt_service * )args[ 2 ] ); } +/** the -create-done event transmitter + * + * \param listener + * \param owner + * \param this + * \param args + */ + static void mlt_factory_create_done( mlt_listener listener, mlt_properties owner, mlt_service this, void **args ) { if ( listener != NULL ) listener( owner, this, ( char * )args[ 0 ], ( char * )args[ 1 ], ( mlt_service )args[ 2 ] ); } -/** Construct the factories. -*/ +/** Construct the repository and factories. + * + * The environment variable MLT_PRODUCER is the name of a default producer often used by other services, defaults to "fezzil". + * + * The environment variable MLT_CONSUMER is the name of a default consumer, defaults to "sdl". + * + * The environment variable MLT_TEST_CARD is the name of a producer or file to be played when nothing is available (all tracks blank). + * + * The environment variable MLT_DATA overrides the default full path to the MLT and module supplemental data files, defaults to \p PREFIX_DATA. + * + * The environment variable MLT_PROFILE defaults to "dv_pal." + * + * The environment variable MLT_REPOSITORY overrides the default location of the plugin modules, defaults to \p PREFIX_LIB. + * + * \param directory an optional full path to a directory containing the modules that overrides the default and + * the MLT_REPOSITORY environment variable + * \return the repository + */ mlt_repository mlt_factory_init( const char *directory ) { @@ -112,7 +150,9 @@ mlt_repository mlt_factory_init( const char *directory ) } /** Fetch the events object. -*/ + * + * \return the global factory event object + */ mlt_properties mlt_factory_event_object( ) { @@ -120,7 +160,9 @@ mlt_properties mlt_factory_event_object( ) } /** Fetch the module directory used in this instance. -*/ + * + * \return the full path to the module directory that this session is using + */ const char *mlt_factory_directory( ) { @@ -128,7 +170,10 @@ const char *mlt_factory_directory( ) } /** Get a value from the environment. -*/ + * + * \param name the name of a MLT (runtime configuration) environment variable + * \return the value of the variable + */ char *mlt_environment( const char *name ) { @@ -139,7 +184,11 @@ char *mlt_environment( const char *name ) } /** Set a value in the environment. -*/ + * + * \param name the name of a MLT environment variable + * \param value the value of the variable + * \return true on error + */ int mlt_environment_set( const char *name, const char *value ) { @@ -149,6 +198,16 @@ int mlt_environment_set( const char *name, const char *value ) return -1; } +/** Set some properties common to all services. + * + * This sets _unique_id, \p mlt_type, \p mlt_service (unless _mlt_service_hidden), and _profile. + * + * \param properties a service's properties list + * \param profile the \p mlt_profile supplied to the factory function + * \param type the MLT service class + * \param service the name of the service + */ + static void set_common_properties( mlt_properties properties, mlt_profile profile, const char *type, const char *service ) { mlt_properties_set_int( properties, "_unique_id", ++ unique_id ); @@ -160,7 +219,12 @@ static void set_common_properties( mlt_properties properties, mlt_profile profil } /** Fetch a producer from the repository. -*/ + * + * \param profile the \p mlt_profile to use + * \param service the name of the producer (optional, defaults to MLT_PRODUCER) + * \param input an optional argument to the producer constructor, typically a string + * \return a new producer + */ mlt_producer mlt_factory_producer( mlt_profile profile, const char *service, void *input ) { @@ -188,7 +252,12 @@ mlt_producer mlt_factory_producer( mlt_profile profile, const char *service, voi } /** Fetch a filter from the repository. -*/ + * + * \param profile the \p mlt_profile to use + * \param service the name of the filter + * \param input an optional argument to the filter constructor, typically a string + * \return a new filter + */ mlt_filter mlt_factory_filter( mlt_profile profile, const char *service, void *input ) { @@ -212,7 +281,12 @@ mlt_filter mlt_factory_filter( mlt_profile profile, const char *service, void *i } /** Fetch a transition from the repository. -*/ + * + * \param profile the \p mlt_profile to use + * \param service the name of the transition + * \param input an optional argument to the transition constructor, typically a string + * \return a new transition + */ mlt_transition mlt_factory_transition( mlt_profile profile, const char *service, void *input ) { @@ -235,8 +309,13 @@ mlt_transition mlt_factory_transition( mlt_profile profile, const char *service, return obj; } -/** Fetch a consumer from the repository -*/ +/** Fetch a consumer from the repository. + * + * \param profile the \p mlt_profile to use + * \param service the name of the consumer (optional, defaults to MLT_CONSUMER) + * \param input an optional argument to the consumer constructor, typically a string + * \return a new consumer + */ mlt_consumer mlt_factory_consumer( mlt_profile profile, const char *service, void *input ) { @@ -263,7 +342,10 @@ mlt_consumer mlt_factory_consumer( mlt_profile profile, const char *service, voi } /** Register an object for clean up. -*/ + * + * \param ptr an opaque pointer to anything allocated on the heap + * \param destructor the function pointer of the deallocation subroutine (e.g., free or \p mlt_pool_release) + */ void mlt_factory_register_for_clean_up( void *ptr, mlt_destructor destructor ) { @@ -273,7 +355,9 @@ void mlt_factory_register_for_clean_up( void *ptr, mlt_destructor destructor ) } /** Close the factory. -*/ + * + * Cleanup all resources for the session. + */ void mlt_factory_close( ) { diff --git a/src/framework/mlt_factory.h b/src/framework/mlt_factory.h index f2a9d225..d9279e5b 100644 --- a/src/framework/mlt_factory.h +++ b/src/framework/mlt_factory.h @@ -1,7 +1,9 @@ -/* - * mlt_factory.h -- the factory method interfaces - * Copyright (C) 2003-2004 Ushodaya Enterprises Limited - * Author: Charles Yates +/** + * \file mlt_factory.h + * \brief the factory method interfaces + * + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited + * \author Charles Yates * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -25,6 +27,17 @@ #include "mlt_profile.h" #include "mlt_repository.h" +/** + * \event \em producer-create-request fired when mlt_factory_producer is called + * \event \em producer-create-done fired when a producer registers itself + * \event \em filter-create-request fired when mlt_factory_filter is called + * \event \em filter-create-done fired when a filter registers itself + * \event \em transition-create-request fired when mlt_factory_transition is called + * \event \em transition-create-done fired when a transition registers itself + * \event \em consumer-create-request fired when mlt_factory_consumer is called + * \event \em consumer-create-done fired when a consumer registers itself + */ + extern mlt_repository mlt_factory_init( const char *directory ); extern const char *mlt_factory_directory( ); extern char *mlt_environment( const char *name ); diff --git a/src/framework/mlt_field.c b/src/framework/mlt_field.c index 89f3824e..c988ae6e 100644 --- a/src/framework/mlt_field.c +++ b/src/framework/mlt_field.c @@ -1,8 +1,9 @@ /** * \file mlt_field.c * \brief a field for planting multiple transitions and filters + * \see mlt_field_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or @@ -32,6 +33,7 @@ /** \brief Field class * + * The field is a convenience class that works with the tractor and multitrack classes to manage track filters and transitions. */ struct mlt_field_s diff --git a/src/framework/mlt_field.h b/src/framework/mlt_field.h index e32062f1..a54db542 100644 --- a/src/framework/mlt_field.h +++ b/src/framework/mlt_field.h @@ -1,8 +1,9 @@ /** * \file mlt_field.h * \brief a field for planting multiple transitions and services + * \see mlt_field_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_filter.c b/src/framework/mlt_filter.c index 289a8d4c..9a04352e 100644 --- a/src/framework/mlt_filter.c +++ b/src/framework/mlt_filter.c @@ -1,7 +1,10 @@ -/* - * mlt_filter.c -- abstraction for all filter services - * Copyright (C) 2003-2004 Ushodaya Enterprises Limited - * Author: Charles Yates +/** + * \file mlt_filter.c + * \brief abstraction for all filter services + * \see mlt_filter_s + * + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited + * \author Charles Yates * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/framework/mlt_filter.h b/src/framework/mlt_filter.h index a42cf55e..66e2e471 100644 --- a/src/framework/mlt_filter.h +++ b/src/framework/mlt_filter.h @@ -1,7 +1,10 @@ -/* - * mlt_filter.h -- abstraction for all filter services - * Copyright (C) 2003-2004 Ushodaya Enterprises Limited - * Author: Charles Yates +/** + * \file mlt_filter.h + * \brief abstraction for all filter services + * \see mlt_filter_s + * + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited + * \author Charles Yates * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index 6424a547..0899b065 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -1,7 +1,10 @@ -/* - * mlt_frame.c -- interface for all frame classes - * Copyright (C) 2003-2004 Ushodaya Enterprises Limited - * Author: Charles Yates +/** + * \file mlt_frame.c + * \brief interface for all frame classes + * \see mlt_frame_s + * + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited + * \author Charles Yates * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -216,12 +219,12 @@ mlt_deque mlt_frame_service_stack( mlt_frame this ) of a composite where the b frame completely obscures the a frame). The image must be writable and the destructor for the image itself must be taken - care of on another frame and that frame cannot have a replace applied to it... + care of on another frame and that frame cannot have a replace applied to it... Further it assumes that no alpha mask is in use. - For these reasons, it can only be used in a specific situation - when you have + For these reasons, it can only be used in a specific situation - when you have multiple tracks each with their own transition and these transitions are applied - in a strictly reversed order (ie: highest numbered [lowest track] is processed + in a strictly reversed order (ie: highest numbered [lowest track] is processed first). More reliable approach - the cases should be detected during the process phase @@ -233,7 +236,7 @@ void mlt_frame_replace_image( mlt_frame this, uint8_t *image, mlt_image_format f // Remove all items from the stack while( mlt_deque_pop_back( this->stack_image ) ) ; - // Update the information + // Update the information mlt_properties_set_data( MLT_FRAME_PROPERTIES( this ), "image", image, 0, NULL, NULL ); mlt_properties_set_int( MLT_FRAME_PROPERTIES( this ), "width", width ); mlt_properties_set_int( MLT_FRAME_PROPERTIES( this ), "height", height ); @@ -448,22 +451,22 @@ unsigned char *mlt_frame_get_waveform( mlt_frame this, int w, int h ) int channels = 2; double fps = mlt_profile_fps( NULL ); int samples = mlt_sample_calculator( fps, frequency, mlt_frame_get_position( this ) ); - + // Get the pcm data mlt_frame_get_audio( this, &pcm, &format, &frequency, &channels, &samples ); - + // Make an 8-bit buffer large enough to hold rendering int size = w * h; unsigned char *bitmap = ( unsigned char* )mlt_pool_alloc( size ); if ( bitmap != NULL ) memset( bitmap, 0, size ); mlt_properties_set_data( properties, "waveform", bitmap, size, ( mlt_destructor )mlt_pool_release, NULL ); - + // Render vertical lines int16_t *ubound = pcm + samples * channels; int skip = samples / w - 1; int i, j, k; - + // Iterate sample stream and along x coordinate for ( i = 0; i < w && pcm < ubound; i++ ) { @@ -472,7 +475,7 @@ unsigned char *mlt_frame_get_waveform( mlt_frame this, int w, int h ) { // Determine sample's magnitude from 2s complement; int pcm_magnitude = *pcm < 0 ? ~(*pcm) + 1 : *pcm; - // The height of a line is the ratio of the magnitude multiplied by + // The height of a line is the ratio of the magnitude multiplied by // half the vertical resolution int height = ( int )( ( double )( pcm_magnitude ) / 32768 * h / 2 ); // Determine the starting y coordinate - left channel above center, @@ -480,11 +483,11 @@ unsigned char *mlt_frame_get_waveform( mlt_frame this, int w, int h ) int displacement = ( h / 2 ) - ( 1 - j ) * height; // Position buffer pointer using y coordinate, stride, and x coordinate unsigned char *p = &bitmap[ i + displacement * w ]; - + // Draw vertical line for ( k = 0; k < height; k++ ) p[ w * k ] = 0xFF; - + pcm++; } pcm += skip * channels; @@ -522,7 +525,7 @@ int mlt_convert_yuv422_to_rgb24a( uint8_t *yuv, uint8_t *rgba, unsigned int tota int yy, uu, vv; int r,g,b; total /= 2; - while (total--) + while (total--) { yy = yuv[0]; uu = yuv[1]; @@ -1064,7 +1067,7 @@ uint8_t *mlt_frame_rescale_yuv422( mlt_frame this, int owidth, int oheight ) { // Start at the beginning of the line out_ptr = out_line; - + // Pointer to the middle of the input line in_line = in_middle + ( dy >> 16 ) * istride; @@ -1220,7 +1223,7 @@ int mlt_frame_combine_audio( mlt_frame this, mlt_frame that, int16_t **buffer, m double B = exp(-2.0 * M_PI * Fc); double A = 1.0 - B; double v; - + for ( i = 0; i < *samples; i++ ) { for ( j = 0; j < *channels; j++ ) diff --git a/src/framework/mlt_frame.h b/src/framework/mlt_frame.h index f24ef3eb..bd586a74 100644 --- a/src/framework/mlt_frame.h +++ b/src/framework/mlt_frame.h @@ -1,8 +1,9 @@ /** * \file mlt_frame.h * \brief interface for all frame classes + * \see mlt_frame_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_multitrack.c b/src/framework/mlt_multitrack.c index c554954f..89d1dc26 100644 --- a/src/framework/mlt_multitrack.c +++ b/src/framework/mlt_multitrack.c @@ -1,8 +1,9 @@ /** * \file mlt_multitrack.c * \brief multitrack service class + * \see mlt_multitrack_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_multitrack.h b/src/framework/mlt_multitrack.h index 5843a6b7..427083c8 100644 --- a/src/framework/mlt_multitrack.h +++ b/src/framework/mlt_multitrack.h @@ -1,8 +1,9 @@ /** * \file mlt_multitrack.h * \brief multitrack service class + * \see mlt_multitrack_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or @@ -25,7 +26,7 @@ #include "mlt_producer.h" -/** \brief Track class +/** \brief Track class used by mlt_multitrack_s */ struct mlt_track_s diff --git a/src/framework/mlt_parser.c b/src/framework/mlt_parser.c index 5473aff1..c5dd4ec3 100644 --- a/src/framework/mlt_parser.c +++ b/src/framework/mlt_parser.c @@ -1,8 +1,9 @@ /** * \file mlt_parser.c * \brief service parsing functionality + * \see mlt_parser_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_parser.h b/src/framework/mlt_parser.h index 08f6ffbf..e82149cd 100644 --- a/src/framework/mlt_parser.h +++ b/src/framework/mlt_parser.h @@ -1,8 +1,9 @@ /** * \file mlt_parser.h * \brief service parsing functionality + * \see mlt_parser_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_playlist.c b/src/framework/mlt_playlist.c index 1710e21d..91f9fa81 100644 --- a/src/framework/mlt_playlist.c +++ b/src/framework/mlt_playlist.c @@ -1,8 +1,9 @@ /** * \file mlt_playlist.c * \brief playlist service class + * \see mlt_playlist_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or @@ -31,7 +32,7 @@ #include #include -/** \brief virtual playlist entry +/** \brief Virtual playlist entry used by mlt_playlist_s */ struct playlist_entry_s diff --git a/src/framework/mlt_playlist.h b/src/framework/mlt_playlist.h index f5e02d32..a6364316 100644 --- a/src/framework/mlt_playlist.h +++ b/src/framework/mlt_playlist.h @@ -1,8 +1,9 @@ /** * \file mlt_playlist.h * \brief playlist service class + * \see mlt_playlist_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or @@ -25,7 +26,7 @@ #include "mlt_producer.h" -/** \brief structure for returning clip information +/** \brief structure for returning clip information from a playlist entry */ typedef struct diff --git a/src/framework/mlt_pool.c b/src/framework/mlt_pool.c index e4d47dd4..b708f878 100644 --- a/src/framework/mlt_pool.c +++ b/src/framework/mlt_pool.c @@ -1,8 +1,9 @@ /** * \file mlt_pool.c * \brief memory pooling functionality + * \see mlt_pool_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or @@ -32,8 +33,7 @@ #include #endif -/** Singleton repositories -*/ +/** global singleton for tracking pools */ static mlt_properties pools = NULL; @@ -42,10 +42,10 @@ static mlt_properties pools = NULL; typedef struct mlt_pool_s { - pthread_mutex_t lock; - mlt_deque stack; - int size; - int count; + pthread_mutex_t lock; ///< lock to prevent race conditions + mlt_deque stack; ///< a stack of addresses to memory blocks + int size; ///< the size of the memory block as a power of 2 + int count; ///< the number of blocks in the pool } *mlt_pool; @@ -60,7 +60,11 @@ typedef struct mlt_release_s *mlt_release; /** Create a pool. -*/ + * + * \private \memberof mlt_pool_s + * \param size the size of the memory blocks to hold as some power of two + * \return a new pool object + */ static mlt_pool pool_init( int size ) { @@ -85,7 +89,11 @@ static mlt_pool pool_init( int size ) } /** Get an item from the pool. -*/ + * + * \private \memberof mlt_pool_s + * \param this a pool + * \return an opaque pointer + */ static void *pool_fetch( mlt_pool this ) { @@ -142,7 +150,10 @@ static void *pool_fetch( mlt_pool this ) } /** Return an item to the pool. -*/ + * + * \private \memberof mlt_pool_s + * \param ptr an opaque pointer + */ static void pool_return( void *ptr ) { @@ -180,7 +191,10 @@ static void pool_return( void *ptr ) } /** Destroy a pool. -*/ + * + * \private \memberof mlt_pool_s + * \param this a pool + */ static void pool_close( mlt_pool this ) { @@ -207,8 +221,10 @@ static void pool_close( mlt_pool this ) } } -/** Initialise the pool. -*/ +/** Initialise the global pool. + * + * \public \memberof mlt_pool_s + */ void mlt_pool_init( ) { @@ -236,7 +252,10 @@ void mlt_pool_init( ) } /** Allocate size bytes from the pool. -*/ + * + * \public \memberof mlt_pool_s + * \param size the number of bytes + */ void *mlt_pool_alloc( int size ) { @@ -259,7 +278,11 @@ void *mlt_pool_alloc( int size ) } /** Allocate size bytes from the pool. -*/ + * + * \public \memberof mlt_pool_s + * \param ptr an opaque pointer - can be in the pool or a new block to allocate + * \param size the number of bytes + */ void *mlt_pool_realloc( void *ptr, int size ) { @@ -300,7 +323,10 @@ void *mlt_pool_realloc( void *ptr, int size ) } /** Purge unused items in the pool. -*/ + * + * A form of garbage collection. + * \public \memberof mlt_pool_s + */ void mlt_pool_purge( ) { @@ -328,7 +354,10 @@ void mlt_pool_purge( ) } /** Release the allocated memory. -*/ + * + * \public \memberof mlt_pool_s + * \param release an opaque pointer of a block in the pool + */ void mlt_pool_release( void *release ) { @@ -337,7 +366,9 @@ void mlt_pool_release( void *release ) } /** Close the pool. -*/ + * + * \public \memberof mlt_pool_s + */ void mlt_pool_close( ) { diff --git a/src/framework/mlt_pool.h b/src/framework/mlt_pool.h index eadfe200..caf983d4 100644 --- a/src/framework/mlt_pool.h +++ b/src/framework/mlt_pool.h @@ -1,8 +1,9 @@ /** * \file mlt_pool.h * \brief memory pooling functionality + * \see mlt_pool_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index 2a6a4875..f43738bd 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -1,8 +1,9 @@ /** * \file mlt_producer.c * \brief abstraction for all producer services + * \see mlt_producer_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_producer.h b/src/framework/mlt_producer.h index 6f98ad74..37ba2ba8 100644 --- a/src/framework/mlt_producer.h +++ b/src/framework/mlt_producer.h @@ -1,8 +1,9 @@ /** * \file mlt_producer.h * \brief abstraction for all producer services + * \see mlt_producer_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_profile.c b/src/framework/mlt_profile.c index f90ca3d6..3c016263 100644 --- a/src/framework/mlt_profile.c +++ b/src/framework/mlt_profile.c @@ -1,8 +1,9 @@ /** * \file mlt_profile.c * \brief video output definition + * \see mlt_profile_s * - * Copyright (C) 2007-2008 Ushodaya Enterprises Limited + * Copyright (C) 2007-2009 Ushodaya Enterprises Limited * \author Dan Dennedy * * This library is free software; you can redistribute it and/or @@ -28,10 +29,19 @@ #include #include + +/** the default subdirectory of the prefix for holding profiles */ #define PROFILES_DIR "/share/mlt/profiles/" -/** Load a profile from the system folder -*/ +/** Load a profile from the system folder. + * + * The environment variable MLT_PROFILES_PATH overrides the default \p PROFILES_DIR. + * + * \private \memberof mlt_profile_s + * \param name the name of a profile settings file located in the standard location or + * the full path name to a profile settings file + * \return a profile or NULL on error + */ static mlt_profile mlt_profile_select( const char *name ) { @@ -76,7 +86,14 @@ static mlt_profile mlt_profile_select( const char *name ) } /** Construct a profile. -*/ + * + * This will never return NULL as it uses the dv_pal settings as hard-coded fallback default. + * + * \public \memberof mlt_profile_s + * @param name the name of a profile settings file located in the standard location or + * the full path name to a profile settings file + * @return a profile + */ mlt_profile mlt_profile_init( const char *name ) { @@ -121,8 +138,12 @@ mlt_profile mlt_profile_init( const char *name ) return profile; } -/** Load a profile from specific file -*/ +/** Load a profile from specific file. + * + * \public \memberof mlt_profile_s + * @param file the full path name to a properties file + * @return a profile or NULL on error + */ mlt_profile mlt_profile_load_file( const char *file ) { @@ -165,8 +186,12 @@ mlt_profile mlt_profile_load_file( const char *file ) return profile; } -/** Load a profile from a properties object -*/ +/** Load a profile from a properties object. + * + * \public \memberof mlt_profile_s + * @param properties a properties list + * @return a profile or NULL if out of memory + */ mlt_profile mlt_profile_load_properties( mlt_properties properties ) { @@ -190,8 +215,12 @@ mlt_profile mlt_profile_load_properties( mlt_properties properties ) return profile; } -/** Load an anonymous profile from string -*/ +/** Load an anonymous profile from string. + * + * \public \memberof mlt_profile_s + * @param string a newline-delimited list of properties as name=value pairs + * @return a profile or NULL if out of memory + */ mlt_profile mlt_profile_load_string( const char *string ) { @@ -210,8 +239,12 @@ mlt_profile mlt_profile_load_string( const char *string ) return mlt_profile_load_properties( properties ); } -/** Get the framerate as float -*/ +/** Get the video frame rate as a floating point value. + * + * \public \memberof mlt_profile_s + * @param aprofile a profile + * @return the frame rate + */ double mlt_profile_fps( mlt_profile aprofile ) { @@ -221,8 +254,12 @@ double mlt_profile_fps( mlt_profile aprofile ) return 0; } -/** Get the sample aspect ratio as float -*/ +/** Get the sample aspect ratio as a floating point value. + * + * \public \memberof mlt_profile_s + * @param aprofile a profile + * @return the pixel aspect ratio + */ double mlt_profile_sar( mlt_profile aprofile ) { @@ -232,8 +269,12 @@ double mlt_profile_sar( mlt_profile aprofile ) return 0; } -/** Get the display aspect ratio as float -*/ +/** Get the display aspect ratio as floating point value. + * + * \public \memberof mlt_profile_s + * @param aprofile a profile + * @return the image aspect ratio + */ double mlt_profile_dar( mlt_profile aprofile ) { @@ -243,8 +284,11 @@ double mlt_profile_dar( mlt_profile aprofile ) return 0; } -/** Free up the global profile resources -*/ +/** Free up the global profile resources. + * + * \public \memberof mlt_profile_s + * @param profile a profile + */ void mlt_profile_close( mlt_profile profile ) { diff --git a/src/framework/mlt_profile.h b/src/framework/mlt_profile.h index 18144931..6245640e 100644 --- a/src/framework/mlt_profile.h +++ b/src/framework/mlt_profile.h @@ -1,8 +1,9 @@ /** * \file mlt_profile.h * \brief video output definition + * \see mlt_profile_s * - * Copyright (C) 2007-2008 Ushodaya Enterprises Limited + * Copyright (C) 2007-2009 Ushodaya Enterprises Limited * \author Dan Dennedy * * This library is free software; you can redistribute it and/or @@ -31,16 +32,16 @@ struct mlt_profile_s { - char* description; - int frame_rate_num; - int frame_rate_den; - int width; - int height; - int progressive; - int sample_aspect_num; - int sample_aspect_den; - int display_aspect_num; - int display_aspect_den; + char* description; /**< a brief description suitable as a label in UI menu */ + int frame_rate_num; /**< the numerator of the video frame rate */ + int frame_rate_den; /**< the denominator of the video frame rate */ + int width; /**< the horizontal resolution of the video */ + int height; /**< the vertical resolution of the video */ + int progressive; /**< a flag to indicate if the video is progressive scan, interlace if not set */ + int sample_aspect_num; /**< the numerator of the pixel aspect ratio */ + int sample_aspect_den; /**< the denominator of the pixel aspect ratio */ + int display_aspect_num; /**< the numerator of the image aspect ratio in case it can not be simply derived (e.g. ITU-R 601) */ + int display_aspect_den; /**< the denominator of the image aspect ratio in case it can not be simply derived (e.g. ITU-R 601) */ }; extern mlt_profile mlt_profile_init( const char *name ); diff --git a/src/framework/mlt_properties.c b/src/framework/mlt_properties.c index 6057b68f..cfb0053e 100644 --- a/src/framework/mlt_properties.c +++ b/src/framework/mlt_properties.c @@ -1,8 +1,9 @@ /** * \file mlt_properties.c * \brief Properties class definition + * \see mlt_properties_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * \author Dan Dennedy * @@ -1534,7 +1535,7 @@ mlt_properties mlt_properties_parse_yaml( const char *filename ) /** How many bytes to grow at a time */ #define STRBUF_GROWTH (1024) -/** \brief Self-growing buffer for building strings +/** \brief Private to mlt_properties_s, a self-growing buffer for building strings * \private */ diff --git a/src/framework/mlt_properties.h b/src/framework/mlt_properties.h index 6fc81ad7..c5e15cc1 100644 --- a/src/framework/mlt_properties.h +++ b/src/framework/mlt_properties.h @@ -1,8 +1,9 @@ /** * \file mlt_properties.h * \brief Properties class declaration + * \see mlt_properties_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * \author Dan Dennedy * diff --git a/src/framework/mlt_property.c b/src/framework/mlt_property.c index d64592f2..2e3e1cbc 100644 --- a/src/framework/mlt_property.c +++ b/src/framework/mlt_property.c @@ -1,8 +1,9 @@ /** * \file mlt_property.c * \brief Property class definition + * \see mlt_property_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h index fcf15c18..f33aa882 100644 --- a/src/framework/mlt_property.h +++ b/src/framework/mlt_property.h @@ -1,8 +1,9 @@ /** * \file mlt_property.h * \brief Property class declaration + * \see mlt_property_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_repository.c b/src/framework/mlt_repository.c index df83e9ef..d4241e2b 100644 --- a/src/framework/mlt_repository.c +++ b/src/framework/mlt_repository.c @@ -1,10 +1,11 @@ /** * \file mlt_repository.c * \brief provides a map between service and shared objects + * \see mlt_repository_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates - * Dan Dennedy + * \author Dan Dennedy * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -32,21 +33,28 @@ #include /** \brief Repository class + * + * The Repository is a collection of plugin modules and their services and service metadata. * * \extends mlt_properties_s + * \properties \p language a cached list of user locales */ struct mlt_repository_s { - struct mlt_properties_s parent; // a list of object files - mlt_properties consumers; // lists of entry points - mlt_properties filters; - mlt_properties producers; - mlt_properties transitions; + struct mlt_properties_s parent; /// a list of object files + mlt_properties consumers; /// a list of entry points for consumers + mlt_properties filters; /// a list of entry points for filters + mlt_properties producers; /// a list of entry points for producers + mlt_properties transitions; /// a list of entry points for transitions }; -/** Construct a new repository -*/ +/** Construct a new repository. + * + * \public \memberof mlt_repository_s + * \param directory the full path of a directory from which to read modules + * \return a new repository or NULL if failed + */ mlt_repository mlt_repository_init( const char *directory ) { @@ -109,6 +117,13 @@ mlt_repository mlt_repository_init( const char *directory ) return this; } +/** Create a properties list for a service holding a function pointer to its constructor function. + * + * \private \memberof mlt_repository_s + * \param symbol a pointer to a function that can create the service. + * \return a properties list + */ + static mlt_properties new_service( void *symbol ) { mlt_properties properties = mlt_properties_new(); @@ -116,9 +131,16 @@ static mlt_properties new_service( void *symbol ) return properties; } -/** Register a service with the repository - Typically, this is invoked by a module within its mlt_register(). -*/ +/** Register a service with the repository. + * + * Typically, this is invoked by a module within its mlt_register(). + * + * \public \memberof mlt_repository_s + * \param this a repository + * \param service_type a service class + * \param service the name of a service + * \param symbol a pointer to a function to create the service + */ void mlt_repository_register( mlt_repository this, mlt_service_type service_type, const char *service, mlt_register_callback symbol ) { @@ -142,6 +164,15 @@ void mlt_repository_register( mlt_repository this, mlt_service_type service_type } } +/** Get the repository properties for particular service class. + * + * \private \memberof mlt_repository_s + * \param this a repository + * \param type a service class + * \param service the name of a service + * \return a properties list or NULL if error + */ + static mlt_properties get_service_properties( mlt_repository this, mlt_service_type type, const char *service ) { mlt_properties service_properties = NULL; @@ -167,8 +198,15 @@ static mlt_properties get_service_properties( mlt_repository this, mlt_service_t return service_properties; } -/** Construct a new instance of a service -*/ +/** Construct a new instance of a service. + * + * \public \memberof mlt_repository_s + * \param this a repository + * \param profile a \p mlt_profile to give the service + * \param type a service class + * \param service the name of the service + * \param input an optional argument to the service constructor + */ void *mlt_repository_create( mlt_repository this, mlt_profile profile, mlt_service_type type, const char *service, void *input ) { @@ -183,8 +221,11 @@ void *mlt_repository_create( mlt_repository this, mlt_profile profile, mlt_servi return NULL; } -/** Destroy a repository -*/ +/** Destroy a repository and free its resources. + * + * \public \memberof mlt_repository_s + * \param this a repository + */ void mlt_repository_close( mlt_repository this ) { @@ -196,41 +237,67 @@ void mlt_repository_close( mlt_repository this ) free( this ); } -/** Get the list of registered consumers -*/ +/** Get the list of registered consumers. + * + * \public \memberof mlt_repository_s + * \param self a repository + * \return a properties list containing all of the consumers + */ mlt_properties mlt_repository_consumers( mlt_repository self ) { return self->consumers; } -/** Get the list of registered filters -*/ +/** Get the list of registered filters. + * + * \public \memberof mlt_repository_s + * \param self a repository + * \return a properties list of all of the filters + */ mlt_properties mlt_repository_filters( mlt_repository self ) { return self->filters; } -/** Get the list of registered producers -*/ +/** Get the list of registered producers. + * + * \public \memberof mlt_repository_s + * \param self a repository + * \return a properties list of all of the producers + */ mlt_properties mlt_repository_producers( mlt_repository self ) { return self->producers; } -/** Get the list of registered transitions -*/ +/** Get the list of registered transitions. + * + * \public \memberof mlt_repository_s + * \param self a repository + * \return a properties list of all of the transitions + */ mlt_properties mlt_repository_transitions( mlt_repository self ) { return self->transitions; } -/** Register the metadata for a service - IMPORTANT: mlt_repository will take responsibility for deallocating the metadata properties that you supply! -*/ +/** Register the metadata for a service. + * + * IMPORTANT: mlt_repository will take responsibility for deallocating the metadata properties + * that you supply! + * + * \public \memberof mlt_repository_s + * \param self a repository + * \param type a service class + * \param service the name of a service + * \param callback the pointer to a function that can supply metadata + * \param callback_data an opaque user data pointer to be supplied on the callback + */ + void mlt_repository_register_metadata( mlt_repository self, mlt_service_type type, const char *service, mlt_metadata_callback callback, void *callback_data ) { mlt_properties service_properties = get_service_properties( self, type, service ); @@ -238,9 +305,16 @@ void mlt_repository_register_metadata( mlt_repository self, mlt_service_type typ mlt_properties_set_data( service_properties, "metadata_cb_data", callback_data, 0, NULL, NULL ); } -/** Get the metadata about a service - Returns NULL if service or its metadata are unavailable. -*/ +/** Get the metadata about a service. + * + * Returns NULL if service or its metadata are unavailable. + * + * \public \memberof mlt_repository_s + * \param self a repository + * \param type a service class + * \param service the name of a service + * \return the service metadata as a structured properties list + */ mlt_properties mlt_repository_metadata( mlt_repository self, mlt_service_type type, const char *service ) { @@ -276,6 +350,12 @@ mlt_properties mlt_repository_metadata( mlt_repository self, mlt_service_type ty return metadata; } +/** Try to determine the locale from some commonly used environment variables. + * + * \private \memberof mlt_repository_s + * \return a string containing the locale id or NULL if unknown + */ + static char *getenv_locale() { char *s = getenv( "LANGUAGE" ); @@ -294,7 +374,15 @@ static char *getenv_locale() } /** Return a list of user-preferred language codes taken from environment variables. -*/ + * + * A module should use this to locate a localized YAML Tiny file from which to build + * its metadata strucutured properties. + * + * \public \memberof mlt_repository_s + * \param self a repository + * \return a properties list that is a list (not a map) of locales, defaults to "en" if not + * overridden by environment variables, in order: LANGUAGE, LC_ALL, LC_MESSAGES, LANG + */ mlt_properties mlt_repository_languages( mlt_repository self ) { diff --git a/src/framework/mlt_repository.h b/src/framework/mlt_repository.h index 5873d909..428efc87 100644 --- a/src/framework/mlt_repository.h +++ b/src/framework/mlt_repository.h @@ -1,10 +1,11 @@ /** * \file mlt_repository.h * \brief provides a map between service and shared objects + * \see mlt_repository_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates - * Dan Dennedy + * \author Dan Dennedy * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,32 +28,32 @@ #include "mlt_types.h" #include "mlt_profile.h" -/** Repository structure forward reference. -*/ - -typedef struct mlt_repository_s *mlt_repository; - /** This callback is the main entry point into a module, which must be exported - with the symbol "mlt_register". - Inside the callback, the module registers the additional callbacks below. -*/ + * with the symbol "mlt_register". + * + * Inside the callback, the module registers the additional callbacks below. + */ typedef void ( *mlt_repository_callback )( mlt_repository ); -/** These are callback functions that modules implement to construct services - and metadata. -*/ +/** The callback function that modules implement to construct a service. + */ + typedef void *( *mlt_register_callback )( mlt_profile, mlt_service_type, const char * /* service name */, void * /* arg */ ); + +/** The callback function that modules implement to supply metadata as a properties list. + */ + typedef mlt_properties ( *mlt_metadata_callback )( mlt_service_type, const char * /* service name */, void * /* callback_data */ ); -/** These convenience macros can be used to register services in a more declarative manner. -*/ +/** A convenience macro to create an entry point for service registration. */ #define MLT_REPOSITORY void mlt_register( mlt_repository repository ) + +/** A convenience macro to a register service in a more declarative manner. */ #define MLT_REGISTER( type, service, symbol ) ( mlt_repository_register( repository, (type), (service), ( mlt_register_callback )(symbol) ) ) -#define MLT_REGISTER_METADATA( type, service, callback, data ) ( mlt_repository_register_metadata( repository, (type), (service), ( mlt_metadata_callback )(callback), (data) ) ) -/** Public functions. -*/ +/** A convenience macro to a register metadata in a more declarative manner. */ +#define MLT_REGISTER_METADATA( type, service, callback, data ) ( mlt_repository_register_metadata( repository, (type), (service), ( mlt_metadata_callback )(callback), (data) ) ) extern mlt_repository mlt_repository_init( const char *directory ); extern void mlt_repository_register( mlt_repository self, mlt_service_type service_type, const char *service, mlt_register_callback ); diff --git a/src/framework/mlt_service.c b/src/framework/mlt_service.c index a9f5eda5..d693f232 100644 --- a/src/framework/mlt_service.c +++ b/src/framework/mlt_service.c @@ -1,8 +1,9 @@ /** * \file mlt_service.c * \brief interface definition for all service classes + * \see mlt_service_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_service.h b/src/framework/mlt_service.h index c9216c56..19306314 100644 --- a/src/framework/mlt_service.h +++ b/src/framework/mlt_service.h @@ -1,8 +1,9 @@ /** * \file mlt_service.h * \brief interface declaration for all service classes + * \see mlt_service_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_tokeniser.c b/src/framework/mlt_tokeniser.c index 9d3977e7..9f35376d 100644 --- a/src/framework/mlt_tokeniser.c +++ b/src/framework/mlt_tokeniser.c @@ -1,8 +1,9 @@ /** * \file mlt_tokeniser.c * \brief string tokeniser + * \see mlt_tokeniser_s * - * Copyright (C) 2002-2008 Ushodaya Enterprises Limited + * Copyright (C) 2002-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_tokeniser.h b/src/framework/mlt_tokeniser.h index c0201793..147f8fc9 100644 --- a/src/framework/mlt_tokeniser.h +++ b/src/framework/mlt_tokeniser.h @@ -1,8 +1,9 @@ /** * \file mlt_tokeniser.h * \brief string tokeniser + * \see mlt_tokeniser_s * - * Copyright (C) 2002-2003 Ushodaya Enterprises Limited + * Copyright (C) 2002-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_tractor.c b/src/framework/mlt_tractor.c index 08929535..40c78215 100644 --- a/src/framework/mlt_tractor.c +++ b/src/framework/mlt_tractor.c @@ -1,8 +1,9 @@ /** * \file mlt_tractor.c * \brief tractor service class + * \see mlt_tractor_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_tractor.h b/src/framework/mlt_tractor.h index 4df3d948..73e07153 100644 --- a/src/framework/mlt_tractor.h +++ b/src/framework/mlt_tractor.h @@ -1,8 +1,9 @@ /** * \file mlt_tractor.h * \brief tractor service class + * \see mlt_tractor_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_transition.c b/src/framework/mlt_transition.c index 19a308a6..5077795b 100644 --- a/src/framework/mlt_transition.c +++ b/src/framework/mlt_transition.c @@ -1,8 +1,9 @@ /** * \file mlt_transition.c * \brief abstraction for all transition services + * \see mlt_transition_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_transition.h b/src/framework/mlt_transition.h index 7f11c3bf..0f9879a3 100644 --- a/src/framework/mlt_transition.h +++ b/src/framework/mlt_transition.h @@ -1,8 +1,9 @@ /** * \file mlt_transition.h * \brief abstraction for all transition services + * \see mlt_transition_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or diff --git a/src/framework/mlt_types.h b/src/framework/mlt_types.h index 34c5a213..035fadab 100644 --- a/src/framework/mlt_types.h +++ b/src/framework/mlt_types.h @@ -2,7 +2,7 @@ * \file mlt_types.h * \brief Provides forward definitions of all public types * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or @@ -106,6 +106,7 @@ typedef struct mlt_deque_s *mlt_deque; /**< pointer to Deque ob typedef struct mlt_geometry_s *mlt_geometry; /**< pointer to Geometry object */ typedef struct mlt_geometry_item_s *mlt_geometry_item; /**< pointer to Geometry Item object */ typedef struct mlt_profile_s *mlt_profile; /**< pointer to Profile object */ +typedef struct mlt_repository_s *mlt_repository; /**< pointer to Repository object */ typedef void ( *mlt_destructor )( void * ); /**< pointer to destructor function */ typedef char *( *mlt_serialiser )( void *, int length );/**< pointer to serialization function */ -- 2.39.2