diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-01-23 20:15:13 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-01-23 20:15:13 +0000 |
| commit | 420adb1fd2910fd24eb84be98169afc209f76a0e (patch) | |
| tree | 91efc15ae6351a1b93e3867b6685fb3922933efc /src/lib | |
| parent | 4233db111cc4b1ca8a1a82b8aac96805a866ffa0 (diff) | |
| parent | 742f0fb10fb38a73d517e2a8870cd03ebefefa20 (diff) | |
Merge master branch.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp_video_frame.h | 3 | ||||
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 8 | ||||
| -rw-r--r-- | src/lib/film.cc | 32 | ||||
| -rw-r--r-- | src/lib/film.h | 10 | ||||
| -rw-r--r-- | src/lib/filter_graph.cc | 4 | ||||
| -rw-r--r-- | src/lib/format.cc | 30 | ||||
| -rw-r--r-- | src/lib/format.h | 2 | ||||
| -rw-r--r-- | src/lib/image.cc | 16 | ||||
| -rw-r--r-- | src/lib/imagemagick_decoder.cc | 6 | ||||
| -rw-r--r-- | src/lib/make_dcp_job.cc | 160 | ||||
| -rw-r--r-- | src/lib/make_dcp_job.h | 46 | ||||
| -rw-r--r-- | src/lib/server.cc | 6 | ||||
| -rw-r--r-- | src/lib/subtitle.cc | 2 | ||||
| -rw-r--r-- | src/lib/util.cc | 3 |
14 files changed, 248 insertions, 80 deletions
diff --git a/src/lib/dcp_video_frame.h b/src/lib/dcp_video_frame.h index 1d434505a..e988b663a 100644 --- a/src/lib/dcp_video_frame.h +++ b/src/lib/dcp_video_frame.h @@ -39,8 +39,7 @@ class Subtitle; class EncodedData { public: - /** @param s Size of data, in bytes. - */ + /** @param s Size of data, in bytes */ EncodedData (int s); EncodedData (std::string f); diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index e7dfc206b..81f405644 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -469,10 +469,10 @@ FFmpegDecoder::audio_sample_format () const return _audio_codec_context->sample_fmt; } -Size +libdcp::Size FFmpegDecoder::native_size () const { - return Size (_video_codec_context->width, _video_codec_context->height); + return libdcp::Size (_video_codec_context->width, _video_codec_context->height); } PixelFormat @@ -559,12 +559,12 @@ FFmpegDecoder::filter_and_emit_video (AVFrame* frame) shared_ptr<FilterGraph> graph; list<shared_ptr<FilterGraph> >::iterator i = _filter_graphs.begin(); - while (i != _filter_graphs.end() && !(*i)->can_process (Size (frame->width, frame->height), (AVPixelFormat) frame->format)) { + while (i != _filter_graphs.end() && !(*i)->can_process (libdcp::Size (frame->width, frame->height), (AVPixelFormat) frame->format)) { ++i; } if (i == _filter_graphs.end ()) { - graph.reset (new FilterGraph (_film, this, Size (frame->width, frame->height), (AVPixelFormat) frame->format)); + graph.reset (new FilterGraph (_film, this, libdcp::Size (frame->width, frame->height), (AVPixelFormat) frame->format)); _filter_graphs.push_back (graph); _film->log()->log (String::compose ("New graph for %1x%2, pixel format %3", frame->width, frame->height, frame->format)); } else { diff --git a/src/lib/film.cc b/src/lib/film.cc index c91a80471..ae9edbfdb 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -157,7 +157,6 @@ Film::Film (Film const & o) , _scaler (o._scaler) , _trim_start (o._trim_start) , _trim_end (o._trim_end) - , _reel_size (o._reel_size) , _dcp_ab (o._dcp_ab) , _content_audio_stream (o._content_audio_stream) , _external_audio (o._external_audio) @@ -390,9 +389,6 @@ Film::write_metadata () const f << "scaler " << _scaler->id () << "\n"; f << "trim_start " << _trim_start << "\n"; f << "trim_end " << _trim_end << "\n"; - if (_reel_size) { - f << "reel_size " << _reel_size.get() << "\n"; - } f << "dcp_ab " << (_dcp_ab ? "1" : "0") << "\n"; if (_content_audio_stream) { f << "selected_content_audio_stream " << _content_audio_stream->to_string() << "\n"; @@ -508,8 +504,6 @@ Film::read_metadata () _trim_start = atoi (v.c_str ()); } else if ( ((!version || version < 2) && k == "trim_end") || k == "trim_end") { _trim_end = atoi (v.c_str ()); - } else if (k == "reel_size") { - _reel_size = boost::lexical_cast<uint64_t> (v); } else if (k == "dcp_ab") { _dcp_ab = (v == "1"); } else if (k == "selected_content_audio_stream" || (!version && k == "selected_audio_stream")) { @@ -610,8 +604,8 @@ Film::read_metadata () _dirty = false; } -Size -Film::cropped_size (Size s) const +libdcp::Size +Film::cropped_size (libdcp::Size s) const { boost::mutex::scoped_lock lm (_state_mutex); s.width -= _crop.left + _crop.right; @@ -1071,26 +1065,6 @@ Film::set_trim_end (int t) } void -Film::set_reel_size (uint64_t s) -{ - { - boost::mutex::scoped_lock lm (_state_mutex); - _reel_size = s; - } - signal_changed (REEL_SIZE); -} - -void -Film::unset_reel_size () -{ - { - boost::mutex::scoped_lock lm (_state_mutex); - _reel_size = boost::optional<uint64_t> (); - } - signal_changed (REEL_SIZE); -} - -void Film::set_dcp_ab (bool a) { { @@ -1298,7 +1272,7 @@ Film::set_package_type (string p) } void -Film::set_size (Size s) +Film::set_size (libdcp::Size s) { { boost::mutex::scoped_lock lm (_state_mutex); diff --git a/src/lib/film.h b/src/lib/film.h index e10abfa4b..60646b0c8 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -123,7 +123,6 @@ public: SCALER, TRIM_START, TRIM_END, - REEL_SIZE, DCP_AB, CONTENT_AUDIO_STREAM, EXTERNAL_AUDIO, @@ -209,11 +208,6 @@ public: return _trim_end; } - boost::optional<uint64_t> reel_size () const { - boost::mutex::scoped_lock lm (_state_mutex); - return _reel_size; - } - bool dcp_ab () const { boost::mutex::scoped_lock lm (_state_mutex); return _dcp_ab; @@ -371,8 +365,6 @@ public: void set_scaler (Scaler const *); void set_trim_start (int); void set_trim_end (int); - void set_reel_size (uint64_t); - void unset_reel_size (); void set_dcp_ab (bool); void set_content_audio_stream (boost::shared_ptr<AudioStream>); void set_external_audio (std::vector<std::string>); @@ -456,8 +448,6 @@ private: int _trim_start; /** Frames to trim off the end of the DCP */ int _trim_end; - /** Approximate target reel size in bytes; if not set, use a single reel */ - boost::optional<uint64_t> _reel_size; /** true to create an A/B comparison DCP, where the left half of the image is the video without any filters or post-processing, and the right half has the specified filters and post-processing. diff --git a/src/lib/filter_graph.cc b/src/lib/filter_graph.cc index 86864a762..3a13d93d0 100644 --- a/src/lib/filter_graph.cc +++ b/src/lib/filter_graph.cc @@ -55,7 +55,7 @@ using libdcp::Size; * @param s Size of the images to process. * @param p Pixel format of the images to process. */ -FilterGraph::FilterGraph (shared_ptr<Film> film, FFmpegDecoder* decoder, Size s, AVPixelFormat p) +FilterGraph::FilterGraph (shared_ptr<Film> film, FFmpegDecoder* decoder, libdcp::Size s, AVPixelFormat p) : _buffer_src_context (0) , _buffer_sink_context (0) , _size (s) @@ -206,7 +206,7 @@ FilterGraph::process (AVFrame const * frame) * @return true if this chain can process images with `s' and `p', otherwise false. */ bool -FilterGraph::can_process (Size s, AVPixelFormat p) const +FilterGraph::can_process (libdcp::Size s, AVPixelFormat p) const { return (_size == s && _pixel_format == p); } diff --git a/src/lib/format.cc b/src/lib/format.cc index a80fab619..4583dd0e5 100644 --- a/src/lib/format.cc +++ b/src/lib/format.cc @@ -68,19 +68,19 @@ Format::as_metadata () const void Format::setup_formats () { - _formats.push_back (new FixedFormat (119, Size (1285, 1080), "119", "1.19", "F")); - _formats.push_back (new FixedFormat (133, Size (1436, 1080), "133", "1.33", "F")); - _formats.push_back (new FixedFormat (138, Size (1485, 1080), "138", "1.375", "F")); - _formats.push_back (new FixedFormat (133, Size (1998, 1080), "133-in-flat", "4:3 within Flat", "F")); - _formats.push_back (new FixedFormat (137, Size (1480, 1080), "137", "Academy", "F")); - _formats.push_back (new FixedFormat (166, Size (1793, 1080), "166", "1.66", "F")); - _formats.push_back (new FixedFormat (166, Size (1998, 1080), "166-in-flat", "1.66 within Flat", "F")); - _formats.push_back (new FixedFormat (178, Size (1998, 1080), "178-in-flat", "16:9 within Flat", "F")); - _formats.push_back (new FixedFormat (178, Size (1920, 1080), "178", "16:9", "F")); - _formats.push_back (new FixedFormat (185, Size (1998, 1080), "185", "Flat", "F")); - _formats.push_back (new FixedFormat (239, Size (2048, 858), "239", "Scope", "S")); - _formats.push_back (new VariableFormat (Size (1998, 1080), "var-185", "Flat", "F")); - _formats.push_back (new VariableFormat (Size (2048, 858), "var-239", "Scope", "S")); + _formats.push_back (new FixedFormat (119, libdcp::Size (1285, 1080), "119", "1.19", "F")); + _formats.push_back (new FixedFormat (133, libdcp::Size (1436, 1080), "133", "1.33", "F")); + _formats.push_back (new FixedFormat (138, libdcp::Size (1485, 1080), "138", "1.375", "F")); + _formats.push_back (new FixedFormat (133, libdcp::Size (1998, 1080), "133-in-flat", "4:3 within Flat", "F")); + _formats.push_back (new FixedFormat (137, libdcp::Size (1480, 1080), "137", "Academy", "F")); + _formats.push_back (new FixedFormat (166, libdcp::Size (1793, 1080), "166", "1.66", "F")); + _formats.push_back (new FixedFormat (166, libdcp::Size (1998, 1080), "166-in-flat", "1.66 within Flat", "F")); + _formats.push_back (new FixedFormat (178, libdcp::Size (1998, 1080), "178-in-flat", "16:9 within Flat", "F")); + _formats.push_back (new FixedFormat (178, libdcp::Size (1920, 1080), "178", "16:9", "F")); + _formats.push_back (new FixedFormat (185, libdcp::Size (1998, 1080), "185", "Flat", "F")); + _formats.push_back (new FixedFormat (239, libdcp::Size (2048, 858), "239", "Scope", "S")); + _formats.push_back (new VariableFormat (libdcp::Size (1998, 1080), "var-185", "Flat", "F")); + _formats.push_back (new VariableFormat (libdcp::Size (2048, 858), "var-239", "Scope", "S")); } /** @param n Nickname. @@ -141,7 +141,7 @@ Format::all () * @param id ID (e.g. 185) * @param n Nick name (e.g. Flat) */ -FixedFormat::FixedFormat (int r, Size dcp, string id, string n, string d) +FixedFormat::FixedFormat (int r, libdcp::Size dcp, string id, string n, string d) : Format (dcp, id, n, d) , _ratio (r) { @@ -161,7 +161,7 @@ Format::dcp_padding (shared_ptr<const Film> f) const return p; } -VariableFormat::VariableFormat (Size dcp, string id, string n, string d) +VariableFormat::VariableFormat (libdcp::Size dcp, string id, string n, string d) : Format (dcp, id, n, d) { diff --git a/src/lib/format.h b/src/lib/format.h index 48a000480..b4c691e56 100644 --- a/src/lib/format.h +++ b/src/lib/format.h @@ -81,7 +81,7 @@ public: static void setup_formats (); protected: - /** Size in pixels of the images that we should + /** libdcp::Size in pixels of the images that we should * put in a DCP for this ratio. This size will not correspond * to the ratio when we are doing things like 16:9 in a Flat frame. */ diff --git a/src/lib/image.cc b/src/lib/image.cc index 0a51add00..9223fdc5d 100644 --- a/src/lib/image.cc +++ b/src/lib/image.cc @@ -96,7 +96,7 @@ Image::components () const } shared_ptr<Image> -Image::scale (Size out_size, Scaler const * scaler, bool result_aligned) const +Image::scale (libdcp::Size out_size, Scaler const * scaler, bool result_aligned) const { assert (scaler); /* Empirical testing suggests that sws_scale() will crash if @@ -129,7 +129,7 @@ Image::scale (Size out_size, Scaler const * scaler, bool result_aligned) const * @param scaler Scaler to use. */ shared_ptr<Image> -Image::scale_and_convert_to_rgb (Size out_size, int padding, Scaler const * scaler, bool result_aligned) const +Image::scale_and_convert_to_rgb (libdcp::Size out_size, int padding, Scaler const * scaler, bool result_aligned) const { assert (scaler); /* Empirical testing suggests that sws_scale() will crash if @@ -137,7 +137,7 @@ Image::scale_and_convert_to_rgb (Size out_size, int padding, Scaler const * scal */ assert (aligned ()); - Size content_size = out_size; + libdcp::Size content_size = out_size; content_size.width -= (padding * 2); shared_ptr<Image> rgb (new SimpleImage (PIX_FMT_RGB24, content_size, result_aligned)); @@ -224,7 +224,7 @@ Image::post_process (string pp, bool aligned) const shared_ptr<Image> Image::crop (Crop crop, bool aligned) const { - Size cropped_size = size (); + libdcp::Size cropped_size = size (); cropped_size.width -= crop.left + crop.right; cropped_size.height -= crop.top + crop.bottom; @@ -389,7 +389,7 @@ Image::bytes_per_pixel (int c) const * @param p Pixel format. * @param s Size in pixels. */ -SimpleImage::SimpleImage (AVPixelFormat p, Size s, bool aligned) +SimpleImage::SimpleImage (AVPixelFormat p, libdcp::Size s, bool aligned) : Image (p) , _size (s) , _aligned (aligned) @@ -487,7 +487,7 @@ SimpleImage::stride () const return _stride; } -Size +libdcp::Size SimpleImage::size () const { return _size; @@ -530,10 +530,10 @@ FilterBufferImage::stride () const return _buffer->linesize; } -Size +libdcp::Size FilterBufferImage::size () const { - return Size (_buffer->video->w, _buffer->video->h); + return libdcp::Size (_buffer->video->w, _buffer->video->h); } bool diff --git a/src/lib/imagemagick_decoder.cc b/src/lib/imagemagick_decoder.cc index a623fd226..99b9e1d34 100644 --- a/src/lib/imagemagick_decoder.cc +++ b/src/lib/imagemagick_decoder.cc @@ -51,7 +51,7 @@ ImageMagickDecoder::ImageMagickDecoder ( _iter = _files.begin (); } -Size +libdcp::Size ImageMagickDecoder::native_size () const { if (_files.empty ()) { @@ -61,7 +61,7 @@ ImageMagickDecoder::native_size () const /* Look at the first file and assume its size holds for all */ using namespace MagickCore; Magick::Image* image = new Magick::Image (_film->content_path ()); - Size const s = Size (image->columns(), image->rows()); + libdcp::Size const s = libdcp::Size (image->columns(), image->rows()); delete image; return s; @@ -81,7 +81,7 @@ ImageMagickDecoder::pass () Magick::Image* magick_image = new Magick::Image (_film->content_path ()); - Size size = native_size (); + libdcp::Size size = native_size (); shared_ptr<Image> image (new SimpleImage (PIX_FMT_RGB24, size, false)); using namespace MagickCore; diff --git a/src/lib/make_dcp_job.cc b/src/lib/make_dcp_job.cc new file mode 100644 index 000000000..705521626 --- /dev/null +++ b/src/lib/make_dcp_job.cc @@ -0,0 +1,160 @@ +/* + Copyright (C) 2012 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +/** @file src/make_dcp_job.cc + * @brief A job to create DCPs. + */ + +#include <iostream> +#include <boost/filesystem.hpp> +#include <libdcp/dcp.h> +#include <libdcp/picture_asset.h> +#include <libdcp/sound_asset.h> +#include <libdcp/reel.h> +extern "C" { +#include <libavutil/pixdesc.h> +} +#include "make_dcp_job.h" +#include "dcp_content_type.h" +#include "exceptions.h" +#include "options.h" +#include "imagemagick_decoder.h" +#include "film.h" + +using std::string; +using std::cout; +using boost::shared_ptr; + +/** @param f Film we are making the DCP for. + * @param o Options. + */ +MakeDCPJob::MakeDCPJob (shared_ptr<Film> f, shared_ptr<const EncodeOptions> o, shared_ptr<Job> req) + : Job (f, req) + , _opt (o) +{ + +} + +string +MakeDCPJob::name () const +{ + return String::compose ("Make DCP for %1", _film->name()); +} + +/** @param f DCP frame index */ +string +MakeDCPJob::j2c_path (int f) const +{ + SourceFrame const s = (f * dcp_frame_rate(_film->frames_per_second()).skip) + _film->dcp_trim_start(); + return _opt->frame_out_path (s, false); +} + +string +MakeDCPJob::wav_path (libdcp::Channel c) const +{ + return _opt->multichannel_audio_out_path (int (c), false); +} + +void +MakeDCPJob::run () +{ + if (!_film->dcp_length()) { + throw EncodeError ("cannot make a DCP when the source length is not known"); + } + + descend (0.9); + + string const dcp_path = _film->dir (_film->dcp_name()); + + /* Remove any old DCP */ + boost::filesystem::remove_all (dcp_path); + + DCPFrameRate const dfr = dcp_frame_rate (_film->frames_per_second ()); + + int frames = 0; + switch (_film->content_type ()) { + case VIDEO: + /* Source frames -> DCP frames */ + frames = _film->dcp_length().get() / dfr.skip; + break; + case STILL: + frames = _film->still_duration() * 24; + break; + } + + libdcp::DCP dcp (_film->dir (_film->dcp_name())); + dcp.Progress.connect (boost::bind (&MakeDCPJob::dcp_progress, this, _1)); + + shared_ptr<libdcp::CPL> cpl ( + new libdcp::CPL (_film->dir (_film->dcp_name()), _film->dcp_name(), _film->dcp_content_type()->libdcp_kind (), frames, dfr.frames_per_second) + ); + + dcp.add_cpl (cpl); + + descend (0.8); + + shared_ptr<libdcp::MonoPictureAsset> pa ( + new libdcp::MonoPictureAsset ( + boost::bind (&MakeDCPJob::j2c_path, this, _1), + _film->dir (_film->dcp_name()), + "video.mxf", + &dcp.Progress, + dfr.frames_per_second, + frames, + _opt->out_size + ) + ); + + ascend (); + + shared_ptr<libdcp::SoundAsset> sa; + + if (_film->audio_channels() > 0) { + descend (0.1); + sa.reset ( + new libdcp::SoundAsset ( + boost::bind (&MakeDCPJob::wav_path, this, _1), + _film->dir (_film->dcp_name()), + "audio.mxf", + &dcp.Progress, + dfr.frames_per_second, + frames, + dcp_audio_channels (_film->audio_channels()) + ) + ); + ascend (); + } + + descend (0.05); + cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (pa, sa, shared_ptr<libdcp::SubtitleAsset> ()))); + ascend (); + + descend (0.05); + dcp.write_xml (); + ascend (); + + set_progress (1); + set_state (FINISHED_OK); +} + +void +MakeDCPJob::dcp_progress (float p) +{ + set_progress (p); +} diff --git a/src/lib/make_dcp_job.h b/src/lib/make_dcp_job.h new file mode 100644 index 000000000..1aa906b0a --- /dev/null +++ b/src/lib/make_dcp_job.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2012 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +/** @file src/make_dcp_job.h + * @brief A job to create DCPs. + */ + +#include "job.h" + +class EncodeOptions; + +/** @class MakeDCPJob + * @brief A job to create DCPs + */ +class MakeDCPJob : public Job +{ +public: + MakeDCPJob (boost::shared_ptr<Film>, boost::shared_ptr<const EncodeOptions>, boost::shared_ptr<Job> req); + + std::string name () const; + void run (); + +private: + void dcp_progress (float); + std::string j2c_path (int) const; + std::string wav_path (libdcp::Channel) const; + + boost::shared_ptr<const EncodeOptions> _opt; +}; + diff --git a/src/lib/server.cc b/src/lib/server.cc index 134cb65a0..d75ab0fb6 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -93,9 +93,9 @@ Server::process (shared_ptr<Socket> socket) return -1; } - Size in_size (get_required_int (kv, "input_width"), get_required_int (kv, "input_height")); + libdcp::Size in_size (get_required_int (kv, "input_width"), get_required_int (kv, "input_height")); int pixel_format_int = get_required_int (kv, "input_pixel_format"); - Size out_size (get_required_int (kv, "output_width"), get_required_int (kv, "output_height")); + libdcp::Size out_size (get_required_int (kv, "output_width"), get_required_int (kv, "output_height")); int padding = get_required_int (kv, "padding"); int subtitle_offset = get_required_int (kv, "subtitle_offset"); float subtitle_scale = get_required_float (kv, "subtitle_scale"); @@ -106,7 +106,7 @@ Server::process (shared_ptr<Socket> socket) int colour_lut_index = get_required_int (kv, "colour_lut"); int j2k_bandwidth = get_required_int (kv, "j2k_bandwidth"); Position subtitle_position (get_optional_int (kv, "subtitle_x"), get_optional_int (kv, "subtitle_y")); - Size subtitle_size (get_optional_int (kv, "subtitle_width"), get_optional_int (kv, "subtitle_height")); + libdcp::Size subtitle_size (get_optional_int (kv, "subtitle_width"), get_optional_int (kv, "subtitle_height")); /* This checks that colour_lut_index is within range */ colour_lut_index_to_name (colour_lut_index); diff --git a/src/lib/subtitle.cc b/src/lib/subtitle.cc index a7aa7cd21..3754e5acf 100644 --- a/src/lib/subtitle.cc +++ b/src/lib/subtitle.cc @@ -56,7 +56,7 @@ TimedSubtitle::TimedSubtitle (AVSubtitle const & sub) throw DecodeError ("non-bitmap subtitles not yet supported"); } - shared_ptr<Image> image (new SimpleImage (PIX_FMT_RGBA, Size (rect->w, rect->h), true)); + shared_ptr<Image> image (new SimpleImage (PIX_FMT_RGBA, libdcp::Size (rect->w, rect->h), true)); /* Start of the first line in the subtitle */ uint8_t* sub_p = rect->pict.data[0]; diff --git a/src/lib/util.cc b/src/lib/util.cc index 0e250bb08..872985024 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -247,7 +247,7 @@ dvdomatic_setup () * @return FFmpeg crop filter string. */ string -crop_string (Position start, Size size) +crop_string (Position start, libdcp::Size size) { stringstream s; s << "crop=" << size.width << ":" << size.height << ":" << start.x << ":" << start.y; @@ -455,7 +455,6 @@ dcp_audio_channels (int f) return f; } - bool operator== (Crop const & a, Crop const & b) { return (a.left == b.left && a.right == b.right && a.top == b.top && a.bottom == b.bottom); |
