X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fmvcp%2Fmvcp_status.c;h=9c7315170835a22d1c52868468ac553d4f07c480;hb=50494c72c7b8b700cf4df4c1f25ae1b5323e4df2;hp=209290f9e1a0a635e10ab5510961480a9d19f41b;hpb=dad3a67a6eca96aa207bdd92d9cfce9fc88cc4fa;p=melted diff --git a/src/mvcp/mvcp_status.c b/src/mvcp/mvcp_status.c index 209290f..9c73151 100644 --- a/src/mvcp/mvcp_status.c +++ b/src/mvcp/mvcp_status.c @@ -34,7 +34,8 @@ void mvcp_status_parse( mvcp_status status, char *text ) { mvcp_tokeniser tokeniser = mvcp_tokeniser_init( ); - if ( mvcp_tokeniser_parse_new( tokeniser, text, " " ) == 17 ) + int r = mvcp_tokeniser_parse_new( tokeniser, text, " " ); + if ( 19 == r || 17 == r ) { status->unit = atoi( mvcp_tokeniser_get_string( tokeniser, 0 ) ); strncpy( status->clip, mvcp_util_strip( mvcp_tokeniser_get_string( tokeniser, 2 ), '\"' ), sizeof( status->clip ) ); @@ -53,6 +54,11 @@ void mvcp_status_parse( mvcp_status status, char *text ) status->seek_flag = atoi( mvcp_tokeniser_get_string( tokeniser, 14 ) ); status->generation = atoi( mvcp_tokeniser_get_string( tokeniser, 15 ) ); status->clip_index = atoi( mvcp_tokeniser_get_string( tokeniser, 16 ) ); + if ( 19 == r ) + { + status->start = atoi( mvcp_tokeniser_get_string( tokeniser, 17 ) ); + status->dur = atoi( mvcp_tokeniser_get_string( tokeniser, 18 ) ); + }; if ( !strcmp( mvcp_tokeniser_get_string( tokeniser, 1 ), "unknown" ) ) status->status = unit_unknown; @@ -121,7 +127,7 @@ char *mvcp_status_serialise( mvcp_status status, char *text, int length ) break; } - snprintf( text, length, "%d %s \"%s\" %d %d %.2f %d %d %d \"%s\" %d %d %d %d %d %d %d\r\n", + snprintf( text, length, "%d %s \"%s\" %d %d %.2f %d %d %d \"%s\" %d %d %d %d %d %d %d %d %d\r\n", status->unit, status_string, status->clip, @@ -138,7 +144,9 @@ char *mvcp_status_serialise( mvcp_status status, char *text, int length ) status->tail_length, status->seek_flag, status->generation, - status->clip_index ); + status->clip_index, + status->start, + status->dur ); return text; }