Jump to content

VLC (Media Player) UDF + GUI Tabs = Bug?

Recommended Posts

I have a GUI that I created that has Tabs in it. On one of the tabs I'm using the

I was using VLC 1.1.11 and it was working fine. I am trying to upgrade to VLC 2.0.0 and as far as I can tell everything works fine.

EXCEPT, there is a feature with VLC that enables you to double click the video and it will expand to fullscreen mode. With VLC 1.1.11 and tabs it worked, with version 2.0.0 and tabs it doesn't work.

I have narrowed it down to something between VLC 2.0.0 and the GUI Tabs. Using this code it will work fine. if you uncomment the lines that create the Tab, it will not work. If the only problem was that it didn't do anything, I could live with that, but once you double click the video it effectively breaks the entire GUI. Nothing in the GUI responds anymore until you CTL+ALT+DEL your system and then exit back to the desktop.

Anybody have any ideas on how to fix this?

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <VLC.au3>

Dim $msg


GUICreate("TEST",640,442, -1, -1, -1, $WS_EX_ACCEPTFILES)
$Button_3 = GUICtrlCreateButton("Exit", 380, 410, 100)

;$hTab = GUICtrlCreateTab(10, 10, 620, 396)

$vlc1 = _GUICtrlVLC_Create(20, 58, 512, 288)
if $vlc1 = False then
msgbox(0, "Test", "_GUICtrlVLC_Create failed." & @CRLF & _
         "The most likely cause is that you don't have VLC installed." & @CRLF & _
         "Make sure VLC, and the ActiveX component, is installed.")

$button = GUICtrlCreateButton("Wildlife", 535, 82, 80, 20)
$stop_button = GUICtrlCreateButton("Stop", 20, 348, 80, 20)
GUICtrlSetState($stop_button, $GUI_DISABLE)
$fullscreen_button = GUICtrlCreateButton("FullScreen", 120, 348, 80, 20)
GUICtrlSetState($fullscreen_button, $GUI_DISABLE)
$channel_label = GUICtrlCreateLabel("", 230, 351, 136, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("Volume", 362, 353, 40, 20)
$volume_slider = GUICtrlCreateSlider(404, 348, 80, 30)
GUICtrlSetLimit($volume_slider, 200)
GUICtrlSetData($volume_slider, 25)
$mute_button = GUICtrlCreateButton("Mute", 486, 348, 40, 20)



While 1
  If $msg = $GUI_EVENT_CLOSE Then

  If $msg = $Button_3 Then

  If $msg = $volume_slider Then
   _GUICtrlVLC_SetVolume($vlc1, GUICtrlRead($volume_slider))

  If $msg = $mute_button Then
   If _GUICtrlVLC_GetMute($vlc1) = True Then
    _GUICtrlVLC_SetMute($vlc1, False)
    _GUICtrlVLC_SetMute($vlc1, True)

  If $msg = $fullscreen_button Then

  if $msg = $stop_button Then
    GUICtrlSetState($stop_button, $GUI_DISABLE)
    GUICtrlSetState($fullscreen_button, $GUI_DISABLE)
    GUICtrlSetData($channel_label, "")

   Case $msg = $button
    $ch1 = _GUICtrlVLC_Add($vlc1, "file:///C:/Users/Public/Videos/Sample Videos/Wildlife.wmv")
    PressPlay("Wildlife", $ch1)

$msg = GUIGetMsg()


Func PressPlay($channelID, $chnumber)
_GUICtrlVLC_Play($vlc1, $chnumber)
GUICtrlSetState($stop_button, $GUI_ENABLE)
GUICtrlSetState($fullscreen_button, $GUI_ENABLE)
GUICtrlSetData($channel_label, $channelID)
Edited by thepaulguy
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...