diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-01 14:28:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-01 14:28:04 +0100 |
| commit | 15f23b356b757a9697bf1a9ec30c243ab8070404 (patch) | |
| tree | 5b86b032ea47f606bbadb0c32801e16064d341a9 /src/lib | |
| parent | 45e6a6df959188bfdb8dfc4906c35d1a3c234b0a (diff) | |
DCPVideoFrame -> DCPVideo and PlayerVideoFrame -> PlayerVideo.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp_video.cc (renamed from src/lib/dcp_video_frame.cc) | 18 | ||||
| -rw-r--r-- | src/lib/dcp_video.h (renamed from src/lib/dcp_video_frame.h) | 12 | ||||
| -rw-r--r-- | src/lib/encoder.cc | 14 | ||||
| -rw-r--r-- | src/lib/encoder.h | 8 | ||||
| -rw-r--r-- | src/lib/player.cc | 24 | ||||
| -rw-r--r-- | src/lib/player.h | 6 | ||||
| -rw-r--r-- | src/lib/player_video.cc (renamed from src/lib/player_video_frame.cc) | 14 | ||||
| -rw-r--r-- | src/lib/player_video.h (renamed from src/lib/player_video_frame.h) | 6 | ||||
| -rw-r--r-- | src/lib/server.cc | 8 | ||||
| -rw-r--r-- | src/lib/transcoder.cc | 4 | ||||
| -rw-r--r-- | src/lib/writer.cc | 2 | ||||
| -rw-r--r-- | src/lib/wscript | 4 |
12 files changed, 60 insertions, 60 deletions
diff --git a/src/lib/dcp_video_frame.cc b/src/lib/dcp_video.cc index 4054f05cd..8d4a5925f 100644 --- a/src/lib/dcp_video_frame.cc +++ b/src/lib/dcp_video.cc @@ -50,7 +50,7 @@ #include <dcp/raw_convert.h> #include <libcxml/cxml.h> #include "film.h" -#include "dcp_video_frame.h" +#include "dcp_video.h" #include "config.h" #include "exceptions.h" #include "server.h" @@ -59,7 +59,7 @@ #include "image.h" #include "log.h" #include "cross.h" -#include "player_video_frame.h" +#include "player_video.h" #define LOG_GENERAL(...) _log->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); @@ -81,8 +81,8 @@ using dcp::raw_convert; * @param bw J2K bandwidth to use (see Config::j2k_bandwidth ()) * @param l Log to write to. */ -DCPVideoFrame::DCPVideoFrame ( - shared_ptr<const PlayerVideoFrame> frame, int index, int dcp_fps, int bw, Resolution r, shared_ptr<Log> l +DCPVideo::DCPVideo ( + shared_ptr<const PlayerVideo> frame, int index, int dcp_fps, int bw, Resolution r, shared_ptr<Log> l ) : _frame (frame) , _index (index) @@ -94,7 +94,7 @@ DCPVideoFrame::DCPVideoFrame ( } -DCPVideoFrame::DCPVideoFrame (shared_ptr<const PlayerVideoFrame> frame, shared_ptr<const cxml::Node> node, shared_ptr<Log> log) +DCPVideo::DCPVideo (shared_ptr<const PlayerVideo> frame, shared_ptr<const cxml::Node> node, shared_ptr<Log> log) : _frame (frame) , _log (log) { @@ -108,7 +108,7 @@ DCPVideoFrame::DCPVideoFrame (shared_ptr<const PlayerVideoFrame> frame, shared_p * @return Encoded data. */ shared_ptr<EncodedData> -DCPVideoFrame::encode_locally () +DCPVideo::encode_locally () { shared_ptr<dcp::GammaLUT> in_lut = dcp::GammaLUT::cache.get ( 12, _frame->colour_conversion().input_gamma, _frame->colour_conversion().input_gamma_linearised @@ -259,7 +259,7 @@ DCPVideoFrame::encode_locally () * @return Encoded data. */ shared_ptr<EncodedData> -DCPVideoFrame::encode_remotely (ServerDescription serv) +DCPVideo::encode_remotely (ServerDescription serv) { boost::asio::io_service io_service; boost::asio::ip::tcp::resolver resolver (io_service); @@ -299,7 +299,7 @@ DCPVideoFrame::encode_remotely (ServerDescription serv) } void -DCPVideoFrame::add_metadata (xmlpp::Element* el) const +DCPVideo::add_metadata (xmlpp::Element* el) const { el->add_child("Index")->add_child_text (raw_convert<string> (_index)); el->add_child("FramesPerSecond")->add_child_text (raw_convert<string> (_frames_per_second)); @@ -309,7 +309,7 @@ DCPVideoFrame::add_metadata (xmlpp::Element* el) const } Eyes -DCPVideoFrame::eyes () const +DCPVideo::eyes () const { return _frame->eyes (); } diff --git a/src/lib/dcp_video_frame.h b/src/lib/dcp_video.h index 7393efde6..7b01966bd 100644 --- a/src/lib/dcp_video_frame.h +++ b/src/lib/dcp_video.h @@ -31,7 +31,7 @@ class Scaler; class Image; class Log; class Subtitle; -class PlayerVideoFrame; +class PlayerVideo; /** @class EncodedData * @brief Container for J2K-encoded data. @@ -89,7 +89,7 @@ public: RemotelyEncodedData (int s); }; -/** @class DCPVideoFrame +/** @class DCPVideo * @brief A single frame of video destined for a DCP. * * Given an Image and some settings, this class knows how to encode @@ -98,11 +98,11 @@ public: * Objects of this class are used for the queue that we keep * of images that require encoding. */ -class DCPVideoFrame : public boost::noncopyable +class DCPVideo : public boost::noncopyable { public: - DCPVideoFrame (boost::shared_ptr<const PlayerVideoFrame>, int, int, int, Resolution, boost::shared_ptr<Log>); - DCPVideoFrame (boost::shared_ptr<const PlayerVideoFrame>, cxml::ConstNodePtr, boost::shared_ptr<Log>); + DCPVideo (boost::shared_ptr<const PlayerVideo>, int, int, int, Resolution, boost::shared_ptr<Log>); + DCPVideo (boost::shared_ptr<const PlayerVideo>, cxml::ConstNodePtr, boost::shared_ptr<Log>); boost::shared_ptr<EncodedData> encode_locally (); boost::shared_ptr<EncodedData> encode_remotely (ServerDescription); @@ -117,7 +117,7 @@ private: void add_metadata (xmlpp::Element *) const; - boost::shared_ptr<const PlayerVideoFrame> _frame; + boost::shared_ptr<const PlayerVideo> _frame; int _index; ///< frame index within the DCP's intrinsic duration int _frames_per_second; ///< Frames per second that we will use for the DCP int _j2k_bandwidth; ///< J2K bandwidth to use diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index 0756586a9..2b1f1d9b3 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -29,13 +29,13 @@ #include "film.h" #include "log.h" #include "config.h" -#include "dcp_video_frame.h" +#include "dcp_video.h" #include "server.h" #include "cross.h" #include "writer.h" #include "server_finder.h" #include "player.h" -#include "player_video_frame.h" +#include "player_video.h" #include "i18n.h" @@ -125,7 +125,7 @@ Encoder::process_end () So just mop up anything left in the queue here. */ - for (list<shared_ptr<DCPVideoFrame> >::iterator i = _queue.begin(); i != _queue.end(); ++i) { + for (list<shared_ptr<DCPVideo> >::iterator i = _queue.begin(); i != _queue.end(); ++i) { LOG_GENERAL (N_("Encode left-over frame %1"), (*i)->index ()); try { _writer->write ((*i)->encode_locally(), (*i)->index (), (*i)->eyes ()); @@ -181,7 +181,7 @@ Encoder::frame_done () } void -Encoder::process_video (shared_ptr<PlayerVideoFrame> pvf) +Encoder::process_video (shared_ptr<PlayerVideo> pvf) { _waker.nudge (); @@ -213,8 +213,8 @@ Encoder::process_video (shared_ptr<PlayerVideoFrame> pvf) } else { /* Queue this new frame for encoding */ LOG_TIMING ("adding to queue of %1", _queue.size ()); - _queue.push_back (shared_ptr<DCPVideoFrame> ( - new DCPVideoFrame ( + _queue.push_back (shared_ptr<DCPVideo> ( + new DCPVideo ( pvf, _video_frames_out, _film->video_frame_rate(), @@ -284,7 +284,7 @@ try } LOG_TIMING ("[%1] encoder thread wakes with queue of %2", boost::this_thread::get_id(), _queue.size()); - shared_ptr<DCPVideoFrame> vf = _queue.front (); + shared_ptr<DCPVideo> vf = _queue.front (); LOG_TIMING ("[%1] encoder thread pops frame %2 (%3) from queue", boost::this_thread::get_id(), vf->index(), vf->eyes ()); _queue.pop_front (); diff --git a/src/lib/encoder.h b/src/lib/encoder.h index 6bb97012a..4502b7151 100644 --- a/src/lib/encoder.h +++ b/src/lib/encoder.h @@ -44,12 +44,12 @@ class Image; class AudioBuffers; class Film; class ServerDescription; -class DCPVideoFrame; +class DCPVideo; class EncodedData; class Writer; class Job; class ServerFinder; -class PlayerVideoFrame; +class PlayerVideo; /** @class Encoder * @brief Encoder to J2K and WAV for DCP. @@ -70,7 +70,7 @@ public: /** Call with a frame of video. * @param f Video frame. */ - void process_video (boost::shared_ptr<PlayerVideoFrame> f); + void process_video (boost::shared_ptr<PlayerVideo> f); /** Call with some audio data */ void process_audio (boost::shared_ptr<const AudioBuffers>); @@ -107,7 +107,7 @@ private: int _video_frames_out; bool _terminate; - std::list<boost::shared_ptr<DCPVideoFrame> > _queue; + std::list<boost::shared_ptr<DCPVideo> > _queue; std::list<boost::thread *> _threads; mutable boost::mutex _mutex; /** condition to manage thread wakeups when we have nothing to do */ diff --git a/src/lib/player.cc b/src/lib/player.cc index 380133b61..b634028ba 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -41,7 +41,7 @@ #include "render_subtitles.h" #include "config.h" #include "content_video.h" -#include "player_video_frame.h" +#include "player_video.h" #include "frame_rate_change.h" #define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL); @@ -292,11 +292,11 @@ Player::set_approximate_size () _approximate_size = true; } -shared_ptr<PlayerVideoFrame> +shared_ptr<PlayerVideo> Player::black_player_video_frame () const { - return shared_ptr<PlayerVideoFrame> ( - new PlayerVideoFrame ( + return shared_ptr<PlayerVideo> ( + new PlayerVideo ( shared_ptr<const ImageProxy> (new RawImageProxy (_black_image, _film->log ())), Crop (), _video_container_size, @@ -309,8 +309,8 @@ Player::black_player_video_frame () const ); } -/** @return All PlayerVideoFrames at the given time (there may be two frames for 3D) */ -list<shared_ptr<PlayerVideoFrame> > +/** @return All PlayerVideos at the given time (there may be two frames for 3D) */ +list<shared_ptr<PlayerVideo> > Player::get_video (DCPTime time, bool accurate) { if (!_have_valid_pieces) { @@ -322,13 +322,13 @@ Player::get_video (DCPTime time, bool accurate) time + DCPTime::from_frames (1, _film->video_frame_rate ()) ); - list<shared_ptr<PlayerVideoFrame> > pvf; + list<shared_ptr<PlayerVideo> > pvf; if (ov.empty ()) { /* No video content at this time */ pvf.push_back (black_player_video_frame ()); } else { - /* Create a PlayerVideoFrame from the content's video at this time */ + /* Create a PlayerVideo from the content's video at this time */ shared_ptr<Piece> piece = ov.back (); shared_ptr<VideoDecoder> decoder = dynamic_pointer_cast<VideoDecoder> (piece->decoder); @@ -350,8 +350,8 @@ Player::get_video (DCPTime time, bool accurate) for (list<ContentVideo>::const_iterator i = content_video.begin(); i != content_video.end(); ++i) { pvf.push_back ( - shared_ptr<PlayerVideoFrame> ( - new PlayerVideoFrame ( + shared_ptr<PlayerVideo> ( + new PlayerVideo ( i->image, content->crop (), image_size, @@ -366,7 +366,7 @@ Player::get_video (DCPTime time, bool accurate) } } - /* Add subtitles to whatever PlayerVideoFrames we got */ + /* Add subtitles to whatever PlayerVideos we got */ list<shared_ptr<Piece> > subs = overlaps<SubtitleContent> ( time, @@ -404,7 +404,7 @@ Player::get_video (DCPTime time, bool accurate) } if (!sub_images.empty ()) { - for (list<shared_ptr<PlayerVideoFrame> >::const_iterator i = pvf.begin(); i != pvf.end(); ++i) { + for (list<shared_ptr<PlayerVideo> >::const_iterator i = pvf.begin(); i != pvf.end(); ++i) { (*i)->set_subtitle (merge (sub_images)); } } diff --git a/src/lib/player.h b/src/lib/player.h index 6805dc8c7..04503c27a 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -42,7 +42,7 @@ class Piece; class Image; class Decoder; class Resampler; -class PlayerVideoFrame; +class PlayerVideo; class ImageProxy; class PlayerStatistics @@ -85,7 +85,7 @@ class Player : public boost::enable_shared_from_this<Player>, public boost::nonc public: Player (boost::shared_ptr<const Film>, boost::shared_ptr<const Playlist>); - std::list<boost::shared_ptr<PlayerVideoFrame> > get_video (DCPTime time, bool accurate); + std::list<boost::shared_ptr<PlayerVideo> > get_video (DCPTime time, bool accurate); boost::shared_ptr<AudioBuffers> get_audio (DCPTime time, DCPTime length, bool accurate); void set_video_container_size (dcp::Size); @@ -119,7 +119,7 @@ private: VideoFrame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const; AudioFrame dcp_to_content_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const; ContentTime dcp_to_content_subtitle (boost::shared_ptr<const Piece> piece, DCPTime t) const; - boost::shared_ptr<PlayerVideoFrame> black_player_video_frame () const; + boost::shared_ptr<PlayerVideo> black_player_video_frame () const; /** @return Pieces of content type C that overlap a specified time range in the DCP */ template<class C> diff --git a/src/lib/player_video_frame.cc b/src/lib/player_video.cc index 5463925bf..f8e4a3e66 100644 --- a/src/lib/player_video_frame.cc +++ b/src/lib/player_video.cc @@ -18,7 +18,7 @@ */ #include <dcp/raw_convert.h> -#include "player_video_frame.h" +#include "player_video.h" #include "image.h" #include "image_proxy.h" #include "scaler.h" @@ -28,7 +28,7 @@ using std::cout; using boost::shared_ptr; using dcp::raw_convert; -PlayerVideoFrame::PlayerVideoFrame ( +PlayerVideo::PlayerVideo ( shared_ptr<const ImageProxy> in, Crop crop, dcp::Size inter_size, @@ -50,7 +50,7 @@ PlayerVideoFrame::PlayerVideoFrame ( } -PlayerVideoFrame::PlayerVideoFrame (shared_ptr<cxml::Node> node, shared_ptr<Socket> socket, shared_ptr<Log> log) +PlayerVideo::PlayerVideo (shared_ptr<cxml::Node> node, shared_ptr<Socket> socket, shared_ptr<Log> log) { _crop = Crop (node); @@ -76,13 +76,13 @@ PlayerVideoFrame::PlayerVideoFrame (shared_ptr<cxml::Node> node, shared_ptr<Sock } void -PlayerVideoFrame::set_subtitle (PositionImage image) +PlayerVideo::set_subtitle (PositionImage image) { _subtitle = image; } shared_ptr<Image> -PlayerVideoFrame::image () const +PlayerVideo::image () const { shared_ptr<Image> im = _in->image (); @@ -116,7 +116,7 @@ PlayerVideoFrame::image () const } void -PlayerVideoFrame::add_metadata (xmlpp::Node* node) const +PlayerVideo::add_metadata (xmlpp::Node* node) const { _crop.as_xml (node); _in->add_metadata (node->add_child ("In")); @@ -137,7 +137,7 @@ PlayerVideoFrame::add_metadata (xmlpp::Node* node) const } void -PlayerVideoFrame::send_binary (shared_ptr<Socket> socket) const +PlayerVideo::send_binary (shared_ptr<Socket> socket) const { _in->send_binary (socket); if (_subtitle.image) { diff --git a/src/lib/player_video_frame.h b/src/lib/player_video.h index 4c6a9c630..73557bbfd 100644 --- a/src/lib/player_video_frame.h +++ b/src/lib/player_video.h @@ -33,11 +33,11 @@ class Log; * bits still their raw form. We may want to combine the bits on a remote machine, * or maybe not even bother to combine them at all. */ -class PlayerVideoFrame +class PlayerVideo { public: - PlayerVideoFrame (boost::shared_ptr<const ImageProxy>, Crop, dcp::Size, dcp::Size, Scaler const *, Eyes, Part, ColourConversion); - PlayerVideoFrame (boost::shared_ptr<cxml::Node>, boost::shared_ptr<Socket>, boost::shared_ptr<Log>); + PlayerVideo (boost::shared_ptr<const ImageProxy>, Crop, dcp::Size, dcp::Size, Scaler const *, Eyes, Part, ColourConversion); + PlayerVideo (boost::shared_ptr<cxml::Node>, boost::shared_ptr<Socket>, boost::shared_ptr<Log>); void set_subtitle (PositionImage); diff --git a/src/lib/server.cc b/src/lib/server.cc index 9d1925de1..2469d4151 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -34,10 +34,10 @@ #include "util.h" #include "scaler.h" #include "image.h" -#include "dcp_video_frame.h" +#include "dcp_video.h" #include "config.h" #include "cross.h" -#include "player_video_frame.h" +#include "player_video.h" #include "i18n.h" @@ -112,9 +112,9 @@ Server::process (shared_ptr<Socket> socket, struct timeval& after_read, struct t return -1; } - shared_ptr<PlayerVideoFrame> pvf (new PlayerVideoFrame (xml, socket, _log)); + shared_ptr<PlayerVideo> pvf (new PlayerVideo (xml, socket, _log)); - DCPVideoFrame dcp_video_frame (pvf, xml, _log); + DCPVideo dcp_video_frame (pvf, xml, _log); gettimeofday (&after_read, 0); diff --git a/src/lib/transcoder.cc b/src/lib/transcoder.cc index a4cd36a4f..1177830be 100644 --- a/src/lib/transcoder.cc +++ b/src/lib/transcoder.cc @@ -61,8 +61,8 @@ Transcoder::go () DCPTime const frame = DCPTime::from_frames (1, _film->video_frame_rate ()); for (DCPTime t; t < _film->length(); t += frame) { - list<shared_ptr<PlayerVideoFrame> > v = _player->get_video (t, true); - for (list<shared_ptr<PlayerVideoFrame> >::const_iterator i = v.begin(); i != v.end(); ++i) { + list<shared_ptr<PlayerVideo> > v = _player->get_video (t, true); + for (list<shared_ptr<PlayerVideo> >::const_iterator i = v.begin(); i != v.end(); ++i) { _encoder->process_video (*i); } _encoder->process_audio (_player->get_audio (t, frame, true)); diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 489135b84..ca9b63df4 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -34,7 +34,7 @@ #include "film.h" #include "ratio.h" #include "log.h" -#include "dcp_video_frame.h" +#include "dcp_video.h" #include "dcp_content_type.h" #include "player.h" #include "audio_mapping.h" diff --git a/src/lib/wscript b/src/lib/wscript index 407d9cde4..1f6a2aa4f 100644 --- a/src/lib/wscript +++ b/src/lib/wscript @@ -16,7 +16,7 @@ sources = """ content_subtitle.cc cross.cc dcp_content_type.cc - dcp_video_frame.cc + dcp_video.cc dcpomatic_time.cc dolby_cp750.cc encoder.cc @@ -48,7 +48,7 @@ sources = """ log.cc md5_digester.cc player.cc - player_video_frame.cc + player_video.cc playlist.cc ratio.cc render_subtitles.cc |
