X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fdv%2Fproducer_libdv.c;h=3da5de384233f65f65540053a4540547c15251ab;hb=5a18fbd70d4b0459e885b0515cd6377350bf61aa;hp=8c139df6c663884cac83b3e9eda9d7b5e91e4e12;hpb=80a5c8297b313b09add80814a637a71ba9e0fa05;p=melted diff --git a/src/modules/dv/producer_libdv.c b/src/modules/dv/producer_libdv.c index 8c139df..3da5de3 100644 --- a/src/modules/dv/producer_libdv.c +++ b/src/modules/dv/producer_libdv.c @@ -130,18 +130,14 @@ static int producer_collect_info( producer_libdv this ) // Calculate default in/out points double fps = this->is_pal ? 25 : 30000.0 / 1001.0; - mlt_timecode length = ( mlt_timecode )( this->frames_in_file ) / fps; mlt_properties_set_double( properties, "fps", fps ); - mlt_properties_set_timecode( properties, "length", length ); - mlt_properties_set_timecode( properties, "in", 0.0 ); - mlt_properties_set_timecode( properties, "out", ( mlt_timecode )( this->frames_in_file - 1 ) / fps ); + mlt_properties_set_position( properties, "length", this->frames_in_file ); + mlt_properties_set_position( properties, "in", 0 ); + mlt_properties_set_position( properties, "out", this->frames_in_file - 1 ); // Parse the header for meta info dv_parse_header( this->dv_decoder, dv_data ); mlt_properties_set_double( properties, "aspect_ratio", dv_format_wide( this->dv_decoder ) ? 16.0/9.0 : 4.0/3.0 ); - - // Set the speed to normal - mlt_properties_set_double( properties, "speed", 1 ); } free( dv_data ); @@ -227,6 +223,7 @@ static int producer_get_audio( mlt_frame this, int16_t **buffer, mlt_audio_forma dv_parse_header( decoder, dv_data ); // Obtain required values + //fprintf( stderr, "libdv: frequency %d\n", decoder->audio->frequency ); *frequency = decoder->audio->frequency; *samples = decoder->audio->samples_this_frame; *channels = decoder->audio->num_channels; @@ -307,7 +304,7 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i } // Update timecode on the frame we're creating - mlt_frame_set_timecode( *frame, mlt_producer_position( producer ) ); + mlt_frame_set_position( *frame, mlt_producer_position( producer ) ); // Calculate the next timecode mlt_producer_prepare_next( producer );