* Region export dialog does not lose export settings (Do not serialize into instant xml)
* Remove old export related files git-svn-id: svn://localhost/ardour2/branches/3.0@3924 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2006 Paul Davis
|
||||
Author: Andre Raue
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <pbd/pthread_utils.h>
|
||||
#include <ardour/audioregion.h>
|
||||
|
||||
#include "export_region_dialog.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
||||
ExportRegionDialog::ExportRegionDialog (PublicEditor& editor, boost::shared_ptr<ARDOUR::Region> reg)
|
||||
: ExportDialog(editor)
|
||||
, region(reg)
|
||||
{
|
||||
assert(region);
|
||||
|
||||
set_title (_("Ardour: Export Region"));
|
||||
file_frame.set_label (_("Export to File")),
|
||||
|
||||
do_not_allow_track_and_master_selection();
|
||||
do_not_allow_channel_count_selection();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExportRegionDialog::export_data()
|
||||
{
|
||||
pthread_t thr;
|
||||
pthread_create_and_store ("region export", &thr, 0, ExportRegionDialog::_export_region_thread, this);
|
||||
|
||||
gtk_main_iteration ();
|
||||
while (spec.running) {
|
||||
if (gtk_events_pending()) {
|
||||
gtk_main_iteration ();
|
||||
} else {
|
||||
usleep (10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
ExportRegionDialog::_export_region_thread (void *arg)
|
||||
{
|
||||
PBD::ThreadCreated (pthread_self(), X_("Export Region"));
|
||||
|
||||
static_cast<ExportRegionDialog*>(arg)->export_region ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
ExportRegionDialog::export_region ()
|
||||
{
|
||||
region->exportme (getSession(), spec);
|
||||
}
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2006 Andre Raue
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __export_region_dialog_h__
|
||||
#define __export_region_dialog_h__
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "export_dialog.h"
|
||||
|
||||
|
||||
class ExportRegionDialog : public ExportDialog
|
||||
{
|
||||
public:
|
||||
ExportRegionDialog (PublicEditor&, boost::shared_ptr<ARDOUR::Region>);
|
||||
|
||||
static void* _export_region_thread (void *);
|
||||
void export_region ();
|
||||
|
||||
protected:
|
||||
void export_data();
|
||||
|
||||
private:
|
||||
boost::shared_ptr<ARDOUR::Region> region;
|
||||
};
|
||||
|
||||
|
||||
#endif // __export_region_dialog_h__
|
||||
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2006 Paul Davis
|
||||
Author: Andre Raue
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "export_session_dialog.h"
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
ExportSessionDialog::ExportSessionDialog (PublicEditor& editor)
|
||||
: ExportDialog(editor)
|
||||
{
|
||||
file_frame.set_label (_("Export to File"));
|
||||
}
|
||||
|
||||
void
|
||||
ExportSessionDialog::export_data ()
|
||||
{
|
||||
if (getSession().start_export (spec)) {
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_main_iteration ();
|
||||
while (spec.running) {
|
||||
if (gtk_events_pending()) {
|
||||
gtk_main_iteration ();
|
||||
} else {
|
||||
usleep (10000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ExportSessionDialog::set_range (nframes_t start, nframes_t end)
|
||||
{
|
||||
ExportDialog::set_range (start, end);
|
||||
|
||||
// XXX: this is a hack until we figure out what is really wrong
|
||||
getSession().request_locate (spec.start_frame, false);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
Copyright (C) 2006 Andre Raue
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __export_session_dialog_h__
|
||||
#define __export_session_dialog_h__
|
||||
|
||||
#include "export_dialog.h"
|
||||
|
||||
|
||||
class ExportSessionDialog : public ExportDialog
|
||||
{
|
||||
public:
|
||||
ExportSessionDialog (PublicEditor&);
|
||||
void set_range (nframes_t start, nframes_t end);
|
||||
|
||||
protected:
|
||||
void export_data();
|
||||
};
|
||||
|
||||
|
||||
#endif // __export_session_dialog_h__
|
||||
@@ -94,6 +94,8 @@ ExportProfileManager::ExportProfileManager (Session & s) :
|
||||
|
||||
ExportProfileManager::~ExportProfileManager ()
|
||||
{
|
||||
if (single_range_mode) { return; }
|
||||
|
||||
XMLNode * instant_xml (new XMLNode ("ExportProfile"));
|
||||
serialize_profile (*instant_xml);
|
||||
session.add_instant_xml (*instant_xml, false);
|
||||
|
||||
Reference in New Issue
Block a user