[Mlt-devel] mlt/src/framework mlt_deque.c,1.3,1.4 mlt_deque.h,1.3,1.4 mlt_frame.c,1.81,1.82 mlt_trac
Brought to you by:
ddennedy,
lilo_booter
From: Charles Y. <lil...@us...> - 2005-06-26 21:05:04
|
Update of /cvsroot/mlt/mlt/src/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1893/src/framework Modified Files: mlt_deque.c mlt_deque.h mlt_frame.c mlt_tractor.c Log Message: src/framework/mlt_deque.c src/framework/mlt_deque.h + Added support for doubles src/framework/mlt_frame.c + Switched order of source/dest audio mix extraction (for transition as filter usage) src/framework/mlt_tractor.c - Removed warning introduced from previous checkin (missing ctype.h) + Temporary work around to allow frames to carry multiple frames (for transition as filter usage) src/modules/core/Makefile src/modules/core/configure src/modules/core/factory.c + Support for new transition filter :-) src/modules/core/transition_composite.c src/modules/core/transition_composite.h - Removed frame properties dependence for process/get_image state communication + Extended alpha blending modes to 'and' and 'xor' logic (may change property triggering soon) + Provided support for transition as filter usage + Cleaned up public copy region functionality Index: mlt_tractor.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/framework/mlt_tractor.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- mlt_tractor.c 24 Jun 2005 08:36:10 -0000 1.41 +++ mlt_tractor.c 26 Jun 2005 21:04:26 -0000 1.42 @@ -28,6 +28,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <ctype.h> /** Forward references to static methods. */ @@ -252,6 +253,8 @@ } /** Get the next frame. + + TODO: This function needs to be redesigned... */ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int track ) @@ -408,10 +411,24 @@ // Pick up first video and audio frames if ( !done && !mlt_frame_is_test_audio( temp ) && !( mlt_properties_get_int( temp_properties, "hide" ) & 2 ) ) + { + // Order of frame creation is starting to get problematic + if ( audio != NULL ) + { + mlt_deque_push_front( MLT_FRAME_AUDIO_STACK( temp ), producer_get_audio ); + mlt_deque_push_front( MLT_FRAME_AUDIO_STACK( temp ), audio ); + } audio = temp; + } if ( !done && !mlt_frame_is_test_card( temp ) && !( mlt_properties_get_int( temp_properties, "hide" ) & 1 ) ) + { + if ( video != NULL ) + { + mlt_deque_push_front( MLT_FRAME_IMAGE_STACK( temp ), producer_get_image ); + mlt_deque_push_front( MLT_FRAME_IMAGE_STACK( temp ), video ); + } video = temp; - + } } // Now stack callbacks Index: mlt_deque.h =================================================================== RCS file: /cvsroot/mlt/mlt/src/framework/mlt_deque.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mlt_deque.h 1 Feb 2005 09:37:33 -0000 1.3 +++ mlt_deque.h 26 Jun 2005 21:04:26 -0000 1.4 @@ -39,6 +39,13 @@ extern int mlt_deque_peek_back_int( mlt_deque self ); extern int mlt_deque_peek_front_int( mlt_deque self ); +extern int mlt_deque_push_back_double( mlt_deque self, double item ); +extern double mlt_deque_pop_back_double( mlt_deque self ); +extern int mlt_deque_push_front_double( mlt_deque self, double item ); +extern double mlt_deque_pop_front_double( mlt_deque self ); +extern double mlt_deque_peek_back_double( mlt_deque self ); +extern double mlt_deque_peek_front_double( mlt_deque self ); + extern void mlt_deque_close( mlt_deque self ); #endif Index: mlt_frame.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/framework/mlt_frame.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- mlt_frame.c 18 Feb 2005 08:44:13 -0000 1.81 +++ mlt_frame.c 26 Jun 2005 21:04:26 -0000 1.82 @@ -971,8 +971,8 @@ int i, j; double d = 0, s = 0; - mlt_frame_get_audio( this, &dest, format, &frequency_dest, &channels_dest, &samples_dest ); mlt_frame_get_audio( that, &src, format, &frequency_src, &channels_src, &samples_src ); + mlt_frame_get_audio( this, &dest, format, &frequency_dest, &channels_dest, &samples_dest ); int silent = mlt_properties_get_int( MLT_FRAME_PROPERTIES( this ), "silent_audio" ); mlt_properties_set_int( MLT_FRAME_PROPERTIES( this ), "silent_audio", 0 ); Index: mlt_deque.c =================================================================== RCS file: /cvsroot/mlt/mlt/src/framework/mlt_deque.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- mlt_deque.c 1 Feb 2005 09:37:33 -0000 1.3 +++ mlt_deque.c 26 Jun 2005 21:04:26 -0000 1.4 @@ -29,6 +29,7 @@ { void *addr; int value; + double floating; } deque_entry; @@ -216,6 +217,75 @@ return this->count > 0 ? this->list[ 0 ].value : 0; } +/** Push an item to the end. +*/ + +int mlt_deque_push_back_double( mlt_deque this, double item ) +{ + int error = mlt_deque_allocate( this ); + + if ( error == 0 ) + this->list[ this->count ++ ].floating = item; + + return error; +} + +/** Pop an item. +*/ + +double mlt_deque_pop_back_double( mlt_deque this ) +{ + return this->count > 0 ? this->list[ -- this->count ].floating : 0; +} + +/** Queue an item at the start. +*/ + +int mlt_deque_push_front_double( mlt_deque this, double item ) +{ + int error = mlt_deque_allocate( this ); + + if ( error == 0 ) + { + memmove( &this->list[ 1 ], this->list, ( this->count ++ ) * sizeof( deque_entry ) ); + this->list[ 0 ].floating = item; + } + + return error; +} + +/** Remove an item from the start. +*/ + +double mlt_deque_pop_front_double( mlt_deque this ) +{ + double item = 0; + + if ( this->count > 0 ) + { + item = this->list[ 0 ].floating; + memmove( this->list, &this->list[ 1 ], ( -- this->count ) * sizeof( deque_entry ) ); + } + + return item; +} + +/** Inquire on item at back of deque but don't remove. +*/ + +double mlt_deque_peek_back_double( mlt_deque this ) +{ + return this->count > 0 ? this->list[ this->count - 1 ].floating : 0; +} + +/** Inquire on item at front of deque but don't remove. +*/ + +double mlt_deque_peek_front_double( mlt_deque this ) +{ + return this->count > 0 ? this->list[ 0 ].floating : 0; +} + /** Close the queue. */ |