From: Ray Lehtiniemi Date: Tue, 7 Apr 2009 19:39:19 +0000 (-0600) Subject: Constness changes X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=4fc3fa1bf4116848c423837437d75f103cdd0154;p=melted Constness changes Signed-off-by: Ray Lehtiniemi --- diff --git a/src/framework/mlt_events.c b/src/framework/mlt_events.c index c27a545..5c84190 100644 --- a/src/framework/mlt_events.c +++ b/src/framework/mlt_events.c @@ -158,7 +158,7 @@ void mlt_events_init( mlt_properties this ) * \return true if there was an error */ -int mlt_events_register( mlt_properties this, char *id, mlt_transmitter transmitter ) +int mlt_events_register( mlt_properties this, const char *id, mlt_transmitter transmitter ) { int error = 1; mlt_events events = mlt_events_fetch( this ); diff --git a/src/framework/mlt_events.h b/src/framework/mlt_events.h index 2fe597d..55bb18f 100644 --- a/src/framework/mlt_events.h +++ b/src/framework/mlt_events.h @@ -43,7 +43,7 @@ typedef void ( *mlt_listener )( ); #endif extern void mlt_events_init( mlt_properties self ); -extern int mlt_events_register( mlt_properties self, char *id, mlt_transmitter transmitter ); +extern int mlt_events_register( mlt_properties self, const char *id, mlt_transmitter transmitter ); extern void mlt_events_fire( mlt_properties self, const char *id, ... ); extern mlt_event mlt_events_listen( mlt_properties self, void *service, const char *id, mlt_listener listener ); extern void mlt_events_block( mlt_properties self, void *service ); diff --git a/src/inigo/inigo.c b/src/inigo/inigo.c index 64638d2..698908e 100644 --- a/src/inigo/inigo.c +++ b/src/inigo/inigo.c @@ -265,7 +265,7 @@ static void transport( mlt_producer producer, mlt_consumer consumer ) } } -static void query_metadata( mlt_repository repo, mlt_service_type type, char *typestr, char *id ) +static void query_metadata( mlt_repository repo, mlt_service_type type, const char *typestr, char *id ) { mlt_properties metadata = mlt_repository_metadata( repo, type, id ); if ( metadata ) @@ -283,7 +283,7 @@ static void query_metadata( mlt_repository repo, mlt_service_type type, char *ty static void query_services( mlt_repository repo, mlt_service_type type ) { mlt_properties services = NULL; - char *typestr = NULL; + const char *typestr = NULL; switch ( type ) { case consumer_type: diff --git a/src/modules/avformat/factory.c b/src/modules/avformat/factory.c index 28917f5..54adf93 100644 --- a/src/modules/avformat/factory.c +++ b/src/modules/avformat/factory.c @@ -124,7 +124,7 @@ static void *create_service( mlt_profile profile, mlt_service_type type, const c static mlt_properties avformat_metadata( mlt_service_type type, const char *id, void *data ) { char file[ PATH_MAX ]; - char *service_type = NULL; + const char *service_type = NULL; switch ( type ) { case consumer_type: diff --git a/src/modules/plus/transition_affine.c b/src/modules/plus/transition_affine.c index 0c6bb1f..7197056 100644 --- a/src/modules/plus/transition_affine.c +++ b/src/modules/plus/transition_affine.c @@ -30,7 +30,7 @@ /** Calculate real geometry. */ -static void geometry_calculate( mlt_transition this, char *store, struct mlt_geometry_item_s *output, float position ) +static void geometry_calculate( mlt_transition this, const char *store, struct mlt_geometry_item_s *output, float position ) { mlt_properties properties = MLT_TRANSITION_PROPERTIES( this ); mlt_geometry geometry = mlt_properties_get_data( properties, store, NULL ); @@ -52,7 +52,7 @@ static void geometry_calculate( mlt_transition this, char *store, struct mlt_geo } -static mlt_geometry transition_parse_keys( mlt_transition this, char *name, char *store, int normalised_width, int normalised_height ) +static mlt_geometry transition_parse_keys( mlt_transition this, const char *name, const char *store, int normalised_width, int normalised_height ) { // Get the properties of the transition mlt_properties properties = MLT_TRANSITION_PROPERTIES( this ); @@ -108,7 +108,7 @@ static mlt_geometry composite_calculate( mlt_transition this, struct mlt_geometr return start; } -static inline float composite_calculate_key( mlt_transition this, char *name, char *store, int norm, float position ) +static inline float composite_calculate_key( mlt_transition this, const char *name, const char *store, int norm, float position ) { // Struct for the result struct mlt_geometry_item_s result; diff --git a/src/modules/westley/producer_westley.c b/src/modules/westley/producer_westley.c index 0568a67..0a66540 100644 --- a/src/modules/westley/producer_westley.c +++ b/src/modules/westley/producer_westley.c @@ -170,7 +170,7 @@ static void track_service( mlt_properties properties, void *service, mlt_destruc // Prepend the property value with the document root -static inline void qualify_property( deserialise_context context, mlt_properties properties, char *name ) +static inline void qualify_property( deserialise_context context, mlt_properties properties, const char *name ) { char *resource = mlt_properties_get( properties, name ); if ( resource != NULL ) diff --git a/src/modules/xine/deinterlace.c b/src/modules/xine/deinterlace.c index 3e14007..4a99e94 100644 --- a/src/modules/xine/deinterlace.c +++ b/src/modules/xine/deinterlace.c @@ -846,7 +846,7 @@ int deinterlace_yuv_supported ( int method ) return 0; } -char *deinterlace_methods[] = { +const char *deinterlace_methods[] = { "none", "bob", "weave", diff --git a/src/modules/xine/deinterlace.h b/src/modules/xine/deinterlace.h index 5d9018c..0cad92a 100644 --- a/src/modules/xine/deinterlace.h +++ b/src/modules/xine/deinterlace.h @@ -42,6 +42,6 @@ void deinterlace_yuv( uint8_t *pdst, uint8_t *psrc[], #define DEINTERLACE_ONEFIELDXV 5 #define DEINTERLACE_LINEARBLEND 6 -extern char *deinterlace_methods[]; +extern const char *deinterlace_methods[]; #endif