]> git.sesse.net Git - mlt/blobdiff - src/modules/sdl/consumer_sdl.c
framework: remove global profile, rather share one mlt_profile across a service netwo...
[mlt] / src / modules / sdl / consumer_sdl.c
index 9d663fd325d7ef88a12b6ca1b37bb3297dcc29ac..0736b9d3e95f96ea0a75fbd905ac68739e71341a 100644 (file)
@@ -18,7 +18,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-#include "consumer_sdl.h"
+#include <framework/mlt_consumer.h>
 #include <framework/mlt_frame.h>
 #include <framework/mlt_deque.h>
 #include <framework/mlt_factory.h>
@@ -81,13 +81,13 @@ static void consumer_sdl_event( mlt_listener listener, mlt_properties owner, mlt
        via the argument, but keep it simple.
 */
 
-mlt_consumer consumer_sdl_init( char *arg )
+mlt_consumer consumer_sdl_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg )
 {
        // Create the consumer object
        consumer_sdl this = calloc( sizeof( struct consumer_sdl_s ), 1 );
 
        // If no malloc'd and consumer init ok
-       if ( this != NULL && mlt_consumer_init( &this->parent, this ) == 0 )
+       if ( this != NULL && mlt_consumer_init( &this->parent, this, profile ) == 0 )
        {
                // Create the queue
                this->queue = mlt_deque_init( );
@@ -188,7 +188,8 @@ int consumer_start( mlt_consumer parent )
                // Attach a colour space converter
                if ( preview_off && !this->filtered )
                {
-                       mlt_filter filter = mlt_factory_filter( "avcolour_space", NULL );
+                       mlt_profile profile = mlt_service_profile( MLT_CONSUMER_SERVICE( parent ) );
+                       mlt_filter filter = mlt_factory_filter( profile, "avcolour_space", NULL );
                        mlt_properties_set_int( MLT_FILTER_PROPERTIES( filter ), "forced", mlt_image_yuv422 );
                        mlt_service_attach( MLT_CONSUMER_SERVICE( parent ), filter );
                        mlt_filter_close( filter );