/*
* CINELERRA
* Copyright (C) 2009-2013 Adam Williams <broadcast at earthling dot net>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#include "asset.h"
Record::~Record()
{
mwindow->gui->record = 0;
- stop(); join();
+ stop();
delete blink_status;
delete cutads_status;
stop_skimming();
// These are locked by a specific driver.
const char *vcodec = 0;
switch( session->vconfig_in->driver ) {
- case CAPTURE_LML:
- case CAPTURE_BUZ:
- vcodec = CODEC_TAG_MJPEG;
- break;
case CAPTURE_DVB:
case VIDEO4LINUX2MPEG:
break;
if( channel )
video_stream = channel->video_stream;
}
- stop();
+ stop(0);
edl->Garbage::remove_user();
if( mwindow->gui->remote_control->deactivate() )
default_asset->Garbage::remove_user();
}
-void Record::stop()
+void Record::stop(int wait)
{
stop_operation();
+ if( wait && running() )
+ record_gui->set_done(1);
+ join();
window_lock->lock("Record::stop");
delete record_thread; record_thread = 0;
delete record_monitor; record_monitor = 0;
window_lock->unlock();
}
else {
- stop(); join();
init_lock->reset();
Thread::start();
}
return batch ? batch->channel : 0;
}
-ArrayList<Channel*>* Record::get_video_inputs()
-{
+ArrayList<Channel*>* Record::get_video_inputs()
+{
return default_asset->video_data && vdevice ? vdevice->get_inputs() : 0;
}
if( adevice ) {
int sw_pos = SESSION->record_positioning == RECORD_POS_SOFTWARE;
adevice->set_software_positioning(sw_pos);
- adevice->open_input(SESSION->aconfig_in, SESSION->vconfig_in,
+ adevice->open_input(SESSION->aconfig_in, SESSION->vconfig_in,
default_asset->sample_rate, get_fragment_samples(),
default_asset->channels, SESSION->real_time_record);
adevice->start_recording();
- adevice->open_monitor(SESSION->playback_config->aconfig,monitor_audio);
+ adevice->open_monitor(SESSION->playback_config->aconfig,monitor_audio);
adevice->set_vdevice(vdevice);
if( vdevice ) vdevice->set_adevice(adevice);
}
Asset *asset = batch->asset;
char source_filename[BCTEXTLEN], toc_path[BCTEXTLEN];
IndexFile::get_index_filename(source_filename,
- mwindow->preferences->index_directory,
+ mwindow->preferences->index_directory,
toc_path, asset->path,".toc");
if( default_asset->video_data )
return vdevice->start_toc(asset->path, toc_path);
#ifdef HAVE_DVB
DeviceDVBInput *Record::
dvb_device()
-{
+{
DeviceDVBInput *dvb_dev = !vdevice ? 0 :
(DeviceDVBInput *)vdevice->mpeg_device();
if( !dvb_dev ) dvb_dev = !adevice ? 0 :