Mercurial > audlegacy-plugins
comparison src/cue/cuesheet.c @ 1999:3afd18361a10
change the way of duplicating original playback.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Tue, 09 Oct 2007 00:02:50 +0900 |
parents | 9d0f5be50219 |
children | 2ffc6a69fcd1 |
comparison
equal
deleted
inserted
replaced
1998:8f3188746b64 | 1999:3afd18361a10 |
---|---|
469 | 469 |
470 if (real_ip_plugin != NULL) | 470 if (real_ip_plugin != NULL) |
471 { | 471 { |
472 if (real_ip) | 472 if (real_ip) |
473 g_free(real_ip); | 473 g_free(real_ip); |
474 real_ip = g_new0(InputPlayback, 1); | 474 |
475 /* duplicate original playback and modify */ | |
476 real_ip = (InputPlayback *)g_memdup(data, sizeof(InputPlayback)); | |
475 real_ip->plugin = real_ip_plugin; | 477 real_ip->plugin = real_ip_plugin; |
476 real_ip->plugin->set_info = set_info_override; | 478 real_ip->plugin->set_info = set_info_override; |
477 real_ip->plugin->output = cue_ip.output; | 479 real_ip->plugin->output = cue_ip.output; |
478 real_ip->filename = cue_file; | 480 real_ip->filename = cue_file; |
479 | |
480 /* need to pass playback->output to real_ip */ | |
481 real_ip->output = data->output; | |
482 real_ip->data = data->data; | |
483 | |
484 /* we have to copy set_pb_ready things too. */ | |
485 real_ip->pb_ready_mutex = data->pb_ready_mutex; | |
486 real_ip->pb_ready_cond = data->pb_ready_cond; | |
487 real_ip->pb_ready_val = data->pb_ready_val; | |
488 real_ip->set_pb_ready = data->set_pb_ready; | |
489 | |
490 real_ip->pb_change_mutex = data->pb_change_mutex; | |
491 real_ip->pb_change_cond = data->pb_change_cond; | |
492 real_ip->set_pb_change = data->set_pb_change; | |
493 | |
494 real_ip->set_params = data->set_params; | |
495 real_ip->set_title = data->set_title; | |
496 | 481 |
497 real_play_thread = g_thread_create((GThreadFunc)(real_ip->plugin->play_file), (gpointer)real_ip, TRUE, NULL); | 482 real_play_thread = g_thread_create((GThreadFunc)(real_ip->plugin->play_file), (gpointer)real_ip, TRUE, NULL); |
498 g_usleep(50000); // wait for 50msec while real input plugin is initializing. | 483 g_usleep(50000); // wait for 50msec while real input plugin is initializing. |
499 | 484 |
500 if(real_ip->plugin->mseek) { | 485 if(real_ip->plugin->mseek) { |