3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - XviD Decoder part of the DShow Filter - |
* - XviD Decoder part of the DShow Filter - |
5 |
* |
* |
6 |
* Copyright(C) 2002-2003 Peter Ross <pross@xvid.org> |
* Copyright(C) 2002-2010 Peter Ross <pross@xvid.org> |
7 |
* |
* |
8 |
* This program is free software ; you can redistribute it and/or modify |
* 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 |
* it under the terms of the GNU General Public License as published by |
19 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: CXvidDecoder.h,v 1.3 2004-04-14 03:25:41 syskin Exp $ |
* $Id: CXvidDecoder.h,v 1.8 2010-10-16 12:20:30 Isibaar Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
30 |
#include "IXvidDecoder.h" |
#include "IXvidDecoder.h" |
31 |
|
|
32 |
|
|
33 |
#define XVID_NAME_L L"XviD MPEG-4 Video Decoder" |
#define XVID_NAME_L L"Xvid MPEG-4 Video Decoder" |
34 |
|
|
35 |
/* --- fourcc --- */ |
/* --- fourcc --- */ |
36 |
|
|
37 |
#define FOURCC_XVID mmioFOURCC('X','V','I','D') |
#define FOURCC_XVID mmioFOURCC('X','V','I','D') |
38 |
#define FOURCC_DIVX mmioFOURCC('D','I','V','X') |
#define FOURCC_DIVX mmioFOURCC('D','I','V','X') |
39 |
#define FOURCC_DX50 mmioFOURCC('D','X','5','0') |
#define FOURCC_DX50 mmioFOURCC('D','X','5','0') |
40 |
#define FOURCC_MP4V mmioFOURCC('m','p','4','v') |
#define FOURCC_MP4V mmioFOURCC('M','P','4','V') |
41 |
|
#define FOURCC_mp4v mmioFOURCC('m','p','4','v') |
42 |
|
|
43 |
/* --- media uids --- */ |
/* --- media uids --- */ |
44 |
|
|
49 |
DEFINE_GUID(CLSID_DX50, mmioFOURCC('d','x','5','0'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); |
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); |
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); |
DEFINE_GUID(CLSID_MP4V, mmioFOURCC('m','p','4','v'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); |
52 |
|
DEFINE_GUID(CLSID_MP4V_UC, mmioFOURCC('M','P','4','V'), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); |
53 |
|
|
54 |
|
|
55 |
/* MEDIATYPE_IYUV is not always defined in the directx headers */ |
/* MEDIATYPE_IYUV is not always defined in the directx headers */ |
68 |
CXvidDecoder(LPUNKNOWN punk, HRESULT *phr); |
CXvidDecoder(LPUNKNOWN punk, HRESULT *phr); |
69 |
~CXvidDecoder(); |
~CXvidDecoder(); |
70 |
|
|
71 |
|
HRESULT CompleteConnect(PIN_DIRECTION direction, IPin *pReceivePin); |
72 |
|
HRESULT BreakConnect(PIN_DIRECTION dir); |
73 |
|
|
74 |
HRESULT CheckInputType(const CMediaType * mtIn); |
HRESULT CheckInputType(const CMediaType * mtIn); |
75 |
HRESULT GetMediaType(int iPos, CMediaType * pmt); |
HRESULT GetMediaType(int iPos, CMediaType * pmt); |
76 |
HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt); |
HRESULT SetMediaType(PIN_DIRECTION direction, const CMediaType *pmt); |
86 |
private : |
private : |
87 |
|
|
88 |
HRESULT ChangeColorspace(GUID subtype, GUID formattype, void * format); |
HRESULT ChangeColorspace(GUID subtype, GUID formattype, void * format); |
89 |
|
HRESULT OpenLib(); |
90 |
void CloseLib(); |
void CloseLib(); |
91 |
|
|
92 |
xvid_dec_create_t m_create; |
xvid_dec_create_t m_create; |
96 |
int (*xvid_global_func)(void *handle, int opt, void *param1, void *param2); |
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); |
int (*xvid_decore_func)(void *handle, int opt, void *param1, void *param2); |
98 |
int ar_x, ar_y; |
int ar_x, ar_y; |
99 |
|
bool forced_ar; |
100 |
|
|
101 |
int rgb_flip; |
int rgb_flip; |
102 |
|
#ifdef XVID_USE_TRAYICON |
103 |
|
HWND MSG_hwnd; /* message handler window */ |
104 |
|
}; |
105 |
|
#define WM_ICONMESSAGE (WM_USER + 1) |
106 |
|
#else |
107 |
}; |
}; |
108 |
|
#endif |
109 |
|
|
110 |
|
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 |
|
|
119 |
#endif /* _FILTER_H_ */ |
#endif /* _FILTER_H_ */ |