1545
|
1 #ifndef AVIFILE_DS_VIDEODECODER_H
|
|
2 #define AVIFILE_DS_VIDEODECODER_H
|
|
3
|
|
4 #include <libwin32.h>
|
|
5 #include <DS_Filter.h>
|
|
6
|
|
7 class DS_VideoDecoder: public IVideoDecoder, public IRtConfig
|
|
8 {
|
|
9 public:
|
|
10 DS_VideoDecoder(const CodecInfo& info, const BITMAPINFOHEADER& format, int flip);
|
|
11 ~DS_VideoDecoder();
|
|
12 int SetDestFmt(int bits = 24, fourcc_t csp = 0);
|
|
13 CAPS GetCapabilities() const {return m_Caps;}
|
|
14 int DecodeInternal(void* src, size_t size, int is_keyframe, CImage* pImage);
|
|
15 void StartInternal();
|
|
16 void StopInternal();
|
|
17 //void Restart();
|
|
18 int SetDirection(int d)
|
|
19 {
|
|
20 m_obh.biHeight = d ? m_bh->biHeight : -m_bh->biHeight;
|
|
21 m_sVhdr2->bmiHeader.biHeight = m_obh.biHeight;
|
|
22 return 0;
|
|
23 }
|
|
24 // IRtConfig interface
|
|
25 virtual HRESULT GetValue(const char*, int&);
|
|
26 virtual HRESULT SetValue(const char*, int);
|
|
27 protected:
|
|
28 DS_Filter* m_pDS_Filter;
|
|
29 AM_MEDIA_TYPE m_sOurType, m_sDestType;
|
|
30 VIDEOINFOHEADER* m_sVhdr;
|
|
31 VIDEOINFOHEADER* m_sVhdr2;
|
|
32 CAPS m_Caps; // capabilities of DirectShow decoder
|
|
33 int m_iLastQuality; // remember last quality as integer
|
|
34 bool m_bIsDivX; // for speed
|
|
35 };
|
|
36
|
|
37 #endif /* AVIFILE_DS_VIDEODECODER_H */
|