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
bfdcf837
Commit
bfdcf837
authored
Apr 14, 2003
by
Emmanuel Puig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Added use of channel server for skins: still experimental
parent
0c212dbc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
10 deletions
+62
-10
modules/gui/skins/src/banks.cpp
modules/gui/skins/src/banks.cpp
+2
-1
modules/gui/skins/src/event.cpp
modules/gui/skins/src/event.cpp
+21
-4
modules/gui/skins/src/event.h
modules/gui/skins/src/event.h
+4
-2
modules/gui/skins/src/vlcproc.cpp
modules/gui/skins/src/vlcproc.cpp
+33
-2
modules/gui/skins/src/vlcproc.h
modules/gui/skins/src/vlcproc.h
+2
-1
No files found.
modules/gui/skins/src/banks.cpp
View file @
bfdcf837
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* banks.cpp: Bitmap bank, Event, bank, Font bank and OffSet bank
* banks.cpp: Bitmap bank, Event, bank, Font bank and OffSet bank
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: banks.cpp,v 1.
1 2003/03/18 02:21:47 ipkiss
Exp $
* $Id: banks.cpp,v 1.
2 2003/04/14 10:00:38 karibu
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -186,6 +186,7 @@ EventBank::~EventBank()
...
@@ -186,6 +186,7 @@ EventBank::~EventBank()
for
(
map
<
string
,
Event
*>::
iterator
iter
=
Bank
.
begin
();
for
(
map
<
string
,
Event
*>::
iterator
iter
=
Bank
.
begin
();
iter
!=
Bank
.
end
();
iter
++
)
iter
!=
Bank
.
end
();
iter
++
)
{
{
iter
->
second
->
DestructParameters
(
true
);
delete
(
OSEvent
*
)
iter
->
second
;
delete
(
OSEvent
*
)
iter
->
second
;
}
}
}
}
...
...
modules/gui/skins/src/event.cpp
View file @
bfdcf837
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* event.cpp: Event class
* event.cpp: Event class
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: event.cpp,v 1.
6 2003/04/13 17:46:23 asmax
Exp $
* $Id: event.cpp,v 1.
7 2003/04/14 10:00:38 karibu
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -66,17 +66,22 @@ Event::~Event()
...
@@ -66,17 +66,22 @@ Event::~Event()
{
{
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
Event
::
DestructParameters
()
void
Event
::
DestructParameters
(
bool
force
)
{
{
switch
(
Message
)
switch
(
Message
)
{
{
case
CTRL_SYNCHRO
:
case
CTRL_SYNCHRO
:
if
(
Param2
==
(
int
)
true
)
if
(
Param2
==
(
int
)
true
||
force
)
delete
(
Event
*
)
Param1
;
delete
(
Event
*
)
Param1
;
break
;
break
;
case
CTRL_SET_TEXT
:
case
CTRL_SET_TEXT
:
delete
(
char
*
)
Param2
;
delete
[]
(
char
*
)
Param2
;
break
;
case
VLC_NET_ADDCS
:
if
(
Param2
==
(
int
)
true
||
force
)
delete
[]
(
char
*
)
Param1
;
break
;
break
;
}
}
...
@@ -171,6 +176,8 @@ unsigned int Event::GetMessageType( string Desc )
...
@@ -171,6 +176,8 @@ unsigned int Event::GetMessageType( string Desc )
// Network events
// Network events
else
if
(
Desc
==
"VLC_NET_ADDUDP"
)
else
if
(
Desc
==
"VLC_NET_ADDUDP"
)
return
VLC_NET_ADDUDP
;
return
VLC_NET_ADDUDP
;
else
if
(
Desc
==
"VLC_NET_ADDCS"
)
return
VLC_NET_ADDCS
;
// Window event
// Window event
else
if
(
Desc
==
"WINDOW_MOVE"
)
else
if
(
Desc
==
"WINDOW_MOVE"
)
...
@@ -236,6 +243,9 @@ void Event::CreateEvent()
...
@@ -236,6 +243,9 @@ void Event::CreateEvent()
char
*
para2
=
new
char
[
MAX_PARAM_SIZE
];
char
*
para2
=
new
char
[
MAX_PARAM_SIZE
];
char
*
para3
=
new
char
[
MAX_PARAM_SIZE
];
char
*
para3
=
new
char
[
MAX_PARAM_SIZE
];
// Buffer to create strings
char
*
buf
;
// Scan the event
// Scan the event
int
scan
=
sscanf
(
EventDesc
.
c_str
(),
int
scan
=
sscanf
(
EventDesc
.
c_str
(),
"%[^(](%[^,)],%[^,)],%[^,)])"
,
msg
,
para1
,
para2
,
para3
);
"%[^(](%[^,)],%[^,)],%[^,)])"
,
msg
,
para1
,
para2
,
para3
);
...
@@ -282,6 +292,13 @@ void Event::CreateEvent()
...
@@ -282,6 +292,13 @@ void Event::CreateEvent()
Param2
=
atoi
(
para1
);
Param2
=
atoi
(
para1
);
break
;
break
;
case
VLC_NET_ADDCS
:
buf
=
new
char
[
MAX_PARAM_SIZE
+
7
];
sprintf
(
buf
,
"%s:%s"
,
para1
,
para2
);
Param1
=
(
unsigned
int
)
buf
;
Param2
=
(
int
)
false
;
break
;
case
CTRL_ID_VISIBLE
:
case
CTRL_ID_VISIBLE
:
Param1
=
(
unsigned
int
)
FindControl
(
para1
);
Param1
=
(
unsigned
int
)
FindControl
(
para1
);
Param2
=
GetBool
(
para2
);
Param2
=
GetBool
(
para2
);
...
...
modules/gui/skins/src/event.h
View file @
bfdcf837
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* event.h: Event class
* event.h: Event class
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: event.h,v 1.
5 2003/04/12 21:43:27 asmax
Exp $
* $Id: event.h,v 1.
6 2003/04/14 10:00:38 karibu
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -40,6 +40,7 @@ using namespace std;
...
@@ -40,6 +40,7 @@ using namespace std;
#define MAX_EVENT_SIZE 30
#define MAX_EVENT_SIZE 30
#define MAX_PARAM_SIZE 20
#define MAX_PARAM_SIZE 20
#define EVENT_MAX_BUFFER_SIZE 20
#if !defined _WIN32
#if !defined _WIN32
#define WM_APP 0x8000
#define WM_APP 0x8000
...
@@ -93,6 +94,7 @@ using namespace std;
...
@@ -93,6 +94,7 @@ using namespace std;
// Network events
// Network events
#define VLC_NET_ADDUDP (VLC_MESSAGE + 701)
#define VLC_NET_ADDUDP (VLC_MESSAGE + 701)
#define VLC_NET_ADDCS (VLC_MESSAGE + 703)
// Window event
// Window event
#define WINDOW_MOVE (VLC_WINDOW + 1)
#define WINDOW_MOVE (VLC_WINDOW + 1)
...
@@ -163,7 +165,7 @@ class Event
...
@@ -163,7 +165,7 @@ class Event
// Destructor
// Destructor
virtual
~
Event
();
virtual
~
Event
();
void
DestructParameters
();
void
DestructParameters
(
bool
force
=
false
);
// General operations on events
// General operations on events
GenericControl
*
FindControl
(
string
id
);
GenericControl
*
FindControl
(
string
id
);
...
...
modules/gui/skins/src/vlcproc.cpp
View file @
bfdcf837
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class
* vlcproc.cpp: VlcProc class
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.
5 2003/04/12 21:43:27 asmax
Exp $
* $Id: vlcproc.cpp,v 1.
6 2003/04/14 10:00:38 karibu
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include <vlc/intf.h>
#include <vlc/intf.h>
#include <vlc/aout.h>
#include <vlc/aout.h>
#include <vlc/vout.h>
#include <vlc/vout.h>
#include <netutils.h>
//--- SKIN ------------------------------------------------------------------
//--- SKIN ------------------------------------------------------------------
#include "os_api.h"
#include "os_api.h"
...
@@ -158,6 +158,10 @@ bool VlcProc::EventProc( Event *evt )
...
@@ -158,6 +158,10 @@ bool VlcProc::EventProc( Event *evt )
AddNetworkUDP
(
(
int
)
evt
->
GetParam2
()
);
AddNetworkUDP
(
(
int
)
evt
->
GetParam2
()
);
return
true
;
return
true
;
case
VLC_NET_ADDCS
:
AddNetworkChannelServer
(
(
char
*
)
evt
->
GetParam1
()
);
return
true
;
default:
default:
return
true
;
return
true
;
}
}
...
@@ -616,5 +620,32 @@ void VlcProc::AddNetworkUDP( int port )
...
@@ -616,5 +620,32 @@ void VlcProc::AddNetworkUDP( int port )
InterfaceRefresh
();
InterfaceRefresh
();
}
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void
VlcProc
::
AddNetworkChannelServer
(
char
*
server
)
{
char
*
name
=
new
char
[
MAX_PARAM_SIZE
];
int
port
=
0
;
// Scan the server address
int
scan
=
sscanf
(
server
,
"%[^:]:%i"
,
name
,
port
);
if
(
scan
!=
2
)
{
msg_Err
(
p_intf
,
"Invalid channel server: %s"
,
server
);
delete
[]
name
;
return
;
}
config_PutInt
(
p_intf
,
"network-channel"
,
VLC_TRUE
);
config_PutPsz
(
p_intf
,
"channel-server"
,
name
);
config_PutInt
(
p_intf
,
"channel-port"
,
port
);
if
(
p_intf
->
p_vlc
->
p_channel
==
NULL
)
{
network_ChannelCreate
(
p_intf
);
}
delete
[]
name
;
}
//---------------------------------------------------------------------------
modules/gui/skins/src/vlcproc.h
View file @
bfdcf837
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* vlcproc.h: VlcProc class
* vlcproc.h: VlcProc class
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: vlcproc.h,v 1.
2 2003/04/11 22:08:07 videolan
Exp $
* $Id: vlcproc.h,v 1.
3 2003/04/14 10:00:39 karibu
Exp $
*
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr>
...
@@ -53,6 +53,7 @@ class VlcProc
...
@@ -53,6 +53,7 @@ class VlcProc
void
FullScreen
();
void
FullScreen
();
void
ChangeVolume
(
unsigned
int
msg
,
long
param
);
void
ChangeVolume
(
unsigned
int
msg
,
long
param
);
void
AddNetworkUDP
(
int
port
);
void
AddNetworkUDP
(
int
port
);
void
AddNetworkChannelServer
(
char
*
server
);
void
InterfaceRefresh
(
bool
All
=
false
);
void
InterfaceRefresh
(
bool
All
=
false
);
void
EnabledEvent
(
string
type
,
bool
state
);
void
EnabledEvent
(
string
type
,
bool
state
);
...
...
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