Problem setting media type for new profile



Hi,

I'm trying to create a custom profile with one video stream of Windows Media
Video 9. I'm encountering two main problems. First, my query for the
IWMCodecInfo3 interface always fails (step 3 below). Second, when I call
SetMediaType( pMediaType) where the media subtype is a compressed type like
WMV9, it fails (step 10 below).

Here's the steps I believe I'm supposed to take in creating the profile.

1. Create the profile manager.
2. I create the empty profile.
3. Then I query the profile manager for the IWMProfile3 interface.
4. Thru the IWMProfile3 interface, I call CreateNewStream(
WMMEDIATYPE_Video, pNewStreamConfig)
5. Query the profile manager interface for the IWMCodecInfo3 interface.
6. From the IWMCodecInfo3 interface, get the IWMStreamConfig interface for
the Windows Media Video 9 codec.
7. From the IWMStreamConfig interface for WMV9, get the WM_MEDIA_TYPE
structure associated with the WMV9 codec -- pWMV9CodecMediaType
8. Back to pNewStreamConfig -- query for the IWMVideoMediaProps interface.
9. From the IWMVideoMediaProps Interface, Call GetMediaType twice, to first
get the size, then get the structure.
10. Thru IWMVideoMediaProps, call SetMediaType( pWMV9CodecMediaType ).
11. Thru the IWMProfile3 interface, add the pNewStreamConfig to the profile.

Since step 3 above is always failing (I have not the faintest idea why it
would fail either), I try to work around it by manually setting up a
WM_MEDIA_TYPE structure and using that in step 10 above rather than the
WM_MEDIA_TYPE structure directly associated with the WMV9 codec. The strange
thing with this workaround is, if I have the media subtype as uncompressed
(RGB24), the method succeeds. If I have the media subtype as WMV9 (which I
want), it fails. Setting it as RGB24 does me no good...since I'm trying to
create a WMV9 file, and it doesn't play back right.

Here's the code for the baffling fail to query for the IWMCodec3 interface.
If I can't even query for this interface, it would seem something's quite
wrong.

if( FAILED(WMCreateProfileManager(&m_pWMProfileManager)))
{
_tcscpy(m_szErrMsg,_T("Unable to Create WindowsMedia Profile Manager"));
throw CAssertException();
}

if ( FAILED( m_pWMProfileManager->QueryInterface( IID_IWMCodecInfo3,
(void**) pCodecInfo3 ) ) )
{
_tcscpy(m_szErrMsg,_T("Unable to get codecInfo3 IMWVideoMediaProps."));
throw CAssertException();
}

Thanks.
Jon Hendrich




--
"When in the company of others, I shall always consider myself the lowest of
all"
.



Relevant Pages

  • RE: LDAP query for xerox 3545 printer/scanner blocked by SBS 2003?
    ... You also cannot query using the LDP tool. ... Step2:Please ensure the DNS on workstation is pointed to SBS server. ... Run Network Monitor on the SBS server to capture the network traffic ... Monitor will capture some packets which pass through this interface. ...
    (microsoft.public.windows.server.sbs)
  • Re: Referencing Primary Key
    ... The query includes both tables, joined on the test number field from both, and presumably with a criteria to select the Profile required, and it should give you what you want. ... When I said 'Primary Key' I meant that each table needs to have a 'primary key' that it uses as, I guess, a record number. ... Once a year we have to send out a letter that lets them indicate whether or not they want to keep using the profile, as well as what the cost will be if the test isn't covered by insurance. ...
    (microsoft.public.access.macros)
  • Re: Does anyone need IDEfile PCBs?
    ... ProFile interface between an Apple II and an IDE drive when there ... IIRC the Profile was only supported by UCSD Pascal, while most people in EU ran DOS 3.3 and most in US had ProDOS. ... The IDEfile protocol converter has been designed for the Apple III and Lisa. ... There were no alternatives to the Profile and Widget drives. ...
    (comp.sys.apple2)
  • Re: Open to suggestions
    ... My intention is to have a script that will query the AD profile attribute ... Perhaps you can pass credentials to an ADO connection ... ' Construct the ADO query, ...
    (microsoft.public.scripting.vbscript)
  • Re: Internet class differences...
    ... web service would need to be created to interface with the database server. ... Initially a WebClient class was used. ... This worked fine for submitting the query. ...
    (microsoft.public.dotnet.general)