X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmodules%2Fmvcp%2Fconsumer_mvcp.c;h=3ee42db6caa7fa818fc3770a8172f54bb2569289;hb=4a77ed4421decfa1884ff1ddf3948ab7bf0897f0;hp=4d4c9a34b8ddc2c9a3d9f1f3670f6e714c22ddff;hpb=4ffc82dac07aeeaf1b56bf0c436d623222a37d2b;p=melted diff --git a/src/modules/mvcp/consumer_mvcp.c b/src/modules/mvcp/consumer_mvcp.c index 4d4c9a3..3ee42db 100644 --- a/src/modules/mvcp/consumer_mvcp.c +++ b/src/modules/mvcp/consumer_mvcp.c @@ -1,6 +1,6 @@ /* - * consumer_valerie.c -- pushes a service via valerie - * Copyright (C) 2003-2004 Ushodaya Enterprises Limited + * consumer_mvcp.c -- pushes a service via MVCP + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * Author: Charles Yates * * This library is free software; you can redistribute it and/or @@ -18,8 +18,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include +#include +#include #include #include #include @@ -33,7 +33,7 @@ static int consumer_start( mlt_consumer this ); /** This is what will be called by the factory */ -mlt_consumer consumer_valerie_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ) +mlt_consumer consumer_mvcp_init( mlt_profile profile, mlt_service_type type, const char *id, char *arg ) { // Create the consumer object mlt_consumer this = calloc( sizeof( struct mlt_consumer_s ), 1 ); @@ -90,8 +90,8 @@ static int consumer_start( mlt_consumer this ) char *title = mlt_properties_get( properties, "title" ); char command[ 2048 ]; - // If this is a reuse, then a valerie object will exist - valerie connection = mlt_properties_get_data( properties, "connection", NULL ); + // If this is a reuse, then a mvcp object will exist + mvcp connection = mlt_properties_get_data( properties, "connection", NULL ); // Special case - we can get a doc too... char *doc = mlt_properties_get( properties, "westley" ); @@ -119,19 +119,19 @@ static int consumer_start( mlt_consumer this ) // Initiate the connection if required if ( connection == NULL ) { - valerie_parser parser = valerie_parser_init_remote( server, port ); - connection = valerie_init( parser ); - if ( valerie_connect( connection ) == valerie_ok ) + mvcp_parser parser = mvcp_parser_init_remote( server, port ); + connection = mvcp_init( parser ); + if ( mvcp_connect( connection ) == mvcp_ok ) { - mlt_properties_set_data( properties, "connection", connection, 0, ( mlt_destructor )valerie_close, NULL ); - mlt_properties_set_data( properties, "parser", parser, 0, ( mlt_destructor )valerie_parser_close, NULL ); + mlt_properties_set_data( properties, "connection", connection, 0, ( mlt_destructor )mvcp_close, NULL ); + mlt_properties_set_data( properties, "parser", parser, 0, ( mlt_destructor )mvcp_parser_close, NULL ); } else { fprintf( stderr, "Unable to connect to the server at %s:%d\n", server, port ); mlt_properties_set_int( properties, "_error", 1 ); - valerie_close( connection ); - valerie_parser_close( parser ); + mvcp_close( connection ); + mvcp_parser_close( parser ); connection = NULL; } } @@ -144,19 +144,19 @@ static int consumer_start( mlt_consumer this ) int error; // Push the service - error = valerie_unit_push( connection, unit, command, service ); + error = mvcp_unit_push( connection, unit, command, service ); // Report error - if ( error != valerie_ok ) + if ( error != mvcp_ok ) fprintf( stderr, "Push failed on %s:%d %s u%d (%d)\n", server, port, command, unit, error ); } else { // Push the service - int error = valerie_unit_receive( connection, unit, command, doc ); + int error = mvcp_unit_receive( connection, unit, command, doc ); // Report error - if ( error != valerie_ok ) + if ( error != mvcp_ok ) fprintf( stderr, "Send failed on %s:%d %s u%d (%d)\n", server, port, command, unit, error ); } }