diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-12 22:10:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-05-18 11:50:29 +0100 |
| commit | 6f344b876689a1234a5eb75041882f06f5d9fe5c (patch) | |
| tree | 3a51f17cab8b8f31b21661b643aaed6a53326031 /src/lib/ffmpeg_decoder.cc | |
| parent | 36774ee2b48f0bfde43b743592e5816ff58bb7d2 (diff) | |
Reasonably straightforward stuff; main things are adding
a _parent to VideoContent (mainly, but not only, for signalling)
and moving the video shared_ptr into Content, which makes much
more sense to replace dynamic_cast tests for whether something
has video or whatever. Nearly builds.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 698078b5b..5240decb2 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -72,12 +72,12 @@ using boost::split; using dcp::Size; FFmpegDecoder::FFmpegDecoder (shared_ptr<const FFmpegContent> c, shared_ptr<Log> log, bool fast) - : VideoDecoder (c) + : VideoDecoder (c->video, log) , AudioDecoder (c, fast) , SubtitleDecoder (c) , FFmpeg (c) , _log (log) - , _pts_offset (pts_offset (c->ffmpeg_audio_streams(), c->first_video(), c->video_frame_rate())) + , _pts_offset (pts_offset (c->ffmpeg_audio_streams(), c->first_video(), c->video->video_frame_rate())) { } @@ -414,7 +414,7 @@ FFmpegDecoder::decode_video_packet () double const pts = i->second * av_q2d (_format_context->streams[_video_stream]->time_base) + _pts_offset.seconds (); video ( shared_ptr<ImageProxy> (new RawImageProxy (image)), - llrint (pts * _ffmpeg_content->video_frame_rate ()) + llrint (pts * _ffmpeg_content->video->video_frame_rate ()) ); } else { LOG_WARNING_NC ("Dropping frame without PTS"); @@ -548,7 +548,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP out_p += image->stride()[0] / sizeof (uint32_t); } - dcp::Size const vs = _ffmpeg_content->video_size (); + dcp::Size const vs = _ffmpeg_content->video->video_size (); dcpomatic::Rect<double> const scaled_rect ( static_cast<double> (rect->x) / vs.width, static_cast<double> (rect->y) / vs.height, |
