[xiph-commits] r6996 -

illiminable at dactyl.lonelymoon.com illiminable
Mon Jul 5 11:02:34 PDT 2004


trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder
Message-ID: <20040705180234.A32939AAAB at dactyl.lonelymoon.com>

Author: illiminable
Date: Mon Jul  5 11:02:34 2004
New Revision: 6996

Modified:
trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.h
Log:
* Added acceptance of YUY2 to input pins for video decoders.

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp	2004-07-05 17:46:25 UTC (rev 6995)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp	2004-07-05 18:01:57 UTC (rev 6996)
@@ -121,7 +121,7 @@
//FIX::: Clean this up !

if	( (inMediaType->majortype == MEDIATYPE_Video) &&
-			(inMediaType->subtype == MEDIASUBTYPE_YV12) &&
+			(inMediaType->subtype == MEDIASUBTYPE_YV12 || inMediaType->subtype == MEDIASUBTYPE_YUY2) &&
(inMediaType->formattype == FORMAT_VideoInfo)
)
{
@@ -155,8 +155,9 @@
//FIX:::Error checking
//RESOLVED::: Bit better.

-	if (inMediaType->subtype == MEDIASUBTYPE_YV12) {
+	if (inMediaType->subtype == MEDIASUBTYPE_YV12 || inMediaType->subtype == MEDIASUBTYPE_YUY2) {
mVideoFormat = (VIDEOINFOHEADER*)inMediaType->pbFormat;
+		mPinInputType = *inMediaType;
//mParentFilter->mAudioFormat = AbstractAudioDecodeFilter::VORBIS;
} else {
//Failed... should never be here !
@@ -177,7 +178,10 @@
outMediaType->SetType(&MEDIATYPE_Video);
outMediaType->SetSubtype(&MEDIASUBTYPE_YV12);
//Don't set the format data here. That's up to our output pin/
-			return S_OK;
+			return S_OK;
+		case 1:
+			outMediaType->SetType(&MEDIATYPE_Video);
+			outMediaType->SetSubtype(&MEDIASUBTYPE_YUY2);
default:
return VFW_S_NO_MORE_ITEMS;
}

Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.h
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.h	2004-07-05 17:46:25 UTC (rev 6995)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.h	2004-07-05 18:01:57 UTC (rev 6996)
@@ -82,7 +82,7 @@
AbstractVideoEncodeOutputPin* mOutputPin;
__int64 mUptoFrame;
AbstractVideoEncodeFilter* mParentFilter;
-	CMediaType* mAcceptableMediaType;
+	CMediaType mPinInputType;

//fstream debugLog;
//unsigned long mFrameSize;
@@ -92,4 +92,6 @@
VIDEOINFOHEADER* mVideoFormat;
long mHeight;
long mWidth;
+
+
};



More information about the commits mailing list