Add a .gitignore file
[melted] / mlt++ / src / MltService.cpp
index c349cf4..88751ab 100644 (file)
@@ -21,6 +21,7 @@
 #include <string.h>
 #include "MltService.h"
 #include "MltFilter.h"
+#include "MltProfile.h"
 using namespace Mlt;
 
 Service::Service( ) :
@@ -58,6 +59,16 @@ mlt_properties Service::get_properties( )
        return mlt_service_properties( get_service( ) );
 }
 
+void Service::lock( )
+{
+       mlt_service_lock( get_service( ) );
+}
+
+void Service::unlock( )
+{
+       mlt_service_unlock( get_service( ) );
+}
+
 int Service::connect_producer( Service &producer, int index )
 {
        return mlt_service_connect_producer( get_service( ), producer.get_service( ), index );
@@ -73,6 +84,11 @@ Service *Service::consumer( )
        return new Service( mlt_service_consumer( get_service( ) ) );
 }
 
+Profile *Service::profile( )
+{
+       return new Profile( mlt_service_profile( get_service() ) );
+}
+
 Frame *Service::get_frame( int index )
 {
        mlt_frame frame = NULL;
@@ -99,6 +115,7 @@ int Service::detach( Filter &filter )
 
 Filter *Service::filter( int index )
 {
-       return new Filter( mlt_service_filter( get_service( ), index ) );
+       mlt_filter result = mlt_service_filter( get_service( ), index );
+       return result == NULL ? NULL : new Filter( result );
 }