Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
5574f54d
Commit
5574f54d
authored
Sep 11, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SAP announce: rewrite, use one thread per SAP group (fixes #1839)
parent
4129590e
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
190 additions
and
370 deletions
+190
-370
include/vlc_common.h
include/vlc_common.h
+0
-2
src/libvlc-module.c
src/libvlc-module.c
+1
-2
src/stream_output/announce.c
src/stream_output/announce.c
+4
-8
src/stream_output/sap.c
src/stream_output/sap.c
+176
-330
src/stream_output/stream_output.h
src/stream_output/stream_output.h
+9
-28
No files found.
include/vlc_common.h
View file @
5574f54d
...
...
@@ -263,8 +263,6 @@ typedef struct sout_stream_t sout_stream_t;
typedef
struct
sout_stream_sys_t
sout_stream_sys_t
;
typedef
struct
config_chain_t
config_chain_t
;
typedef
struct
sap_session_t
sap_session_t
;
typedef
struct
sap_address_t
sap_address_t
;
typedef
struct
session_descriptor_t
session_descriptor_t
;
typedef
struct
announce_method_t
announce_method_t
;
typedef
struct
announce_handler_t
announce_handler_t
;
...
...
src/libvlc-module.c
View file @
5574f54d
...
...
@@ -1832,8 +1832,7 @@ vlc_module_begin();
PACKETIZER_TEXT
,
PACKETIZER_LONGTEXT
,
true
);
set_subcategory
(
SUBCAT_SOUT_SAP
);
add_bool
(
"sap-flow-control"
,
false
,
NULL
,
ANN_SAPCTRL_TEXT
,
ANN_SAPCTRL_LONGTEXT
,
true
);
add_obsolete_bool
(
"sap-flow-control"
);
add_integer
(
"sap-interval"
,
5
,
NULL
,
ANN_SAPINTV_TEXT
,
ANN_SAPINTV_LONGTEXT
,
true
);
...
...
src/stream_output/announce.c
View file @
5574f54d
...
...
@@ -176,10 +176,7 @@ static announce_handler_t *announce_HandlerCreate( vlc_object_t *p_this )
int
announce_HandlerDestroy
(
announce_handler_t
*
p_announce
)
{
if
(
p_announce
->
p_sap
)
{
/* Exit the SAP */
vlc_object_release
(
p_announce
->
p_sap
);
}
SAP_Destroy
(
p_announce
->
p_sap
);
/* Free the structure */
vlc_object_release
(
p_announce
);
...
...
@@ -201,7 +198,7 @@ static int announce_Register( announce_handler_t *p_announce,
/* Do we already have a SAP announce handler ? */
if
(
!
p_announce
->
p_sap
)
{
sap_handler_t
*
p_sap
=
announce_SAPHandlerCreate
(
p_announce
);
sap_handler_t
*
p_sap
=
SAP_Create
(
VLC_OBJECT
(
p_announce
)
);
msg_Dbg
(
p_announce
,
"creating SAP announce handler"
);
if
(
!
p_sap
)
{
...
...
@@ -212,7 +209,7 @@ static int announce_Register( announce_handler_t *p_announce,
}
/* this will set p_session->p_sap for later deletion */
msg_Dbg
(
p_announce
,
"adding SAP session"
);
p_announce
->
p_sap
->
pf_a
dd
(
p_announce
->
p_sap
,
p_session
);
SAP_A
dd
(
p_announce
->
p_sap
,
p_session
);
}
else
{
...
...
@@ -228,7 +225,6 @@ static int announce_UnRegister( announce_handler_t *p_announce,
session_descriptor_t
*
p_session
)
{
msg_Dbg
(
p_announce
,
"unregistering announce"
);
if
(
p_announce
->
p_sap
)
p_announce
->
p_sap
->
pf_del
(
p_announce
->
p_sap
,
p_session
);
SAP_Del
(
p_announce
->
p_sap
,
p_session
);
return
VLC_SUCCESS
;
}
src/stream_output/sap.c
View file @
5574f54d
This diff is collapsed.
Click to expand it.
src/stream_output/stream_output.h
View file @
5574f54d
...
...
@@ -47,36 +47,15 @@ struct sout_packetizer_input_t
};
#define sout_NewInstance(a,b) __sout_NewInstance(VLC_OBJECT(a),b)
VLC_EXPORT
(
sout_instance_t
*
,
__sout_NewInstance
,
(
vlc_object_t
*
,
const
char
*
)
);
VLC_EXPORT
(
void
,
sout_DeleteInstance
,
(
sout_instance_t
*
)
);
sout_instance_t
*
__sout_NewInstance
(
vlc_object_t
*
,
const
char
*
);
void
sout_DeleteInstance
(
sout_instance_t
*
);
VLC_EXPORT
(
sout_packetizer_input_t
*
,
sout_InputNew
,(
sout_instance_t
*
,
es_format_t
*
)
);
VLC_EXPORT
(
int
,
sout_InputDelete
,
(
sout_packetizer_input_t
*
)
);
VLC_EXPORT
(
int
,
sout_InputSendBuffer
,
(
sout_packetizer_input_t
*
,
block_t
*
)
);
sout_packetizer_input_t
*
sout_InputNew
(
sout_instance_t
*
,
es_format_t
*
);
int
sout_InputDelete
(
sout_packetizer_input_t
*
);
int
sout_InputSendBuffer
(
sout_packetizer_input_t
*
,
block_t
*
);
/* Announce system */
/* The SAP handler, running in a separate thread */
struct
sap_handler_t
{
VLC_COMMON_MEMBERS
/* needed to create a thread */
sap_session_t
**
pp_sessions
;
sap_address_t
**
pp_addresses
;
bool
b_control
;
int
i_sessions
;
int
i_addresses
;
int
i_current_session
;
int
(
*
pf_add
)
(
sap_handler_t
*
,
session_descriptor_t
*
);
int
(
*
pf_del
)
(
sap_handler_t
*
,
session_descriptor_t
*
);
/* private data, not in p_sys as there is one kind of sap_handler_t */
};
struct
session_descriptor_t
{
struct
sockaddr_storage
orig
;
...
...
@@ -98,7 +77,9 @@ struct announce_handler_t
int
announce_HandlerDestroy
(
announce_handler_t
*
);
/* Release it with vlc_object_release() */
sap_handler_t
*
announce_SAPHandlerCreate
(
announce_handler_t
*
p_announce
);
sap_handler_t
*
SAP_Create
(
vlc_object_t
*
);
void
SAP_Destroy
(
sap_handler_t
*
);
int
SAP_Add
(
sap_handler_t
*
,
session_descriptor_t
*
);
void
SAP_Del
(
sap_handler_t
*
,
const
session_descriptor_t
*
);
#endif
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