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
ba894d9b
Commit
ba894d9b
authored
Nov 29, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove SLP (Closes:#434)
parent
bad8db30
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
4 additions
and
326 deletions
+4
-326
configure.ac
configure.ac
+0
-37
include/stream_output.h
include/stream_output.h
+0
-1
modules/stream_out/Modules.am
modules/stream_out/Modules.am
+1
-3
modules/stream_out/announce.c
modules/stream_out/announce.c
+0
-172
modules/stream_out/announce.h
modules/stream_out/announce.h
+0
-52
modules/stream_out/standard.c
modules/stream_out/standard.c
+2
-55
src/stream_output/announce.c
src/stream_output/announce.c
+1
-6
No files found.
configure.ac
View file @
ba894d9b
...
...
@@ -4520,43 +4520,6 @@ then
fi
fi
dnl
dnl SLP access plugin
dnl
AC_ARG_ENABLE(slp,
[ --enable-slp SLP service discovery support (default disabled)])
if test "${enable_slp}" = "yes"
then
AC_ARG_WITH(slp,
[ --with-slp=PATH libslp headers and libraries])
if test -z "${with_slp}"
then
AC_CHECK_HEADERS(slp.h, have_slp="true", have_slp="false")
if test "${have_slp}" = "true"
then
VLC_ADD_PLUGINS([slp])
VLC_ADD_LDFLAGS([slp],[-lslp])
VLC_ADD_LDFLAGS([stream_out_standard],[-lslp])
fi
else
AC_MSG_CHECKING(for slp headers in ${with_slp})
if test -f ${with_slp}/slp.h
then
dnl Use ${with_slp}/libslp/slp.h
AC_MSG_RESULT(yes)
VLC_ADD_PLUGINS([slp])
VLC_ADD_LDFLAGS([slp],[-L${with_slp} -lslp])
VLC_ADD_LDFLAGS([stream_out_standard],[-L${with_slp} -lslp])
VLC_ADD_CPPFLAGS([slp],[-I${with_slp}])
AC_DEFINE(HAVE_SLP_H)
else
dnl No libslp could be found, sorry
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot find ${with_slp}/slp.h])
fi
fi
fi
dnl
dnl DAAP access plugin and services discovery
dnl
...
...
include/stream_output.h
View file @
ba894d9b
...
...
@@ -257,7 +257,6 @@ struct session_descriptor_t
};
#define METHOD_TYPE_SAP 1
#define METHOD_TYPE_SLP 2
struct
announce_method_t
{
...
...
modules/stream_out/Modules.am
View file @
ba894d9b
SOURCES_stream_out_dummy = dummy.c
SOURCES_stream_out_description = description.c
SOURCES_stream_out_standard = standard.c \
announce.c \
announce.h
SOURCES_stream_out_standard = standard.c
SOURCES_stream_out_transcode = transcode.c
SOURCES_stream_out_duplicate = duplicate.c
SOURCES_stream_out_es = es.c
...
...
modules/stream_out/announce.c
deleted
100644 → 0
View file @
bad8db30
/*****************************************************************************
* announce.c : Session announcement
*****************************************************************************
* Copyright (C) 2002 the VideoLAN team
*
* Authors: Clment Stenac <zorglub@via.ecp.fr>
* Damien Lucas <nitrox@via.ecp.fr>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h>
/* free() */
#include <errno.h>
/* ENOMEM */
#include <stdio.h>
/* sprintf() */
#include <vlc/vlc.h>
#include <vlc/sout.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef WIN32
# include <winsock2.h>
# include <ws2tcpip.h>
# ifndef IN_MULTICAST
# define IN_MULTICAST(a) IN_CLASSD(a)
# endif
#else
# include <sys/socket.h>
#endif
#ifdef HAVE_SLP_H
# include <slp.h>
#endif
#include "announce.h"
#include "network.h"
#define DEFAULT_PORT 1234
#ifdef HAVE_SLP_H
/*****************************************************************************
* sout_SLPBuildName: Builds a service name according to SLP standard
*****************************************************************************/
static
char
*
sout_SLPBuildName
(
char
*
psz_url
,
char
*
psz_name
)
{
char
*
psz_service
;
unsigned
int
i_size
;
/* name to build is: service:vlc.services.videolan://$(url) */
i_size
=
8
+
12
+
12
+
5
+
strlen
(
psz_url
)
+
1
;
psz_service
=
(
char
*
)
malloc
(
i_size
*
sizeof
(
char
));
snprintf
(
psz_service
,
i_size
,
"service:vlc.services.videolan://udp:@%s"
,
psz_url
);
/* How piggy ! */
psz_service
[
i_size
]
=
'\0'
;
/* Just to make sure */
return
psz_service
;
}
/*****************************************************************************
* sout_SLPReport: Reporting function. Unused at the moment but needed
*****************************************************************************/
static
void
sout_SLPReport
(
SLPHandle
slp_handle
,
SLPError
slp_error
,
void
*
cookie
)
{
}
#endif
/*****************************************************************************
* sout_SLPReg: Registers the program with SLP
*****************************************************************************/
int
sout_SLPReg
(
sout_instance_t
*
p_sout
,
char
*
psz_url
,
char
*
psz_name
)
{
#ifdef HAVE_SLP_H
SLPHandle
slp_handle
;
SLPError
slp_res
;
char
*
psz_service
=
sout_SLPBuildName
(
psz_url
,
psz_name
);
if
(
SLPOpen
(
NULL
,
SLP_FALSE
,
&
slp_handle
)
!=
SLP_OK
)
{
msg_Warn
(
p_sout
,
"Unable to initialize SLP"
);
return
-
1
;
}
msg_Info
(
p_sout
,
"Registering %s (name: %s) in SLP"
,
psz_service
,
psz_name
);
slp_res
=
SLPReg
(
slp_handle
,
psz_service
,
SLP_LIFETIME_MAXIMUM
,
NULL
,
psz_name
,
SLP_TRUE
,
sout_SLPReport
,
NULL
);
if
(
slp_res
!=
SLP_OK
)
{
msg_Warn
(
p_sout
,
"Error while registering service: %i"
,
slp_res
);
return
-
1
;
}
return
0
;
#else
/* This function should never be called if this is false */
return
-
1
;
#endif
}
/*****************************************************************************
* sout_SLDePReg: Unregisters the program from SLP
*****************************************************************************/
int
sout_SLPDereg
(
sout_instance_t
*
p_sout
,
char
*
psz_url
,
char
*
psz_name
)
{
#ifdef HAVE_SLP_H
SLPHandle
slp_handle
;
SLPError
slp_res
;
char
*
psz_service
=
sout_SLPBuildName
(
psz_url
,
psz_name
);
if
(
SLPOpen
(
NULL
,
SLP_FALSE
,
&
slp_handle
)
!=
SLP_OK
)
{
msg_Warn
(
p_sout
,
"Unable to initialize SLP"
);
return
-
1
;
}
msg_Info
(
p_sout
,
"Unregistering %s from SLP"
,
psz_service
);
slp_res
=
SLPDereg
(
slp_handle
,
psz_service
,
sout_SLPReport
,
NULL
);
if
(
slp_res
!=
SLP_OK
)
{
msg_Warn
(
p_sout
,
"Error while registering service: %i"
,
slp_res
);
return
-
1
;
}
return
0
;
#else
/* This function should never be called if this is false */
return
-
1
;
#endif
}
modules/stream_out/announce.h
deleted
100644 → 0
View file @
bad8db30
/*****************************************************************************
* announce.h : Session announcement
*****************************************************************************
* Copyright (C) 2002 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@via.ecp.fr>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_SLP_H
# include <slp.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
/*****************************************************************************
* slp_session_t: SLP Session descriptor
*****************************************************************************/
struct
slp_session_t
{
char
*
psz_url
;
char
*
psz_name
;
};
typedef
struct
slp_session_t
slp_session_t
;
/*****************************************************************************
* Prototypes
*****************************************************************************/
int
sout_SLPReg
(
sout_instance_t
*
,
char
*
,
char
*
);
int
sout_SLPDereg
(
sout_instance_t
*
,
char
*
,
char
*
);
modules/stream_out/standard.c
View file @
ba894d9b
...
...
@@ -34,7 +34,6 @@
# include <unistd.h>
#endif
#include "announce.h"
#include "network.h"
/*****************************************************************************
...
...
@@ -59,7 +58,7 @@
#define NAME_TEXT N_("Session name")
#define NAME_LONGTEXT N_( \
"Name of the session that will be announced with SAP
or SLP
" )
"Name of the session that will be announced with SAP" )
#define GROUP_TEXT N_("Session groupname")
#define GROUP_LONGTEXT N_( \
...
...
@@ -68,9 +67,6 @@
#define SAP_TEXT N_("SAP announcing")
#define SAP_LONGTEXT N_("Announce this session with SAP")
#define SLP_TEXT N_("SLP announcing")
#define SLP_LONGTEXT N_("Announce this session with SLP")
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
...
...
@@ -101,8 +97,6 @@ vlc_module_begin();
VLC_TRUE
);
add_suppressed_bool
(
SOUT_CFG_PREFIX
"sap-ipv6"
);
add_bool
(
SOUT_CFG_PREFIX
"slp"
,
0
,
NULL
,
SLP_TEXT
,
SLP_LONGTEXT
,
VLC_TRUE
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
...
...
@@ -112,7 +106,7 @@ vlc_module_end();
*****************************************************************************/
static
const
char
*
ppsz_sout_options
[]
=
{
"access"
,
"mux"
,
"url"
,
"dst"
,
"sap"
,
"name"
,
"group"
,
"slp"
,
NULL
"sap"
,
"name"
,
"group"
,
NULL
};
#define DEFAULT_PORT 1234
...
...
@@ -124,7 +118,6 @@ static int Send( sout_stream_t *, sout_stream_id_t *, block_t* );
struct
sout_stream_sys_t
{
sout_mux_t
*
p_mux
;
slp_session_t
*
p_slp
;
session_descriptor_t
*
p_session
;
};
...
...
@@ -135,7 +128,6 @@ static int Open( vlc_object_t *p_this )
{
sout_stream_t
*
p_stream
=
(
sout_stream_t
*
)
p_this
;
sout_instance_t
*
p_sout
=
p_stream
->
p_sout
;
slp_session_t
*
p_slp
=
NULL
;
char
*
psz_mux
;
char
*
psz_access
;
...
...
@@ -384,46 +376,11 @@ static int Open( vlc_object_t *p_this )
free
(
p_method
);
}
/* *** Register with slp *** */
#ifdef HAVE_SLP_H
var_Get
(
p_stream
,
SOUT_CFG_PREFIX
"slp"
,
&
val
);
if
(
val
.
b_bool
&&
(
strstr
(
psz_access
,
"udp"
)
||
strstr
(
psz_access
,
"rtp"
)
)
)
{
int
i_ret
;
msg_Info
(
p_this
,
"SLP Enabled"
);
var_Get
(
p_stream
,
SOUT_CFG_PREFIX
"name"
,
&
val
);
if
(
*
val
.
psz_string
)
{
i_ret
=
sout_SLPReg
(
p_sout
,
psz_url
,
val
.
psz_string
);
}
else
{
i_ret
=
sout_SLPReg
(
p_sout
,
psz_url
,
psz_url
);
}
if
(
i_ret
)
{
msg_Warn
(
p_sout
,
"SLP Registering failed"
);
}
else
{
p_slp
=
malloc
(
sizeof
(
slp_session_t
));
p_slp
->
psz_url
=
strdup
(
psz_url
);
p_slp
->
psz_name
=
strdup
(
*
val
.
psz_string
?
val
.
psz_string
:
psz_url
);
}
free
(
val
.
psz_string
);
}
#endif
p_stream
->
pf_add
=
Add
;
p_stream
->
pf_del
=
Del
;
p_stream
->
pf_send
=
Send
;
p_stream
->
p_sys
->
p_mux
=
p_mux
;
p_stream
->
p_sys
->
p_slp
=
p_slp
;
if
(
psz_access
)
free
(
psz_access
);
if
(
psz_mux
)
free
(
psz_mux
);
...
...
@@ -448,16 +405,6 @@ static void Close( vlc_object_t * p_this )
sout_AnnounceSessionDestroy
(
p_sys
->
p_session
);
}
#ifdef HAVE_SLP_H
if
(
p_sys
->
p_slp
)
{
sout_SLPDereg
(
(
sout_instance_t
*
)
p_this
,
p_sys
->
p_slp
->
psz_url
,
p_sys
->
p_slp
->
psz_name
);
free
(
p_sys
->
p_slp
);
}
#endif
sout_MuxDelete
(
p_sys
->
p_mux
);
sout_AccessOutDelete
(
p_access
);
...
...
src/stream_output/announce.c
View file @
ba894d9b
...
...
@@ -194,7 +194,7 @@ void sout_AnnounceSessionDestroy( session_descriptor_t *p_session )
/**
* Create and initialize an announcement method structure
*
* \param i_type METHOD_TYPE_SAP
or METHOD_TYPE_SLP
* \param i_type METHOD_TYPE_SAP
* \return a new announce_method structure
*/
announce_method_t
*
sout_AnnounceMethodCreate
(
int
i_type
)
...
...
@@ -287,11 +287,6 @@ int announce_Register( announce_handler_t *p_announce,
msg_Dbg
(
p_announce
,
"adding SAP session"
);
p_announce
->
p_sap
->
pf_add
(
p_announce
->
p_sap
,
p_session
);
}
else
if
(
p_method
->
i_type
==
METHOD_TYPE_SLP
)
{
msg_Dbg
(
p_announce
,
"SLP unsupported at the moment"
);
return
VLC_EGENERIC
;
}
else
{
msg_Dbg
(
p_announce
,
"Announce type unsupported"
);
...
...
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