Original Post
Hi everyone, I wondered if someone could clear something up for me. I've been experimenting with video textures and I've been having some problems when using the Directshow Base Pin Class. In particular:
From what I understand, this is called with a proposed media type and you can then return S_OK when you find a sutible format. What I don't understand is how these calls can vary between computers. From testing, one machine will be offered different formats than others. The same codecs are installed on all machines so I'm wondering what the factors are that influence this? Is it GFX card limitations (enven tho the codec doesn't require hardware), current Display setup or maybe GFX drivers? I'm just having a hard time as when I get a video texture working on one machine, the next machine will instead launch an "ActiveMovie Window" as I'm guessing it was unable to find a suitable format.
Please correct me if I'm not understanding the process correctly as I think this is where I'm going wrong!
Here is the code I'm using:
Any advice would be great!
Thanks in advance!
David
[Edited by - thekiwimaddog on October 3, 2010 5:16:26 AM]
virtual HRESULT CheckMediaType( const CMediaType *pmt ) = 0;From what I understand, this is called with a proposed media type and you can then return S_OK when you find a sutible format. What I don't understand is how these calls can vary between computers. From testing, one machine will be offered different formats than others. The same codecs are installed on all machines so I'm wondering what the factors are that influence this? Is it GFX card limitations (enven tho the codec doesn't require hardware), current Display setup or maybe GFX drivers? I'm just having a hard time as when I get a video texture working on one machine, the next machine will instead launch an "ActiveMovie Window" as I'm guessing it was unable to find a suitable format.
Please correct me if I'm not understanding the process correctly as I think this is where I'm going wrong!
Here is the code I'm using:
HRESULT CVideoTextureRenderer::CheckMediaType(const CMediaType *pmt){ HRESULT hr = E_FAIL; VIDEOINFO *pvi=0; CheckPointer(pmt,E_POINTER); // Reject the connection if this is not a video type if( *pmt->FormatType() != FORMAT_VideoInfo ) { ErrorLog("CheckMediaType() - Not A Video Type!",NULL); return E_INVALIDARG; } // Only accept RGB24 video pvi = (VIDEOINFO *)pmt->Format(); if(IsEqualGUID( *pmt->Type(), MEDIATYPE_Video) && IsEqualGUID( *pmt->Subtype(), MEDIASUBTYPE_RGB24)) { hr = S_OK; ErrorLog("CheckMediaType() - Found Matching Format!",NULL); } else { ErrorLog("CheckMediaType() - Not RGB24 Video Format!",NULL); } return hr;}Any advice would be great!
Thanks in advance!
David
[Edited by - thekiwimaddog on October 3, 2010 5:16:26 AM]