}
_streams[stream]->audio (data, time);
+ _positions[stream] = time;
}
void
return p;
}
-
-void
-AudioDecoder::set_position (AudioStreamPtr stream, ContentTime time)
-{
- _positions[stream] = time;
-}
AudioDecoder (Decoder* parent, boost::shared_ptr<const AudioContent>, boost::shared_ptr<Log> log);
boost::optional<ContentTime> position () const;
- void set_position (AudioStreamPtr stream, ContentTime position);
void set_fast ();
void flush ();
boost::signals2::signal<void (AudioStreamPtr, ContentAudio)> Data;
- boost::optional<ContentTime> position () const;
-
private:
/** An AudioDecoderStream object to manage each stream in _audio_content */
- std::map<AudioStreamPtr, boost::shared_ptr<AudioDecoderStream> > _streams;
+ typedef std::map<AudioStreamPtr, boost::shared_ptr<AudioDecoderStream> > StreamMap;
+ StreamMap _streams;
std::map<AudioStreamPtr, ContentTime> _positions;
};
}
}
- video->set_position (_next);
- audio->set_position (_dcp_content->audio->stream(), _next);
- subtitle->set_position (_next);
_next += ContentTime::from_frames (1, vfr);
if ((*_reel)->main_picture ()) {
}
subtitle->emit_text (p, s);
- subtitle->set_position (p.from);
}
ContentTimePeriod
LOG_WARNING ("Crazy timestamp %1", to_string (ct));
}
- audio->set_position (*stream, ct);
-
/* Give this data provided there is some, and its time is sane */
if (ct >= ContentTime() && data->frames() > 0) {
audio->emit (*stream, data, ct);
}
}
- video->set_position (ContentTime::from_frames (_frame_video_position, _image_content->active_video_frame_rate ()));
video->emit (_image, _frame_video_position);
++_frame_video_position;
return;
}
TextData (ContentTextSubtitle (period, s));
+ _position = period.from;
}
void
boost::shared_ptr<Log> log
);
- void set_position (ContentTime position) {
- _position = position;
- }
-
boost::optional<ContentTime> position () const {
return _position;
}
ContentTimePeriod const p = content_time_period (_subtitles[_next]);
subtitle->emit_text (p, _subtitles[_next]);
- subtitle->set_position (p.from);
++_next;
return;
default:
DCPOMATIC_ASSERT (false);
}
+
+ _position = ContentTime::from_frames (frame, _content->active_video_frame_rate ());
}
friend struct ffmpeg_pts_offset_test;
friend void ffmpeg_decoder_sequential_test_one (boost::filesystem::path file, float fps, int gaps, int video_length);
- void set_position (ContentTime position) {
- _position = position;
- }
-
boost::optional<ContentTime> position () const {
return _position;
}
using std::list;
using boost::shared_ptr;
+using boost::bind;
using boost::dynamic_pointer_cast;
SubtitleView::SubtitleView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<Decoder> decoder, DCPTime position)