return error;
}
+/** Probe open clip.
+*/
+response_codes melted_probe_clip( command_argument cmd_arg )
+{
+ int l;
+ const char *file_name = (const char*) cmd_arg->argument;
+ char fullname[1024];
+ mlt_producer producer;
+ mlt_profile profile;
+
+ snprintf( fullname, sizeof(fullname), "%s%s", cmd_arg->root_dir, file_name );
+ profile = mlt_profile_init(NULL);
+ producer = mlt_factory_producer( profile, NULL, fullname );
+ if (!producer )
+ {
+ mlt_profile_close(profile);
+ return RESPONSE_BAD_FILE;
+ };
+
+ l = mlt_producer_get_length( producer );
+ mvcp_response_printf( cmd_arg->response, 10240,
+ "%d \"%s\" %d %d %d %d %.2f\n\n",
+ 0, /* index */
+ cmd_arg->argument, /* title */
+ 0, /* frame in */
+ l - 1, /* frame out */
+ l, /* frame count */
+ l, /* length */
+ mlt_producer_get_fps( producer ) );
+
+ mlt_producer_close( producer );
+ mlt_profile_close(profile);
+
+ return RESPONSE_SUCCESS_N;
+}
+
/** Set a server configuration property.
*/
extern response_codes melted_list_nodes( command_argument );
extern response_codes melted_list_units( command_argument );
extern response_codes melted_list_clips( command_argument );
+extern response_codes melted_probe_clip( command_argument );
extern response_codes melted_set_global_property( command_argument );
extern response_codes melted_get_global_property( command_argument );
{"UADD", melted_add_unit, 0, ATYPE_STRING, "Create a new playout unit (virtual VTR) to transmit to receiver specified in GUID argument."},
{"ULS", melted_list_units, 0, ATYPE_NONE, "Lists the units that have already been added to the server."},
{"CLS", melted_list_clips, 0, ATYPE_STRING, "Lists the clips at directory name argument."},
+ {"PROBE", melted_probe_clip, 0, ATYPE_STRING, "Probe clip for playback. Output clip parameters."},
{"SET", melted_set_global_property, 0, ATYPE_PAIR, "Set a server configuration property."},
{"GET", melted_get_global_property, 0, ATYPE_STRING, "Get a server configuration property."},
{"RUN", melted_run, 0, ATYPE_STRING, "Run a batch file." },