summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-07-19 16:08:29 +0100
committerCarl Hetherington <cth@carlh.net>2013-07-19 16:08:29 +0100
commitbd453939da140ea994282e1c167ea5f8d02e2d94 (patch)
tree8cdfbacdc9f33f82ab13895a0ed5207fd0bc8fa1 /src/lib
parent56506a1993f402fe889a650faa3de2e265632498 (diff)
Spacing tweaks; rename ImageMagick -> StillImage.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/content_factory.cc6
-rw-r--r--src/lib/player.cc18
-rw-r--r--src/lib/playlist.cc4
-rw-r--r--src/lib/playlist.h4
-rw-r--r--src/lib/still_image.h (renamed from src/lib/imagemagick.h)14
-rw-r--r--src/lib/still_image_content.cc (renamed from src/lib/imagemagick_content.cc)26
-rw-r--r--src/lib/still_image_content.h (renamed from src/lib/imagemagick_content.h)14
-rw-r--r--src/lib/still_image_decoder.cc (renamed from src/lib/imagemagick_decoder.cc)20
-rw-r--r--src/lib/still_image_decoder.h (renamed from src/lib/imagemagick_decoder.h)9
-rw-r--r--src/lib/still_image_examiner.cc (renamed from src/lib/imagemagick_examiner.cc)18
-rw-r--r--src/lib/still_image_examiner.h (renamed from src/lib/imagemagick_examiner.h)8
-rw-r--r--src/lib/wscript6
12 files changed, 74 insertions, 73 deletions
diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc
index cf45b6aa6..bf447641d 100644
--- a/src/lib/content_factory.cc
+++ b/src/lib/content_factory.cc
@@ -19,7 +19,7 @@
#include <libcxml/cxml.h>
#include "ffmpeg_content.h"
-#include "imagemagick_content.h"
+#include "still_image_content.h"
#include "sndfile_content.h"
using std::string;
@@ -34,8 +34,8 @@ content_factory (shared_ptr<const Film> film, shared_ptr<cxml::Node> node)
if (type == "FFmpeg") {
content.reset (new FFmpegContent (film, node));
- } else if (type == "ImageMagick") {
- content.reset (new ImageMagickContent (film, node));
+ } else if (type == "StillImage") {
+ content.reset (new StillImageContent (film, node));
} else if (type == "Sndfile") {
content.reset (new SndfileContent (film, node));
}
diff --git a/src/lib/player.cc b/src/lib/player.cc
index d3d5d0f6b..1ffced425 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -22,8 +22,8 @@
#include "film.h"
#include "ffmpeg_decoder.h"
#include "ffmpeg_content.h"
-#include "imagemagick_decoder.h"
-#include "imagemagick_content.h"
+#include "still_image_decoder.h"
+#include "still_image_content.h"
#include "sndfile_decoder.h"
#include "sndfile_content.h"
#include "subtitle_content.h"
@@ -74,8 +74,8 @@ std::ostream& operator<<(std::ostream& s, Piece const & p)
{
if (dynamic_pointer_cast<FFmpegContent> (p.content)) {
s << "\tffmpeg ";
- } else if (dynamic_pointer_cast<ImageMagickContent> (p.content)) {
- s << "\timagemagick";
+ } else if (dynamic_pointer_cast<StillImageContent> (p.content)) {
+ s << "\tstill image";
} else if (dynamic_pointer_cast<SndfileContent> (p.content)) {
s << "\tsndfile ";
}
@@ -421,20 +421,20 @@ Player::setup_pieces ()
piece->decoder = fd;
}
- shared_ptr<const ImageMagickContent> ic = dynamic_pointer_cast<const ImageMagickContent> (*i);
+ shared_ptr<const StillImageContent> ic = dynamic_pointer_cast<const StillImageContent> (*i);
if (ic) {
- shared_ptr<ImageMagickDecoder> id;
+ shared_ptr<StillImageDecoder> id;
- /* See if we can re-use an old ImageMagickDecoder */
+ /* See if we can re-use an old StillImageDecoder */
for (list<shared_ptr<Piece> >::const_iterator j = old_pieces.begin(); j != old_pieces.end(); ++j) {
- shared_ptr<ImageMagickDecoder> imd = dynamic_pointer_cast<ImageMagickDecoder> ((*j)->decoder);
+ shared_ptr<StillImageDecoder> imd = dynamic_pointer_cast<StillImageDecoder> ((*j)->decoder);
if (imd && imd->content() == ic) {
id = imd;
}
}
if (!id) {
- id.reset (new ImageMagickDecoder (_film, ic));
+ id.reset (new StillImageDecoder (_film, ic));
id->Video.connect (bind (&Player::process_video, this, piece, _1, _2, _3));
}
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc
index c9d05b049..5ccc12b61 100644
--- a/src/lib/playlist.cc
+++ b/src/lib/playlist.cc
@@ -26,8 +26,8 @@
#include "video_content.h"
#include "ffmpeg_decoder.h"
#include "ffmpeg_content.h"
-#include "imagemagick_decoder.h"
-#include "imagemagick_content.h"
+#include "still_image_decoder.h"
+#include "still_image_content.h"
#include "content_factory.h"
#include "job.h"
#include "config.h"
diff --git a/src/lib/playlist.h b/src/lib/playlist.h
index e39e9f51f..7dbf41604 100644
--- a/src/lib/playlist.h
+++ b/src/lib/playlist.h
@@ -29,8 +29,8 @@
class Content;
class FFmpegContent;
class FFmpegDecoder;
-class ImageMagickContent;
-class ImageMagickDecoder;
+class StillImageMagickContent;
+class StillImageMagickDecoder;
class SndfileContent;
class SndfileDecoder;
class Job;
diff --git a/src/lib/imagemagick.h b/src/lib/still_image.h
index 5a1712a3a..b60069419 100644
--- a/src/lib/imagemagick.h
+++ b/src/lib/still_image.h
@@ -17,19 +17,19 @@
*/
-class ImageMagickContent;
+class StillImageContent;
-class ImageMagick
+class StillImage
{
public:
- ImageMagick (boost::shared_ptr<const ImageMagickContent> c)
- : _imagemagick_content (c)
+ StillImage (boost::shared_ptr<const StillImageContent> c)
+ : _still_image_content (c)
{}
- boost::shared_ptr<const ImageMagickContent> content () const {
- return _imagemagick_content;
+ boost::shared_ptr<const StillImageContent> content () const {
+ return _still_image_content;
}
protected:
- boost::shared_ptr<const ImageMagickContent> _imagemagick_content;
+ boost::shared_ptr<const StillImageContent> _still_image_content;
};
diff --git a/src/lib/imagemagick_content.cc b/src/lib/still_image_content.cc
index 0c4e84015..3a30ccf87 100644
--- a/src/lib/imagemagick_content.cc
+++ b/src/lib/still_image_content.cc
@@ -18,8 +18,8 @@
*/
#include <libcxml/cxml.h>
-#include "imagemagick_content.h"
-#include "imagemagick_examiner.h"
+#include "still_image_content.h"
+#include "still_image_examiner.h"
#include "config.h"
#include "compose.hpp"
#include "film.h"
@@ -31,14 +31,14 @@ using std::cout;
using std::stringstream;
using boost::shared_ptr;
-ImageMagickContent::ImageMagickContent (shared_ptr<const Film> f, boost::filesystem::path p)
+StillImageContent::StillImageContent (shared_ptr<const Film> f, boost::filesystem::path p)
: Content (f, p)
, VideoContent (f, p)
{
}
-ImageMagickContent::ImageMagickContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node)
+StillImageContent::StillImageContent (shared_ptr<const Film> f, shared_ptr<const cxml::Node> node)
: Content (f, node)
, VideoContent (f, node)
{
@@ -46,13 +46,13 @@ ImageMagickContent::ImageMagickContent (shared_ptr<const Film> f, shared_ptr<con
}
string
-ImageMagickContent::summary () const
+StillImageContent::summary () const
{
return String::compose (_("%1 [still]"), file().filename().string());
}
bool
-ImageMagickContent::valid_file (boost::filesystem::path f)
+StillImageContent::valid_file (boost::filesystem::path f)
{
string ext = f.extension().string();
transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
@@ -60,29 +60,29 @@ ImageMagickContent::valid_file (boost::filesystem::path f)
}
void
-ImageMagickContent::as_xml (xmlpp::Node* node) const
+StillImageContent::as_xml (xmlpp::Node* node) const
{
- node->add_child("Type")->add_child_text ("ImageMagick");
+ node->add_child("Type")->add_child_text ("StillImage");
Content::as_xml (node);
VideoContent::as_xml (node);
}
void
-ImageMagickContent::examine (shared_ptr<Job> job)
+StillImageContent::examine (shared_ptr<Job> job)
{
Content::examine (job);
shared_ptr<const Film> film = _film.lock ();
assert (film);
- shared_ptr<ImageMagickExaminer> examiner (new ImageMagickExaminer (film, shared_from_this()));
+ shared_ptr<StillImageExaminer> examiner (new StillImageExaminer (film, shared_from_this()));
take_from_video_examiner (examiner);
set_video_length (Config::instance()->default_still_length() * video_frame_rate());
}
void
-ImageMagickContent::set_video_length (VideoContent::Frame len)
+StillImageContent::set_video_length (VideoContent::Frame len)
{
{
boost::mutex::scoped_lock lm (_mutex);
@@ -93,7 +93,7 @@ ImageMagickContent::set_video_length (VideoContent::Frame len)
}
Time
-ImageMagickContent::length () const
+StillImageContent::length () const
{
shared_ptr<const Film> film = _film.lock ();
assert (film);
@@ -103,7 +103,7 @@ ImageMagickContent::length () const
}
string
-ImageMagickContent::identifier () const
+StillImageContent::identifier () const
{
stringstream s;
s << VideoContent::identifier ();
diff --git a/src/lib/imagemagick_content.h b/src/lib/still_image_content.h
index 50191cc5a..02921f4e2 100644
--- a/src/lib/imagemagick_content.h
+++ b/src/lib/still_image_content.h
@@ -17,8 +17,8 @@
*/
-#ifndef DCPOMATIC_IMAGEMAGICK_CONTENT_H
-#define DCPOMATIC_IMAGEMAGICK_CONTENT_H
+#ifndef DCPOMATIC_STILL_IMAGE_CONTENT_H
+#define DCPOMATIC_STILL_IMAGE_CONTENT_H
#include <boost/enable_shared_from_this.hpp>
#include "video_content.h"
@@ -27,14 +27,14 @@ namespace cxml {
class Node;
}
-class ImageMagickContent : public VideoContent
+class StillImageContent : public VideoContent
{
public:
- ImageMagickContent (boost::shared_ptr<const Film>, boost::filesystem::path);
- ImageMagickContent (boost::shared_ptr<const Film>, boost::shared_ptr<const cxml::Node>);
+ StillImageContent (boost::shared_ptr<const Film>, boost::filesystem::path);
+ StillImageContent (boost::shared_ptr<const Film>, boost::shared_ptr<const cxml::Node>);
- boost::shared_ptr<ImageMagickContent> shared_from_this () {
- return boost::dynamic_pointer_cast<ImageMagickContent> (Content::shared_from_this ());
+ boost::shared_ptr<StillImageContent> shared_from_this () {
+ return boost::dynamic_pointer_cast<StillImageContent> (Content::shared_from_this ());
};
void examine (boost::shared_ptr<Job>);
diff --git a/src/lib/imagemagick_decoder.cc b/src/lib/still_image_decoder.cc
index ee50f3fb1..21cc83f54 100644
--- a/src/lib/imagemagick_decoder.cc
+++ b/src/lib/still_image_decoder.cc
@@ -20,8 +20,8 @@
#include <iostream>
#include <boost/filesystem.hpp>
#include <Magick++.h>
-#include "imagemagick_content.h"
-#include "imagemagick_decoder.h"
+#include "still_image_content.h"
+#include "still_image_decoder.h"
#include "image.h"
#include "film.h"
#include "exceptions.h"
@@ -32,18 +32,18 @@ using std::cout;
using boost::shared_ptr;
using libdcp::Size;
-ImageMagickDecoder::ImageMagickDecoder (shared_ptr<const Film> f, shared_ptr<const ImageMagickContent> c)
+StillImageDecoder::StillImageDecoder (shared_ptr<const Film> f, shared_ptr<const StillImageContent> c)
: Decoder (f)
, VideoDecoder (f)
- , ImageMagick (c)
+ , StillImage (c)
{
}
void
-ImageMagickDecoder::pass ()
+StillImageDecoder::pass ()
{
- if (_video_position >= _imagemagick_content->video_length ()) {
+ if (_video_position >= _still_image_content->video_length ()) {
return;
}
@@ -52,7 +52,7 @@ ImageMagickDecoder::pass ()
return;
}
- Magick::Image* magick_image = new Magick::Image (_imagemagick_content->file().string ());
+ Magick::Image* magick_image = new Magick::Image (_still_image_content->file().string ());
_video_size = libdcp::Size (magick_image->columns(), magick_image->rows());
_image.reset (new Image (PIX_FMT_RGB24, _video_size.get(), false));
@@ -75,13 +75,13 @@ ImageMagickDecoder::pass ()
}
void
-ImageMagickDecoder::seek (VideoContent::Frame frame, bool)
+StillImageDecoder::seek (VideoContent::Frame frame, bool)
{
_video_position = frame;
}
bool
-ImageMagickDecoder::done () const
+StillImageDecoder::done () const
{
- return _video_position >= _imagemagick_content->video_length ();
+ return _video_position >= _still_image_content->video_length ();
}
diff --git a/src/lib/imagemagick_decoder.h b/src/lib/still_image_decoder.h
index 3e551c3b7..db41b0357 100644
--- a/src/lib/imagemagick_decoder.h
+++ b/src/lib/still_image_decoder.h
@@ -18,18 +18,18 @@
*/
#include "video_decoder.h"
-#include "imagemagick.h"
+#include "still_image.h"
namespace Magick {
class Image;
}
-class ImageMagickContent;
+class StillImageContent;
-class ImageMagickDecoder : public VideoDecoder, public ImageMagick
+class StillImageDecoder : public VideoDecoder, public StillImage
{
public:
- ImageMagickDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const ImageMagickContent>);
+ StillImageDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const StillImageContent>);
/* Decoder */
@@ -41,3 +41,4 @@ private:
boost::shared_ptr<Image> _image;
mutable boost::optional<libdcp::Size> _video_size;
};
+
diff --git a/src/lib/imagemagick_examiner.cc b/src/lib/still_image_examiner.cc
index 0eee0d425..71357e5ef 100644
--- a/src/lib/imagemagick_examiner.cc
+++ b/src/lib/still_image_examiner.cc
@@ -19,8 +19,8 @@
#include <iostream>
#include <Magick++.h>
-#include "imagemagick_content.h"
-#include "imagemagick_examiner.h"
+#include "still_image_content.h"
+#include "still_image_examiner.h"
#include "film.h"
#include "i18n.h"
@@ -28,30 +28,30 @@
using std::cout;
using boost::shared_ptr;
-ImageMagickExaminer::ImageMagickExaminer (shared_ptr<const Film> f, shared_ptr<const ImageMagickContent> c)
- : ImageMagick (c)
+StillImageExaminer::StillImageExaminer (shared_ptr<const Film> f, shared_ptr<const StillImageContent> c)
+ : StillImage (c)
, _film (f)
{
using namespace MagickCore;
- Magick::Image* image = new Magick::Image (_imagemagick_content->file().string());
+ Magick::Image* image = new Magick::Image (_still_image_content->file().string());
_video_size = libdcp::Size (image->columns(), image->rows());
delete image;
}
libdcp::Size
-ImageMagickExaminer::video_size () const
+StillImageExaminer::video_size () const
{
return _video_size;
}
int
-ImageMagickExaminer::video_length () const
+StillImageExaminer::video_length () const
{
- return _imagemagick_content->video_length ();
+ return _still_image_content->video_length ();
}
float
-ImageMagickExaminer::video_frame_rate () const
+StillImageExaminer::video_frame_rate () const
{
boost::shared_ptr<const Film> f = _film.lock ();
if (!f) {
diff --git a/src/lib/imagemagick_examiner.h b/src/lib/still_image_examiner.h
index 801ede442..fa3456e8a 100644
--- a/src/lib/imagemagick_examiner.h
+++ b/src/lib/still_image_examiner.h
@@ -17,19 +17,19 @@
*/
-#include "imagemagick.h"
+#include "still_image.h"
#include "video_examiner.h"
namespace Magick {
class Image;
}
-class ImageMagickContent;
+class StillImageContent;
-class ImageMagickExaminer : public ImageMagick, public VideoExaminer
+class StillImageExaminer : public StillImage, public VideoExaminer
{
public:
- ImageMagickExaminer (boost::shared_ptr<const Film>, boost::shared_ptr<const ImageMagickContent>);
+ StillImageExaminer (boost::shared_ptr<const Film>, boost::shared_ptr<const StillImageContent>);
float video_frame_rate () const;
libdcp::Size video_size () const;
diff --git a/src/lib/wscript b/src/lib/wscript
index 2bedc1fce..100663b87 100644
--- a/src/lib/wscript
+++ b/src/lib/wscript
@@ -28,9 +28,9 @@ sources = """
film.cc
filter.cc
image.cc
- imagemagick_content.cc
- imagemagick_decoder.cc
- imagemagick_examiner.cc
+ still_image_content.cc
+ still_image_decoder.cc
+ still_image_examiner.cc
job.cc
job_manager.cc
log.cc