Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
e5c2a63d
Commit
e5c2a63d
authored
Aug 02, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use separate functions for RTSP and HTTP hosts
Also prefix with vlc_ for namespace cleanliness.
parent
73a0a9f9
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
36 additions
and
21 deletions
+36
-21
include/vlc_httpd.h
include/vlc_httpd.h
+3
-2
modules/access/dvb/http.c
modules/access/dvb/http.c
+2
-2
modules/access_output/http.c
modules/access_output/http.c
+4
-4
modules/lua/libs/httpd.c
modules/lua/libs/httpd.c
+1
-1
modules/misc/rtsp.c
modules/misc/rtsp.c
+1
-1
modules/stream_out/rtp.c
modules/stream_out/rtp.c
+1
-1
modules/stream_out/rtsp.c
modules/stream_out/rtsp.c
+2
-2
src/libvlccore.sym
src/libvlccore.sym
+3
-2
src/missing.c
src/missing.c
+10
-3
src/network/httpd.c
src/network/httpd.c
+9
-3
No files found.
include/vlc_httpd.h
View file @
e5c2a63d
...
...
@@ -99,8 +99,9 @@ struct httpd_message_t
};
/* create a new host */
VLC_API
httpd_host_t
*
httpd_HostNew
(
vlc_object_t
*
,
const
char
*
psz_host
,
int
i_port
)
VLC_USED
;
VLC_API
httpd_host_t
*
httpd_TLSHostNew
(
vlc_object_t
*
,
const
char
*
,
int
)
VLC_USED
;
VLC_API
httpd_host_t
*
vlc_http_HostNew
(
vlc_object_t
*
,
const
char
*
psz_host
,
int
i_port
)
VLC_USED
;
VLC_API
httpd_host_t
*
vlc_https_HostNew
(
vlc_object_t
*
,
const
char
*
,
int
)
VLC_USED
;
VLC_API
httpd_host_t
*
vlc_rtsp_HostNew
(
vlc_object_t
*
,
const
char
*
,
int
)
VLC_USED
;
/* delete a host */
VLC_API
void
httpd_HostDelete
(
httpd_host_t
*
);
...
...
modules/access/dvb/http.c
View file @
e5c2a63d
...
...
@@ -96,8 +96,8 @@ int HTTPOpen( access_t *p_access )
msg_Dbg
(
p_access
,
"base %s:%d"
,
psz_address
,
i_port
);
p_sys
->
p_httpd_host
=
httpd
_HostNew
(
VLC_OBJECT
(
p_access
),
psz_address
,
i_port
);
p_sys
->
p_httpd_host
=
vlc_http
_HostNew
(
VLC_OBJECT
(
p_access
),
psz_address
,
i_port
);
if
(
p_sys
->
p_httpd_host
==
NULL
)
{
msg_Err
(
p_access
,
"cannot listen on %s:%d"
,
psz_address
,
i_port
);
...
...
modules/access_output/http.c
View file @
e5c2a63d
...
...
@@ -190,15 +190,15 @@ static int Open( vlc_object_t *p_this )
{
if
(
i_bind_port
<=
0
)
i_bind_port
=
DEFAULT_SSL_PORT
;
p_sys
->
p_httpd_host
=
httpd_TLS
HostNew
(
VLC_OBJECT
(
p_access
),
psz_bind_addr
,
i_bind_port
);
p_sys
->
p_httpd_host
=
vlc_https_
HostNew
(
VLC_OBJECT
(
p_access
),
psz_bind_addr
,
i_bind_port
);
}
else
{
if
(
i_bind_port
<=
0
)
i_bind_port
=
DEFAULT_PORT
;
p_sys
->
p_httpd_host
=
httpd
_HostNew
(
VLC_OBJECT
(
p_access
),
psz_bind_addr
,
i_bind_port
);
p_sys
->
p_httpd_host
=
vlc_http
_HostNew
(
VLC_OBJECT
(
p_access
),
psz_bind_addr
,
i_bind_port
);
}
if
(
p_sys
->
p_httpd_host
==
NULL
)
...
...
modules/lua/libs/httpd.c
View file @
e5c2a63d
...
...
@@ -70,7 +70,7 @@ static int vlclua_httpd_tls_host_new( lua_State *L )
vlc_object_t
*
p_this
=
vlclua_get_this
(
L
);
const
char
*
psz_host
=
luaL_checkstring
(
L
,
1
);
int
i_port
=
luaL_checkint
(
L
,
2
);
httpd_host_t
*
p_host
=
httpd
_HostNew
(
p_this
,
psz_host
,
i_port
);
httpd_host_t
*
p_host
=
vlc_http
_HostNew
(
p_this
,
psz_host
,
i_port
);
if
(
!
p_host
)
return
luaL_error
(
L
,
"Failed to create HTTP host
\"
%s:%d
\"
"
,
psz_host
,
i_port
);
...
...
modules/misc/rtsp.c
View file @
e5c2a63d
...
...
@@ -282,7 +282,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
psz_raw_mux
=
var_CreateGetString
(
p_this
,
"rtsp-raw-mux"
);
p_sys
->
p_rtsp_host
=
httpd
_HostNew
(
VLC_OBJECT
(
p_vod
),
url
.
psz_host
,
url
.
i_port
);
vlc_rtsp
_HostNew
(
VLC_OBJECT
(
p_vod
),
url
.
psz_host
,
url
.
i_port
);
if
(
!
p_sys
->
p_rtsp_host
)
{
msg_Err
(
p_vod
,
"cannot create RTSP server (%s:%i)"
,
...
...
modules/stream_out/rtp.c
View file @
e5c2a63d
...
...
@@ -1320,7 +1320,7 @@ static int HttpSetup( sout_stream_t *p_stream, const vlc_url_t *url)
{
sout_stream_sys_t
*
p_sys
=
p_stream
->
p_sys
;
p_sys
->
p_httpd_host
=
httpd
_HostNew
(
VLC_OBJECT
(
p_stream
),
url
->
psz_host
,
p_sys
->
p_httpd_host
=
vlc_http
_HostNew
(
VLC_OBJECT
(
p_stream
),
url
->
psz_host
,
url
->
i_port
>
0
?
url
->
i_port
:
80
);
if
(
p_sys
->
p_httpd_host
)
{
...
...
modules/stream_out/rtsp.c
View file @
e5c2a63d
...
...
@@ -120,8 +120,8 @@ rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media,
msg_Dbg
(
owner
,
"RTSP stream: host %s port %d at %s"
,
url
->
psz_host
,
rtsp
->
port
,
rtsp
->
psz_path
);
rtsp
->
host
=
httpd
_HostNew
(
VLC_OBJECT
(
owner
),
url
->
psz_host
,
rtsp
->
port
);
rtsp
->
host
=
vlc_rtsp
_HostNew
(
VLC_OBJECT
(
owner
),
url
->
psz_host
,
rtsp
->
port
);
if
(
rtsp
->
host
==
NULL
)
goto
error
;
...
...
src/libvlccore.sym
View file @
e5c2a63d
...
...
@@ -159,7 +159,9 @@ httpd_FileNew
httpd_HandlerDelete
httpd_HandlerNew
httpd_HostDelete
httpd_HostNew
vlc_http_HostNew
vlc_https_HostNew
vlc_rtsp_HostNew
httpd_MsgAdd
httpd_MsgGet
httpd_RedirectDelete
...
...
@@ -169,7 +171,6 @@ httpd_StreamDelete
httpd_StreamHeader
httpd_StreamNew
httpd_StreamSend
httpd_TLSHostNew
httpd_UrlCatch
httpd_UrlDelete
httpd_UrlNew
...
...
src/missing.c
View file @
e5c2a63d
...
...
@@ -93,18 +93,25 @@ void httpd_HostDelete (httpd_host_t *h)
assert
(
0
);
}
httpd_host_t
*
httpd
_HostNew
(
vlc_object_t
*
obj
,
const
char
*
host
,
int
port
)
httpd_host_t
*
vlc_http
_HostNew
(
vlc_object_t
*
obj
,
const
char
*
host
,
int
port
)
{
(
void
)
host
;
(
void
)
port
;
msg_Err
(
obj
,
"
VLC httpd support
not compiled-in!"
);
msg_Err
(
obj
,
"
HTTP server
not compiled-in!"
);
return
NULL
;
}
httpd_host_t
*
httpd_TLS
HostNew
(
vlc_object_t
*
obj
,
const
char
*
host
,
int
port
)
httpd_host_t
*
vlc_https_
HostNew
(
vlc_object_t
*
obj
,
const
char
*
host
,
int
port
)
{
return
httpd_HostNew
(
obj
,
host
,
port
);
}
httpd_host_t
*
vlc_rtsp_HostNew
(
vlc_object_t
*
obj
,
const
char
*
host
,
int
port
)
{
(
void
)
host
;
(
void
)
port
;
msg_Err
(
obj
,
"RTSP server not compiled-in!"
);
return
NULL
;
}
void
httpd_MsgAdd
(
httpd_message_t
*
m
,
const
char
*
name
,
const
char
*
fmt
,
...)
{
(
void
)
m
;
(
void
)
name
;
(
void
)
fmt
;
...
...
src/network/httpd.c
View file @
e5c2a63d
...
...
@@ -968,13 +968,13 @@ static httpd_host_t *httpd_HostCreate( vlc_object_t *, const char *, int,
vlc_tls_creds_t
*
);
/* create a new host */
httpd_host_t
*
httpd
_HostNew
(
vlc_object_t
*
p_this
,
const
char
*
psz_host
,
int
i_port
)
httpd_host_t
*
vlc_http
_HostNew
(
vlc_object_t
*
p_this
,
const
char
*
psz_host
,
int
i_port
)
{
return
httpd_HostCreate
(
p_this
,
psz_host
,
i_port
,
NULL
);
}
httpd_host_t
*
httpd_TLS
HostNew
(
vlc_object_t
*
obj
,
const
char
*
host
,
int
port
)
httpd_host_t
*
vlc_https_
HostNew
(
vlc_object_t
*
obj
,
const
char
*
host
,
int
port
)
{
char
*
cert
=
var_InheritString
(
obj
,
"http-cert"
);
if
(
cert
==
NULL
)
...
...
@@ -1028,6 +1028,12 @@ error:
return
NULL
;
}
httpd_host_t
*
vlc_rtsp_HostNew
(
vlc_object_t
*
p_this
,
const
char
*
psz_host
,
int
i_port
)
{
return
httpd_HostCreate
(
p_this
,
psz_host
,
i_port
,
NULL
);
}
static
vlc_mutex_t
httpd_mutex
=
VLC_STATIC_MUTEX
;
static
httpd_host_t
*
httpd_HostCreate
(
vlc_object_t
*
p_this
,
...
...
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