diff --git a/FFmpegSource2/ffms.cpp b/FFmpegSource2/ffms.cpp index 82de48fee..0d47f1523 100644 --- a/FFmpegSource2/ffms.cpp +++ b/FFmpegSource2/ffms.cpp @@ -59,7 +59,9 @@ FFMS_API(VideoBase *) FFMS_CreateVideoSource(const char *SourceFile, int Track, switch (TrackIndices->Decoder) { case 0: return new FFVideoSource(SourceFile, Track, TrackIndices, PP, Threads, SeekMode, ErrorMsg, MsgSize); case 1: return new MatroskaVideoSource(SourceFile, Track, TrackIndices, PP, Threads, ErrorMsg, MsgSize); +#ifdef HAALITS case 2: return new HaaliTSVideoSource(SourceFile, Track, TrackIndices, PP, Threads, ErrorMsg, MsgSize); +#endif default: _snprintf(ErrorMsg, MsgSize, "Unsupported format"); return NULL; diff --git a/FFmpegSource2/ffvideosource.cpp b/FFmpegSource2/ffvideosource.cpp index af1bc8281..7968d4507 100644 --- a/FFmpegSource2/ffvideosource.cpp +++ b/FFmpegSource2/ffvideosource.cpp @@ -561,6 +561,8 @@ AVFrameLite *MatroskaVideoSource::GetFrame(int n, char *ErrorMsg, unsigned MsgSi return OutputFrame(DecodeFrame); } +#ifdef HAALITS + void HaaliTSVideoSource::Free(bool CloseCodec) { if (CloseCodec) avcodec_close(CodecContext); @@ -789,3 +791,5 @@ AVFrameLite *HaaliTSVideoSource::GetFrame(int n, char *ErrorMsg, unsigned MsgSiz LastFrameNum = n; return OutputFrame(DecodeFrame); } + +#endif // HAALITS \ No newline at end of file diff --git a/FFmpegSource2/ffvideosource.h b/FFmpegSource2/ffvideosource.h index d27852533..a466aa305 100644 --- a/FFmpegSource2/ffvideosource.h +++ b/FFmpegSource2/ffvideosource.h @@ -33,7 +33,7 @@ extern "C" { #include "utils.h" #include "ffms.h" -#ifdef _WIN32 +#ifdef HAALITS # define _WIN32_DCOM # include # include @@ -101,6 +101,8 @@ public: AVFrameLite *GetFrame(int n, char *ErrorMsg, unsigned MsgSize); }; +#ifdef HAALITS + class HaaliTSVideoSource : public VideoBase { private: CComPtr pMMC; @@ -113,4 +115,6 @@ public: AVFrameLite *GetFrame(int n, char *ErrorMsg, unsigned MsgSize); }; +#endif // HAALITS + #endif