}
while (j < time || eyes != video.eyes) {
if (last != _last_video.end()) {
- last->second->set_eyes (eyes);
- emit_video (last->second, j);
+ shared_ptr<PlayerVideo> copy = last->second->shallow_copy();
+ copy->set_eyes (eyes);
+ emit_video (copy, j);
} else {
emit_video (black_player_video_frame(eyes), j);
}
{
return _in->memory_used();
}
+
+/** @return Shallow copy of this; _in and _subtitle are shared between the original and the copy */
+shared_ptr<PlayerVideo>
+PlayerVideo::shallow_copy () const
+{
+ return shared_ptr<PlayerVideo>(
+ new PlayerVideo(
+ _in,
+ _crop,
+ _fade,
+ _inter_size,
+ _out_size,
+ _eyes,
+ _part,
+ _colour_conversion
+ )
+ );
+}
PlayerVideo (boost::shared_ptr<cxml::Node>, boost::shared_ptr<Socket>);
+ boost::shared_ptr<PlayerVideo> shallow_copy () const;
+
void set_subtitle (PositionImage);
void prepare ();