]> git.sesse.net Git - mlt/commitdiff
track reversal and hidden tracks
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 24 Mar 2004 17:19:48 +0000 (17:19 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 24 Mar 2004 17:19:48 +0000 (17:19 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@238 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_frame.c
src/framework/mlt_multitrack.c
src/framework/mlt_producer.c
src/framework/mlt_tractor.c
src/framework/mlt_transition.c
src/modules/inigo/producer_inigo.c

index 360ecb02767745f2154ab29c336c8562ef3efd99..ce820b9a0e74c3df928c52153240c0bfafcd2c54 100644 (file)
@@ -88,7 +88,7 @@ mlt_properties mlt_frame_properties( mlt_frame this )
 
 int mlt_frame_is_test_card( mlt_frame this )
 {
-       return mlt_properties_get_int( mlt_frame_properties( this ), "test_image" );
+       return mlt_deque_count( this->stack_image ) == 0 || mlt_properties_get_int( mlt_frame_properties( this ), "test_image" );
 }
 
 /** Check if we have a way to derive something than test audio.
index 323d1ee9e3da4ac5807bc053646a6b3e600f4eb4..84f23893c1e97c0ad3e5b04aef639f14344c5794 100644 (file)
@@ -374,6 +374,7 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind
                double speed = mlt_properties_get_double( producer_properties, "_speed" );
                mlt_properties properties = mlt_frame_properties( *frame );
                mlt_properties_set_double( properties, "_speed", speed );
+               mlt_properties_set_int( properties, "hide", mlt_properties_get_int( mlt_producer_properties( producer ), "hide" ) );
        }
        else
        {
index 74441f94a8d4a03cd8d1c976a3a1e3efa1e8be15..a35d134ea453f762d0b93b4556c53eb3d7d608e8 100644 (file)
@@ -298,6 +298,8 @@ static int producer_get_frame( mlt_service service, mlt_frame_ptr frame, int ind
        mlt_properties_set_double( properties, "fps", mlt_producer_get_fps( this ) );
        double speed = mlt_producer_get_speed( this );
        mlt_properties_set_double( properties, "_speed", speed );
+       mlt_properties_set_int( properties, "test_audio", mlt_frame_is_test_audio( *frame ) );
+       mlt_properties_set_int( properties, "test_image", mlt_frame_is_test_card( *frame ) );
 
        return 0;
 }
index 16c7c50ffbffb599d8a67d92c7c62444177c60c5..783cf5581b58904e938a4b3f6668662b25028239 100644 (file)
@@ -199,9 +199,9 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int tra
                                mlt_properties_set_data( frame_properties, label, temp, 0, ( mlt_destructor )mlt_frame_close, NULL );
 
                                // Pick up first video and audio frames
-                               if ( audio == NULL && !mlt_frame_is_test_audio( temp ) )
+                               if ( !done && !mlt_frame_is_test_audio( temp ) && !( mlt_properties_get_int( mlt_frame_properties( temp ), "hide" ) & 2 ) )
                                        audio = temp;
-                               if ( video == NULL && !mlt_frame_is_test_card( temp ) )
+                               if ( !done && !mlt_frame_is_test_card( temp ) && !( mlt_properties_get_int( mlt_frame_properties( temp ), "hide" ) & 1 ) )
                                        video = temp;
                        }
        
index 12443d7370e4a7cd1958fccb7d66b2d373af7478..7d4bc417d026236aef9770987d07573d78b8fa0d 100644 (file)
@@ -197,6 +197,10 @@ static int transition_get_frame( mlt_service service, mlt_frame_ptr frame, int i
                {
                        // Process the transition
                        *frame = mlt_transition_process( this, this->a_frame, this->b_frame );
+                       if ( !mlt_properties_get_int( mlt_frame_properties( this->a_frame ), "test_image" ) )
+                               mlt_properties_set_int( mlt_frame_properties( this->b_frame ), "test_image", 1 );
+                       if ( !mlt_properties_get_int( mlt_frame_properties( this->a_frame ), "test_audio" ) )
+                               mlt_properties_set_int( mlt_frame_properties( this->b_frame ), "test_audio", 1 );
                        this->a_held = 0;
                }
                else
index 8e1b1c81194d149fa73a8c9c065d25a6827cb70f..1e6b4bbe1c7f3092cbb06085f36f87b9e3af3103 100644 (file)
@@ -158,7 +158,10 @@ mlt_producer producer_inigo_init( char **argv )
                        producer = NULL;
                        mlt_playlist_blank( playlist, atof( argv[ ++ i ] ) );
                }
-               else if ( !strcmp( argv[ i ], "-track" ) )
+               else if ( !strcmp( argv[ i ], "-track" ) ||
+                                 !strcmp( argv[ i ], "-hide-track" ) ||
+                                 !strcmp( argv[ i ], "-hide-video" ) ||
+                                 !strcmp( argv[ i ], "-hide-audio" ) )
                {
                        if ( producer != NULL )
                                mlt_playlist_append( playlist, producer );
@@ -166,6 +169,16 @@ mlt_producer producer_inigo_init( char **argv )
                        mlt_multitrack_connect( multitrack, mlt_playlist_producer( playlist ), track ++ );
                        track_service( field, playlist, ( mlt_destructor )mlt_playlist_close );
                        playlist = mlt_playlist_init( );
+                       if ( playlist != NULL )
+                       {
+                               properties = mlt_playlist_properties( playlist );
+                               if ( !strcmp( argv[ i ], "-hide-track" ) )
+                                       mlt_properties_set_int( properties, "hide", 3 );
+                               else if ( !strcmp( argv[ i ], "-hide-video" ) )
+                                       mlt_properties_set_int( properties, "hide", 1 );
+                               else if ( !strcmp( argv[ i ], "-hide-audio" ) )
+                                       mlt_properties_set_int( properties, "hide", 2 );
+                       }
                }
                else if ( strchr( argv[ i ], '=' ) )
                {