]> git.sesse.net Git - mlt/commitdiff
Minor mods
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 14 Jan 2004 13:41:06 +0000 (13:41 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Wed, 14 Jan 2004 13:41:06 +0000 (13:41 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@76 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt/src/framework/mlt_multitrack.c
mlt/src/framework/mlt_playlist.c
mlt/src/framework/mlt_producer.c
mlt/src/modules/ffmpeg/producer_ffmpeg.c
src/framework/mlt_multitrack.c
src/framework/mlt_playlist.c
src/framework/mlt_producer.c
src/modules/ffmpeg/producer_ffmpeg.c

index 47bc271d1e421a4d7ff4ba4b3f46ba2897b0b3ed..59b2383227cf3fa2061eb3cc8124368c3dd695e2 100644 (file)
@@ -147,7 +147,7 @@ void mlt_multitrack_refresh( mlt_multitrack this )
 
        // Update multitrack properties now - we'll not destroy the in point here
        mlt_properties_set_position( properties, "length", length );
-       mlt_properties_set_position( properties, "out", length );
+       mlt_properties_set_position( properties, "out", length - 1 );
        mlt_properties_set_double( properties, "fps", fps );
 }
 
@@ -298,7 +298,7 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind
                mlt_producer producer = this->list[ index ];
 
                // Obtain the current position
-               uint64_t position = mlt_producer_frame( parent );
+               mlt_position position = mlt_producer_frame( parent );
 
                // Make sure we're at the same point
                mlt_producer_seek( producer, position );
index 921bbd5e44da3372997d8a286e997fca0b4ade62..ff9e27386ba3ec2960a54e715934073b6061d919 100644 (file)
@@ -149,7 +149,7 @@ static int mlt_playlist_virtual_refresh( mlt_playlist this )
        mlt_properties_set_double( mlt_playlist_properties( this ), "first_fps", fps );
        mlt_properties_set_double( mlt_playlist_properties( this ), "fps", fps == 0 ? 25 : fps );
        mlt_properties_set_position( mlt_playlist_properties( this ), "length", frame_count );
-       mlt_properties_set_position( mlt_playlist_properties( this ), "out", frame_count );
+       mlt_properties_set_position( mlt_playlist_properties( this ), "out", frame_count - 1 );
 
        return 0;
 }
index c874243548cf7a529cdd95d40ae63accdcc521d4..f4e5bd591f86333027db308d0e13f1853cf55938 100644 (file)
@@ -57,9 +57,9 @@ int mlt_producer_init( mlt_producer this, void *child )
                mlt_properties_set_double( properties, "frame", 0 );
                mlt_properties_set_double( properties, "fps", 25.0 );
                mlt_properties_set_double( properties, "speed", 1.0 );
-               mlt_properties_set_position( properties, "in", 0.0 );
-               mlt_properties_set_position( properties, "out", 179999 );
-               mlt_properties_set_position( properties, "length", 180000 );
+               mlt_properties_set_position( properties, "in", 0 );
+               mlt_properties_set_position( properties, "out", 1799999 );
+               mlt_properties_set_position( properties, "length", 1800000 );
                mlt_properties_set_double( properties, "aspect_ratio", 4.0 / 3.0 );
                mlt_properties_set( properties, "log_id", "multitrack" );
 
@@ -86,32 +86,6 @@ mlt_properties mlt_producer_properties( mlt_producer this )
        return mlt_service_properties( &this->parent );
 }
 
-/** Convert frame position to position.
-*/
-
-/*
-mlt_position mlt_producer_time( mlt_producer this, int64_t frame )
-{
-       if ( frame < 0 )
-               return -1;
-       else
-               return ( mlt_position )frame / mlt_producer_get_fps( this );
-}
-*/
-
-/** Convert position to frame position.
-*/
-
-/*
-int64_t mlt_producer_frame_position( mlt_producer this, mlt_position position )
-{
-       if ( position < 0 )
-               return -1;
-       else
-               return ( int64_t )( floor( position * mlt_producer_get_fps( this ) + 0.5 ) );
-}
-*/
-
 /** Seek to a specified position.
 */
 
index f383aff1bc203f04be74dc9fa1121d56337328b3..43b8a2e2ec3b18c787a1077381c8435b811b2d3c 100644 (file)
@@ -202,6 +202,8 @@ mlt_producer producer_ffmpeg_init( char *file )
 
                mlt_properties_set( properties, "log_id", file );
                mlt_properties_set( properties, "resource", file );
