[cvs] / xvidcore / dshow / src / CXvidDecoder.h Repository:
ViewVC logotype

Diff of /xvidcore/dshow/src/CXvidDecoder.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Sat Feb 22 08:22:03 2003 UTC revision 1.1.2.3, Sat Nov 15 02:51:41 2003 UTC
# Line 0  Line 1 
1    /*****************************************************************************
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$
23     *
24     ****************************************************************************/
25    
26    #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    /* MEDIATYPE_IYUV is not always defined in the directx headers */
69    DEFINE_GUID(CLSID_MEDIASUBTYPE_IYUV, 0x56555949, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
70    
71    
72    class CXvidDecoder : public CVideoTransformFilter, public IXvidDecoder, public ISpecifyPropertyPages
73    {
74    
75    public :
76    
77            static CUnknown * WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);
78            STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
79            DECLARE_IUNKNOWN;
80    
81            CXvidDecoder(LPUNKNOWN punk, HRESULT *phr);
82            ~CXvidDecoder();
83    
84            HRESULT CheckInputType(const CMediaType * mtIn);
85            HRESULT GetMediaType(int iPos, CMediaType * pmt);
86            HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt);
87    
88            HRESULT CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut);
89            HRESULT DecideBufferSize(IMemAllocator * pima, ALLOCATOR_PROPERTIES * pProperties);
90    
91            HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut);
92    
93            STDMETHODIMP GetPages(CAUUID * pPages);
94            STDMETHODIMP FreePages(CAUUID * pPages);
95    
96    private :
97    
98            HRESULT ChangeColorspace(GUID subtype, GUID formattype, void * format);
99    
100            xvid_dec_create_t m_create;
101            xvid_dec_frame_t m_frame;
102    };
103    
104    
105    #endif /* _FILTER_H_ */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.3

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