#ifndef __INPUT_H__ #define __INPUT_H__ #include #include #include #include #include #include #include extern "C" { #include #include #include #include #include } class Player; class Track; class Input { friend class Player; private: Track *videoTrack; Track *audioTrack; Track *subtitleTrack; Track *teletextTrack; int hasPlayThreadStarted; float seek_sec_abs; float seek_sec_rel; bool isContainerRunning; bool terminating; Player *context; AVFormatContext *avfc; uint64_t readCount; public: Input(); ~Input(); bool ReadSubtitle(const char *filename, const char *format, int pid); bool ReadSubtitles(const char *filename); bool Init(const char *filename); bool UpdateTracks(); bool Play(); bool Stop(); bool Seek(float sec, bool absolute); bool GetDuration(double &duration); bool SwitchAudio(Track *track); bool SwitchSubtitle(Track *track); bool SwitchTeletext(Track *track); bool SwitchVideo(Track *track); bool GetMetadata(std::vector &keys, std::vector &values); bool GetReadCount(uint64_t &readcount); }; #endif