summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-06-28 09:47:55 +0100
committerCarl Hetherington <cth@carlh.net>2013-06-28 09:47:55 +0100
commit318d819afd66b76e3ea7ce728452c2fb668c0b80 (patch)
treef053fd342a84555b98d78eca79b93cf254c028d9
parent409db67a7e665c562b4c46035e6394263a93a7f6 (diff)
parent1c86e1eaa1115015e7b2c4129a3b4be024939db2 (diff)
Merge branch 'master' of ssh://carlh.dnsalias.org/home/carl/git/dvdomatic
-rw-r--r--platform/linux/control-12.04-324
-rw-r--r--platform/linux/control-12.04-644
-rw-r--r--platform/linux/control-12.10-324
-rw-r--r--platform/linux/control-12.10-644
-rwxr-xr-xrun/tests4
-rw-r--r--src/lib/ffmpeg_decoder.cc10
-rw-r--r--src/lib/ffmpeg_decoder.h5
-rw-r--r--src/lib/film.cc5
-rw-r--r--src/lib/job.cc6
-rw-r--r--src/lib/ui_signaller.h5
-rw-r--r--src/wx/job_manager_view.cc1
-rw-r--r--test/test.cc4
12 files changed, 40 insertions, 16 deletions
diff --git a/platform/linux/control-12.04-32 b/platform/linux/control-12.04-32
index 0f52d03ae..89f5021e3 100644
--- a/platform/linux/control-12.04-32
+++ b/platform/linux/control-12.04-32
@@ -2,13 +2,13 @@ Source: dvdomatic
Section: video
Priority: extra
Maintainer: Carl Hetherington <cth@carlh.net>
-Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.3), g++ (>= 4:4.6.3), pkg-config (>= 0.26), libwxgtk2.8-dev (>= 2.8.12.1), libssh-dev (>= 0.5.2), libboost-filesystem-dev (>= 1.46.0), libboost-thread-dev (>= 1.46.0), libsndfile1-dev (>= 1.0.25), libmagick++-dev (>= 8:6.6.9.7)
+Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.3), g++ (>= 4:4.6.3), pkg-config (>= 0.26), libssh-dev (>= 0.5.2), libboost-filesystem-dev (>= 1.46.0), libboost-thread-dev (>= 1.46.0), libsndfile1-dev (>= 1.0.25), libmagick++-dev (>= 8:6.6.9.7), libgtk-3 (>= 3.6.0)
Standards-Version: 3.9.3
Homepage: http://carlh.net/software/dvdomatic
Package: dvdomatic
Architecture: i386
-Depends: libc6 (>= 2.15), libwxgtk2.8-0 (>= 2.8.12.1), libssh-4 (>= 0.5.2), libboost-filesystem1.46.1 (>= 1.46.1), libboost-thread1.46.1 (>= 1.46.1), libsndfile1 (>= 1.0.25), libmagick++4 (>= 8:6.6.9.7), libxml++2.6-2 (>= 2.34.1)
+Depends: libc6 (>= 2.15), libssh-4 (>= 0.5.2), libboost-filesystem1.46.1 (>= 1.46.1), libboost-thread1.46.1 (>= 1.46.1), libsndfile1 (>= 1.0.25), libmagick++4 (>= 8:6.6.9.7), libxml++2.6-2 (>= 2.34.1), libgtk-3-dev (>= 3.6.0)
Description: Generator of Digital Cinema Packages (DCPs)
DVD-o-matic generates Digital Cinema Packages (DCPs) from video and audio
files (such as those from DVDs or Blu-Rays) for presentation on DCI-compliant
diff --git a/platform/linux/control-12.04-64 b/platform/linux/control-12.04-64
index fa4b4476e..8d0781bdc 100644
--- a/platform/linux/control-12.04-64
+++ b/platform/linux/control-12.04-64
@@ -2,13 +2,13 @@ Source: dvdomatic
Section: video
Priority: extra
Maintainer: Carl Hetherington <cth@carlh.net>
-Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.3), g++ (>= 4:4.6.3), pkg-config (>= 0.26), libwxgtk2.8-dev (>= 2.8.12.1), libssh-dev (>= 0.5.2), libboost-filesystem-dev (>= 1.46.0), libboost-thread-dev (>= 1.46.0), libsndfile1-dev (>= 1.0.25), libmagick++-dev (>= 8:6.6.9.7)
+Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.3), g++ (>= 4:4.6.3), pkg-config (>= 0.26), libssh-dev (>= 0.5.2), libboost-filesystem-dev (>= 1.46.0), libboost-thread-dev (>= 1.46.0), libsndfile1-dev (>= 1.0.25), libmagick++-dev (>= 8:6.6.9.7), libgtk-3-dev (>= 3.6.0)
Standards-Version: 3.9.3
Homepage: http://carlh.net/software/dvdomatic
Package: dvdomatic
Architecture: amd64
-Depends: libc6 (>= 2.15), libwxgtk2.8-0 (>= 2.8.12.1), libssh-4 (>= 0.5.2), libboost-filesystem1.46.1 (>= 1.46.1), libboost-thread1.46.1 (>= 1.46.1), libsndfile1 (>= 1.0.25), libmagick++4 (>= 8:6.6.9.7), libxml++2.6-2 (>= 2.34.1)
+Depends: libc6 (>= 2.15), libssh-4 (>= 0.5.2), libboost-filesystem1.46.1 (>= 1.46.1), libboost-thread1.46.1 (>= 1.46.1), libsndfile1 (>= 1.0.25), libmagick++4 (>= 8:6.6.9.7), libxml++2.6-2 (>= 2.34.1), libgtk-3 (>= 3.6.0)
Description: Generator of Digital Cinema Packages (DCPs)
DVD-o-matic generates Digital Cinema Packages (DCPs) from video and audio
files (such as those from DVDs or Blu-Rays) for presentation on DCI-compliant
diff --git a/platform/linux/control-12.10-32 b/platform/linux/control-12.10-32
index 0e5fc1f46..86d12c33f 100644
--- a/platform/linux/control-12.10-32
+++ b/platform/linux/control-12.10-32
@@ -2,13 +2,13 @@ Source: dvdomatic
Section: video
Priority: extra
Maintainer: Carl Hetherington <cth@carlh.net>
-Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.3), g++ (>= 4:4.6.3), pkg-config (>= 0.26), libwxgtk2.8-dev (>= 2.8.12.1), libssh-dev (>= 0.5.2), libboost-filesystem-dev (>= 1.46.0), libboost-thread-dev (>= 1.46.0), libsndfile1-dev (>= 1.0.25), libmagick++-dev (>= 8:6.6.9.7)
+Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.3), g++ (>= 4:4.6.3), pkg-config (>= 0.26), libssh-dev (>= 0.5.2), libboost-filesystem-dev (>= 1.46.0), libboost-thread-dev (>= 1.46.0), libsndfile1-dev (>= 1.0.25), libmagick++-dev (>= 8:6.6.9.7), libgtk-3 (>= 3.6.0)
Standards-Version: 3.9.3
Homepage: http://carlh.net/software/dvdomatic
Package: dvdomatic
Architecture: i386
-Depends: libc6 (>= 2.15), libwxgtk2.8-0 (>= 2.8.12.1), libssh-4 (>= 0.5.2), libboost-filesystem1.49.0 (>= 1.49.0), libboost-thread1.49.0 (>= 1.49.0), libsndfile1 (>= 1.0.25), libmagick++5 (>= 8:6.7.7.10), libxml++2.6-2 (>= 2.34.2)
+Depends: libc6 (>= 2.15), libssh-4 (>= 0.5.2), libboost-filesystem1.49.0 (>= 1.49.0), libboost-thread1.49.0 (>= 1.49.0), libsndfile1 (>= 1.0.25), libmagick++5 (>= 8:6.7.7.10), libxml++2.6-2 (>= 2.34.2), libgtk-3-dev (>= 3.6.0)
Description: Generator of Digital Cinema Packages (DCPs)
DVD-o-matic generates Digital Cinema Packages (DCPs) from video and audio
files (such as those from DVDs or Blu-Rays) for presentation on DCI-compliant
diff --git a/platform/linux/control-12.10-64 b/platform/linux/control-12.10-64
index 24e16b4b5..4ea69104d 100644
--- a/platform/linux/control-12.10-64
+++ b/platform/linux/control-12.10-64
@@ -2,13 +2,13 @@ Source: dvdomatic
Section: video
Priority: extra
Maintainer: Carl Hetherington <cth@carlh.net>
-Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.3), g++ (>= 4:4.6.3), pkg-config (>= 0.26), libwxgtk2.8-dev (>= 2.8.12.1), libssh-dev (>= 0.5.2), libboost-filesystem-dev (>= 1.46.0), libboost-thread-dev (>= 1.46.0), libsndfile1-dev (>= 1.0.25), libmagick++-dev (>= 8:6.6.9.7)
+Build-Depends: debhelper (>= 8.0.0), python (>= 2.7.3), g++ (>= 4:4.6.3), pkg-config (>= 0.26), libssh-dev (>= 0.5.2), libboost-filesystem-dev (>= 1.46.0), libboost-thread-dev (>= 1.46.0), libsndfile1-dev (>= 1.0.25), libmagick++-dev (>= 8:6.6.9.7), libgtk-3 (>= 3.6.0)
Standards-Version: 3.9.3
Homepage: http://carlh.net/software/dvdomatic
Package: dvdomatic
Architecture: amd64
-Depends: libc6 (>= 2.15), libwxgtk2.8-0 (>= 2.8.12.1), libssh-4 (>= 0.5.2), libboost-filesystem1.49.0 (>= 1.49.0), libboost-thread1.49.0 (>= 1.49.0), libsndfile1 (>= 1.0.25), libmagick++5 (>= 8:6.7.7.10), libxml++2.6-2 (>= 2.34.2)
+Depends: libc6 (>= 2.15), libssh-4 (>= 0.5.2), libboost-filesystem1.49.0 (>= 1.49.0), libboost-thread1.49.0 (>= 1.49.0), libsndfile1 (>= 1.0.25), libmagick++5 (>= 8:6.7.7.10), libxml++2.6-2 (>= 2.34.2), libgtk-3-dev (>= 3.6.0)
Description: Generator of Digital Cinema Packages (DCPs)
DVD-o-matic generates Digital Cinema Packages (DCPs) from video and audio
files (such as those from DVDs or Blu-Rays) for presentation on DCI-compliant
diff --git a/run/tests b/run/tests
index e1686a55c..e6cdf4ba8 100755
--- a/run/tests
+++ b/run/tests
@@ -2,10 +2,10 @@
export LD_LIBRARY_PATH=build/src/lib:$LD_LIBRARY_PATH
if [ "$1" == "--debug" ]; then
- gdb --args build/test/unit-tests
+ gdb --args build/test/unit-tests --catch_system_errors=no
elif [ "$1" == "--valgrind" ]; then
valgrind --tool="memcheck" --leak-check=full build/test/unit-tests
else
- build/test/unit-tests
+ build/test/unit-tests --catch_system_errors=no
fi
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index cad247e5a..c2143b949 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -61,6 +61,8 @@ using boost::optional;
using boost::dynamic_pointer_cast;
using libdcp::Size;
+boost::mutex FFmpegDecoder::_mutex;
+
FFmpegDecoder::FFmpegDecoder (shared_ptr<Film> f, DecodeOptions o)
: Decoder (f, o)
, VideoDecoder (f, o)
@@ -83,6 +85,8 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr<Film> f, DecodeOptions o)
FFmpegDecoder::~FFmpegDecoder ()
{
+ boost::mutex::scoped_lock lm (_mutex);
+
if (_audio_codec_context) {
avcodec_close (_audio_codec_context);
}
@@ -157,6 +161,8 @@ FFmpegDecoder::setup_general ()
void
FFmpegDecoder::setup_video ()
{
+ boost::mutex::scoped_lock lm (_mutex);
+
_video_codec_context = _format_context->streams[_video_stream]->codec;
_video_codec = avcodec_find_decoder (_video_codec_context->codec_id);
@@ -172,6 +178,8 @@ FFmpegDecoder::setup_video ()
void
FFmpegDecoder::setup_audio ()
{
+ boost::mutex::scoped_lock lm (_mutex);
+
if (!_audio_stream) {
return;
}
@@ -194,6 +202,8 @@ FFmpegDecoder::setup_audio ()
void
FFmpegDecoder::setup_subtitle ()
{
+ boost::mutex::scoped_lock lm (_mutex);
+
if (!_subtitle_stream || _subtitle_stream->id() >= int (_format_context->nb_streams)) {
return;
}
diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h
index 0c89b973d..198f4294e 100644
--- a/src/lib/ffmpeg_decoder.h
+++ b/src/lib/ffmpeg_decoder.h
@@ -107,6 +107,9 @@ public:
private:
+ /* No copy construction */
+ FFmpegDecoder (FFmpegDecoder const &);
+
bool pass ();
bool do_seek (double p, bool, bool);
PixelFormat pixel_format () const;
@@ -145,4 +148,6 @@ private:
std::list<boost::shared_ptr<FilterGraph> > _filter_graphs;
boost::mutex _filter_graphs_mutex;
+
+ static boost::mutex _mutex;
};
diff --git a/src/lib/film.cc b/src/lib/film.cc
index c4dc9d830..6bc503dc1 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -948,6 +948,9 @@ Film::set_content (string c)
_content = c;
}
+ /* Do this before we start using FFmpeg ourselves */
+ run_ffprobe (c, file ("ffprobe.log"), _log);
+
/* Reset streams here in case the new content doesn't have one or the other */
_content_audio_stream = shared_ptr<AudioStream> ();
_subtitle_stream = shared_ptr<SubtitleStream> ();
@@ -1003,8 +1006,6 @@ Film::set_content (string c)
if (content_type() == STILL) {
set_use_content_audio (false);
}
-
- run_ffprobe (c, file ("ffprobe.log"), _log);
}
void
diff --git a/src/lib/job.cc b/src/lib/job.cc
index 9a5812fa7..8bb43a91f 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -27,6 +27,7 @@
#include "job.h"
#include "util.h"
#include "cross.h"
+#include "ui_signaller.h"
#include "i18n.h"
@@ -172,8 +173,11 @@ Job::set_state (State s)
boost::mutex::scoped_lock lm (_state_mutex);
_state = s;
- if (_state == FINISHED_OK || _state == FINISHED_ERROR) {
+ if (_state == FINISHED_OK || _state == FINISHED_ERROR || _state == FINISHED_CANCELLED) {
_ran_for = elapsed_time ();
+ if (ui_signaller) {
+ ui_signaller->emit (boost::bind (boost::ref (Finished)));
+ }
}
}
diff --git a/src/lib/ui_signaller.h b/src/lib/ui_signaller.h
index 221bcbe95..0d19660bf 100644
--- a/src/lib/ui_signaller.h
+++ b/src/lib/ui_signaller.h
@@ -60,7 +60,10 @@ public:
}
/** This should wake the UI and make it call ui_idle() */
- virtual void wake_ui () = 0;
+ virtual void wake_ui () {
+ /* This is only a sensible implementation when there is no GUI... */
+ ui_idle ();
+ }
private:
/** A io_service which is used as the conduit for messages */
diff --git a/src/wx/job_manager_view.cc b/src/wx/job_manager_view.cc
index 5cd9f2e15..cfe09aec8 100644
--- a/src/wx/job_manager_view.cc
+++ b/src/wx/job_manager_view.cc
@@ -133,7 +133,6 @@ JobManagerView::update ()
if (!(*i)->finished_cancelled()) {
_job_records[*i].gauge->SetValue (100);
}
- (*i)->Finished ();
_job_records[*i].finalised = true;
_job_records[*i].cancel->Enable (false);
if (!(*i)->error_details().empty ()) {
diff --git a/test/test.cc b/test/test.cc
index 65b1f9056..74d967a46 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -40,6 +40,7 @@
#include "ffmpeg_decoder.h"
#include "sndfile_decoder.h"
#include "trimmer.h"
+#include "ui_signaller.h"
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE dvdomatic_test
#include <boost/test/unit_test.hpp>
@@ -64,6 +65,8 @@ struct TestConfig
Config::instance()->set_default_dci_metadata (DCIMetadata ());
Config::instance()->set_default_format (static_cast<Format*> (0));
Config::instance()->set_default_dcp_content_type (static_cast<DCPContentType*> (0));
+
+ ui_signaller = new UISignaller ();
}
};
@@ -103,4 +106,3 @@ new_test_film (string name)
#include "job_test.cc"
#include "client_server_test.cc"
#include "image_test.cc"
-