Re: Failed to connect Video Renderer Filter in WinCE 4.2

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Dear Damon,

Thank you very much. I have appended an RGB format and then it works under
target device. I have a more question.

If the display card supports YUV overlay acceleration, how does it work?
Does the video renderer convert the fetched RGB sample to YUV sample or
request to change the negotiated media type dynamically?

Thanks & Best Regards,
Arthur

"Damon Barry [MSFT]" <damonb@xxxxxxxxxxxxxxxxxxxx> дÈëÓʼþ
news:e%23U6zUOTFHA.2916@xxxxxxxxxxxxxxxxxxxxxxx
> The video renderer only handles GDI-supported formats at type-negotiation
> time. Then once samples begin to flow it will check the display driver
for
> DDraw support and try to use a YUV overlay if it exists. So the WMV DMO
> works because it connects to the renderer using RGB, then switches to YUV
> later (assuming your platform supports overlays). See the following
> documentation for the official explanation:
>
>
http://msdn.microsoft.com/library/en-us/wcemultimedia5/html/wce50lrfVideoRendererFilter.asp?frame=true
>
> What you need to do is expose an RGB format in addition to the YUV
formats.
> You could just fake RGB (declare that you support it when you really
don't),
> but then you'd have problems in the case where the renderer needs to fall
> back to GDI (e.g. - when a context or start menu comes up over the video
in
> the UI). So ideally you'd want to truly support RGB even though YUV will
be
> your preferred format.
>
> FYI, you can see for yourself what's happening during type negotiation in
> the WMV DMO. Create the following registry keys and values:
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Debug\GLOBAL]
> "TIMING"=dword:0
> "TRACE"=dword:0
> "MEMORY"=dword:0
> "LOCKING"=dword:0
> "ERROR"=dword:0
>
> The levels go from 0 (none) to 5 (full). A good approach is to set TRACE
and
> ERROR to 5 and then examine the output after you connect the graph.
>
> --Damon
> --
> damonb@xxxxxxxxxxxxxxxxxxxx (Remove the 'online.' from my address to reach
> me.)
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> ______________________________
>
> The Windows CE 5.0 documentation is online at:
>
http://msdn.microsoft.com/library/en-us/wceintro5/html/wce50oriWelcomeToWindowsCE.asp?frame=true
>
>
> "Arthur Jiang" <Arthur.Jiang@xxxxxxxxxx> wrote in message
> news:eGp4GAKTFHA.2912@xxxxxxxxxxxxxxxxxxxxxxx
> > Dear Experts,
> >
> > I have implemented an customized video decoder filter for WindowsCE.Net
> > 4.2.
> > But the video renderer cann't accept the connection from my video
decoder
> > filter. However, this video decoder filter works normally under
> > Windows2000
> > SP4. Could you give me some advice on how to solve this troublesome
> > problem?
> >
> > The problem is that pReceivePin->ReceiveConnection() will return
> > VFW_E_TYPE_NOT_ACCEPTED during the call of AttemptConnection(). I have
set
> > output pin's media type of my video deocder as below:
> >
> > HRESULT CMyVideoDecoder::GetMediaType(int iPosition, CMediaType *mtOut)
> > {
> > if (iPosition < 0 || iPosition > 3)
> > { /* Only three media type are supported by the output pin */
> > return E_INVALIDARG;
> > }
> >
> > VIDEOINFOHEADER format;
> > ZeroMemory(&format, sizeof(VIDEOINFOHEADER));
> >
> > mtOut->SetType(&MEDIATYPE_Video);
> > mtOut->SetFormatType(&FORMAT_VideoInfo);
> > mtOut->SetTemporalCompression(FALSE);
> >
> > format.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
> > format.bmiHeader.biWidth = m_nImageWidth;
> > format.bmiHeader.biHeight = m_nImageHeight;
> > format.bmiHeader.biPlanes = 1;
> >
> > switch (iPosition)
> > {
> > case 0:
> > format.bmiHeader.biCompression = MEDIASUBTYPE_YUY2.Data1;
> > format.bmiHeader.biBitCount = 16;
> > mtOut->SetSubtype(&MEDIASUBTYPE_YUY2);
> > break;
> > case 1:
> > mtOut->SetSubtype(&MEDIASUBTYPE_UYVY);
> > format.bmiHeader.biBitCount = 16;
> > format.bmiHeader.biCompression = MEDIASUBTYPE_UYVY.Data1;
> > break;
> > case 2:
> > mtOut->SetSubtype(&MEDIASUBTYPE_YVYU);
> > format.bmiHeader.biBitCount = 16;
> > format.bmiHeader.biCompression = MEDIASUBTYPE_YVYU.Data1;
> > break;
> > default:
> > break;
> > }
> >
> > mtOut->SetFormat(PBYTE(&format), sizeof(VIDEOINFOHEADER));
> >
> > return S_OK;
> > }
> >
> > The above three media types are also supported by WMV decoder filter in
> > WindowsCE.Net 4.2. But the Video Renderer filter accepts the connection
> > from
> > WMV deocder filter.
> >
> > Could anyone point out the unreasonable configuration of output pin's
> > media
> > type to help me solve this troublesome problem?
> >
> > Many thanks,
> > Arthur
> >
> >
> >
>
>


.



Relevant Pages

  • Re: Converting UYVY video to RGB in simulink
    ... UYVY is a YCbCr 4:2:2 format. ... the YCbCr to RGB ... Video and Image Processing Blockset team lead ...
    (comp.soft-sys.matlab)
  • Re: VMR vs Video Renderer
    ... > Major Type: Video ... > Format: RGB 640X576, 32 bit ... > Sub Type: ARGB32 ...
    (microsoft.public.win32.programmer.directx.video)
  • Converting UYVY video to RGB in simulink
    ... i am importing composite video from a camera using a TV capture ... card.The capture card supports only UYVY video format and I cant find ... any block to convert it to RGB format in the vip blockset .CAn ... I have tried another video capture card "Pinnacle PCTV 100i" it ...
    (comp.soft-sys.matlab)
  • NewestShareware.com Issue #205
    ... An easier to read version of this newsletter in HTML format can ... Program Name - Supported Platforms - Type - Category ... PQ iPhone Video Converter is a One-Click solution to convert Tivo, ... The Installation procedure accepts a ...
    (comp.software.shareware.announce)
  • NewestShareware.com Issue #274
    ... An easier to read version of this newsletter in HTML format can ... Program Homepage/Download url: ... A-one iPod Video Convertor is the most powerful iPod Video Convertor ... DVD movie to your computer by converting DVD to AVI, DivX, XviD, VCD, ...
    (comp.software.shareware.announce)