Parent Directory | Revision Log
Revision 1054 - (view) (download)
1 : | edgomez | 1054 | /***************************************************************************** |
2 : | * | ||
3 : | * XVID MPEG-4 VIDEO CODEC | ||
4 : | * - XviD Decoder part of the DShow Filter - | ||
5 : | * | ||
6 : | * Copyright(C) 2002-2003 Peter Ross <pross@xvid.org> | ||
7 : | * | ||
8 : | * This program is free software ; you can redistribute it and/or modify | ||
9 : | * it under the terms of the GNU General Public License as published by | ||
10 : | * the Free Software Foundation ; either version 2 of the License, or | ||
11 : | * (at your option) any later version. | ||
12 : | * | ||
13 : | * This program is distributed in the hope that it will be useful, | ||
14 : | * but WITHOUT ANY WARRANTY ; without even the implied warranty of | ||
15 : | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 : | * GNU General Public License for more details. | ||
17 : | * | ||
18 : | * You should have received a copy of the GNU General Public License | ||
19 : | * along with this program ; if not, write to the Free Software | ||
20 : | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 : | * | ||
22 : | * $Id: CXvidDecoder.h,v 1.1.2.2 2003-06-09 13:49:00 edgomez Exp $ | ||
23 : | * | ||
24 : | ****************************************************************************/ | ||
25 : | |||
26 : | suxen_drol | 888 | #ifndef _FILTER_H_ |
27 : | #define _FILTER_H_ | ||
28 : | |||
29 : | #include <xvid.h> | ||
30 : | #include "IXvidDecoder.h" | ||
31 : | |||
32 : | #ifdef _DEBUG | ||
33 : | #include <stdio.h> /* vsprintf */ | ||
34 : | #define DPRINTF_BUF_SZ 1024 | ||
35 : | static __inline void | ||
36 : | DPRINTF(char *fmt, ...) | ||
37 : | { | ||
38 : | va_list args; | ||
39 : | char buf[DPRINTF_BUF_SZ]; | ||
40 : | |||
41 : | va_start(args, fmt); | ||
42 : | vsprintf(buf, fmt, args); | ||
43 : | OutputDebugString(buf); | ||
44 : | } | ||
45 : | #else | ||
46 : | static __inline void | ||
47 : | DPRINTF(char *fmt, ...) { } | ||
48 : | #endif | ||
49 : | |||
50 : | #define XVID_NAME_L L"XviD MPEG-4 Video Decoder" | ||
51 : | |||
52 : | /* --- fourcc --- */ | ||
53 : | |||
54 : | #define FOURCC_XVID mmioFOURCC('X','V','I','D') | ||
55 : | #define FOURCC_DIVX mmioFOURCC('D','I','V','X') | ||
56 : | #define FOURCC_DX50 mmioFOURCC('D','X','5','0') | ||
57 : | |||
58 : | /* --- media uids --- */ | ||
59 : | |||
60 : | DEFINE_GUID(CLSID_XVID, mmioFOURCC('x','v','i','d'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); | ||
61 : | DEFINE_GUID(CLSID_XVID_UC, mmioFOURCC('X','V','I','D'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); | ||
62 : | DEFINE_GUID(CLSID_DIVX, mmioFOURCC('d','i','v','x'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); | ||
63 : | DEFINE_GUID(CLSID_DIVX_UC, mmioFOURCC('D','I','V','X'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); | ||
64 : | DEFINE_GUID(CLSID_DX50, mmioFOURCC('d','x','5','0'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); | ||
65 : | DEFINE_GUID(CLSID_DX50_UC, mmioFOURCC('D','X','5','0'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); | ||
66 : | |||
67 : | |||
68 : | class CXvidDecoder : public CVideoTransformFilter, public IXvidDecoder, public ISpecifyPropertyPages | ||
69 : | { | ||
70 : | |||
71 : | public : | ||
72 : | |||
73 : | static CUnknown * WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr); | ||
74 : | STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv); | ||
75 : | DECLARE_IUNKNOWN; | ||
76 : | |||
77 : | CXvidDecoder(LPUNKNOWN punk, HRESULT *phr); | ||
78 : | ~CXvidDecoder(); | ||
79 : | |||
80 : | HRESULT CheckInputType(const CMediaType * mtIn); | ||
81 : | HRESULT GetMediaType(int iPos, CMediaType * pmt); | ||
82 : | HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt); | ||
83 : | |||
84 : | HRESULT CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut); | ||
85 : | HRESULT DecideBufferSize(IMemAllocator * pima, ALLOCATOR_PROPERTIES * pProperties); | ||
86 : | |||
87 : | HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut); | ||
88 : | |||
89 : | STDMETHODIMP GetPages(CAUUID * pPages); | ||
90 : | STDMETHODIMP FreePages(CAUUID * pPages); | ||
91 : | |||
92 : | private : | ||
93 : | |||
94 : | HRESULT ChangeColorspace(GUID subtype, GUID formattype, void * format); | ||
95 : | |||
96 : | // data | ||
97 : | |||
98 : | HINSTANCE m_hdll; | ||
99 : | int (*m_xvid_global)(void *, int, void *, void *); | ||
100 : | int (*m_xvid_decore)(void *, int, void *, void *); | ||
101 : | |||
102 : | xvid_dec_create_t m_create; | ||
103 : | xvid_dec_frame_t m_frame; | ||
104 : | }; | ||
105 : | |||
106 : | |||
107 : | edgomez | 1054 | #endif /* _FILTER_H_ */ |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |