From 4dbf3ebb9b3642a02300bd2388c6b2211160cb5a Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Tue, 31 Aug 2004 08:29:37 +0000 Subject: [PATCH] Minor make/configure mods and mlt_frame_waveform mod git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@401 d19143bc-622f-0410-bfdd-b5b2a6649095 --- configure | 2 +- src/framework/Makefile | 41 ++++++++++++++++--------------- src/framework/mlt_frame.c | 3 +- src/framework/mlt_frame.h | 2 +- src/modules/westley/consumer_westley.c | 4 +++ src/valerie/Makefile | 22 ++++++++-------- 6 files changed, 40 insertions(+), 34 deletions(-) diff --git a/configure b/configure index c238296..e198581 100755 --- a/configure +++ b/configure @@ -55,7 +55,7 @@ function build_config echo "LIBDL=-ldl" echo "OPTIMISATIONS=-O4 -pipe -ffast-math -fomit-frame-pointer" - echo "CFLAGS+=-Wall \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE) -pthread" + echo "CFLAGS+=-Wall -fPIC -DPIC \$(TARGETARCH) \$(TARGETCPU) \$(OPTIMISATIONS) \$(MMX_FLAGS) \$(DEBUG_FLAGS) \$(LARGE_FILE) -pthread" ) > config.mak echo "#!/bin/sh" > mlt-config diff --git a/src/framework/Makefile b/src/framework/Makefile index 7a60973..047e4e8 100644 --- a/src/framework/Makefile +++ b/src/framework/Makefile @@ -20,6 +20,26 @@ OBJS = mlt_frame.o \ mlt_pool.o \ mlt_tokeniser.o +INCS = mlt_consumer.h \ + mlt_factory.h \ + mlt_filter.h \ + mlt.h \ + mlt_multitrack.h \ + mlt_pool.h \ + mlt_properties.h \ + mlt_repository.h \ + mlt_tractor.h \ + mlt_types.h \ + mlt_deque.h \ + mlt_field.h \ + mlt_frame.h \ + mlt_playlist.h \ + mlt_producer.h \ + mlt_property.h \ + mlt_service.h \ + mlt_transition.h \ + mlt_tokeniser.h + SRCS := $(OBJS:.o=.c) CFLAGS += -rdynamic -DPREFIX="\"$(prefix)\"" @@ -43,26 +63,7 @@ clean: install: install -m 755 $(TARGET) $(prefix)/lib/libmlt.so install -d "$(prefix)/include/mlt/framework" - install -m 644 mlt_consumer.h \ - mlt_factory.h \ - mlt_filter.h \ - mlt.h \ - mlt_multitrack.h \ - mlt_pool.h \ - mlt_properties.h \ - mlt_repository.h \ - mlt_tractor.h \ - mlt_types.h \ - mlt_deque.h \ - mlt_field.h \ - mlt_frame.h \ - mlt_playlist.h \ - mlt_producer.h \ - mlt_property.h \ - mlt_service.h \ - mlt_transition.h \ - mlt_tokeniser.h \ - "$(prefix)/include/mlt/framework" + install -m 644 $(INCS) "$(prefix)/include/mlt/framework" ifneq ($(wildcard .depend),) include .depend diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index 5593c6b..7674633 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -339,13 +339,14 @@ int mlt_frame_get_audio( mlt_frame this, int16_t **buffer, mlt_audio_format *for return 0; } -unsigned char *mlt_frame_get_waveform( mlt_frame this, double fps, int w, int h ) +unsigned char *mlt_frame_get_waveform( mlt_frame this, int w, int h ) { int16_t *pcm = NULL; mlt_properties properties = mlt_frame_properties( this ); mlt_audio_format format = mlt_audio_pcm; int frequency = 32000; // lower frequency available? int channels = 2; + double fps = mlt_properties_get_double( properties, "fps" ); int samples = mlt_sample_calculator( fps, frequency, mlt_frame_get_position( this ) ); // Get the pcm data diff --git a/src/framework/mlt_frame.h b/src/framework/mlt_frame.h index 11da681..cf86fba 100644 --- a/src/framework/mlt_frame.h +++ b/src/framework/mlt_frame.h @@ -51,7 +51,7 @@ extern int mlt_frame_set_position( mlt_frame self, mlt_position value ); extern int mlt_frame_get_image( mlt_frame self, uint8_t **buffer, mlt_image_format *format, int *width, int *height, int writable ); extern uint8_t *mlt_frame_get_alpha_mask( mlt_frame self ); extern int mlt_frame_get_audio( mlt_frame self, int16_t **buffer, mlt_audio_format *format, int *frequency, int *channels, int *samples ); -extern unsigned char *mlt_frame_get_waveform( mlt_frame self, double fps, int w, int h ); +extern unsigned char *mlt_frame_get_waveform( mlt_frame self, int w, int h ); extern int mlt_frame_push_get_image( mlt_frame self, mlt_get_image get_image ); extern mlt_get_image mlt_frame_pop_get_image( mlt_frame self ); extern int mlt_frame_push_frame( mlt_frame self, mlt_frame that ); diff --git a/src/modules/westley/consumer_westley.c b/src/modules/westley/consumer_westley.c index c90d584..632ee4b 100644 --- a/src/modules/westley/consumer_westley.c +++ b/src/modules/westley/consumer_westley.c @@ -280,6 +280,7 @@ static void serialise_multitrack( serialise_context context, mlt_service service if ( hide ) xmlNewProp( track, "hide", hide == 1 ? "video" : ( hide == 2 ? "audio" : "both" ) ); } + serialise_producer_filters( context, service, child ); } } @@ -349,6 +350,8 @@ static void serialise_playlist( serialise_context context, mlt_service service, } } } + + serialise_producer_filters( context, service, child ); } else if ( strcmp( (const char*) node->name, "tractor" ) != 0 ) { @@ -383,6 +386,7 @@ static void serialise_tractor( serialise_context context, mlt_service service, x // Recurse on connected producer serialise_service( context, mlt_service_producer( service ), child ); + serialise_producer_filters( context, service, child ); } } diff --git a/src/valerie/Makefile b/src/valerie/Makefile index e0beb11..67b6cf7 100644 --- a/src/valerie/Makefile +++ b/src/valerie/Makefile @@ -12,6 +12,16 @@ OBJS = valerie.o \ valerie_remote.o \ valerie_socket.o +INCS = valerie.h \ + valerie_notifier.h \ + valerie_parser.h \ + valerie_remote.h \ + valerie_response.h \ + valerie_socket.h \ + valerie_status.h \ + valerie_tokeniser.h \ + valerie_util.h + SRCS := $(OBJS:.o=.c) LDFLAGS += -lpthread @@ -33,17 +43,7 @@ clean: install: all install -m 755 $(TARGET) $(prefix)/lib/libvalerie.so mkdir -p "$(prefix)/include/mlt/valerie" - install -m 644 \ - valerie.h \ - valerie_notifier.h \ - valerie_parser.h \ - valerie_remote.h \ - valerie_response.h \ - valerie_socket.h \ - valerie_status.h \ - valerie_tokeniser.h \ - valerie_util.h \ - "$(prefix)/include/mlt/valerie" + install -m 644 $(INCS) "$(prefix)/include/mlt/valerie" ifneq ($(wildcard .depend),) include .depend -- 1.7.4.4