+               mlt_properties_set_position( properties, "length", 36000 );
+               mlt_properties_set_position( properties, "out", 36000 );
 
                this->buffer = malloc( 1024 * 1024 * 2 );
 
index 47bc271d1e421a4d7ff4ba4b3f46ba2897b0b3ed..59b2383227cf3fa2061eb3cc8124368c3dd695e2 100644 (file)
@@ -147,7 +147,7 @@ void mlt_multitrack_refresh( mlt_multitrack this )
 
        // Update multitrack properties now - we'll not destroy the in point here
        mlt_properties_set_position( properties, "length", length );
-       mlt_properties_set_position( properties, "out", length );
+       mlt_properties_set_position( properties, "out", length - 1 );
        mlt_properties_set_double( properties, "fps", fps );
 }
 
@@ -298,7 +298,7 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind
                mlt_producer producer = this->list[ index ];
 
                // Obtain the current position
-               uint64_t position = mlt_producer_frame( parent );
+               mlt_position position = mlt_producer_frame( parent );
 
                // Make sure we're at the same point
                mlt_producer_seek( producer, position );
index 921bbd5e44da3372997d8a286e997fca0b4ade62..ff9e27386ba3ec2960a54e715934073b6061d919 100644 (file)
@@ -149,7 +149,7 @@ static int mlt_playlist_virtual_refresh( mlt_playlist this )
        mlt_properties_set_double( mlt_playlist_properties( this ), "first_fps", fps );
        mlt_properties_set_double( mlt_playlist_properties( this ), "fps", fps == 0 ? 25 : fps );
        mlt_properties_set_position( mlt_playlist_properties( this ), "length", frame_count );
-       mlt_properties_set_position( mlt_playlist_properties( this ), "out", frame_count );
+       mlt_properties_set_position( mlt_playlist_properties( this ), "out", frame_count - 1 );
 
        return 0;
 }
index c874243548cf7a529cdd95d40ae63accdcc521d4..f4e5bd591f86333027db308d0e13f1853cf55938 100644 (file)
@@ -57,9 +57,9 @@ int mlt_producer_init( mlt_producer this, void *child )
                mlt_properties_set_double( properties, "frame", 0 );
                mlt_properties_set_double( properties, "fps", 25.0 );
                mlt_properties_set_double( properties, "speed", 1.0 );
-               mlt_properties_set_position( properties, "in", 0.0 );
-               mlt_properties_set_position( properties, "out", 179999 );
-               mlt_properties_set_position( properties, "length", 180000 );
+               mlt_properties_set_position( properties, "in", 0 );
+               mlt_properties_set_position( properties, "out", 1799999 );
+               mlt_properties_set_position( properties, "length", 1800000 );
                mlt_properties_set_double( properties, "aspect_ratio", 4.0 / 3.0 );
                mlt_properties_set( properties, "log_id", "multitrack" );
 
@@ -86,32 +86,6 @@ mlt_properties mlt_producer_properties( mlt_producer this )
        return mlt_service_properties( &this->parent );
 }
 
-/** Convert frame position to position.
-*/
-
-/*
-mlt_position mlt_producer_time( mlt_producer this, int64_t frame )
-{
-       if ( frame < 0 )
-               return -1;
-       else
-               return ( mlt_position )frame / mlt_producer_get_fps( this );
-}
-*/
-
-/** Convert position to frame position.
-*/
-
-/*
-int64_t mlt_producer_frame_position( mlt_producer this, mlt_position position )
-{
-       if ( position < 0 )
-               return -1;
-       else
-               return ( int64_t )( floor( position * mlt_producer_get_fps( this ) + 0.5 ) );
-}
-*/
-
 /** Seek to a specified position.
 */
 
index f383aff1bc203f04be74dc9fa1121d56337328b3..43b8a2e2ec3b18c787a1077381c8435b811b2d3c 100644 (file)
@@ -202,6 +202,8 @@ mlt_producer producer_ffmpeg_init( char *file )
 
                mlt_properties_set( properties, "log_id", file );
                mlt_properties_set( properties, "resource", file );
+               mlt_properties_set_position( properties, "length", 36000 );
+               mlt_properties_set_position( properties, "out", 36000 );
 
                this->buffer = malloc( 1024 * 1024 * 2 );