[svn] / branches / dev-api-3 / dshow / src / CXvidDecoder.h Repository:
ViewVC logotype

Annotation of /branches/dev-api-3/dshow/src/CXvidDecoder.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 749 - (view) (download)

1 : Isibaar 6 #ifndef _FILTER_H_
2 :     #define _FILTER_H_
3 :    
4 : Isibaar 382 #include <xvid.h>
5 : Isibaar 6 #include "IXvidDecoder.h"
6 :    
7 : suxen_drol 749 #ifdef _DEBUG
8 :     #include <stdio.h> /* vsprintf */
9 :     #define DPRINTF_BUF_SZ 1024
10 :     static __inline void
11 :     DPRINTF(char *fmt, ...)
12 :     {
13 :     va_list args;
14 :     char buf[DPRINTF_BUF_SZ];
15 : Isibaar 6
16 : suxen_drol 749 va_start(args, fmt);
17 :     vsprintf(buf, fmt, args);
18 :     OutputDebugString(buf);
19 :     }
20 : suxen_drol 613 #else
21 : suxen_drol 749 static __inline void
22 :     DPRINTF(char *fmt, ...) { }
23 : suxen_drol 613 #endif
24 : Isibaar 6
25 :     #define XVID_NAME_L L"XviD MPEG-4 Video Decoder"
26 :    
27 :     /* --- fourcc --- */
28 :    
29 :     #define FOURCC_XVID mmioFOURCC('X','V','I','D')
30 :     #define FOURCC_DIVX mmioFOURCC('D','I','V','X')
31 : suxen_drol 749 #define FOURCC_DX50 mmioFOURCC('D','X','5','0')
32 : Isibaar 6
33 :     /* --- media uids --- */
34 :    
35 : suxen_drol 749 DEFINE_GUID(CLSID_XVID, mmioFOURCC('x','v','i','d'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
36 :     DEFINE_GUID(CLSID_XVID_UC, mmioFOURCC('X','V','I','D'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
37 :     DEFINE_GUID(CLSID_DIVX, mmioFOURCC('d','i','v','x'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
38 :     DEFINE_GUID(CLSID_DIVX_UC, mmioFOURCC('D','I','V','X'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
39 :     DEFINE_GUID(CLSID_DX50, mmioFOURCC('d','x','5','0'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
40 :     DEFINE_GUID(CLSID_DX50_UC, mmioFOURCC('D','X','5','0'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
41 : Isibaar 6
42 :    
43 :     class CXvidDecoder : public CVideoTransformFilter, public IXvidDecoder, public ISpecifyPropertyPages
44 :     {
45 :    
46 :     public :
47 :    
48 :     static CUnknown * WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);
49 :     STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
50 :     DECLARE_IUNKNOWN;
51 :    
52 :     CXvidDecoder(LPUNKNOWN punk, HRESULT *phr);
53 :     ~CXvidDecoder();
54 :    
55 :     HRESULT CheckInputType(const CMediaType * mtIn);
56 :     HRESULT GetMediaType(int iPos, CMediaType * pmt);
57 :     HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt);
58 :    
59 :     HRESULT CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut);
60 :     HRESULT DecideBufferSize(IMemAllocator * pima, ALLOCATOR_PROPERTIES * pProperties);
61 :    
62 :     HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut);
63 :    
64 :     STDMETHODIMP GetPages(CAUUID * pPages);
65 :     STDMETHODIMP FreePages(CAUUID * pPages);
66 :    
67 :     private :
68 :    
69 :     HRESULT ChangeColorspace(GUID subtype, GUID formattype, void * format);
70 :    
71 :     // data
72 :    
73 :     HINSTANCE m_hdll;
74 :     int (*m_xvid_init)(void *, int, void *, void *);
75 :     int (*m_xvid_decore)(void *, int, void *, void *);
76 :    
77 :     XVID_DEC_PARAM m_param;
78 :     XVID_DEC_FRAME m_frame;
79 :     };
80 :    
81 :    
82 :     #endif /* _FILTER_H_ */

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4