Ardour  8.12
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 #ifndef __ardour_export_timespan_h__
24 #define __ardour_export_timespan_h__
25 
26 #include <memory>
27 #include <string>
28 
30 #include "ardour/types.h"
31 
32 namespace ARDOUR
33 {
34 
35 class ExportStatus;
36 class ExportChannel;
37 class ExportTempFile;
38 
40 {
41 private:
42  typedef std::shared_ptr<ExportStatus> ExportStatusPtr;
43 
44 private:
45  friend class ExportElementFactory;
47 
48 public:
50 
51  std::string name () const { return _name; }
52  void set_name (std::string name) { _name = name; }
53 
54  std::string range_id () const { return _range_id; }
55  void set_range_id (std::string range_id) { _range_id = range_id; }
56 
57  std::string vapor () const { return _vapor; }
58  void set_vapor (std::string vapor) { _vapor = vapor; }
59 
60  bool realtime () const { return _realtime; }
61  void set_realtime (bool rt) { _realtime = rt; }
62 
64  samplecnt_t get_length () const { return end_sample - start_sample; }
65  samplepos_t get_start () const { return start_sample; }
66  samplepos_t get_end () const { return end_sample; }
67 
69  bool operator< (ExportTimespan const & other) {
70  if (start_sample < other.start_sample) { return true; }
71  if (start_sample > other.start_sample) { return false; }
72  return end_sample < other.end_sample;
73  }
74 
75 private:
76 
78 
83 
84  std::string _name;
85  std::string _range_id;
86  std::string _vapor;
87  bool _realtime;
88 };
89 
90 } // namespace ARDOUR
91 
92 #endif /* __ardour_export_timespan_h__ */
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