Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a5e3711f
Commit
a5e3711f
authored
Jun 07, 2002
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./plugins/win32/*: tried to port the Win32 interface to the new API. Seems
to be still crashing.
parent
5c13c83c
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
338 additions
and
311 deletions
+338
-311
include/vlc/intf.h
include/vlc/intf.h
+2
-2
include/vlc_common.h
include/vlc_common.h
+9
-8
include/vlc_playlist.h
include/vlc_playlist.h
+1
-1
plugins/macosx/intf_vlc_wrapper.m
plugins/macosx/intf_vlc_wrapper.m
+2
-2
plugins/win32/control.cpp
plugins/win32/control.cpp
+29
-54
plugins/win32/disc.cpp
plugins/win32/disc.cpp
+12
-12
plugins/win32/intf_win32.cpp
plugins/win32/intf_win32.cpp
+35
-18
plugins/win32/mainframe.cpp
plugins/win32/mainframe.cpp
+98
-77
plugins/win32/menu.cpp
plugins/win32/menu.cpp
+56
-56
plugins/win32/messages.cpp
plugins/win32/messages.cpp
+1
-1
plugins/win32/network.cpp
plugins/win32/network.cpp
+22
-22
plugins/win32/playlist.cpp
plugins/win32/playlist.cpp
+46
-36
plugins/win32/preferences.cpp
plugins/win32/preferences.cpp
+9
-9
plugins/win32/win32_common.h
plugins/win32/win32_common.h
+4
-1
src/input/input.c
src/input/input.c
+2
-2
src/libvlc.c
src/libvlc.c
+2
-2
src/misc/modules.c
src/misc/modules.c
+2
-2
src/misc/netutils.c
src/misc/netutils.c
+2
-2
src/misc/objects.c
src/misc/objects.c
+2
-2
src/playlist/playlist.c
src/playlist/playlist.c
+2
-2
No files found.
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/01 12:31:58
sam Exp $
* $Id: intf.h,v 1.
2 2002/06/07 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/04 00:11:12
sam Exp $
* $Id: vlc_common.h,v 1.
7 2002/06/07 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/02 22:31:52 massiot
Exp $
* $Id: intf_vlc_wrapper.m,v 1.1
3 2002/06/07 23: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
->
pp_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
->
pp_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
->
pp_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_PlaylistAdd
(
p_intfGlobal
->
p_vlc
->
p_playlist
,
PLAYLIST_END
,
Source
.
c_str
()
);
playlist_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
->
pp_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
This diff is collapsed.
Click to expand it.
plugins/win32/menu.cpp
View file @
a5e3711f
This diff is collapsed.
Click to expand it.
plugins/win32/messages.cpp
View file @
a5e3711f
...
...
@@ -89,7 +89,7 @@ void __fastcall TMessagesDlg::UpdateLog()
/* Limit log size */
i_count
=
RichEditMessages
->
Lines
->
Count
;
i_max_lines
=
config_GetInt
Variable
(
"intfwin-max-lines"
);
i_max_lines
=
config_GetInt
(
p_intfGlobal
,
"intfwin-max-lines"
);
if
(
i_max_lines
>
0
)
{
for
(
i_del
=
0
;
i_del
<=
i_count
-
i_max_lines
;
i_del
++
)
...
...
plugins/win32/network.cpp
View file @
a5e3711f
...
...
@@ -90,33 +90,33 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
AnsiString
Channel
=
ComboBoxCSAddress
->
Text
;
unsigned
int
i_channel_port
=
SpinEditCSPort
->
Value
;
unsigned
int
i_port
;
int
i_end
=
p_intfGlobal
->
p_vlc
->
p_playlist
->
i_size
;
playlist_t
*
p_playlist
;
Hide
();
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
/* 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
;
}
Hide
();
/* Check which option was chosen */
switch
(
OldRadioValue
)
{
/* UDP */
case
0
:
config_PutInt
Variable
(
"network-channel"
,
FALSE
);
config_PutInt
(
p_intfGlobal
,
"network-channel"
,
FALSE
);
i_port
=
SpinEditUDPPort
->
Value
;
/* Build source name */
Source
=
"udp:@:"
+
IntToStr
(
i_port
);
intf_PlaylistAdd
(
p_main
->
p_playlist
,
PLAYLIST_END
,
Source
.
c_str
()
);
playlist_Add
(
p_playlist
,
Source
.
c_str
(),
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
/* update the display */
p_intfGlobal
->
p_sys
->
p_playlist
->
UpdateGrid
(
p_main
->
p_playlist
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
p_intfGlobal
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
break
;
/* UDP Multicast */
...
...
@@ -128,12 +128,11 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
/* Build source name */
Source
=
"udp:@"
+
Address
+
":"
+
IntToStr
(
i_port
);
intf_PlaylistAdd
(
p_main
->
p_playlist
,
PLAYLIST_END
,
Source
.
c_str
()
);
playlist_Add
(
p_playlist
,
Source
.
c_str
(),
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
/* update the display */
p_intfGlobal
->
p_sys
->
p_playlist
->
UpdateGrid
(
p_main
->
p_playlist
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
p_intfGlobal
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
break
;
/* Channel server */
...
...
@@ -142,9 +141,9 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
config_PutPsz
(
p_intfGlobal
,
"channel-server"
,
Channel
.
c_str
()
);
config_PutInt
(
p_intfGlobal
,
"channel-port"
,
i_channel_port
);
if
(
p_
main
->
p_channel
==
NULL
)
if
(
p_
intfGlobal
->
p_vlc
->
p_channel
==
NULL
)
{
network_ChannelCreate
();
network_ChannelCreate
(
p_intfGlobal
);
}
p_intfGlobal
->
p_sys
->
b_playing
=
1
;
...
...
@@ -165,14 +164,15 @@ void __fastcall TNetworkDlg::BitBtnOkClick( TObject *Sender )
Source
=
"http://"
+
Address
;
}
intf_PlaylistAdd
(
p_main
->
p_playlist
,
PLAYLIST_END
,
Source
.
c_str
()
);
playlist_Add
(
p_playlist
,
Source
.
c_str
(),
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
/* update the display */
p_intfGlobal
->
p_sys
->
p_playlist
->
UpdateGrid
(
p_main
->
p_playlist
);
intf_PlaylistJumpto
(
p_main
->
p_playlist
,
i_end
-
1
);
p_intfGlobal
->
p_sys
->
p_playwin
->
UpdateGrid
(
p_playlist
);
break
;
}
vlc_object_release
(
p_playlist
);
}
//---------------------------------------------------------------------------
void
__fastcall
TNetworkDlg
::
ChangeEnabled
(
int
i_selected
)
...
...
plugins/win32/playlist.cpp
View file @
a5e3711f
...
...
@@ -91,6 +91,13 @@ void __fastcall TPlaylistDlg::ListViewPlaylistDblClick( TObject *Sender )
TListItem
*
ItemStart
;
TItemStates
Focused
;
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
/* search the selected item */
if
(
ListViewPlaylist
->
SelCount
>
0
)
{
...
...
@@ -106,15 +113,10 @@ void __fastcall TPlaylistDlg::ListViewPlaylistDblClick( TObject *Sender )
Item
=
ListViewPlaylist
->
GetNextItem
(
ItemStart
,
sdAll
,
Focused
);
}
/* stop current item, select the good one */
if
(
(
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
!=
NULL
)
&&
(
Item
->
Index
!=
p_intfGlobal
->
p_sys
->
i_playing
)
)
{
/* FIXME: temporary hack */
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
}
intf_PlaylistJumpto
(
p_intfGlobal
->
p_vlc
->
p_playlist
,
Item
->
Index
-
1
);
playlist_Goto
(
p_playlist
,
Item
->
Index
-
1
);
}
vlc_object_release
(
p_playlist
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
ListViewPlaylistKeyDown
(
TObject
*
Sender
,
...
...
@@ -179,6 +181,7 @@ void __fastcall TPlaylistDlg::MenuAddUrlClick( TObject *Sender )
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
MenuDeleteSelectedClick
(
TObject
*
Sender
)
{
#if 0 /* PLAYLIST TARASS */
/* user wants to delete a file in the queue */
int i_pos;
playlist_t *p_playlist = p_intfGlobal->p_vlc->p_playlist;
...
...
@@ -199,10 +202,12 @@ void __fastcall TPlaylistDlg::MenuDeleteSelectedClick( TObject *Sender )
UpdateGrid( p_playlist );
vlc_mutex_unlock( &p_intfGlobal->change_lock );
#endif
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
MenuDeleteAllClick
(
TObject
*
Sender
)
{
#if 0 /* PLAYLIST TARASS */
int i_pos;
playlist_t *p_playlist = p_intfGlobal->p_vlc->p_playlist;
...
...
@@ -219,10 +224,12 @@ void __fastcall TPlaylistDlg::MenuDeleteAllClick( TObject *Sender )
UpdateGrid( p_playlist );
vlc_mutex_unlock( &p_intfGlobal->change_lock );
#endif
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
MenuSelectionInvertClick
(
TObject
*
Sender
)
{
#if 0 /* PLAYLIST TARASS */
#define NOT( var ) ( (var) ? false : true )
int i_pos;
playlist_t *p_playlist = p_intfGlobal->p_vlc->p_playlist;
...
...
@@ -234,6 +241,7 @@ void __fastcall TPlaylistDlg::MenuSelectionInvertClick( TObject *Sender )
Items->Item[i_pos]->Selected = NOT( Items->Item[i_pos]->Selected );
}
#undef NOT
#endif
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
MenuSelectionCropClick
(
TObject
*
Sender
)
...
...
@@ -293,14 +301,14 @@ void __fastcall TPlaylistDlg::UpdateGrid( playlist_t * p_playlist )
{
#ifdef WIN32
/* Position of the last '\' in the string */
FileName
=
rindex
(
p_playlist
->
p
_item
[
i_dummy
].
psz_name
,
'\\'
);
FileName
=
rindex
(
p_playlist
->
p
p_items
[
i_dummy
]
->
psz_name
,
'\\'
);
#else
/* Position of the last '/' in the string */
FileName
=
rindex
(
p_playlist
->
p
_item
[
i_dummy
].
psz_name
,
'/'
);
FileName
=
rindex
(
p_playlist
->
p
p_items
[
i_dummy
]
->
psz_name
,
'/'
);
#endif
if
(
(
FileName
==
NULL
)
||
(
*
(
FileName
+
1
)
==
'\0'
)
)
{
FileName
=
p_playlist
->
p
_item
[
i_dummy
].
psz_name
;
FileName
=
p_playlist
->
p
p_items
[
i_dummy
]
->
psz_name
;
}
else
{
...
...
@@ -319,9 +327,14 @@ void __fastcall TPlaylistDlg::UpdateGrid( playlist_t * p_playlist )
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
Manage
(
intf_thread_t
*
p_intf
)
{
playlist_t
*
p_playlist
=
p_intfGlobal
->
p_vlc
->
p_playlist
;
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
vlc_mutex_lock
(
&
p_playlist
->
change
_lock
);
vlc_mutex_lock
(
&
p_playlist
->
object
_lock
);
if
(
p_intf
->
p_sys
->
i_playing
!=
p_playlist
->
i_index
)
{
...
...
@@ -331,47 +344,44 @@ void __fastcall TPlaylistDlg::Manage( intf_thread_t * p_intf )
UpdateGrid
(
p_playlist
);
}
vlc_mutex_unlock
(
&
p_playlist
->
change_lock
);
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
DeleteItem
(
int
i_pos
)
{
intf_PlaylistDelete
(
p_intfGlobal
->
p_vlc
->
p_playlist
,
i_pos
);
/* are we deleting the current played stream */
if
(
p_intfGlobal
->
p_sys
->
i_playing
==
i_pos
)
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intfGlobal
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
/* next ! */
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
/* this has to set the slider to 0 */
/* step minus one */
p_intfGlobal
->
p_sys
->
i_playing
--
;
vlc_mutex_lock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
p_intfGlobal
->
p_vlc
->
p_playlist
->
i_index
--
;
vlc_mutex_unlock
(
&
p_intfGlobal
->
p_vlc
->
p_playlist
->
change_lock
);
return
;
}
playlist_Delete
(
p_playlist
,
i_pos
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
Previous
()
{
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
)
{
/* FIXME: temporary hack */
intf_PlaylistPrev
(
p_intfGlobal
->
p_vlc
->
p_playlist
);
intf_PlaylistPrev
(
p_intfGlobal
->
p_vlc
->
p_playlist
);
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
return
;
}
playlist_Prev
(
p_playlist
);
}
//---------------------------------------------------------------------------
void
__fastcall
TPlaylistDlg
::
Next
()
{
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
)
{
/* FIXME: temporary hack */
p_intfGlobal
->
p_vlc
->
p_input_bank
->
pp_input
[
0
]
->
b_eof
=
1
;
return
;
}
playlist_Next
(
p_playlist
);
}
//---------------------------------------------------------------------------
plugins/win32/preferences.cpp
View file @
a5e3711f
...
...
@@ -194,7 +194,7 @@ void __fastcall TGroupBoxPlugin::ListViewSelectItem( TObject *Sender,
p_module
!=
NULL
;
p_module
=
p_module
->
next
)
{
if
(
strcmp
(
p_module
->
psz_name
,
Name
.
c_str
()
)
==
0
)
if
(
strcmp
(
p_module
->
psz_
object_
name
,
Name
.
c_str
()
)
==
0
)
{
ModuleSelected
=
p_module
;
LabelHint
->
Caption
=
p_module
->
psz_longname
?
...
...
@@ -210,12 +210,13 @@ void __fastcall TGroupBoxPlugin::ListViewSelectItem( TObject *Sender,
void
__fastcall
TGroupBoxPlugin
::
ButtonSelectClick
(
TObject
*
Sender
)
{
if
(
!
ModuleSelected
)
return
;
Edit
->
Text
=
ModuleSelected
->
psz_name
;
Edit
->
Text
=
ModuleSelected
->
psz_
object_
name
;
}
//---------------------------------------------------------------------------
void
__fastcall
TGroupBoxPlugin
::
ButtonConfigClick
(
TObject
*
Sender
)
{
p_intfGlobal
->
p_sys
->
p_window
->
CreatePreferences
(
ModuleSelected
->
psz_name
);
p_intfGlobal
->
p_sys
->
p_window
->
CreatePreferences
(
ModuleSelected
->
psz_object_name
);
}
//---------------------------------------------------------------------------
void
__fastcall
TGroupBoxPlugin
::
UpdateChanges
()
...
...
@@ -272,10 +273,6 @@ __fastcall TGroupBoxInteger::TGroupBoxInteger( TComponent* Owner,
SpinEdit
=
CreateSpinEdit
(
this
,
16
,
164
,
24
,
21
,
-
1
,
100000
,
p_config
->
i_value
);
/* init updown */
UpDown
=
CreateUpDown
(
this
,
-
1
,
32767
,
p_config
->
i_value
,
false
);
UpDown
->
Associate
=
Edit
;
/* vertical alignment */
Height
=
LabelDesc
->
Height
+
24
;
LabelDesc
->
Top
=
Top
+
(
Height
-
LabelDesc
->
Height
)
/
2
+
4
;
...
...
@@ -380,8 +377,11 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
for
(
p_module
=
p_intfGlobal
->
p_vlc
->
module_bank
.
first
;
p_module
!=
NULL
;
p_module
=
p_module
->
next
)
{
if
(
psz_module_name
&&
!
strcmp
(
psz_module_name
,
p_module
->
psz_name
)
)
if
(
psz_module_name
&&
!
strcmp
(
psz_module_name
,
p_module
->
psz_object_name
)
)
{
break
;
}
}
if
(
!
p_module
)
return
;
...
...
@@ -431,7 +431,7 @@ void __fastcall TPreferencesDlg::CreateConfigDialog( char *psz_module_name )
(
1
<<
p_item
->
i_value
)
)
{
ListItem
=
GroupBoxPlugin
->
ListView
->
Items
->
Add
();
ListItem
->
Caption
=
p_module_plugins
->
psz_name
;
ListItem
->
Caption
=
p_module_plugins
->
psz_
object_
name
;
}
}
...
...
plugins/win32/win32_common.h
View file @
a5e3711f
...
...
@@ -59,7 +59,7 @@ struct intf_sys_s
/* windows and widgets */
TMainFrameDlg
*
p_window
;
/* main window */
TPlaylistDlg
*
p_play
list
;
/* playlist */
TPlaylistDlg
*
p_play
win
;
/* playlist */
TPopupMenu
*
p_popup
;
/* popup menu */
TAboutDlg
*
p_about
;
/* about window */
TDiscDlg
*
p_disc
;
/* disc selection window */
...
...
@@ -84,5 +84,8 @@ struct intf_sys_s
/* Language information */
es_descriptor_t
*
p_audio_es_old
;
es_descriptor_t
*
p_spu_es_old
;
/* The input thread */
input_thread_t
*
p_input
;
};
src/input/input.c
View file @
a5e3711f
...
...
@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input.c,v 1.20
2 2002/06/07 14:30:41
sam Exp $
* $Id: input.c,v 1.20
3 2002/06/07 23:53:44
sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -41,7 +41,7 @@
#endif
#include "netutils.h"
#include "playlist.h"
#include "
vlc_
playlist.h"
#include "stream_control.h"
#include "input_ext-intf.h"
...
...
src/libvlc.c
View file @
a5e3711f
...
...
@@ -4,7 +4,7 @@
* and spawns threads.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: libvlc.c,v 1.
8 2002/06/07 14:30:41
sam Exp $
* $Id: libvlc.c,v 1.
9 2002/06/07 23:53:44
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -72,7 +72,7 @@
#include "stream_control.h"
#include "input_ext-intf.h"
#include "playlist.h"
#include "
vlc_
playlist.h"
#include "interface.h"
#include "audio_output.h"
...
...
src/misc/modules.c
View file @
a5e3711f
...
...
@@ -2,7 +2,7 @@
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: modules.c,v 1.6
6 2002/06/07 14:30:41
sam Exp $
* $Id: modules.c,v 1.6
7 2002/06/07 23:53:44
sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
...
...
@@ -53,7 +53,7 @@
#include "netutils.h"
#include "interface.h"
#include "playlist.h"
#include "
vlc_
playlist.h"
#include "intf_eject.h"
#include "stream_control.h"
...
...
src/misc/netutils.c
View file @
a5e3711f
...
...
@@ -2,7 +2,7 @@
* netutils.c: various network functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: netutils.c,v 1.7
0 2002/06/07 21:45:30
sam Exp $
* $Id: netutils.c,v 1.7
1 2002/06/07 23:53:44
sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Benoit Steiner <benny@via.ecp.fr>
...
...
@@ -75,7 +75,7 @@
#endif
#include "netutils.h"
#include "playlist.h"
#include "
vlc_
playlist.h"
#include "network.h"
...
...
src/misc/objects.c
View file @
a5e3711f
...
...
@@ -2,7 +2,7 @@
* objects.c: vlc_object_t handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: objects.c,v 1.
9 2002/06/07 16:06:09
sam Exp $
* $Id: objects.c,v 1.
10 2002/06/07 23:53:44
sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -41,7 +41,7 @@
#include "audio_output.h"
#include "playlist.h"
#include "
vlc_
playlist.h"
#include "interface.h"
/*****************************************************************************
...
...
src/playlist/playlist.c
View file @
a5e3711f
...
...
@@ -2,7 +2,7 @@
* playlist.c : Playlist management functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: playlist.c,v 1.
8 2002/06/07 19:54:37
sam Exp $
* $Id: playlist.c,v 1.
9 2002/06/07 23:53:44
sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -30,7 +30,7 @@
#include "stream_control.h"
#include "input_ext-intf.h"
#include "playlist.h"
#include "
vlc_
playlist.h"
#define PLAYLIST_STOPPED 0
#define PLAYLIST_RUNNING 1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment