From a1289f57c9137402954ac6505a17320b20e2ac68 Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko Date: Tue, 3 Jul 2012 14:45:21 +0300 Subject: [PATCH] implement probe clip mvcp support --- src/mvcp/mvcp.c | 18 ++++++++++++++++++ src/mvcp/mvcp.h | 3 +++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/mvcp/mvcp.c b/src/mvcp/mvcp.c index 99e086d..fd92d3e 100644 --- a/src/mvcp/mvcp.c +++ b/src/mvcp/mvcp.c @@ -765,6 +765,24 @@ void mvcp_list_close( mvcp_list list ) } } +/** Probe clip +*/ +mvcp_error_code mvcp_probe_clip( mvcp this, char *filename, mvcp_list_entry entry) +{ + mvcp_response response; + mvcp_error_code error = mvcp_ok; + + response = mvcp_parser_executef( this->parser, "PROBE \"%s\"", filename ); + if ( mvcp_response_count( response ) >= 2 ) + mvcp_list_parse( entry, mvcp_response_get_line( response, 1 ) ); + else + error = mvcp_get_error_code( NULL, response ); + + mvcp_response_close( response ); + + return error; +}; + /** List the currently connected nodes. */ diff --git a/src/mvcp/mvcp.h b/src/mvcp/mvcp.h index 12fcee7..98d76f7 100644 --- a/src/mvcp/mvcp.h +++ b/src/mvcp/mvcp.h @@ -261,6 +261,9 @@ extern mvcp_error_code mvcp_push( mvcp, mlt_service, size_t, const char *, ... ) /* Close function. */ extern void mvcp_close( mvcp ); +/* Probe function */ +extern mvcp_error_code mvcp_probe_clip( mvcp, char *, mvcp_list_entry ); + #ifdef __cplusplus } #endif -- 1.7.4.4