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

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

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

revision 1896, Sat Oct 16 12:20:30 2010 UTC revision 1898, Sun Oct 17 18:31:52 2010 UTC
# Line 19  Line 19 
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.8 2010-10-16 12:20:30 Isibaar Exp $   * $Id: CXvidDecoder.h,v 1.9 2010-10-17 18:31:46 Isibaar Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 29  Line 29 
29  #include <xvid.h>  #include <xvid.h>
30  #include "IXvidDecoder.h"  #include "IXvidDecoder.h"
31    
   
32  #define XVID_NAME_L             L"Xvid MPEG-4 Video Decoder"  #define XVID_NAME_L             L"Xvid MPEG-4 Video Decoder"
33    
34  /* --- fourcc --- */  /* --- fourcc --- */
# Line 56  Line 55 
55  DEFINE_GUID(CLSID_MEDIASUBTYPE_IYUV, 0x56555949, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);  DEFINE_GUID(CLSID_MEDIASUBTYPE_IYUV, 0x56555949, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71);
56    
57    
58  class CXvidDecoder : public CVideoTransformFilter, public IXvidDecoder, public ISpecifyPropertyPages  class CXvidDecoder :
59            public CVideoTransformFilter,
60            public IXvidDecoder,
61            public ISpecifyPropertyPages
62    #if defined(XVID_USE_MFT)
63        ,public IMFTransform
64    #endif
65  {  {
66    
67  public :  public :
# Line 83  Line 88 
88          STDMETHODIMP GetPages(CAUUID * pPages);          STDMETHODIMP GetPages(CAUUID * pPages);
89          STDMETHODIMP FreePages(CAUUID * pPages);          STDMETHODIMP FreePages(CAUUID * pPages);
90    
91      /* IMFTransform */
92    #if defined(XVID_USE_MFT)
93            STDMETHODIMP MFTGetStreamLimits(DWORD *pdwInputMinimum, DWORD *pdwInputMaximum, DWORD *pdwOutputMinimum, DWORD *pdwOutputMaximum);
94            STDMETHODIMP MFTGetStreamCount(DWORD *pcInputStreams, DWORD *pcOutputStreams);
95            STDMETHODIMP MFTGetStreamIDs(DWORD dwInputIDArraySize, DWORD *pdwInputIDs, DWORD dwOutputIDArraySize, DWORD *pdwOutputIDs);
96            STDMETHODIMP MFTGetInputStreamInfo(DWORD dwInputStreamID, MFT_INPUT_STREAM_INFO *pStreamInfo);
97            STDMETHODIMP MFTGetOutputStreamInfo(DWORD dwOutputStreamID, MFT_OUTPUT_STREAM_INFO *pStreamInfo);
98            STDMETHODIMP GetAttributes(IMFAttributes** pAttributes);
99            STDMETHODIMP GetInputStreamAttributes(DWORD dwInputStreamID, IMFAttributes **ppAttributes);
100            STDMETHODIMP GetOutputStreamAttributes(DWORD dwOutputStreamID, IMFAttributes **ppAttributes);
101            STDMETHODIMP MFTDeleteInputStream(DWORD dwStreamID);
102            STDMETHODIMP MFTAddInputStreams(DWORD cStreams, DWORD *adwStreamIDs);
103            STDMETHODIMP MFTGetInputAvailableType(DWORD dwInputStreamID, DWORD dwTypeIndex, IMFMediaType **ppType);
104            STDMETHODIMP MFTGetOutputAvailableType(DWORD dwOutputStreamID, DWORD dwTypeIndex, IMFMediaType **ppType);
105            STDMETHODIMP MFTSetInputType(DWORD dwInputStreamID, IMFMediaType *pType, DWORD dwFlags);
106            STDMETHODIMP MFTSetOutputType(DWORD dwOutputStreamID, IMFMediaType *pType, DWORD dwFlags);
107            STDMETHODIMP MFTGetInputCurrentType(DWORD dwInputStreamID, IMFMediaType **ppType);
108            STDMETHODIMP MFTGetOutputCurrentType(DWORD dwOutputStreamID, IMFMediaType **ppType);
109            STDMETHODIMP MFTGetInputStatus(DWORD dwInputStreamID, DWORD *pdwFlags);
110            STDMETHODIMP MFTGetOutputStatus(DWORD *pdwFlags);
111            STDMETHODIMP MFTSetOutputBounds(LONGLONG hnsLowerBound, LONGLONG hnsUpperBound);
112            STDMETHODIMP MFTProcessEvent(DWORD dwInputStreamID, IMFMediaEvent *pEvent);
113            STDMETHODIMP MFTProcessMessage(MFT_MESSAGE_TYPE eMessage, ULONG_PTR ulParam);
114    
115            STDMETHODIMP MFTProcessInput(DWORD dwInputStreamID, IMFSample *pSample, DWORD dwFlags);
116            STDMETHODIMP MFTProcessOutput(DWORD dwFlags, DWORD cOutputBufferCount, MFT_OUTPUT_DATA_BUFFER *pOutputSamples, DWORD *pdwStatus);
117    #endif  /* XVID_USE_MFT */
118    
119  private :  private :
120    
121          HRESULT ChangeColorspace(GUID subtype, GUID formattype, void * format);          HRESULT ChangeColorspace(GUID subtype, GUID formattype, void * format);
# Line 99  Line 132 
132          bool forced_ar;          bool forced_ar;
133    
134          int rgb_flip;          int rgb_flip;
135            int out_stride;
136    
137            /* mft stuff */
138    #if defined(XVID_USE_MFT)
139            BOOL HasPendingOutput() const { return m_frame.output.plane[1] != NULL; }
140    
141            HRESULT OnSetInputType(IMFMediaType *pmt);
142            HRESULT OnCheckInputType(IMFMediaType *pmt);
143    
144            HRESULT OnSetOutputType(IMFMediaType *pmt);
145    
146            IMFMediaType *m_pInputType;
147            IMFMediaType *m_pOutputType;
148    
149            CRITICAL_SECTION m_mft_lock;
150            REFERENCE_TIME m_timestamp;
151            REFERENCE_TIME m_timelength;
152    
153            int m_discont;
154    
155            /* Used to construct or interpolate missing timestamps */
156            REFERENCE_TIME m_rtFrame;
157            MFRatio m_frameRate;
158            UINT64 m_duration;
159    #endif
160    
161  #ifdef XVID_USE_TRAYICON  #ifdef XVID_USE_TRAYICON
162          HWND MSG_hwnd; /* message handler window */          HWND MSG_hwnd; /* message handler window */
163  };  };

Legend:
Removed from v.1896  
changed lines
  Added in v.1898

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