diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2007-11-11 12:09:14 +0300 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2007-11-11 12:09:14 +0300 |
commit | 2db485996ff6f2ca87f5e52e51c1830d994d5508 (patch) | |
tree | 740b6759477bf06a7ad1cb86bfe5e7e32ac98e1b /src/filters/transform/mpcvideodec/DXVADecoder.cpp | |
parent | 30c5b63b99fbf31605b0ff484a8d9f3e0c95ce96 (diff) |
Modify : ffmpeg can be compile with GCC (need to uncomment _USE_FFMPEG_WITHGCC in MPCVideoDec stdafx.h)
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@332 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/mpcvideodec/DXVADecoder.cpp')
-rw-r--r-- | src/filters/transform/mpcvideodec/DXVADecoder.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/filters/transform/mpcvideodec/DXVADecoder.cpp b/src/filters/transform/mpcvideodec/DXVADecoder.cpp new file mode 100644 index 000000000..13fbfe703 --- /dev/null +++ b/src/filters/transform/mpcvideodec/DXVADecoder.cpp @@ -0,0 +1,56 @@ +/*
+ * $Id: DXVADecoderH264.cpp 249 2007-09-26 11:07:22Z casimir666 $
+ *
+ * (C) 2006-2007 see AUTHORS
+ *
+ * This file is part of mplayerc.
+ *
+ * Mplayerc is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Mplayerc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "stdafx.h"
+#include <dxva2api.h>
+#include "DXVADecoderH264.h"
+
+
+CDXVADecoder* CDXVADecoder::CreateDecoder (CMPCVideoDecFilter* pFilter, IDirectXVideoDecoder* pDXDecoder, const GUID* guidDecoder)
+{
+ CDXVADecoder* pDecoder = NULL;
+
+ if (*guidDecoder == DXVA2_ModeH264_E)
+ pDecoder = new CDXVADecoderH264 (pFilter, pDXDecoder, H264_VLD);
+ else
+ ASSERT (FALSE); // Unknown decoder !!
+
+ return pDecoder;
+}
+
+CDXVADecoder::CDXVADecoder (CMPCVideoDecFilter* pFilter, IDirectXVideoDecoder* pDXDecoder, DXVA2Mode nMode)
+{
+ m_pFilter = pFilter;
+ m_nMode = nMode;
+ m_pDXDecoder = pDXDecoder;
+};
+
+
+void CDXVADecoder::AllocExecuteParams (int nSize)
+{
+ m_ExecuteParams.NumCompBuffers = nSize;
+ m_ExecuteParams.pCompressedBuffers = new DXVA2_DecodeBufferDesc[nSize];
+ m_ExecuteParams.pExtensionData = NULL;
+
+ for (int i=0; i<nSize; i++)
+ memset (&m_ExecuteParams.pCompressedBuffers[i], 0, sizeof(DXVA2_DecodeBufferDesc));
+}
\ No newline at end of file |