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

Diff of /branches/release-1_3-branch/xvidcore/dshow/src/CXvidDecoder.cpp

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

revision 1949, Mon Feb 14 16:59:16 2011 UTC revision 2003, Thu May 19 12:24:11 2011 UTC
# Line 3  Line 3 
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-2010 Peter Ross <pross@xvid.org>   *  Copyright(C) 2002-2011 Peter Ross <pross@xvid.org>
7   *               2003-2010 Michael Militzer <michael@xvid.org>   *               2003-2011 Michael Militzer <michael@xvid.org>
8   *   *
9   *  This program is free software ; you can redistribute it and/or modify   *  This program is free software ; you can redistribute it and/or modify
10   *  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
# Line 20  Line 20 
20   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
21   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
22   *   *
23   * $Id: CXvidDecoder.cpp,v 1.25.2.3 2011-02-14 16:58:54 Isibaar Exp $   * $Id: CXvidDecoder.cpp,v 1.25.2.4 2011-03-17 15:13:25 Isibaar Exp $
24   *   *
25   ****************************************************************************/   ****************************************************************************/
26    
# Line 36  Line 36 
36          C:\DX90SDK\Samples\C++\DirectShow\BaseClasses\Debug          C:\DX90SDK\Samples\C++\DirectShow\BaseClasses\Debug
37  */  */
38    
39  /*  #ifdef ENABLE_MFT
40  #define XVID_USE_MFT  #define XVID_USE_MFT
41    #endif
42    
43  #define XVID_USE_TRAYICON  #define XVID_USE_TRAYICON
 */  
44    
45  #include <windows.h>  #include <windows.h>
46    
# Line 312  Line 313 
313    
314  /* constructor */  /* constructor */
315    
 #define XVID_DLL_NAME "xvidcore.dll"  
   
316  CXvidDecoder::CXvidDecoder(LPUNKNOWN punk, HRESULT *phr) :  CXvidDecoder::CXvidDecoder(LPUNKNOWN punk, HRESULT *phr) :
317      CVideoTransformFilter(NAME("CXvidDecoder"), punk, CLSID_XVID), m_hdll (NULL)      CVideoTransformFilter(NAME("CXvidDecoder"), punk, CLSID_XVID), m_hdll (NULL)
318  {  {
# Line 816  Line 815 
815  /* (internal function) change colorspace */  /* (internal function) change colorspace */
816  #define CALC_BI_STRIDE(width,bitcount)  ((((width * bitcount) + 31) & ~31) >> 3)  #define CALC_BI_STRIDE(width,bitcount)  ((((width * bitcount) + 31) & ~31) >> 3)
817    
818  HRESULT CXvidDecoder::ChangeColorspace(GUID subtype, GUID formattype, void * format)  HRESULT CXvidDecoder::ChangeColorspace(GUID subtype, GUID formattype, void * format, int noflip)
819  {  {
820          DWORD biWidth;          DWORD biWidth;
821    
# Line 839  Line 838 
838                  return S_FALSE;                  return S_FALSE;
839          }          }
840    
841            if (noflip) rgb_flip = 0;
842    
843          if (subtype == CLSID_MEDIASUBTYPE_IYUV)          if (subtype == CLSID_MEDIASUBTYPE_IYUV)
844          {          {
845                  DPRINTF("IYUV");                  DPRINTF("IYUV");
# Line 912  Line 913 
913    
914          if (direction == PINDIR_OUTPUT)          if (direction == PINDIR_OUTPUT)
915          {          {
916                  return ChangeColorspace(*pmt->Subtype(), *pmt->FormatType(), pmt->Format());                  return ChangeColorspace(*pmt->Subtype(), *pmt->FormatType(), pmt->Format(), 0);
917          }          }
918    
919          return S_OK;          return S_OK;
# Line 1049  Line 1050 
1050          {          {
1051                  HRESULT result;                  HRESULT result;
1052    
1053                  result = ChangeColorspace(mtOut->subtype, mtOut->formattype, mtOut->pbFormat);                  result = ChangeColorspace(mtOut->subtype, mtOut->formattype, mtOut->pbFormat, 0);
1054                  DeleteMediaType(mtOut);                  DeleteMediaType(mtOut);
1055    
1056                  if (result != S_OK)                  if (result != S_OK)
# Line 1630  Line 1631 
1631                          hr = MFCreateAMMediaTypeFromMFMediaType(pType, GUID_NULL, &am);                          hr = MFCreateAMMediaTypeFromMFMediaType(pType, GUID_NULL, &am);
1632    
1633                          if (SUCCEEDED(hr)) {                          if (SUCCEEDED(hr)) {
1634                                  if (FAILED(ChangeColorspace(am->subtype, am->formattype, am->pbFormat))) {                                  if (FAILED(ChangeColorspace(am->subtype, am->formattype, am->pbFormat, 1))) {
1635                                          DPRINTF("(MFT)InternalCheckOutputType (MF_E_INVALIDTYPE)");                                          DPRINTF("(MFT)InternalCheckOutputType (MF_E_INVALIDTYPE)");
1636                                          return MF_E_INVALIDTYPE;                                          return MF_E_INVALIDTYPE;
1637                                  }                                  }

Legend:
Removed from v.1949  
changed lines
  Added in v.2003

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