Ardour  9.0-pre0-582-g084a23a80d
export_timespan.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2011 Sakari Bergen <sakari.bergen@beatwaves.net>
3  * Copyright (C) 2008-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2009-2010 Carl Hetherington <carl@carlh.net>
5  * Copyright (C) 2009-2012 David Robillard <d@drobilla.net>
6  * Copyright (C) 2016-2019 Robin Gareus <robin@gareus.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #pragma once
24 
25 #include <memory>
26 #include <string>
27 
29 #include "ardour/types.h"
30 
31 namespace ARDOUR
32 {
33 
34 class ExportStatus;
35 class ExportChannel;
36 class ExportTempFile;
37 
39 {
40 private:
41  typedef std::shared_ptr<ExportStatus> ExportStatusPtr;
42 
43 private:
44  friend class ExportElementFactory;
46 
47 public:
49 
50  std::string name () const { return _name; }
51  void set_name (std::string name) { _name = name; }
52 
53  std::string range_id () const { return _range_id; }
54  void set_range_id (std::string range_id) { _range_id = range_id; }
55 
56  std::string vapor () const { return _vapor; }
57  void set_vapor (std::string vapor) { _vapor = vapor; }
58 
59  bool realtime () const { return _realtime; }
60  void set_realtime (bool rt) { _realtime = rt; }
61 
63  samplecnt_t get_length () const { return end_sample - start_sample; }
64  samplepos_t get_start () const { return start_sample; }
65  samplepos_t get_end () const { return end_sample; }
66 
68  bool operator< (ExportTimespan const & other) {
69  if (start_sample < other.start_sample) { return true; }
70  if (start_sample > other.start_sample) { return false; }
71  return end_sample < other.end_sample;
72  }
73 
74 private:
75 
77 
82 
83  std::string _name;
84  std::string _range_id;
85  std::string _vapor;
86  bool _realtime;
87 };
88 
89 } // namespace ARDOUR
90 
void set_realtime(bool rt)
ExportTimespan(ExportStatusPtr status, samplecnt_t sample_rate)
ExportStatusPtr status
std::string vapor() const
void set_vapor(std::string vapor)
samplepos_t get_end() const
samplecnt_t get_length() const
samplepos_t get_start() const
void set_name(std::string name)
std::string range_id() const
void set_range_id(std::string range_id)
void set_range(samplepos_t start, samplepos_t end)
std::string name() const
std::shared_ptr< ExportStatus > ExportStatusPtr
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_API
PBD::PropertyDescriptor< timepos_t > start
Temporal::samplecnt_t samplecnt_t
Temporal::samplepos_t samplepos_t