IVideoWindow from Dolphin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

IVideoWindow from Dolphin

Martin Rubi
Hi everyone.
Has anybody worked with directshow from dolphin ? In particular, i'm trying
to show an .avi video in a dolphin view, but cant get it right.

I'm passing someView asParameter to a dll call which in turn does something
like this

IVideoWindow     m_pVideoWindow;
...
m_pVideoWindow->put_Owner((OAHWND)m_overlayParent); // this is the handle of
the view created in dolphin, someView asParameter
m_pVideoWindow->put_WindowStyle(WS_CHILD);
m_pVideoWindow->SetWindowPosition(aRectangle);
m_pVideoWindow->put_Visible(OATRUE);
m_pVideoWindow->put_AutoShow(OAFALSE);

The thing is, if i define the view i use to make nothing in the events

OverlayView>>wmEraseBkGnd: message wParam: wParam lParam: lParam
    ^ true

OverlayView>>wmPaint: message wParam: wParam lParam: lParam
    ^true

then i get to see the overlay as a child of my view, but only if i dont
resize it or drag some other view over it. If the view uses the default
implementation of the erase and paint messages, i dont see the overlay at
all.
I've tried showing the overlay, using the same calls to my dll, from an mfc
application, and the overlay is showing fine as a CDialog child.
Is there something in the framework i should bypass or redefined in order
show the overlay correctly ? If so, are there any examples i could use to
see how it should be correctly done ?

Thanks in advance and happy new year for everyone.
Martin.


Reply | Threaded
Open this post in threaded view
|

Re: IVideoWindow from Dolphin

True Christian
"Martin" <[hidden email]> wrote
> Has anybody worked with directshow from dolphin ? In particular, i'm
> trying
> to show an .avi video in a dolphin view, but cant get it right.

Hi Martin, it looks like you're a lot further along with directshow than me.
I posted a help request on this recently and the best I got was advice to
look up directshow.  Perhaps we can work together and make progress.

Kirk Fraser


Reply | Threaded
Open this post in threaded view
|

Re: IVideoWindow from Dolphin

Mike Hales-2
In reply to this post by Martin Rubi
Martin, I have done some work with DirectShow with SmalltalkMT not
dolphin, so I may not help much. But...

>From the DirectX SDK:

"MFC applications which place the video window in a child window must
define an empty WM_ERASEBKGND message handler, or the video display
area will not repaint correctly."

So you do have to implement the handler for WM_ERASEBKGND.  I don't
know about the paint handler though.

In my application, I handle the resize event, and send the appropriate
window position to the IVideoWindow and ask the parent window to paint.
This seems to work out ok.

I don't know if this helps at all.

Mike


Reply | Threaded
Open this post in threaded view
|

Re: IVideoWindow from Dolphin

Martin Rubi
Hi, Mike.

Thanks for the answer.
As I was suggested in another list, I set the back color of my view to the
mask color used by the overlay, and that was it. I didn't have to do any
other special treatment at all. This color was (Color red: 16 green: 0 blue:
16), but i don't know if it's a well known constant or just one that works
for my current configuration.

Thanks again.
Regards.
Martin.