#include "content_advanced_dialog.h"
#include "content_menu.h"
#include "content_properties_dialog.h"
+#include "content_timeline_audio_view.h"
#include "dir_dialog.h"
#include "file_dialog.h"
#include "film_viewer.h"
#include "id.h"
#include "repeat_dialog.h"
#include "timeline_video_content_view.h"
-#include "timeline_audio_content_view.h"
#include "wx_util.h"
#include "lib/audio_content.h"
#include "lib/config.h"
}
shared_ptr<TimelineVideoContentView> video;
- shared_ptr<TimelineAudioContentView> audio;
+ shared_ptr<ContentTimelineAudioView> audio;
for (auto j: _views) {
auto v = dynamic_pointer_cast<TimelineVideoContentView>(j);
- auto a = dynamic_pointer_cast<TimelineAudioContentView>(j);
+ auto a = dynamic_pointer_cast<ContentTimelineAudioView>(j);
if (v && v->content() == fc) {
video = v;
} else if (a && a->content() == fc) {
#include "film_editor.h"
#include "film_viewer.h"
#include "content_timeline_atmos_view.h"
-#include "timeline_audio_content_view.h"
+#include "content_timeline_audio_view.h"
#include "timeline_labels_view.h"
#include "timeline_reels_view.h"
#include "timeline_text_content_view.h"
}
if (i->audio && !i->audio->mapping().mapped_output_channels().empty ()) {
- _views.push_back (make_shared<TimelineAudioContentView>(*this, i));
+ _views.push_back(make_shared<ContentTimelineAudioView>(*this, i));
}
for (auto j: i->text) {
struct AudioMappingComparator {
bool operator()(shared_ptr<ContentTimelineView> a, shared_ptr<ContentTimelineView> b) {
int la = -1;
- auto cva = dynamic_pointer_cast<TimelineAudioContentView>(a);
+ auto cva = dynamic_pointer_cast<ContentTimelineAudioView>(a);
if (cva) {
auto oc = cva->content()->audio->mapping().mapped_output_channels();
la = *min_element(boost::begin(oc), boost::end(oc));
}
int lb = -1;
- auto cvb = dynamic_pointer_cast<TimelineAudioContentView>(b);
+ auto cvb = dynamic_pointer_cast<ContentTimelineAudioView>(b);
if (cvb) {
auto oc = cvb->content()->audio->mapping().mapped_output_channels();
lb = *min_element(boost::begin(oc), boost::end(oc));
auto views = _views;
sort(views.begin(), views.end(), AudioMappingComparator());
- int const audio_tracks = place<TimelineAudioContentView> (film, views, _tracks);
+ int const audio_tracks = place<ContentTimelineAudioView>(film, views, _tracks);
_labels_view->set_video_tracks (video_tracks);
_labels_view->set_audio_tracks (audio_tracks);
--- /dev/null
+/*
+ Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic 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.
+
+ DCP-o-matic 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 DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "content_timeline_audio_view.h"
+#include "wx_util.h"
+#include "lib/audio_content.h"
+#include "lib/util.h"
+
+
+using std::dynamic_pointer_cast;
+using std::list;
+using std::shared_ptr;
+
+
+/** @class ContentTimelineAudioView
+ * @brief Content timeline view for AudioContent.
+ */
+
+
+ContentTimelineAudioView::ContentTimelineAudioView(ContentTimeline& tl, shared_ptr<Content> c)
+ : TimelineContentView (tl, c)
+{
+
+}
+
+wxColour
+ContentTimelineAudioView::background_colour () const
+{
+ return wxColour (149, 121, 232, 255);
+}
+
+wxColour
+ContentTimelineAudioView::foreground_colour () const
+{
+ return wxColour (0, 0, 0, 255);
+}
+
+wxString
+ContentTimelineAudioView::label () const
+{
+ wxString s = TimelineContentView::label ();
+ shared_ptr<AudioContent> ac = content()->audio;
+ DCPOMATIC_ASSERT (ac);
+
+ if (ac->gain() > 0.01) {
+ s += wxString::Format (" +%.1fdB", ac->gain());
+ } else if (ac->gain() < -0.01) {
+ s += wxString::Format (" %.1fdB", ac->gain());
+ }
+
+ if (ac->delay() > 0) {
+ s += wxString::Format (_(" delayed by %dms"), ac->delay());
+ } else if (ac->delay() < 0) {
+ s += wxString::Format (_(" advanced by %dms"), -ac->delay());
+ }
+
+ list<int> mapped = ac->mapping().mapped_output_channels();
+ if (!mapped.empty ()) {
+ s += wxString::FromUTF8(" → ");
+ for (auto i: mapped) {
+ s += std_to_wx(short_audio_channel_name(i)) + ", ";
+ }
+ s = s.Left(s.Length() - 2);
+ }
+
+ return s;
+}
--- /dev/null
+/*
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+
+ This file is part of DCP-o-matic.
+
+ DCP-o-matic 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.
+
+ DCP-o-matic 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 DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+
+#include "timeline_content_view.h"
+
+
+/** @class ContentTimelineAudioView
+ * @brief Content timeline view for AudioContent.
+ */
+class ContentTimelineAudioView : public TimelineContentView
+{
+public:
+ ContentTimelineAudioView(ContentTimeline& tl, std::shared_ptr<Content> c);
+
+private:
+ bool active () const override {
+ return true;
+ }
+ wxColour background_colour () const override;
+ wxColour foreground_colour () const override;
+ wxString label () const override;
+};
+++ /dev/null
-/*
- Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
-
- This file is part of DCP-o-matic.
-
- DCP-o-matic 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.
-
- DCP-o-matic 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 DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-#include "timeline_audio_content_view.h"
-#include "wx_util.h"
-#include "lib/audio_content.h"
-#include "lib/util.h"
-
-
-using std::dynamic_pointer_cast;
-using std::list;
-using std::shared_ptr;
-
-
-/** @class TimelineAudioContentView
- * @brief Timeline view for AudioContent.
- */
-
-
-TimelineAudioContentView::TimelineAudioContentView(ContentTimeline& tl, shared_ptr<Content> c)
- : TimelineContentView (tl, c)
-{
-
-}
-
-wxColour
-TimelineAudioContentView::background_colour () const
-{
- return wxColour (149, 121, 232, 255);
-}
-
-wxColour
-TimelineAudioContentView::foreground_colour () const
-{
- return wxColour (0, 0, 0, 255);
-}
-
-wxString
-TimelineAudioContentView::label () const
-{
- wxString s = TimelineContentView::label ();
- shared_ptr<AudioContent> ac = content()->audio;
- DCPOMATIC_ASSERT (ac);
-
- if (ac->gain() > 0.01) {
- s += wxString::Format (" +%.1fdB", ac->gain());
- } else if (ac->gain() < -0.01) {
- s += wxString::Format (" %.1fdB", ac->gain());
- }
-
- if (ac->delay() > 0) {
- s += wxString::Format (_(" delayed by %dms"), ac->delay());
- } else if (ac->delay() < 0) {
- s += wxString::Format (_(" advanced by %dms"), -ac->delay());
- }
-
- list<int> mapped = ac->mapping().mapped_output_channels();
- if (!mapped.empty ()) {
- s += wxString::FromUTF8(" → ");
- for (auto i: mapped) {
- s += std_to_wx(short_audio_channel_name(i)) + ", ";
- }
- s = s.Left(s.Length() - 2);
- }
-
- return s;
-}
+++ /dev/null
-/*
- Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
-
- This file is part of DCP-o-matic.
-
- DCP-o-matic 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.
-
- DCP-o-matic 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 DCP-o-matic. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-
-#include "timeline_content_view.h"
-
-
-/** @class TimelineAudioContentView
- * @brief Timeline view for AudioContent.
- */
-class TimelineAudioContentView : public TimelineContentView
-{
-public:
- TimelineAudioContentView(ContentTimeline& tl, std::shared_ptr<Content> c);
-
-private:
- bool active () const override {
- return true;
- }
- wxColour background_colour () const override;
- wxColour foreground_colour () const override;
- wxString label () const override;
-};
content_sub_panel.cc
content_timeline.cc
content_timeline_atmos_view.cc
+ content_timeline_audio_view.cc
content_timeline_dialog.cc
content_timeline_view.cc
content_version_dialog.cc
timecode.cc
timeline.cc
timeline_content_view.cc
- timeline_audio_content_view.cc
timeline_labels_view.cc
timeline_text_content_view.cc
timeline_reels_view.cc