[vlc-devel] [PATCH] win32: use PostMessage in event handlers to avoid deadlocks

Sergey Radionov rsatom at gmail.com
Tue Feb 7 04:02:04 CET 2012


2012/2/7 Rafaël Carré <funman at videolan.org>:
> Le 12-02-06 21:48, Sergey Radionov a écrit :
>> 2012/2/7 Rafaël Carré <funman at videolan.org>:
>>> Le 12-02-06 21:27, Sergey Radionov a écrit :
>>>> 2012/2/4 Sergey Radionov <rsatom at gmail.com>:
>>>>> when main thread wait something. It's fixing "stop" bug.
>>>>> ---
>>>>>  common/win32_fullscreen.cpp |    8 ++++----
>>>>>  1 files changed, 4 insertions(+), 4 deletions(-)
>>>>>
>>>>> diff --git a/common/win32_fullscreen.cpp b/common/win32_fullscreen.cpp
>>>>> index e1d7f0a..c0d8ab3 100644
>>>>> --- a/common/win32_fullscreen.cpp
>>>>> +++ b/common/win32_fullscreen.cpp
>>>>> @@ -498,7 +498,7 @@ void VLCControlsWnd::SetVideoPosScrollRangeByVideoLen()
>>>>>
>>>>>  void VLCControlsWnd::SetVideoPosScrollPosByVideoPos(libvlc_time_t CurScrollPos)
>>>>>  {
>>>>> -    SendMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (CurScrollPos >> VideoPosShiftBits), 0);
>>>>> +    PostMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (CurScrollPos >> VideoPosShiftBits), 0);
>>>>>  }
>>>>>
>>>>>  void VLCControlsWnd::SetVideoPos(float Pos) //0-start, 1-end
>>>>> @@ -561,15 +561,15 @@ void VLCControlsWnd::handle_input_state_event(const libvlc_event_t* event)
>>>>>     switch( event->type )
>>>>>     {
>>>>>         case libvlc_MediaPlayerPlaying:
>>>>> -            SendMessage(hPlayPauseButton, BM_SETIMAGE,
>>>>> +            PostMessage(hPlayPauseButton, BM_SETIMAGE,
>>>>>                         (WPARAM)IMAGE_BITMAP, (LPARAM)RC().hPauseBitmap);
>>>>>             break;
>>>>>         case libvlc_MediaPlayerPaused:
>>>>> -            SendMessage(hPlayPauseButton, BM_SETIMAGE,
>>>>> +            PostMessage(hPlayPauseButton, BM_SETIMAGE,
>>>>>                         (WPARAM)IMAGE_BITMAP, (LPARAM)RC().hPlayBitmap);
>>>>>             break;
>>>>>         case libvlc_MediaPlayerStopped:
>>>>> -            SendMessage(hPlayPauseButton, BM_SETIMAGE,
>>>>> +            PostMessage(hPlayPauseButton, BM_SETIMAGE,
>>>>>                         (WPARAM)IMAGE_BITMAP, (LPARAM)RC().hPlayBitmap);
>>>>>             break;
>>>>>     }
>>>>> --
>>>>> 1.7.7.1.msysgit.0
>>>>>
>>>>
>>>> Please don't forget it before vlc 2.0 release...
>>>
>>> Can't you commit on npapi? I thought you would apply it yourself
>> No, I have no commit access.
>
> I think you should get access then.
maybe.. I'm just afraid break something :)

>
> commit c93a88b2835d7006132050cfe80e76653e909194
> Author:     Sergey Radionov <RSATom at gmail.com>
> AuthorDate: Mon Jan 2 23:34:28 2012 +0700
> Commit:     Sergey Radionov <RSATom at gmail.com>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> If you didn't commit this yourself, then who did??
not I am:) I'm sure :)

>
> CommitDate: Mon Jan 2 23:34:28 2012 +0700
Jan 2 was not easy day for someone, I think :)

>
>    npapi win32, ActiveX: added VLC cone displaying when no video playing.
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list