Add a .gitignore file
[melted] / mlt++ / src / MltService.cpp
index 63509f4..88751ab 100644 (file)
@@ -21,6 +21,7 @@
 #include <string.h>
 #include "MltService.h"
 #include "MltFilter.h"
+#include "MltProfile.h"
 using namespace Mlt;
 
 Service::Service( ) :
@@ -83,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;
@@ -109,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 );
 }