[xiph-commits] r7819 - in trunk/oggdsf/src/lib:
codecs/theora/filters/dsfTheoraEncoder
core/directshow/dsfAbstractVideoEncoder
illiminable at motherfish-iii.xiph.org
illiminable at motherfish-iii.xiph.org
Mon Sep 20 23:08:41 PDT 2004
Author: illiminable
Date: 2004-09-20 23:08:40 -0700 (Mon, 20 Sep 2004)
New Revision: 7819
Modified:
trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp
Log:
* Updated all the pins to reflect new input types.
Modified: trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp 2004-09-21 05:59:47 UTC (rev 7818)
+++ trunk/oggdsf/src/lib/codecs/theora/filters/dsfTheoraEncoder/TheoraEncodeInputPin.cpp 2004-09-21 06:08:40 UTC (rev 7819)
@@ -676,10 +676,24 @@
if (mPinInputType.subtype == MEDIASUBTYPE_YUY2) {
//debugLog<<"About to encode YUY2 to YV12"<<endl;
encodeYUY2ToYV12(inBuf, inNumBytes);
- } else {
+ } else if (mPinInputType.subtype == MEDIASUBTYPE_AYUV) {
+ encodeAYUVtoYV12(inBuf, inNumBytes);
+
+ } else if (mPinInputType.subtype == MEDIASUBTYPE_RGB32) {
+ encodeRGB32toYV12(inBuf, inNumBytes);
+
+ } else if (mPinInputType.subtype == MEDIASUBTYPE_RGB24) {
+ encodeRGB24toYV12(inBuf, inNumBytes);
+
+
+ } else if (mPinInputType.subtype == MEDIASUBTYPE_YV12) {
//Should be more specifc.
//debugLog<<"About to encode YV12 to YV12"<<endl;
encodeYV12ToYV12(inBuf, inNumBytes);
+ } else {
+
+ //FATAL ERROR
+ throw 0;
}
Modified: trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp
===================================================================
--- trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp 2004-09-21 05:59:47 UTC (rev 7818)
+++ trunk/oggdsf/src/lib/core/directshow/dsfAbstractVideoEncoder/AbstractVideoEncodeInputPin.cpp 2004-09-21 06:08:40 UTC (rev 7819)
@@ -121,7 +121,12 @@
//FIX::: Clean this up !
if ( (inMediaType->majortype == MEDIATYPE_Video) &&
- (inMediaType->subtype == MEDIASUBTYPE_YV12 || inMediaType->subtype == MEDIASUBTYPE_YUY2) &&
+ ( inMediaType->subtype == MEDIASUBTYPE_YV12 ||
+ inMediaType->subtype == MEDIASUBTYPE_YUY2 ||
+ inMediaType->subtype == MEDIASUBTYPE_AYUV ||
+ inMediaType->subtype == MEDIASUBTYPE_RGB32 ||
+ inMediaType->subtype == MEDIASUBTYPE_RGB24
+ ) &&
(inMediaType->formattype == FORMAT_VideoInfo)
)
{
@@ -155,7 +160,12 @@
//FIX:::Error checking
//RESOLVED::: Bit better.
- if (inMediaType->subtype == MEDIASUBTYPE_YV12 || inMediaType->subtype == MEDIASUBTYPE_YUY2) {
+ if ( inMediaType->subtype == MEDIASUBTYPE_YV12 ||
+ inMediaType->subtype == MEDIASUBTYPE_YUY2 ||
+ inMediaType->subtype == MEDIASUBTYPE_AYUV ||
+ inMediaType->subtype == MEDIASUBTYPE_RGB32 ||
+ inMediaType->subtype == MEDIASUBTYPE_RGB24
+ ) {
mVideoFormat = (VIDEOINFOHEADER*)inMediaType->pbFormat;
mPinInputType = *inMediaType;
//mParentFilter->mAudioFormat = AbstractAudioDecodeFilter::VORBIS;
@@ -182,6 +192,15 @@
case 1:
outMediaType->SetType(&MEDIATYPE_Video);
outMediaType->SetSubtype(&MEDIASUBTYPE_YUY2);
+ case 2:
+ outMediaType->SetType(&MEDIATYPE_Video);
+ outMediaType->SetSubtype(&MEDIASUBTYPE_RGB32);
+ case 3:
+ outMediaType->SetType(&MEDIATYPE_Video);
+ outMediaType->SetSubtype(&MEDIASUBTYPE_RGB24);
+ case 4:
+ outMediaType->SetType(&MEDIATYPE_Video);
+ outMediaType->SetSubtype(&MEDIASUBTYPE_AYUV);
default:
return VFW_S_NO_MORE_ITEMS;
}
More information about the commits
mailing list