* Add subtitle view.
+2014-03-18 Carl Hetherington <cth@carlh.net>
+
+ * Version 1.66.3 released.
+
+2014-03-18 Carl Hetherington <cth@carlh.net>
+
+ * Fix bad rounding of timecodes.
+
+ * Tentative support for 3D from alternate frames of the source.
+
2014-03-17 Carl Hetherington <cth@carlh.net>
* Improve behaviour of the position slider at the end of films.
print >>f,''
def dependencies(target):
- return (('ffmpeg-cdist', '08827fa4e1d483511e6135c424d2ca9c56a9ed50'),
+ return (('ffmpeg-cdist', 'a0db025'),
('libdcp', '1.0'))
def build(target, options):
-dcpomatic (1.66.2-1) UNRELEASED; urgency=low
+dcpomatic (1.66.3-1) UNRELEASED; urgency=low
* New upstream release.
* New upstream release.
* New upstream release.
* New upstream release.
* New upstream release.
+ * New upstream release.
- -- Carl Hetherington <carl@d1stkfactory> Mon, 17 Mar 2014 09:20:12 +0000
+ -- Carl Hetherington <carl@d1stkfactory> Tue, 18 Mar 2014 16:20:29 +0000
dcpomatic (0.87-1) UNRELEASED; urgency=low
universal_copy $ROOT lib/libavutil*.dylib $WORK/$libs
universal_copy $ROOT lib/libavcodec*.dylib $WORK/$libs
universal_copy $ROOT lib/libswscale*.dylib $WORK/$libs
-universal_copy $ROOT lib/libpostproc*.dylib $WORK/$libs
universal_copy $ROOT lib/libswresample*.dylib $WORK/$libs
universal_copy $ROOT bin/ffprobe $WORK/$macos
universal_copy $ENV lib/libboost_system.dylib $WORK/$libs
cp build/platform/osx/Info.plist $WORK/$approot
cp icons/dcpomatic.icns $WORK/$resources/DCP-o-matic.icns
+cp icons/colour_conversions.png $WORK/$resources
+cp icons/defaults.png $WORK/$resources
+cp icons/kdm_email.png $WORK/$resources
+cp icons/servers.png $WORK/$resources
+cp icons/tms.png $WORK/$resources
# i18n: .mo files
for lang in de_DE es_ES fr_FR it_IT sv_SE; do
File "%cdist_deps%/bin/avdevice-55.dll"
File "%cdist_deps%/bin/dcp.dll"
File "%cdist_deps%/bin/libopenjpeg-1.dll"
-File "%cdist_deps%/bin/postproc-52.dll"
File "%cdist_deps%/bin/swresample-0.dll"
File "%cdist_deps%/bin/swscale-2.dll"
File "%cdist_deps%/bin/cxml.dll"
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
-#include <libpostproc/postprocess.h>
}
#include "ffmpeg.h"
#include "ffmpeg_content.h"
stringstream s;
- s << String::compose (_("%1 frames; %2 frames per second"), video_length().frames (video_frame_rate()), video_frame_rate()) << "\n";
+ s << String::compose (_("%1 frames; %2 frames per second"), video_length_after_3d_combine().frames (video_frame_rate()), video_frame_rate()) << "\n";
s << VideoContent::information ();
return s.str ();
ContentTime
FFmpegContent::audio_length () const
{
- {
- boost::mutex::scoped_lock lm (_mutex);
- if (!_audio_stream) {
- return ContentTime ();
- }
+ boost::mutex::scoped_lock lm (_mutex);
+ if (!_audio_stream) {
+ return ContentTime ();
}
- return video_length();
+ return video_length ();
}
int
{
shared_ptr<const Film> film = _film.lock ();
assert (film);
- return DCPTime (video_length(), FrameRateChange (video_frame_rate (), film->video_frame_rate ()));
+ return DCPTime (video_length_after_3d_combine(), FrameRateChange (video_frame_rate (), film->video_frame_rate ()));
}
AudioMapping
#include <boost/thread/mutex.hpp>
extern "C" {
#include <libavcodec/avcodec.h>
-#include <libpostproc/postprocess.h>
}
#include "util.h"
#include "decoder.h"
#include <libswscale/swscale.h>
#include <libavutil/pixfmt.h>
#include <libavutil/pixdesc.h>
-#include <libpostproc/postprocess.h>
}
#include "image.h"
#include "exceptions.h"
{
shared_ptr<const Film> film = _film.lock ();
assert (film);
- return DCPTime (video_length(), FrameRateChange (video_frame_rate(), film->video_frame_rate()));
+ return DCPTime (video_length_after_3d_combine(), FrameRateChange (video_frame_rate(), film->video_frame_rate()));
}
string
public:
Scaler (int f, std::string i, std::string n);
- /** @return id used for calls to FFmpeg's pp_postprocess */
+ /** @return id used for calls to FFmpeg's sws_getContext */
int ffmpeg_id () const {
return _ffmpeg_id;
}
{
VIDEO_FRAME_TYPE_2D,
VIDEO_FRAME_TYPE_3D_LEFT_RIGHT,
- VIDEO_FRAME_TYPE_3D_TOP_BOTTOM
+ VIDEO_FRAME_TYPE_3D_TOP_BOTTOM,
+ VIDEO_FRAME_TYPE_3D_ALTERNATE
};
enum Eyes
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavfilter/avfiltergraph.h>
-#include <libpostproc/postprocess.h>
#include <libavutil/pixfmt.h>
}
#include "util.h"
<< N_("libavfilter ") << ffmpeg_version_to_string (avfilter_version()) << N_(", ")
<< N_("libavformat ") << ffmpeg_version_to_string (avformat_version()) << N_(", ")
<< N_("libavutil ") << ffmpeg_version_to_string (avutil_version()) << N_(", ")
- << N_("libpostproc ") << ffmpeg_version_to_string (postproc_version()) << N_(", ")
<< N_("libswscale ") << ffmpeg_version_to_string (swscale_version()) << N_(", ")
<< MagickVersion << N_(", ")
<< N_("libssh ") << ssh_version (0) << N_(", ")
{
return String::compose (
"video: length %1, size %2x%3, rate %4",
- video_length().seconds(),
+ video_length_after_3d_combine().seconds(),
video_size().width,
video_size().height,
video_frame_rate()
dcp::Size const s = video_size ();
switch (video_frame_type ()) {
case VIDEO_FRAME_TYPE_2D:
+ case VIDEO_FRAME_TYPE_3D_ALTERNATE:
return s;
case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT:
return dcp::Size (s.width / 2, s.height);
return _video_length;
}
+ ContentTime video_length_after_3d_combine () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ if (_video_frame_type == VIDEO_FRAME_TYPE_3D_ALTERNATE) {
+ return ContentTime (_video_length.get() / 2);
+ }
+
+ return _video_length;
+ }
+
dcp::Size video_size () const {
boost::mutex::scoped_lock lm (_mutex);
return _video_size;
case VIDEO_FRAME_TYPE_2D:
_pending.push_back (shared_ptr<DecodedVideo> (new DecodedVideo (time, image, EYES_BOTH, same)));
break;
+ case VIDEO_FRAME_TYPE_3D_ALTERNATE:
+ Video (image, (frame % 2) ? EYES_RIGHT : EYES_LEFT, same);
+ break;
case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT:
{
int const half = image->size().width / 2;
supported_by.Add (wxT ("Adam Colt"));
supported_by.Add (wxT ("Andres Fink"));
supported_by.Add (wxT ("Evan Freeze"));
- supported_by.Add (wxT ("Rodolfo Giuliano"));
+ supported_by.Add (wxT ("Silvio Giuliano"));
supported_by.Add (wxT ("Flor Guillaume"));
supported_by.Add (wxT ("Jonathan Jensen"));
supported_by.Add (wxT ("Adam Klotblixt"));
void
Timecode::set (DCPTime t, int fps)
{
- int const h = t.seconds() / 3600;
- t -= DCPTime::from_seconds (h * 3600);
- int const m = t.seconds() / 60;
- t -= DCPTime::from_seconds (m * 60);
- int const s = t.seconds();
- t -= DCPTime::from_seconds (s);
- int const f = rint (t.seconds() * fps);
+ /* Do this calculation with frames so that we can round
+ to a frame boundary at the start rather than the end.
+ */
+ int64_t f = rint (t.seconds() * fps);
+
+ int const h = f / (3600 * fps);
+ f -= h * 3600 * fps;
+ int const m = f / (60 * fps);
+ f -= m * 60 * fps;
+ int const s = f / fps;
+ f -= s * fps;
checked_set (_hours, lexical_cast<string> (h));
checked_set (_minutes, lexical_cast<string> (m));
checked_set (_seconds, lexical_cast<string> (s));
checked_set (_frames, lexical_cast<string> (f));
- _fixed->SetLabel (wxString::Format ("%02d:%02d:%02d.%02d", h, m, s, f));
+ _fixed->SetLabel (wxString::Format ("%02d:%02d:%02d.%02ld", h, m, s, f));
}
DCPTime
} else {
_position->set (DCPTime () , 24);
}
- } else if (property == ContentProperty::LENGTH || property == VideoContentProperty::VIDEO_FRAME_RATE) {
+ } else if (
+ property == ContentProperty::LENGTH ||
+ property == VideoContentProperty::VIDEO_FRAME_RATE ||
+ property == VideoContentProperty::VIDEO_FRAME_TYPE
+ ) {
if (content) {
_full_length->set (content->full_length (), _editor->film()->video_frame_rate ());
_play_length->set (content->length_after_trim (), _editor->film()->video_frame_rate ());
_frame_type->wrapped()->Append (_("2D"));
_frame_type->wrapped()->Append (_("3D left/right"));
_frame_type->wrapped()->Append (_("3D top/bottom"));
+ _frame_type->wrapped()->Append (_("3D alternate"));
_filters_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&VideoPanel::edit_filters_clicked, this));
_colour_conversion_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&VideoPanel::edit_colour_conversion_clicked, this));
film->examine_and_add_content (A);
wait_for_jobs ();
- BOOST_CHECK_EQUAL (A->video_length().frames (24), 16);
+ BOOST_CHECK_EQUAL (A->video_length_after_3d_combine().frames (24), 16);
shared_ptr<FFmpegContent> B (new FFmpegContent (film, "test/data/red_30.mp4"));
film->examine_and_add_content (B);
wait_for_jobs ();
- BOOST_CHECK_EQUAL (B->video_length().frames (30), 16);
+ BOOST_CHECK_EQUAL (B->video_length_after_3d_combine().frames (30), 16);
/* Film should have been set to 25fps */
BOOST_CHECK_EQUAL (film->video_frame_rate(), 25);