Hello,

This problem has bothered me for a long time, and I have no any idea...
Could you kindly help this? thanks!

I have some trouble in porting transform filter in CE6:

source filter ---> transform filter --> video renderer

The transform filter uses the default media sample allocator from input pin
of video renderer.

Here is the code snippets:

Receive(IMediaSample *pSample)
{
...
m_pOutput->GetDeliveryBuffer(&m_pOut, NULL, NULL, 0));
m_pOut->GetPointer((BYTE**)&m_dec.image);
...
}

Two media samples are allocated totally in this project.

In CE6, this transform filter is used to playing media file in CE media
player.
Normally, This transform filter can work correctly. That means the media
sample buffer address(m_dec.image) can be retrieved correctly.
It alternates between the two allocated media sample addresses.

But, in some special cases m_dec.image is NOT retrieved correctly:

CASE 1.
When playing media file is compeleted, click PLAY button to play it again
manually without restarting media player. The address of media sample,
m_dec.image, is not correctly. That means, it is not either of two media
sample addresses.

BUT, if let media player to play repeatedly automatically by choosing
"Repeat" in the menu, it will work correctly!

CASE 2.
When playing media file, drag player window and move down until the taskbar
overlays the titlebar of player. The address of media sample, m_dec.image
cannot be retrieved correctly again suddenly!

thanks!

Re: Video Renderer problem on CE6 by zzhikang

zzhikang
Mon Jan 01 04:23:53 CST 2007

Can anyone help this?
thanks!

"zzhikang" <zzhikang@discussions.microsoft.com> wrote in message
news:CCB4272C-D07C-4C67-A71A-490E4E0022A8@microsoft.com...
> Hello,
>
> This problem has bothered me for a long time, and I have no any idea...
> Could you kindly help this? thanks!
>
> I have some trouble in porting transform filter in CE6:
>
> source filter ---> transform filter --> video renderer
>
> The transform filter uses the default media sample allocator from input
> pin
> of video renderer.
>
> Here is the code snippets:
>
> Receive(IMediaSample *pSample)
> {
> ...
> m_pOutput->GetDeliveryBuffer(&m_pOut, NULL, NULL, 0));
> m_pOut->GetPointer((BYTE**)&m_dec.image);
> ...
> }
>
> Two media samples are allocated totally in this project.
>
> In CE6, this transform filter is used to playing media file in CE media
> player.
> Normally, This transform filter can work correctly. That means the media
> sample buffer address(m_dec.image) can be retrieved correctly.
> It alternates between the two allocated media sample addresses.
>
> But, in some special cases m_dec.image is NOT retrieved correctly:
>
> CASE 1.
> When playing media file is compeleted, click PLAY button to play it again
> manually without restarting media player. The address of media sample,
> m_dec.image, is not correctly. That means, it is not either of two media
> sample addresses.
>
> BUT, if let media player to play repeatedly automatically by choosing
> "Repeat" in the menu, it will work correctly!
>
> CASE 2.
> When playing media file, drag player window and move down until the
> taskbar
> overlays the titlebar of player. The address of media sample, m_dec.image
> cannot be retrieved correctly again suddenly!
>
> thanks!



Re: Video Renderer problem on CE6 by Haitao

Haitao
Fri Jan 05 20:44:02 CST 2007

Would please tell us more about your system, CPU and platform, etc.? Is it a
WMV, MPEG, or other format?

Do these scenarios happen to the transfer filters (decoders) provided by MS
as well?

Thanks,
--
Haitao Jiang
Software Design Engineer in Test
Windows Device Core Multimedia

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.

"zzhikang" <zzhikang@hotmail.com> wrote in message
news:ee7xo7YLHHA.4712@TK2MSFTNGP04.phx.gbl...
> Can anyone help this?
> thanks!
>
> "zzhikang" <zzhikang@discussions.microsoft.com> wrote in message
> news:CCB4272C-D07C-4C67-A71A-490E4E0022A8@microsoft.com...
>> Hello,
>>
>> This problem has bothered me for a long time, and I have no any idea...
>> Could you kindly help this? thanks!
>>
>> I have some trouble in porting transform filter in CE6:
>>
>> source filter ---> transform filter --> video renderer
>>
>> The transform filter uses the default media sample allocator from input
>> pin
>> of video renderer.
>>
>> Here is the code snippets:
>>
>> Receive(IMediaSample *pSample)
>> {
>> ...
>> m_pOutput->GetDeliveryBuffer(&m_pOut, NULL, NULL, 0));
>> m_pOut->GetPointer((BYTE**)&m_dec.image);
>> ...
>> }
>>
>> Two media samples are allocated totally in this project.
>>
>> In CE6, this transform filter is used to playing media file in CE media
>> player.
>> Normally, This transform filter can work correctly. That means the media
>> sample buffer address(m_dec.image) can be retrieved correctly.
>> It alternates between the two allocated media sample addresses.
>>
>> But, in some special cases m_dec.image is NOT retrieved correctly:
>>
>> CASE 1.
>> When playing media file is compeleted, click PLAY button to play it again
>> manually without restarting media player. The address of media sample,
>> m_dec.image, is not correctly. That means, it is not either of two media
>> sample addresses.
>>
>> BUT, if let media player to play repeatedly automatically by choosing
>> "Repeat" in the menu, it will work correctly!
>>
>> CASE 2.
>> When playing media file, drag player window and move down until the
>> taskbar
>> overlays the titlebar of player. The address of media sample, m_dec.image
>> cannot be retrieved correctly again suddenly!
>>
>> thanks!
>
>



Re: Video Renderer problem on CE6 by zzhikang

zzhikang
Thu Jan 11 06:33:29 CST 2007

Hello, Jiang
My transform filter does hardware decoding process, and it decodes media
bitstream to video memory surface.
But, there are some special cases that the default video renderer switches
to software rendering and gives the transform filter a buffer in system
memory.
As far as i know, there are 3 cases:
1. during playing, switch CE Player to backgroud() - for example, activate
explorer and let it cover CE Player completely.
2. during playing, move CE Player down until its titlebar is covered by the
taskbar of Windows CE.
3. play media file normally. After it finishes, do not close CE Player and
let it "Play" again.

Here, take case 3 as example.
When playing media file again, the first frame is keyframe(I-Frame).
But, during the first frame, the transform will receive one dynamic format
change from video renderer(why?) - the media type of output is not null.
The video renderer gives the transform a buffer in system memory, and this
keyframe has to be skipped.(the hardware cannot get this frame)
The hardware has to sync to next keyframe for decoding the correct image.
It may wait too long...depends on when next keyframe comes

Thanks!

"Haitao Jiang (MS)" <haitaoj@online.microsoft.com.noonlineemail> wrote in
message news:ejE6GyTMHHA.4000@TK2MSFTNGP06.phx.gbl...
> Would please tell us more about your system, CPU and platform, etc.? Is it
> a WMV, MPEG, or other format?

X86, CE6, and normal WMV9

>
> Do these scenarios happen to the transfer filters (decoders) provided by
> MS as well?
I think this issue has influence on hardware decoding.
When one dyanmic format change comes from video renderer, there is no lock
and unlock for directdraw surface on CE6.
The hardware will stop decoding.
(CE5 has lock/unlock although CE Player is covered by explorer - case 1)
>
> Thanks,
> --
> Haitao Jiang
> Software Design Engineer in Test
> Windows Device Core Multimedia
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> You assume all risk for your use.
>