[svn] / branches / release-1_3-branch / xvidcore / dshow / src / CXvidDecoder.h Repository:
ViewVC logotype

Annotation of /branches/release-1_3-branch/xvidcore/dshow/src/CXvidDecoder.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1896 - (view) (download)
Original Path: trunk/xvidcore/dshow/src/CXvidDecoder.h

1 : edgomez 1384 /*****************************************************************************
2 :     *
3 :     * XVID MPEG-4 VIDEO CODEC
4 :     * - XviD Decoder part of the DShow Filter -
5 :     *
6 : Isibaar 1896 * Copyright(C) 2002-2010 Peter Ross <pross@xvid.org>
7 : edgomez 1384 *
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 : Isibaar 1896 * $Id: CXvidDecoder.h,v 1.8 2010-10-16 12:20:30 Isibaar Exp $
23 : edgomez 1384 *
24 :     ****************************************************************************/
25 :    
26 :     #ifndef _FILTER_H_
27 :     #define _FILTER_H_
28 :    
29 :     #include <xvid.h>
30 :     #include "IXvidDecoder.h"
31 :    
32 :    
33 : Isibaar 1802 #define XVID_NAME_L L"Xvid MPEG-4 Video Decoder"
34 : edgomez 1384
35 :     /* --- fourcc --- */
36 :    
37 :     #define FOURCC_XVID mmioFOURCC('X','V','I','D')
38 :     #define FOURCC_DIVX mmioFOURCC('D','I','V','X')
39 :     #define FOURCC_DX50 mmioFOURCC('D','X','5','0')
40 : suxen_drol 1647 #define FOURCC_MP4V mmioFOURCC('M','P','4','V')
41 :     #define FOURCC_mp4v mmioFOURCC('m','p','4','v')
42 : edgomez 1384
43 :     /* --- media uids --- */
44 :    
45 :     DEFINE_GUID(CLSID_XVID, mmioFOURCC('x','v','i','d'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
46 :     DEFINE_GUID(CLSID_XVID_UC, mmioFOURCC('X','V','I','D'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
47 :     DEFINE_GUID(CLSID_DIVX, mmioFOURCC('d','i','v','x'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
48 :     DEFINE_GUID(CLSID_DIVX_UC, mmioFOURCC('D','I','V','X'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
49 :     DEFINE_GUID(CLSID_DX50, mmioFOURCC('d','x','5','0'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
50 :     DEFINE_GUID(CLSID_DX50_UC, mmioFOURCC('D','X','5','0'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
51 :     DEFINE_GUID(CLSID_MP4V, mmioFOURCC('m','p','4','v'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
52 : suxen_drol 1647 DEFINE_GUID(CLSID_MP4V_UC, mmioFOURCC('M','P','4','V'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
53 : edgomez 1384
54 :    
55 :     /* MEDIATYPE_IYUV is not always defined in the directx headers */
56 :     DEFINE_GUID(CLSID_MEDIASUBTYPE_IYUV, 0x56555949, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
57 :    
58 :    
59 :     class CXvidDecoder : public CVideoTransformFilter, public IXvidDecoder, public ISpecifyPropertyPages
60 :     {
61 :    
62 :     public :
63 :    
64 :     static CUnknown * WINAPI CreateInstance(LPUNKNOWN punk, HRESULT *phr);
65 :     STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
66 :     DECLARE_IUNKNOWN;
67 :    
68 :     CXvidDecoder(LPUNKNOWN punk, HRESULT *phr);
69 :     ~CXvidDecoder();
70 :    
71 : Isibaar 1896 HRESULT CompleteConnect(PIN_DIRECTION direction, IPin *pReceivePin);
72 :     HRESULT BreakConnect(PIN_DIRECTION dir);
73 :    
74 : edgomez 1384 HRESULT CheckInputType(const CMediaType * mtIn);
75 :     HRESULT GetMediaType(int iPos, CMediaType * pmt);
76 :     HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt);
77 :    
78 :     HRESULT CheckTransform(const CMediaType *mtIn, const CMediaType *mtOut);
79 :     HRESULT DecideBufferSize(IMemAllocator * pima, ALLOCATOR_PROPERTIES * pProperties);
80 :    
81 :     HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut);
82 :    
83 :     STDMETHODIMP GetPages(CAUUID * pPages);
84 :     STDMETHODIMP FreePages(CAUUID * pPages);
85 :    
86 :     private :
87 :    
88 :     HRESULT ChangeColorspace(GUID subtype, GUID formattype, void * format);
89 : Isibaar 1605 HRESULT OpenLib();
90 : syskin 1428 void CloseLib();
91 : edgomez 1384
92 :     xvid_dec_create_t m_create;
93 :     xvid_dec_frame_t m_frame;
94 :    
95 :     HINSTANCE m_hdll;
96 :     int (*xvid_global_func)(void *handle, int opt, void *param1, void *param2);
97 :     int (*xvid_decore_func)(void *handle, int opt, void *param1, void *param2);
98 :     int ar_x, ar_y;
99 : syskin 1498 bool forced_ar;
100 : edgomez 1384
101 :     int rgb_flip;
102 : Isibaar 1896 #ifdef XVID_USE_TRAYICON
103 :     HWND MSG_hwnd; /* message handler window */
104 : edgomez 1384 };
105 : Isibaar 1896 #define WM_ICONMESSAGE (WM_USER + 1)
106 :     #else
107 :     };
108 :     #endif
109 : edgomez 1384
110 : syskin 1498 static const int PARS[][2] = {
111 :     {1, 1},
112 :     {12, 11},
113 :     {10, 11},
114 :     {16, 11},
115 :     {40, 33},
116 :     {0, 0},
117 :     };
118 : edgomez 1384
119 :     #endif /* _FILTER_H_ */

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