Hi,
thank you.
now, I'm sure that, click the movie object, the childwindow(the movie object)
catch the focus,
and later, it will catch all key event. so the slideshow window can't catch any
event.
I always think that return the focus to the slideshow window when first press
ESC,
and press ESC again, the slideshow window will catch it, and finish.
do you agree with me? or do you have more suggestion?
when I test in MS Office PPT, I find that, firstly click the movie object,
the movie object will catch the focus and handle the event( will pause the
movie, if click the object again, will play continue ),
later, press ESC, will return the focus to the main window, press ESC again,
finish the slide.
and I think it is well that MS's method.
now, I will check and dubeg the vcl and avmedia code further to find
a more effect way to fix the bug.
following is my debuging callstact information in MS VS2003.net.
-----------------------------------------------------------------------
press ESC after not click the movie object:
> sd680mi.dll!sd::SlideshowImpl::keyInput(const KeyEvent & rKEvt={...}) Line
> 2334 C++
sd680mi.dll!sd::Slideshow::keyInput(const KeyEvent & rKEvt={...}) Line 185
C++
sd680mi.dll!sd::ViewShell::KeyInput(const KeyEvent & rKEvt={...}, sd::Window
* pWin=0x0806aa90) Line 574 + 0xf C++
sd680mi.dll!sd::DrawViewShell::KeyInput(const KeyEvent & rKEvt={...},
sd::Window * pWin=0x0806aa90) Line 286 + 0x10 C++
sd680mi.dll!sd::ShowWindow::KeyInput(const KeyEvent & rKEvt={...}) Line 186
+ 0x21 C++
vcl680mi.dll!ImplHandleKey(Window * pWindow=0x04a356e8, unsigned short
nSVEvent=4, unsigned short nKeyCode=1281, unsigned short nCharCode=27, unsigned
short nRepeat=0, unsigned char bForward='') Line 1183 C++
vcl680mi.dll!ImplWindowFrameProc(void * pInst=0x04a356e8, SalFrame *
__formal=0x04a35998, unsigned short nEvent=5, const void * pEvent=0x0101f438)
Line 2368 + 0x25 C++
vcl680mi.dll!ImplHandleKeyMsg(HWND__ * hWnd=0x00090a7e, unsigned int
nMsg=256, unsigned int wParam=27, long lParam=65537, long & rResult=0) Line
3848 + 0x23 C++
vcl680mi.dll!SalFrameWndProc(HWND__ * hWnd=0x00090a7e, unsigned int nMsg=256,
unsigned int wParam=27, long lParam=65537, int & rDef=1) Line 5697 + 0x19 C++
vcl680mi.dll!SalFrameWndProcW(HWND__ * hWnd=0x00090a7e, unsigned int
nMsg=256, unsigned int wParam=27, long lParam=65537) Line 6053 + 0x19 C++
-----------------------------------------------------------------------
press ESC after click the movie object:
> vcl680mi.dll!Window::Notify(NotifyEvent & rNEvt={...}) Line 5311 C++
sd680mi.dll!sd::Window::Notify(NotifyEvent & rNEvt={...}) Line 404 C++
sd680mi.dll!sd::ShowWindow::Notify(NotifyEvent & rNEvt={...}) Line 375 + 0xc
C++
vcl680mi.dll!Window::Notify(NotifyEvent & rNEvt={...}) Line 5331 + 0x29 C++
vcl680mi.dll!Window::KeyInput(const KeyEvent & rKEvt={...}) Line 4800 + 0xf
C++
vcl680mi.dll!ImplHandleKey(Window * pWindow=0x04a356e8, unsigned short
nSVEvent=4, unsigned short nKeyCode=1281, unsigned short nCharCode=0, unsigned
short nRepeat=0, unsigned char bForward='') Line 1183 C++
vcl680mi.dll!ImplWindowFrameProc(void * pInst=0x04a356e8, SalFrame *
__formal=0x04a35998, unsigned short nEvent=5, const void * pEvent=0x0101f638)
Line 2368 + 0x25 C++
vcl680mi.dll!ImplHandleSalObjKeyMsg(HWND__ * hWnd=0x00090a7e, unsigned int
nMsg=256, unsigned int wParam=27, long lParam=65537) Line 3923 + 0x23 C++
vcl680mi.dll!ImplSalPostDispatchMsg(tagMSG * pMsg=0x0101f698, long
__formal=0) Line 289 + 0x21 C++
vcl680mi.dll!ImplSalDispatchMessage(tagMSG * pMsg=0x0101f698) Line 718 + 0xd
C++
vcl680mi.dll!ImplSalYield(unsigned char bWait='', unsigned char
bHandleAllCurrentEvents=0) Line 746 + 0x9 C++
vcl680mi.dll!WinSalInstance::Yield(bool bWait=true, bool
bHandleAllCurrentEvents=false) Line 791 + 0xd C++
vcl680mi.dll!Application::Yield(bool bAllEvents=false) Line 554 C++
vcl680mi.dll!Application::Execute() Line 516 + 0x7 C++
soffice.exe!desktop::Desktop::Main() Line 1803 C++
vcl680mi.dll!ImplSVMain() Line 255 C++
vcl680mi.dll!SVMain() Line 296 C++
soffice.exe!sal_main(int __formal=1, int __formal=1) Line 82 C++
soffice.exe!WinMain(void * _hinst=0x00400000, void * _dummy=0x00000000, char
* _cmdline=0x00051f10, int _nshow=1) Line 74 + 0x39 C++
soffice.exe!WinMainCRTStartup() Line 390 + 0x1b C
kernel32.dll!7c816fd7()
ntdll.dll!7c935b4f()
----------------------------------------------------------------------------------------
I find:
the two operation, will into the same function(ImplHandleKey) from different
way, also the parameter is similar,
although the parameter(Window* pWindow) has the same pointer value, but they
are the different derived class,
and will execute the different way.
Regards
songzhanjun
>Hi Song,
>
>in addition to what Christian said, here is another hint for you:
>
>the media player implementation on Windows uses the DirectShow SDK
>from Windows as backend for the display/playback of media streams.
>As such, there exist platform dependent backend implementations for
>the used backend.
>
>On Windows, you can find this and other implementations in module
>avmedia: avmedia/source/win/window.cxx. This file also contains
>the WndMsgProc for the used VideoWindow implementation
>(MediaPlayerWndProc). You could start with further debugging efforts
>within this function. Maybe the the key event is caught here and
>not processed (propagated) accordingly?!
>
>Regards
>Kai
>
>Christian Lippka - Sun Microsystems Gmbh - Hamburg wrote:
>> Hi Song,
>>
>> great you came so far with debugging. I just talked to Thorsten about this
>> and he told me that even if it is a system window, vcl wraps a vcl window
>> around it so we should be able to get the key events.
>> I suggest you continue debug on this. Best practice for such cases is
>> to first debug the case that works. In your case this is pressing esc
>> during a running slide show without having a movie playing. Then follow
>> the key event from SalSysObjWndProc up to the slide show implementation
>> in sd project. You will learn a great deal on the way up. After you studied
>> the way of the key event, you can start to reproduce the error case.
>> In your case that is pressing esc during a running slide show with a
>> movie file playing. Then figure out what is different or who is stealing
>> your key event.
>>
>> Regards,
>> Christian
>>
>> songzhanjun wrote:
>> > Hi Christian,
>> >
>> > Thanks for you help.
>> >
>> > I used windows XP and the movie format is .avi.
>> >
>> >> I agree with you. I think that the movie will be a childwindow when
>> >> display the Impress, and when click on the moive, the windows message
>> >> will come into the callback function SalSysObjWndProc()( in file:
>> >> ../vcl/win/source/windows/salobj.cxx), later, the message will be post to
>> >> the childwindow( the movie object ). do you agree with me?
>> > but, I don't know how I can do.
>> >
>> > Regards,
>> > songzhanjun
>> >
>> >
>> > > Hi Song,
>> > >
>> > > if the inserted movie is a plugin (don't know, you need
>> > > to tell us what format and what plattform) then it is
>> > > displayed in a system window. So a click would give the
>> > > window the focus and then it consumes all keyboard events.
>> > >
>> > > Regards,
>> > > Christian
>> > >
>> > > songzhanjun wrote:
>> > >
>> > > > Hi, all:
>> > > >
>> > > > I have a bug in Impress, and I want to debug the code. can anyone give
>> > > > me some advice?
>> > > >
>> > > > [Step]
>> > > > 1. new a Impress document.
>> > > >> 2. Insert the video file to a Impress document: Insert | Movie and
>> > > >> Sound, pop the "Insert Movie and Sound" dialog, select a video file,
>> > > >> and click the "OK" button.
>> > > > 3. show the Impress.
>> > > > 4. when show the Impress, click the video's area.
>> > > > 5. = >click the Esc key, the Impress can't finish.
>> > > > [Expectation]
>> > > > the Impress can finish when click the Esc key.
>> > > >
>> > > > Regards
>> > > > songzhanjun
>> > > >
>> > > >
>> >
>>
>>