mirror of https://github.com/odrling/Aegisub
FFMS2 Add all required HAALITS ifdefs
Originally committed to SVN as r2572.
This commit is contained in:
parent
ff8d019d58
commit
e1dfb76c1e
|
@ -59,7 +59,9 @@ FFMS_API(VideoBase *) FFMS_CreateVideoSource(const char *SourceFile, int Track,
|
||||||
switch (TrackIndices->Decoder) {
|
switch (TrackIndices->Decoder) {
|
||||||
case 0: return new FFVideoSource(SourceFile, Track, TrackIndices, PP, Threads, SeekMode, ErrorMsg, MsgSize);
|
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);
|
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);
|
case 2: return new HaaliTSVideoSource(SourceFile, Track, TrackIndices, PP, Threads, ErrorMsg, MsgSize);
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
_snprintf(ErrorMsg, MsgSize, "Unsupported format");
|
_snprintf(ErrorMsg, MsgSize, "Unsupported format");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -561,6 +561,8 @@ AVFrameLite *MatroskaVideoSource::GetFrame(int n, char *ErrorMsg, unsigned MsgSi
|
||||||
return OutputFrame(DecodeFrame);
|
return OutputFrame(DecodeFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAALITS
|
||||||
|
|
||||||
void HaaliTSVideoSource::Free(bool CloseCodec) {
|
void HaaliTSVideoSource::Free(bool CloseCodec) {
|
||||||
if (CloseCodec)
|
if (CloseCodec)
|
||||||
avcodec_close(CodecContext);
|
avcodec_close(CodecContext);
|
||||||
|
@ -789,3 +791,5 @@ AVFrameLite *HaaliTSVideoSource::GetFrame(int n, char *ErrorMsg, unsigned MsgSiz
|
||||||
LastFrameNum = n;
|
LastFrameNum = n;
|
||||||
return OutputFrame(DecodeFrame);
|
return OutputFrame(DecodeFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // HAALITS
|
|
@ -33,7 +33,7 @@ extern "C" {
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "ffms.h"
|
#include "ffms.h"
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef HAALITS
|
||||||
# define _WIN32_DCOM
|
# define _WIN32_DCOM
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <tchar.h>
|
# include <tchar.h>
|
||||||
|
@ -101,6 +101,8 @@ public:
|
||||||
AVFrameLite *GetFrame(int n, char *ErrorMsg, unsigned MsgSize);
|
AVFrameLite *GetFrame(int n, char *ErrorMsg, unsigned MsgSize);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef HAALITS
|
||||||
|
|
||||||
class HaaliTSVideoSource : public VideoBase {
|
class HaaliTSVideoSource : public VideoBase {
|
||||||
private:
|
private:
|
||||||
CComPtr<IMMContainer> pMMC;
|
CComPtr<IMMContainer> pMMC;
|
||||||
|
@ -113,4 +115,6 @@ public:
|
||||||
AVFrameLite *GetFrame(int n, char *ErrorMsg, unsigned MsgSize);
|
AVFrameLite *GetFrame(int n, char *ErrorMsg, unsigned MsgSize);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif // HAALITS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue