[svn] / trunk / xvidextra / src / apps / miniconvert / filters.h Repository:
ViewVC logotype

Annotation of /trunk/xvidextra/src/apps/miniconvert/filters.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2029 - (view) (download)

1 : Irhall 2014 /*****************************************************************************
2 :     *
3 :     * Xvid MiniConvert
4 :     * - Header for helper filters -
5 :     *
6 :     * Copyright(C) 2011 Xvid Solutions GmbH
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 :     * Author(s): Ireneusz Hallmann
27 :     *
28 :     ****************************************************************************/
29 :    
30 :     #ifndef _FILTERS_H_
31 :     #define _FILTERS_H_
32 :    
33 :     // {4A4FA86F-789F-4912-B547-C4BFAA6D2D96}
34 :     static const GUID CLSID_ChangeSubtypeT =
35 :     { 0x4a4fa86f, 0x789f, 0x4912, { 0xb5, 0x47, 0xc4, 0xbf, 0xaa, 0x6d, 0x2d, 0x96 } };
36 :    
37 :     // {31550865-FA54-4019-89F4-A1A77083BD06}
38 :     static const GUID IID_IRecProgressNotify =
39 :     { 0x31550865, 0xfa54, 0x4019, { 0x89, 0xf4, 0xa1, 0xa7, 0x70, 0x83, 0xbd, 0x6 } };
40 :    
41 :     // {6C203582-9CB7-4775-81BA-CAE05D7DB9C6}
42 :     static const GUID CLSID_ProgressNotifyFilter =
43 :     { 0x6c203582, 0x9cb7, 0x4775, { 0x81, 0xba, 0xca, 0xe0, 0x5d, 0x7d, 0xb9, 0xc6 } };
44 :    
45 :     // 00000050-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_MP3
46 :     static const GUID MEDIASUBTYPE_MP3 =
47 :     { 0x00000055, 0x0000, 0x0010, { 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71 } };
48 :    
49 : Isibaar 2029 // 6B6D0801-9ADA-11D0-A520-00A0D10129C0
50 :     static const GUID MEDIASUBTYPE_ASF =
51 :     {0x6B6D0801, 0x9ADA, 0x11D0, { 0xA5, 0x20, 0x00, 0xA0, 0xD1, 0x01, 0x29, 0xC0 } };
52 : Irhall 2014
53 : Isibaar 2029 static const GUID CLSID_HaaliMediaSplitter_AR =
54 :     {0x564fd788, 0x86c9, 0x4444, { 0x97, 0x1e, 0xcc, 0x4a, 0x24, 0x3d, 0xa1, 0x50 } };
55 :    
56 :     static const GUID CLSID_HaaliMediaSplitter =
57 :     {0x55DA30FC, 0xF16B, 0x49FC, { 0xBA, 0xA5, 0xAE, 0x59, 0xFC, 0x65, 0xF8, 0x2D } };
58 :    
59 :     // B98D13E7-55DB-4385-A33D-09FD1BA26338
60 :     static const GUID CLSID_LAVSource =
61 :     { 0xB98D13E7, 0x55DB, 0x4385, { 0xA3, 0x3D, 0x09, 0xFD, 0x1B, 0xA2, 0x63, 0x38 }};
62 :    
63 :     // 171252A0-8820-4AFE-9DF8-5C92B2D66B04
64 :     static const GUID CLSID_LAVSplitter =
65 :     { 0x171252A0, 0x8820, 0x4AFE, { 0x9D, 0xF8, 0x5C, 0x92, 0xB2, 0xD6, 0x6B, 0x04 }};
66 :    
67 :     // 0F40E1E5-4F79-4988-B1A9-CC98794E6B55
68 :     static const GUID CLSID_FFDshowAudioDecoder =
69 :     { 0x0F40E1E5, 0x4F79, 0x4988, { 0xB1, 0xA9, 0xCC, 0x98, 0x79, 0x4E, 0x6B, 0x55 }};
70 :    
71 :     // 04FE9017-F873-410E-871E-AB91661A4EF7
72 :     static const GUID CLSID_FFDshowVideoDecoder =
73 :     { 0x04FE9017, 0xF873, 0x410E, { 0x87, 0x1E, 0xAB, 0x91, 0x66, 0x1A, 0x4E, 0xF7 }};
74 :    
75 : Irhall 2014 DECLARE_INTERFACE_(IRecProgressNotify, IUnknown)
76 :     {
77 :     STDMETHOD (SetPass)(int in_Pass) PURE;
78 :     STDMETHOD (SetTotalFrames)(DWORD in_TotalFrames) PURE;
79 :     STDMETHOD (SetNotifyWnd)(HWND in_hWnd) PURE;
80 :     STDMETHOD (GetBitrate)(DWORD &OutFramesCount, LONGLONG &OutTotalDataSize) PURE;
81 :     STDMETHOD (GetDimensions)(DWORD &Width, DWORD &Height) PURE;
82 :     STDMETHOD (SetTotalSize)(int nbTotal) PURE;
83 :     STDMETHOD (SetElapsedSize)(int nbElapsed) PURE;
84 :     STDMETHOD (SetCurSize)(int nbCur) PURE;
85 :     };
86 :    
87 :     class CIRecProgressNotify : public IRecProgressNotify
88 :     {
89 :     protected:
90 :     int m_Pass;
91 :     HWND m_MessageWnd;
92 :     DWORD m_TotalFrames;
93 :     int m_SampleCnt;
94 :     LONGLONG m_TotalDataSize;
95 :     int m_Type;
96 :     LONGLONG m_startTime;
97 :     LONGLONG m_stopTime;
98 :     int m_Width, m_Height;
99 :     int m_curSize, m_totalSize, m_elapsedSize;
100 :    
101 :     public:
102 :     CIRecProgressNotify();
103 :     STDMETHODIMP SetPass(int in_Pass) ;
104 :     STDMETHODIMP SetTotalFrames(DWORD in_TotalFrames) ;
105 :     STDMETHODIMP SetNotifyWnd(HWND in_hWnd);
106 :     STDMETHODIMP GetBitrate(DWORD &OutFramesCount, LONGLONG &OutTotalDataSize);
107 :     STDMETHODIMP GetDimensions(DWORD &Width, DWORD &Height);
108 :     STDMETHODIMP SetTotalSize(int nbTotal);
109 :     STDMETHODIMP SetCurSize(int nbCur);
110 :     STDMETHODIMP SetElapsedSize(int nbElapsed);
111 :     };
112 :    
113 :     class CProgressNotifyFilter : public CTransInPlaceFilter, CIRecProgressNotify
114 :     {
115 :     public:
116 :     static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr, int Type);
117 :     CProgressNotifyFilter(LPUNKNOWN pUnk, HRESULT *phr, int Type);
118 :     ~CProgressNotifyFilter();
119 :     int m_FpsNom, m_FpsDen, m_MinSampleSize;
120 :    
121 :     virtual HRESULT CompleteConnect(PIN_DIRECTION direction, IPin *pReceivePin);
122 :     LONGLONG m_AvgTimeForFrame;
123 :     CMediaType m_MediaType;
124 :    
125 :     // IUnknown
126 :     DECLARE_IUNKNOWN
127 :    
128 :     // CUnknown
129 :     STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
130 :    
131 :     HRESULT CheckInputType(const CMediaType *mtIn);
132 :     HRESULT Transform(IMediaSample *pSample);
133 :    
134 :     HRESULT DecideBufferSize(IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *pProperties);
135 :     };
136 :    
137 :     class ChangeSubtypeT :
138 :     public CTransformFilter, CIRecProgressNotify
139 :     {
140 :     public:
141 :     static CUnknown * WINAPI CreateInstance(IUnknown *pUnk, HRESULT *phr);
142 :     ChangeSubtypeT(LPUNKNOWN pUnk, HRESULT *phr);
143 :     ~ChangeSubtypeT(void);
144 :    
145 :     // IUnknown
146 :     DECLARE_IUNKNOWN
147 :    
148 :     // CUnknown
149 :     STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void ** ppv);
150 :    
151 :     HRESULT CheckInputType(const CMediaType *pmt);
152 :     HRESULT CheckTransform(const CMediaType *pmtIn, const CMediaType *pmtOut);
153 :    
154 :     virtual HRESULT GetMediaType(int iPosition, CMediaType *pMediaType);
155 :     virtual HRESULT DecideBufferSize(IMemAllocator * pAlloc, ALLOCATOR_PROPERTIES * ppropInputRequest);
156 :     virtual HRESULT Transform(IMediaSample *pIn, IMediaSample *pOut);
157 :     virtual HRESULT CompleteConnect(PIN_DIRECTION direction, IPin *pReceivePin);
158 :    
159 :     CMediaType m_InMediaType, m_OutMediaType;
160 :    
161 :     GUID m_SubtypeID;
162 :     int m_OutFcc;
163 :    
164 :     int m_FpsNom, m_FpsDen;
165 :     DWORD m_AvgTimeForFrame;
166 :    
167 :     BYTE *m_pMpeg4Sequence;
168 :     int m_Mpeg4SequenceSize;
169 :     };
170 :    
171 :     #endif /* _FILTERS_H_ */

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