- int _mplayer_stdin[2];
- int _mplayer_stdout[2];
- int _mplayer_stderr[2];
- pid_t _mplayer_pid;
-
- boost::thread* _stdout_reader;
- /* XXX: should probably be atomically accessed */
- bool _stdout_reader_should_run;
-
- mutable boost::mutex _state_mutex;
- float _position;
- bool _paused;
+ bool _video;
+ bool _audio;
+ bool _subtitles;
+
+ /** Our decoders are ready to go; if this is false the decoders must be (re-)created before they are used */
+ bool _have_valid_decoders;
+ /** Video decoders in order of presentation */
+ std::vector<boost::shared_ptr<VideoDecoder> > _video_decoders;
+ /** Start positions of each video decoder in seconds*/
+ std::vector<double> _video_start;
+ /** Index of current video decoder */
+ size_t _video_decoder;
+ /** Audio decoders in order of presentation (if they are from FFmpeg) */
+ std::vector<boost::shared_ptr<AudioDecoder> > _audio_decoders;
+ /** Start positions of each audio decoder (if they are from FFmpeg) in seconds */
+ std::vector<double> _audio_start;
+ /** Current audio decoder index if we are running them sequentially; otherwise undefined */
+ size_t _sequential_audio_decoder;
+
+ boost::shared_ptr<AudioBuffers> _audio_buffers;
+ boost::optional<double> _audio_time;