allow build mvcp client without mlt framework
authorMaksym Veremeyenko <verem@m1stereo.tv>
Tue, 26 Jun 2012 20:28:51 +0000 (23:28 +0300)
committerDan Dennedy <dan@dennedy.org>
Sat, 30 Jun 2012 01:29:49 +0000 (18:29 -0700)
src/mvcp/mvcp.h
src/mvcp/mvcp_parser.h
src/mvcp/mvcp_remote.c

index 9490e6d..12fcee7 100644 (file)
 #include <limits.h>
 
 /* MLT Header files. */
+#ifndef MVCP_EMBEDDED
 #include <framework/mlt.h>
+#else
+#define mlt_service void *
+#endif
 
 /* Application header files */
 #include "mvcp_parser.h"
index 67d2bba..9240aa7 100644 (file)
 #define _MVCP_PARSER_H_
 
 /* MLT Header files */
+#ifndef MVCP_EMBEDDED
 #include <framework/mlt.h>
+#else
+#define mlt_service void *
+#endif
 
 /* Application header files */
 #include "mvcp_response.h"
index 6ea0430..8ad0e9d 100644 (file)
 #include <pthread.h>
 
 /* Application header files */
+#ifndef MVCP_EMBEDDED
 #include <framework/mlt.h>
+#else
+#define mlt_service void *
+#endif
 #include "mvcp_remote.h"
 #include "mvcp_socket.h"
 #include "mvcp_tokeniser.h"
@@ -226,6 +230,7 @@ static mvcp_response mvcp_remote_receive( mvcp_remote remote, char *command, cha
 static mvcp_response mvcp_remote_push( mvcp_remote remote, char *command, mlt_service service )
 {
        mvcp_response response = NULL;
+#ifndef MVCP_EMBEDDED
        if ( service != NULL )
        {
                mlt_consumer consumer = mlt_factory_consumer( NULL, "xml", "buffer" );
@@ -239,6 +244,7 @@ static mvcp_response mvcp_remote_push( mvcp_remote remote, char *command, mlt_se
                response = mvcp_remote_receive( remote, command, buffer );
                mlt_consumer_close( consumer );
        }
+#endif
        return response;
 }