summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-27 02:09:22 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-27 02:09:22 +0100
commit387304bc9147933b68eda2b38ba8cac0d250e87e (patch)
tree0697a08182c94193a3424d44d5f7af4231f0ade3 /src/wx
parentfd2b1840496fa121727b7e835843c8beeaebd5eb (diff)
Untested use of Frame for video/audio content lengths.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/content_properties_dialog.cc4
-rw-r--r--src/wx/timing_panel.cc4
-rw-r--r--src/wx/video_panel.cc14
-rw-r--r--src/wx/video_panel.h2
4 files changed, 13 insertions, 11 deletions
diff --git a/src/wx/content_properties_dialog.cc b/src/wx/content_properties_dialog.cc
index 76de75ea6..45593fd5b 100644
--- a/src/wx/content_properties_dialog.cc
+++ b/src/wx/content_properties_dialog.cc
@@ -40,7 +40,7 @@ ContentPropertiesDialog::ContentPropertiesDialog (wxWindow* parent, shared_ptr<C
if (video) {
add_property (
_("Video length"),
- std_to_wx (raw_convert<string> (video->video_length ().frames (video->video_frame_rate ()))) + " " + _("video frames")
+ std_to_wx (raw_convert<string> (video->video_length ())) + " " + _("video frames")
);
add_property (
_("Video size"),
@@ -60,7 +60,7 @@ ContentPropertiesDialog::ContentPropertiesDialog (wxWindow* parent, shared_ptr<C
);
add_property (
_("Audio length"),
- std_to_wx (raw_convert<string> (audio->audio_length().frames (audio->audio_frame_rate ()))) + " " + _("audio frames")
+ std_to_wx (raw_convert<string> (audio->audio_length())) + " " + _("audio frames")
);
}
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index cafb06dfc..74c1756a5 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -284,8 +284,8 @@ TimingPanel::full_length_changed ()
for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (*i);
if (ic && ic->still ()) {
- /* XXX: No effective FRC here... is this right? */
- ic->set_video_length (ContentTime (_full_length->get (_parent->film()->video_frame_rate()), FrameRateChange (1, 1)));
+ int const vfr = _parent->film()->video_frame_rate ();
+ ic->set_video_length (_full_length->get (vfr).frames (vfr));
}
}
}
diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc
index 0f241506e..9ddfd6714 100644
--- a/src/wx/video_panel.cc
+++ b/src/wx/video_panel.cc
@@ -277,24 +277,24 @@ VideoPanel::film_content_changed (int property)
}
}
} else if (property == VideoContentProperty::VIDEO_FADE_IN) {
- set<ContentTime> check;
+ set<Frame> check;
for (VideoContentList::const_iterator i = vc.begin (); i != vc.end(); ++i) {
check.insert ((*i)->fade_in ());
}
if (check.size() == 1) {
- _fade_in->set (vc.front()->fade_in (), vc.front()->video_frame_rate ());
+ _fade_in->set (ContentTime::from_frames (vc.front()->fade_in (), vc.front()->video_frame_rate ()), vc.front()->video_frame_rate ());
} else {
_fade_in->clear ();
}
} else if (property == VideoContentProperty::VIDEO_FADE_OUT) {
- set<ContentTime> check;
+ set<Frame> check;
for (VideoContentList::const_iterator i = vc.begin (); i != vc.end(); ++i) {
check.insert ((*i)->fade_out ());
}
if (check.size() == 1) {
- _fade_out->set (vc.front()->fade_out (), vc.front()->video_frame_rate ());
+ _fade_out->set (ContentTime::from_frames (vc.front()->fade_out (), vc.front()->video_frame_rate ()), vc.front()->video_frame_rate ());
} else {
_fade_out->clear ();
}
@@ -394,7 +394,8 @@ VideoPanel::fade_in_changed ()
{
VideoContentList vc = _parent->selected_video ();
for (VideoContentList::const_iterator i = vc.begin(); i != vc.end(); ++i) {
- (*i)->set_fade_in (_fade_in->get (_parent->film()->video_frame_rate ()));
+ int const vfr = _parent->film()->video_frame_rate ();
+ (*i)->set_fade_in (_fade_in->get (vfr).frames (vfr));
}
}
@@ -403,7 +404,8 @@ VideoPanel::fade_out_changed ()
{
VideoContentList vc = _parent->selected_video ();
for (VideoContentList::const_iterator i = vc.begin(); i != vc.end(); ++i) {
- (*i)->set_fade_out (_fade_out->get (_parent->film()->video_frame_rate ()));
+ int const vfr = _parent->film()->video_frame_rate ();
+ (*i)->set_fade_out (_fade_out->get (vfr).frames (vfr));
}
}
diff --git a/src/wx/video_panel.h b/src/wx/video_panel.h
index 28d6aa4bb..9c496c4ee 100644
--- a/src/wx/video_panel.h
+++ b/src/wx/video_panel.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.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