X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_decoder.cc;h=420c6a7bee712161c28ff0d165cd9dd689374074;hb=97d25da42455d0ed93c2eebe023883767bb12d53;hp=2a769166692b8064ec288210ea0b2dc377949086;hpb=504c63b3d62038bc486ca8a09e77fbb403907edd;p=dcpomatic.git diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 2a7691666..420c6a7be 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -1,19 +1,20 @@ /* Copyright (C) 2014-2016 Carl Hetherington - This program is free software; you can redistribute it and/or modify + This file is part of DCP-o-matic. + + DCP-o-matic 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, + DCP-o-matic 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. + along with DCP-o-matic. If not, see . */ @@ -97,14 +98,14 @@ DCPDecoder::pass (PassReason reason, bool) shared_ptr stereo = dynamic_pointer_cast (asset); int64_t const entry_point = (*_reel)->main_picture()->entry_point (); if (mono) { - video->video (shared_ptr (new J2KImageProxy (mono->get_frame (entry_point + frame), asset->size())), offset + frame); + video->give (shared_ptr (new J2KImageProxy (mono->get_frame (entry_point + frame), asset->size())), offset + frame); } else { - video->video ( + video->give ( shared_ptr (new J2KImageProxy (stereo->get_frame (entry_point + frame), asset->size(), dcp::EYE_LEFT)), offset + frame ); - video->video ( + video->give ( shared_ptr (new J2KImageProxy (stereo->get_frame (entry_point + frame), asset->size(), dcp::EYE_RIGHT)), offset + frame ); @@ -126,7 +127,7 @@ DCPDecoder::pass (PassReason reason, bool) } } - audio->audio (_dcp_content->audio->stream(), data, ContentTime::from_frames (offset, vfr) + _next); + audio->give (_dcp_content->audio->stream(), data, ContentTime::from_frames (offset, vfr) + _next); } if ((*_reel)->main_subtitle ()) { @@ -139,7 +140,7 @@ DCPDecoder::pass (PassReason reason, bool) if (!subs.empty ()) { /* XXX: assuming that all `subs' are at the same time; maybe this is ok */ - subtitle->text_subtitle ( + subtitle->give_text ( ContentTimePeriod ( ContentTime::from_frames (offset - entry_point, vfr) + ContentTime::from_seconds (subs.front().in().as_seconds ()), ContentTime::from_frames (offset - entry_point, vfr) + ContentTime::from_seconds (subs.front().out().as_seconds ())