diff options
Diffstat (limited to 'markad-standalone.h')
-rw-r--r-- | markad-standalone.h | 63 |
1 files changed, 61 insertions, 2 deletions
diff --git a/markad-standalone.h b/markad-standalone.h index 1f39d39..cd4a023 100644 --- a/markad-standalone.h +++ b/markad-standalone.h @@ -14,12 +14,71 @@ #include <stdarg.h> #include <unistd.h> #include <fcntl.h> +#include <getopt.h> +#include <signal.h> +#include <ctype.h> #include "demux.h" #include "global.h" #include "decoder.h" #include "video.h" +#include "audio.h" +#include "common.h" +#include "version.h" -int SysLogLevel=3; +int SysLogLevel=2; -#endif
\ No newline at end of file +class cMarkAdIndex +{ +private: + int index_fd; // index file descriptor + int maxfiles; + bool ts; + + int index; + int iframe; + off_t offset; + + bool Open(const char *Directory); + void Close(); +public: + bool isTS() + { + return ts; + } + int MaxFiles() + { + return maxfiles; + } + int GetNext(off_t Offset); + cMarkAdIndex(const char *Directory); + ~cMarkAdIndex(); +}; + +class cMarkAdStandalone +{ +private: + cMarkAdDemux *video_demux; + cMarkAdDemux *ac3_demux; + cMarkAdDemux *mp2_demux; + cMarkAdDecoder *decoder; + cMarkAdVideo *video; + cMarkAdAudio *audio; + cMarkAdCommon *common; + + MarkAdContext macontext; + char *dir; + + cMarkAdIndex *index; + + void AddMark(MarkAdMark *Mark); + int LastIFrame(int Number, off_t Offset); + bool ProcessFile(int Number); + +public: + void Process(); + cMarkAdStandalone(const char *Directory); + ~cMarkAdStandalone(); +}; + +#endif |