]> git.sesse.net Git - mlt/commitdiff
Make the frame audio properties consistent.
authorDan Dennedy <dan@dennedy.org>
Sat, 7 May 2011 04:13:37 +0000 (21:13 -0700)
committerDan Dennedy <dan@dennedy.org>
Sat, 7 May 2011 04:13:37 +0000 (21:13 -0700)
src/framework/mlt_tractor.c
src/modules/avformat/producer_avformat.c
src/modules/dv/producer_libdv.c
src/modules/vorbis/producer_vorbis.c

index e6f8c6dc5821f2f7bb65240c51e75bd663b70f4e..202977ba38f236533af7eaae7e3c32b7aa7c841b 100644 (file)
@@ -296,8 +296,9 @@ static int producer_get_audio( mlt_frame self, void **buffer, mlt_audio_format *
        mlt_frame frame = mlt_frame_pop_audio( self );
        mlt_frame_get_audio( frame, buffer, format, frequency, channels, samples );
        mlt_frame_set_audio( self, *buffer, *format, mlt_audio_format_size( *format, *samples, *channels ), NULL );
-       mlt_properties_set_int( properties, "frequency", *frequency );
-       mlt_properties_set_int( properties, "channels", *channels );
+       mlt_properties_set_int( properties, "audio_frequency", *frequency );
+       mlt_properties_set_int( properties, "audio_channels", *channels );
+       mlt_properties_set_int( properties, "audio_samples", *samples );
        return 0;
 }
 
index 550b6e4f0ea119cbb5e1654283a5e289bff9e680..970684f2585f75732eb035f824e4ff08229d2a4e 100644 (file)
@@ -2351,8 +2351,8 @@ static void producer_set_up_audio( producer_avformat self, mlt_frame frame )
        // Get the codec(s)
        if ( context && index == INT_MAX )
        {
-               mlt_properties_set_int( frame_properties, "frequency", self->max_frequency );
-               mlt_properties_set_int( frame_properties, "channels", self->total_channels );
+               mlt_properties_set_int( frame_properties, "audio_frequency", self->max_frequency );
+               mlt_properties_set_int( frame_properties, "audio_channels", self->total_channels );
                for ( index = 0; index < context->nb_streams; index++ )
                {
                        if ( context->streams[ index ]->codec->codec_type == CODEC_TYPE_AUDIO )
index 3d9eaf4edfc261d241510880e0701d19e56d2dab..345602aa4016447e32b85c2116dc5a510c8e834e 100644 (file)
@@ -500,8 +500,8 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i
                                dv_format_wide( dv_decoder ) ? ( this->is_pal ? 118.0/81.0 : 40.0/33.0 ) : ( this->is_pal ? 59.0/54.0 : 10.0/11.0 ) );
        
 
-               mlt_properties_set_int( properties, "frequency", dv_decoder->audio->frequency );
-               mlt_properties_set_int( properties, "channels", dv_decoder->audio->num_channels );
+               mlt_properties_set_int( properties, "audio_frequency", dv_decoder->audio->frequency );
+               mlt_properties_set_int( properties, "audio_channels", dv_decoder->audio->num_channels );
 
                // Register audio callback
                if ( mlt_properties_get_int( MLT_PRODUCER_PROPERTIES( producer ), "audio_index" ) > 0 )
index 99499b28f9e69e6abe908aa29bfabd1ba7c4fa04..908aeec4d608944f95c1aaa20e5c9120bc61788c 100644 (file)
@@ -171,8 +171,8 @@ static int producer_open( mlt_producer this, mlt_profile profile, char *file )
 
                                // Get the vorbis info
                                vorbis_info *vi = ov_info( ov, -1 );
-                               mlt_properties_set_int( properties, "frequency", (int) vi->rate );
-                               mlt_properties_set_int( properties, "channels", vi->channels );
+                               mlt_properties_set_int( properties, "audio_frequency", (int) vi->rate );
+                               mlt_properties_set_int( properties, "audio_channels", vi->channels );
 
                                // Set some media metadata
                                mlt_properties_set_int( properties, "meta.media.nb_streams", 1 );