Constness changes
[melted] / mlt++ / src / MltProducer.cpp
index 3a58819..4302243 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "MltProducer.h"
 #include "MltFilter.h"
+#include "MltProfile.h"
 using namespace Mlt;
 
 Producer::Producer( ) :
@@ -28,14 +29,14 @@ Producer::Producer( ) :
 {
 }
 
-Producer::Producer( char *id, char *service ) :
+Producer::Producer( Profile& profile, const char *id, const char *service ) :
        instance( NULL ),
        parent_( NULL )
 {
        if ( id != NULL && service != NULL )
-               instance = mlt_factory_producer( id, service );
+               instance = mlt_factory_producer( profile.get_profile(), id, service );
        else
-               instance = mlt_factory_producer( "fezzik", id != NULL ? id : service );
+               instance = mlt_factory_producer( profile.get_profile(), "fezzik", id != NULL ? id : service );
 }
 
 Producer::Producer( Service &producer ) :
@@ -59,6 +60,7 @@ Producer::Producer( mlt_producer producer ) :
 }
 
 Producer::Producer( Producer &producer ) :
+       Mlt::Service( producer ),
        instance( producer.get_producer( ) ),
        parent_( NULL )
 {
@@ -167,12 +169,12 @@ Producer *Producer::cut( int in, int out )
 
 bool Producer::is_cut( )
 {
-       return mlt_producer_is_cut( get_producer( ) );
+       return mlt_producer_is_cut( get_producer( ) ) != 0;
 }
 
 bool Producer::is_blank( )
 {
-       return mlt_producer_is_blank( get_producer( ) );
+       return mlt_producer_is_blank( get_producer( ) ) != 0;
 }
 
 bool Producer::same_clip( Producer &that )