Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
a5e3711f
Commit
a5e3711f
authored
Jun 07, 2002
by
Sam Hocevar
Browse files
* ./plugins/win32/*: tried to port the Win32 interface to the new API. Seems
to be still crashing.
parent
5c13c83c
Changes
20
Hide whitespace changes
Inline
Side-by-side
include/vlc/intf.h
View file @
a5e3711f
...
...
@@ -2,7 +2,7 @@
* intf.h: interface header for vlc
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: intf.h,v 1.
1
2002/06/0
1 12:31:58
sam Exp $
* $Id: intf.h,v 1.
2
2002/06/0
7 23:53:44
sam Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -36,7 +36,7 @@ extern "C" {
*****************************************************************************/
#include
"interface.h"
#include
"intf_eject.h"
#include
"playlist.h"
#include
"
vlc_
playlist.h"
#include
"stream_control.h"
#include
"input_ext-intf.h"
...
...
include/vlc_common.h
View file @
a5e3711f
...
...
@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.
6
2002/06/0
4 00:11:12
sam Exp $
* $Id: vlc_common.h,v 1.
7
2002/06/0
7 23:53:44
sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
...
...
@@ -24,6 +24,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Compiler-specific workarounds
*****************************************************************************/
#if defined( __BORLANDC__ )
# undef HAVE_VARIADIC_MACROS
# undef HAVE_STDINT_H
#endif
/*****************************************************************************
* Required system headers
*****************************************************************************/
...
...
@@ -200,13 +208,6 @@ VLC_DECLARE_STRUCT(iso639_lang)
#include
"vlc_threads.h"
/*****************************************************************************
* Compiler-specific workarounds
*****************************************************************************/
#if defined( __BORLANDC__ )
# undef HAVE_VARIADIC_MACROS
#endif
/*****************************************************************************
* Common structure members
*****************************************************************************/
...
...
include/playlist.h
→
include/
vlc_
playlist.h
View file @
a5e3711f
...
...
@@ -2,7 +2,7 @@
* vlc_playlist.h : Playlist functions
*****************************************************************************
* Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
* $Id: playlist.h,v 1.
7
2002/06/07
19:54:37
sam Exp $
* $Id:
vlc_
playlist.h,v 1.
1
2002/06/07
23:53:44
sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
plugins/macosx/intf_vlc_wrapper.m
View file @
a5e3711f
...
...
@@ -2,7 +2,7 @@
* intf_vlc_wrapper.c: MacOS X plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.m,v 1.1
2
2002/06/0
2
2
2:31:52 massiot
Exp $
* $Id: intf_vlc_wrapper.m,v 1.1
3
2002/06/0
7
2
3:53:44 sam
Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
...
...
@@ -33,7 +33,7 @@
#include
<videolan/vlc.h>
#include
"interface.h"
#include
"
intf
_playlist.h"
#include
"
vlc
_playlist.h"
#include
"intf_eject.h"
#include
"video.h"
...
...
plugins/win32/control.cpp
View file @
a5e3711f
...
...
@@ -44,55 +44,42 @@ bool ControlBack( TObject *Sender )
bool
ControlStop
(
TObject
*
Sender
)
{
if
(
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
!=
NULL
)
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
/* end playing item */
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
/* update playlist */
vlc_mutex_lock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
p_intfGlobal
->
p_vlc
->
p_playlist
->
i_index
--
;
p_intfGlobal
->
p_vlc
->
p_playlist
->
b_stopped
=
1
;
vlc_mutex_unlock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
return
false
;
}
playlist_Stop
(
p_playlist
);
vlc_object_release
(
p_playlist
);
return
true
;
}
bool
ControlPlay
(
TObject
*
Sender
)
{
if
(
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
!=
NULL
)
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
p_intfGlobal
->
p_sys
->
p_window
->
MenuOpenFileClick
(
Sender
);
return
false
;
}
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
if
(
p_playlist
->
i_size
)
{
input_SetStatus
(
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
],
INPUT_STATUS_PLAY
);
p_intfGlobal
->
p_vlc
->
p_playlist
->
b_stopped
=
0
;
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
playlist_Play
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
else
{
vlc_mutex_lock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
if
(
p_intfGlobal
->
p_vlc
->
p_playlist
->
b_stopped
)
{
if
(
p_intfGlobal
->
p_vlc
->
p_playlist
->
i_size
)
{
vlc_mutex_unlock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
intf_PlaylistJumpto
(
p_intfGlobal
->
p_vlc
->
p_playlist
,
p_intfGlobal
->
p_vlc
->
p_playlist
->
i_index
);
}
else
{
vlc_mutex_unlock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
p_intfGlobal
->
p_sys
->
p_window
->
MenuOpenFileClick
(
Sender
);
}
}
else
{
vlc_mutex_unlock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
}
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
p_intfGlobal
->
p_sys
->
p_window
->
MenuOpenFileClick
(
Sender
);
}
return
true
;
...
...
@@ -101,13 +88,9 @@ bool ControlPlay( TObject *Sender )
bool
ControlPause
(
TObject
*
Sender
)
{
if
(
p_intfGlobal
->
p_
vlc
->
p_input_bank
->
p
p
_input
[
0
]
!=
NULL
)
if
(
p_intfGlobal
->
p_
sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
],
INPUT_STATUS_PAUSE
);
vlc_mutex_lock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
p_intfGlobal
->
p_vlc
->
p_playlist
->
b_stopped
=
0
;
vlc_mutex_unlock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
input_SetStatus
(
p_intfGlobal
->
p_sys
->
p_input
,
INPUT_STATUS_PAUSE
);
}
return
true
;
...
...
@@ -116,13 +99,9 @@ bool ControlPause( TObject *Sender )
bool
ControlSlow
(
TObject
*
Sender
)
{
if
(
p_intfGlobal
->
p_
vlc
->
p_input_bank
->
p
p
_input
[
0
]
!=
NULL
)
if
(
p_intfGlobal
->
p_
sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
],
INPUT_STATUS_SLOWER
);
vlc_mutex_lock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
p_intfGlobal
->
p_vlc
->
p_playlist
->
b_stopped
=
0
;
vlc_mutex_unlock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
input_SetStatus
(
p_intfGlobal
->
p_sys
->
p_input
,
INPUT_STATUS_SLOWER
);
}
return
true
;
...
...
@@ -131,13 +110,9 @@ bool ControlSlow( TObject *Sender )
bool
ControlFast
(
TObject
*
Sender
)
{
if
(
p_intfGlobal
->
p_
vlc
->
p_input_bank
->
p
p
_input
[
0
]
!=
NULL
)
if
(
p_intfGlobal
->
p_
sys
->
p_input
!=
NULL
)
{
input_SetStatus
(
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
],
INPUT_STATUS_FASTER
);
vlc_mutex_lock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
p_intfGlobal
->
p_vlc
->
p_playlist
->
b_stopped
=
0
;
vlc_mutex_unlock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
input_SetStatus
(
p_intfGlobal
->
p_sys
->
p_input
,
INPUT_STATUS_FASTER
);
}
return
true
;
...
...
plugins/win32/disc.cpp
View file @
a5e3711f
...
...
@@ -64,7 +64,14 @@ void __fastcall TDiscDlg::BitBtnCancelClick( TObject *Sender )
void
__fastcall
TDiscDlg
::
BitBtnOkClick
(
TObject
*
Sender
)
{
AnsiString
Device
,
Source
,
Method
,
Title
,
Chapter
;
int
i_end
=
p_intfGlobal
->
p_vlc
->
p_playlist
->
i_size
;
playlist_t
*
p_playlist
;
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
Hide
();
...
...
@@ -86,20 +93,13 @@ void __fastcall TDiscDlg::BitBtnOkClick( TObject *Sender )
/* Build source name and add it to playlist */
Source
=
Method
+
":"
+
Device
+
"@"
+
Title
+
","
+
Chapter
;
intf_P
laylistAdd
(
p_
intfGlobal
->
p_vlc
->
p_playlist
,
PLAYLIST_
END
,
Source
.
c_str
()
);
p
laylist
_
Add
(
p_
playlist
,
Source
.
c_str
()
,
PLAYLIST_
APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
/* update the display */
p_intfGlobal
->
p_sys
->
p_playlist
->
UpdateGrid
(
p_intfGlobal
->
p_vlc
->
p_playlist
);
/* stop current item, select added item */
if
(
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
!=
NULL
)
{
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
}
p_intfGlobal
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
intf_PlaylistJumpto
(
p_intfGlobal
->
p_vlc
->
p_playlist
,
i_end
-
1
);
vlc_object_release
(
p_playlist
);
}
//---------------------------------------------------------------------------
void
__fastcall
TDiscDlg
::
RadioGroupTypeClick
(
TObject
*
Sender
)
...
...
plugins/win32/intf_win32.cpp
View file @
a5e3711f
...
...
@@ -77,6 +77,8 @@ static int intf_Open( intf_thread_t *p_intf )
/* Initialize Win32 thread */
p_intf
->
p_sys
->
b_playing
=
0
;
p_intf
->
p_sys
->
b_popup_changed
=
0
;
p_intf
->
p_sys
->
p_input
=
NULL
;
p_intf
->
p_sys
->
i_playing
=
-
1
;
p_intf
->
p_sys
->
b_slider_free
=
1
;
...
...
@@ -88,6 +90,11 @@ static int intf_Open( intf_thread_t *p_intf )
*****************************************************************************/
static
void
intf_Close
(
intf_thread_t
*
p_intf
)
{
if
(
p_intf
->
p_sys
->
p_input
)
{
vlc_object_release
(
p_intf
->
p_sys
->
p_input
);
}
msg_Unsubscribe
(
p_intf
,
p_intf
->
p_sys
->
p_sub
);
/* Destroy structure */
...
...
@@ -100,7 +107,7 @@ static void intf_Close( intf_thread_t *p_intf )
static
void
intf_Run
(
intf_thread_t
*
p_intf
)
{
p_intf
->
p_sys
->
p_window
=
new
TMainFrameDlg
(
NULL
);
p_intf
->
p_sys
->
p_play
list
=
new
TPlaylistDlg
(
NULL
);
p_intf
->
p_sys
->
p_play
win
=
new
TPlaylistDlg
(
NULL
);
p_intf
->
p_sys
->
p_messages
=
new
TMessagesDlg
(
NULL
);
/* show main window and wait until it is closed */
...
...
@@ -110,7 +117,7 @@ static void intf_Run( intf_thread_t *p_intf )
if
(
p_intf
->
p_sys
->
p_network
)
delete
p_intf
->
p_sys
->
p_network
;
if
(
p_intf
->
p_sys
->
p_preferences
)
delete
p_intf
->
p_sys
->
p_preferences
;
delete
p_intf
->
p_sys
->
p_messages
;
delete
p_intf
->
p_sys
->
p_play
list
;
delete
p_intf
->
p_sys
->
p_play
win
;
}
/*****************************************************************************
...
...
@@ -138,16 +145,30 @@ int Win32Manage( intf_thread_t *p_intf )
p_intf
->
p_sys
->
p_messages
->
UpdateLog
();
/* Update the playlist */
p_intf
->
p_sys
->
p_play
list
->
Manage
(
p_intf
);
p_intf
->
p_sys
->
p_play
win
->
Manage
(
p_intf
);
if
(
p_intf
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
!=
NULL
)
/* Update the input */
if
(
p_intf
->
p_sys
->
p_input
==
NULL
)
{
p_intf
->
p_sys
->
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
}
else
if
(
p_intf
->
p_sys
->
p_input
->
b_dead
)
{
vlc_object_release
(
p_intf
->
p_sys
->
p_input
);
p_intf
->
p_sys
->
p_input
=
NULL
;
}
if
(
p_intf
->
p_sys
->
p_input
)
{
vlc_mutex_lock
(
&
p_intf
->
p_vlc
->
p_input_bank
->
p
p
_input
[
0
]
->
stream
.
stream_lock
)
;
input_thread_t
*
p_input
=
p_intf
->
p_sys
->
p_input
;
if
(
!
p_intf
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
b_die
)
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
if
(
!
p_input
->
b_die
)
{
/* New input or stream map change */
if
(
p_in
tf
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
stream
.
b_changed
)
if
(
p_in
put
->
stream
.
b_changed
)
{
p_intf
->
p_sys
->
p_window
->
ModeManage
();
SetupMenus
(
p_intf
);
...
...
@@ -155,13 +176,12 @@ int Win32Manage( intf_thread_t *p_intf )
}
/* Manage the slider */
if
(
p_intf
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
stream
.
b_seekable
&&
p_intf
->
p_sys
->
b_playing
)
if
(
p_input
->
stream
.
b_seekable
&&
p_intf
->
p_sys
->
b_playing
)
{
TTrackBar
*
TrackBar
=
p_intf
->
p_sys
->
p_window
->
TrackBar
;
off_t
NewValue
=
TrackBar
->
Position
;
#define p_area p_in
tf->p_vlc->p_input_bank->pp_input[0]
->stream.p_selected_area
#define p_area p_in
put
->stream.p_selected_area
/* If the user hasn't touched the slider since the last time,
* then the input can safely change it */
if
(
NewValue
==
p_intf
->
p_sys
->
OldValue
)
...
...
@@ -179,9 +199,9 @@ int Win32Manage( intf_thread_t *p_intf )
(
off_t
)
SLIDER_MAX_VALUE
;
/* release the lock to be able to seek */
vlc_mutex_unlock
(
&
p_in
tf
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
stream
.
stream_lock
);
input_Seek
(
p_in
tf
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
p_this
,
i_seek
,
INPUT_SEEK_SET
);
vlc_mutex_lock
(
&
p_in
tf
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
stream
.
stream_lock
);
vlc_mutex_unlock
(
&
p_in
put
->
stream
.
stream_lock
);
input_Seek
(
p_in
put
,
i_seek
,
INPUT_SEEK_SET
);
vlc_mutex_lock
(
&
p_in
put
->
stream
.
stream_lock
);
/* Update the old value */
p_intf
->
p_sys
->
OldValue
=
NewValue
;
...
...
@@ -194,14 +214,14 @@ int Win32Manage( intf_thread_t *p_intf )
}
if
(
p_intf
->
p_sys
->
i_part
!=
p_in
tf
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
stream
.
p_selected_area
->
i_part
)
p_in
put
->
stream
.
p_selected_area
->
i_part
)
{
// p_intf->p_sys->b_chapter_update = 1;
SetupMenus
(
p_intf
);
}
}
vlc_mutex_unlock
(
&
p_in
tf
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
stream
.
stream_lock
);
vlc_mutex_unlock
(
&
p_in
put
->
stream
.
stream_lock
);
}
else
if
(
p_intf
->
p_sys
->
b_playing
&&
!
p_intf
->
p_vlc
->
b_die
)
{
...
...
@@ -209,9 +229,6 @@ int Win32Manage( intf_thread_t *p_intf )
p_intf
->
p_sys
->
b_playing
=
0
;
}
/* Manage core vlc functions through the callback */
p_intf
->
pf_manage
(
p_intf
);
if
(
p_intf
->
p_vlc
->
b_die
)
{
vlc_mutex_unlock
(
&
p_intf
->
change_lock
);
...
...
plugins/win32/mainframe.cpp
View file @
a5e3711f
...
...
@@ -91,21 +91,21 @@ void __fastcall TMainFrameDlg::TrackBarChange( TObject *Sender )
* the stream. It is called whenever the slider changes its value.
* The lock has to be taken before the function is called */
// vlc_mutex_lock( &p_intfGlobal->p_
vlc->p_input_bank
->p
p
_input
[0]
->stream.stream_lock );
// vlc_mutex_lock( &p_intfGlobal->p_
sys
->p_input->stream.stream_lock );
if
(
p_intfGlobal
->
p_
vlc
->
p_input_bank
->
p
p
_input
[
0
]
!=
NULL
)
if
(
p_intfGlobal
->
p_
sys
->
p_input
!=
NULL
)
{
#define p_area p_intfGlobal->p_
vlc->p_input_bank
->p
p
_input
[0]
->stream.p_selected_area
#define p_area p_intfGlobal->p_
sys
->p_input->stream.p_selected_area
char
psz_time
[
OFFSETTOTIME_MAX_SIZE
];
off_t
Value
=
TrackBar
->
Position
;
GroupBoxSlider
->
Caption
=
input_OffsetToTime
(
p_intfGlobal
->
p_
vlc
->
p_input_bank
->
p
p
_input
[
0
]
,
psz_time
,
input_OffsetToTime
(
p_intfGlobal
->
p_
sys
->
p_input
,
psz_time
,
(
p_area
->
i_size
*
Value
)
/
(
off_t
)
SLIDER_MAX_VALUE
);
#undef p_area
}
// vlc_mutex_unlock( &p_intfGlobal->p_
vlc->p_input_bank
->p
p
_input
[0]
->stream.stream_lock );
// vlc_mutex_unlock( &p_intfGlobal->p_
sys
->p_input->stream.stream_lock );
}
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
FormClose
(
TObject
*
Sender
,
...
...
@@ -128,26 +128,28 @@ void __fastcall TMainFrameDlg::FormClose( TObject *Sender,
****************************************************************************/
void
__fastcall
TMainFrameDlg
::
MenuOpenFileClick
(
TObject
*
Sender
)
{
int
i_end
=
p_intfGlobal
->
p_vlc
->
p_playlist
->
i_size
;
AnsiString
FileName
;
playlist_t
*
p_playlist
;
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
if
(
OpenDialog1
->
Execute
()
)
{
/* add the new file to the interface playlist */
FileName
=
OpenDialog1
->
FileName
;
intf_P
laylistAdd
(
p_
intfGlobal
->
p_vlc
->
p_playlist
,
PLAYLIST_END
,
(
char
*
)
FileName
.
c_str
()
);
p
laylist
_
Add
(
p_
playlist
,
(
char
*
)
FileName
.
c_str
()
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
/* update the plugin display */
p_intfGlobal
->
p_sys
->
p_playlist
->
UpdateGrid
(
p_intfGlobal
->
p_vlc
->
p_playlist
);
/* end current item, select added item */
if
(
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
!=
NULL
)
{
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
}
intf_PlaylistJumpto
(
p_intfGlobal
->
p_vlc
->
p_playlist
,
i_end
-
1
);
p_intfGlobal
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
};
vlc_object_release
(
p_playlist
);
}
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
MenuOpenDiscClick
(
TObject
*
Sender
)
...
...
@@ -184,27 +186,39 @@ void __fastcall TMainFrameDlg::MenuHideinterfaceClick( TObject *Sender )
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
MenuFullscreenClick
(
TObject
*
Sender
)
{
if
(
p_intfGlobal
->
p_vlc
->
p_vout_bank
->
i_count
)
{
vlc_mutex_lock
(
&
p_intfGlobal
->
p_vlc
->
p_vout_bank
->
pp_vout
[
0
]
->
change_lock
);
p_intfGlobal
->
p_vlc
->
p_vout_bank
->
pp_vout
[
0
]
->
i_changes
|=
VOUT_FULLSCREEN_CHANGE
;
vout_thread_t
*
p_vout
;
vlc_mutex_unlock
(
&
p_intfGlobal
->
p_vlc
->
p_vout_bank
->
pp_vout
[
0
]
->
change_lock
);
p_vout
=
(
vout_thread_t
*
)
vlc_object_find
(
p_intfGlobal
->
p_sys
->
p_input
,
VLC_OBJECT_VOUT
,
FIND_CHILD
);
if
(
p_vout
==
NULL
)
{
return
;
}
p_vout
->
i_changes
|=
VOUT_FULLSCREEN_CHANGE
;
vlc_object_release
(
p_vout
);
}
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
MenuPlaylistClick
(
TObject
*
Sender
)
{
TPlaylistDlg
*
p_play
list
=
p_intfGlobal
->
p_sys
->
p_play
list
;
if
(
p_play
list
->
Visible
)
TPlaylistDlg
*
p_play
win
=
p_intfGlobal
->
p_sys
->
p_play
win
;
if
(
p_play
win
->
Visible
)
{
p_play
list
->
Hide
();
p_play
win
->
Hide
();
}
else
{
p_playlist
->
UpdateGrid
(
p_intfGlobal
->
p_vlc
->
p_playlist
);
p_playlist
->
Show
();
playlist_t
*
p_playlist
;
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
p_playwin
->
UpdateGrid
(
p_playlist
);
vlc_object_release
(
p_playlist
);
p_playwin
->
Show
();
}
}
//---------------------------------------------------------------------------
...
...
@@ -282,17 +296,26 @@ void __fastcall TMainFrameDlg::ToolButtonFastClick( TObject *Sender )
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
ToolButtonPrevClick
(
TObject
*
Sender
)
{
p_intfGlobal
->
p_sys
->
p_play
list
->
Previous
();
p_intfGlobal
->
p_sys
->
p_play
win
->
Previous
();
}
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
ToolButtonNextClick
(
TObject
*
Sender
)
{
p_intfGlobal
->
p_sys
->
p_play
list
->
Next
();
p_intfGlobal
->
p_sys
->
p_play
win
->
Next
();
}
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
ToolButtonEjectClick
(
TObject
*
Sender
)
{
AnsiString
Device
=
""
;
char
*
psz_current
;
playlist_t
*
p_playlist
;
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
/*
* Get the active input
...
...
@@ -300,29 +323,35 @@ void __fastcall TMainFrameDlg::ToolButtonEjectClick( TObject *Sender )
* If it's neither a VCD nor a DVD, then return
*/
if
(
p_intfGlobal
->
p_vlc
->
p_playlist
->
current
.
psz_name
!=
NULL
)
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
psz_current
=
p_playlist
->
pp_items
[
p_playlist
->
i_index
]
->
psz_name
;
if
(
psz_current
!=
NULL
)
{
if
(
strncmp
(
p
_intfGlobal
->
p_vlc
->
p_playlist
->
current
.
psz_name
,
"dvd"
,
3
)
||
strncmp
(
p
_intfGlobal
->
p_vlc
->
p_playlist
->
current
.
psz_name
,
"vcd"
,
3
)
)
if
(
strncmp
(
p
sz_current
,
"dvd"
,
3
)
||
strncmp
(
p
sz_current
,
"vcd"
,
3
)
)
{
/* Determine the device name by omitting the first 4 characters
* and keeping 3 characters */
Device
=
strdup
(
(
p
_intfGlobal
->
p_vlc
->
p_playlist
->
current
.
psz_name
+
4
)
);
Device
=
strdup
(
(
p
sz_current
+
4
)
);
Device
=
Device
.
SubString
(
1
,
2
);
}
}
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
if
(
Device
==
""
)
{
return
;
}
/* If there's a stream playing, we aren't allowed to eject ! */
if
(
p_in
put_bank
->
p
p_input
[
0
]
==
NULL
)
if
(
p_in
tfGlobal
->
p_sys
->
p_input
==
NULL
)
{
intf_WarnMsg
(
4
,
"intf:
ejecting %s"
,
Device
.
c_str
()
);
msg_Dbg
(
p_intfGlobal
,
"
ejecting %s"
,
Device
.
c_str
()
);
intf_Eject
(
Device
.
c_str
()
);
intf_Eject
(
p_intfGlobal
,
Device
.
c_str
()
);
}
}
//--------------------------------------------------------------------------
...
...
@@ -431,95 +460,89 @@ void __fastcall TMainFrameDlg::PopupNetworkStreamClick( TObject *Sender )
void
__fastcall
TMainFrameDlg
::
ButtonTitlePrevClick
(
TObject
*
Sender
)
{
intf_thread_t
*
p_intf
;
input_bank_t
*
p_input_bank
;
input_area_t
*
p_area
;
int
i_id
;
p_intf
=
p_intfGlobal
;
p_input_bank
=
p_intf
->
p_vlc
->
p_input_bank
;
i_id
=
p_input_bank
->
pp_input
[
0
]
->
stream
.
p_selected_area
->
i_id
-
1
;
i_id
=
p_intf
->
p_sys
->
p_input
->
stream
.
p_selected_area
->
i_id
-
1
;
/* Disallow area 0 since it is used for video_ts.vob */
if
(
i_id
>
0
)
{
p_area
=
p_in
put_bank
->
p
p
_input
[
0
]
->
stream
.
pp_areas
[
i_id
];
input_ChangeArea
(
p_in
put_bank
->
p
p
_input
[
0
]
,
(
input_area_t
*
)
p_area
);
p_area
=
p_in
tf
->
p_sys
->
p_input
->
stream
.
pp_areas
[
i_id
];
input_ChangeArea
(
p_in
tf
->
p_sys
->
p_input
,
(
input_area_t
*
)
p_area
);
input_SetStatus
(
p_in
put_bank
->
p
p
_input
[
0
]
,
INPUT_STATUS_PLAY
);
input_SetStatus
(
p_in
tf
->
p_sys
->
p_input
,
INPUT_STATUS_PLAY
);
p_intf
->
p_sys
->
b_title_update
=
1
;
vlc_mutex_lock
(
&
p_in
put_bank
->
p
p
_input
[
0
]
->
stream
.
stream_lock
);
vlc_mutex_lock
(
&
p_in
tf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
SetupMenus
(
p_intf
);
vlc_mutex_unlock
(
&
p_in
put_bank
->
p
p
_input
[
0
]
->
stream
.
stream_lock
);
vlc_mutex_unlock
(
&
p_in
tf
->
p_sys
->
p_input
->
stream
.
stream_lock
);
}
}
//---------------------------------------------------------------------------
void
__fastcall
TMainFrameDlg
::
ButtonTitleNextClick
(
TObject
*
Sender
)
{
intf_thread_t
*
p_intf
;
input_bank_t
*
p_input_bank
;
input_area_t
*
p_area
;
int
i_id
;