#define _(x) x
#endif
+extern pthread_mutex_t g_activate_mutex;
+
#define USEC_PER_SEC 1000000
#define MSEC_PER_SEC 1000
#define TIME_RUN_SKIP_COUNT 5
}
/* input buffers for first plugin */
- plugin_connect_input_ports (first_enabled, procinfo->jack_input_buffers);
+ if( plugin->desc->has_input )
+ plugin_connect_input_ports (first_enabled, procinfo->jack_input_buffers);
}
void
for (channel = 0; channel < procinfo->channels; channel++)
{
- procinfo->jack_input_buffers[channel] = inputs[channel];
- if (!procinfo->jack_input_buffers[channel])
+ if(get_first_enabled_plugin (procinfo)->desc->has_input)
{
- mlt_log_verbose( NULL, "%s: no jack buffer for input port %ld\n", __FUNCTION__, channel);
- return 1;
+ procinfo->jack_input_buffers[channel] = inputs[channel];
+ if (!procinfo->jack_input_buffers[channel])
+ {
+ mlt_log_verbose( NULL, "%s: no jack buffer for input port %ld\n", __FUNCTION__, channel);
+ return 1;
+ }
}
-
procinfo->jack_output_buffers[channel] = outputs[channel];
if (!procinfo->jack_output_buffers[channel])
{
{
mlt_log_info( NULL, _("Connecting to JACK server with client name '%s'\n"), procinfo->jack_client_name);
- procinfo->jack_client = jack_client_new (procinfo->jack_client_name);
+ procinfo->jack_client = jack_client_open (procinfo->jack_client_name, JackNullOption, NULL);
if (!procinfo->jack_client)
{
buffer_size = jack_get_sample_rate (procinfo->jack_client);
jack_set_process_callback (procinfo->jack_client, process_jack, procinfo);
+ pthread_mutex_lock( &g_activate_mutex );
jack_on_shutdown (procinfo->jack_client, jack_shutdown_cb, procinfo);
+ pthread_mutex_unlock( &g_activate_mutex );
jack_activate (procinfo->jack_client);