X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fvorbis%2Fproducer_vorbis.c;h=b6346cf4e4564b731d9b914ff59adeb8048f58a6;hb=70933f360aa7d16e5140267ce2f716de924464c7;hp=982808bcf59d1521e73f5d11ff121e2c9f120b1c;hpb=a07c3da76259d6ba479d800ffecc5617a9ad158f;p=melted diff --git a/src/modules/vorbis/producer_vorbis.c b/src/modules/vorbis/producer_vorbis.c index 982808b..b6346cf 100644 --- a/src/modules/vorbis/producer_vorbis.c +++ b/src/modules/vorbis/producer_vorbis.c @@ -18,10 +18,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Local header files -#include "producer_vorbis.h" - // MLT Header files +#include #include // vorbis Header files @@ -34,7 +32,7 @@ #include // Forward references. -static int producer_open( mlt_producer this, char *file ); +static int producer_open( mlt_producer this, mlt_profile profile, char *file ); static int producer_get_frame( mlt_producer this, mlt_frame_ptr frame, int index ); /** Structure for metadata reading @@ -69,7 +67,7 @@ static sw_metadata *vorbis_metadata_from_str (char * str) /** Constructor for libvorbis. */ -mlt_producer producer_vorbis_init( char *file ) +mlt_producer producer_vorbis_init( mlt_profile profile, mlt_service_type type, const char *id, char *file ) { mlt_producer this = NULL; @@ -92,7 +90,7 @@ mlt_producer producer_vorbis_init( char *file ) this->get_frame = producer_get_frame; // Open the file - if ( producer_open( this, file ) != 0 ) + if ( producer_open( this, profile, file ) != 0 ) { // Clean up mlt_producer_close( this ); @@ -122,7 +120,7 @@ static void producer_file_close( void *file ) /** Open the file. */ -static int producer_open( mlt_producer this, char *file ) +static int producer_open( mlt_producer this, mlt_profile profile, char *file ) { // FILE pointer for file FILE *input = fopen( file, "r" ); @@ -164,7 +162,7 @@ static int producer_open( mlt_producer this, char *file ) double length = ov_time_total( ov, -1 ); // We will treat everything with the producer fps - double fps = mlt_producer_get_fps( this ); + double fps = mlt_profile_fps( profile ); // Set out and length of file mlt_properties_set_position( properties, "out", ( length * fps ) - 1 ); @@ -342,7 +340,7 @@ static int producer_get_audio( mlt_frame frame, int16_t **buffer, mlt_audio_form static int producer_get_frame( mlt_producer this, mlt_frame_ptr frame, int index ) { // Create an empty frame - *frame = mlt_frame_init( ); + *frame = mlt_frame_init( MLT_PRODUCER_SERVICE( this ) ); // Update timecode on the frame we're creating mlt_frame_set_position( *frame, mlt_producer_position( this ) );