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
08b246ea
Commit
08b246ea
authored
Jun 12, 2003
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
9628e431
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
13 deletions
+34
-13
include/announce.h
include/announce.h
+2
-2
modules/stream_out/standard.c
modules/stream_out/standard.c
+7
-2
src/stream_output/announce.c
src/stream_output/announce.c
+25
-9
No files found.
include/announce.h
View file @
08b246ea
...
...
@@ -2,7 +2,7 @@
* announce.h : Session announcement
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: announce.h,v 1.
2 2003/05/26 13:45:51
zorglub Exp $
* $Id: announce.h,v 1.
3 2003/06/12 11:37:48
zorglub Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Laurent Aimar <fenrir@via.ecp.fr>
...
...
@@ -65,4 +65,4 @@ struct sap_session_t
*****************************************************************************/
VLC_EXPORT
(
sap_session_t
*
,
sout_SAPNew
,
(
sout_instance_t
*
,
char
*
,
char
*
,
char
*
)
);
VLC_EXPORT
(
void
,
sout_SAPSend
,
(
sout_instance_t
*
,
sap_session_t
*
)
);
VLC_EXPORT
(
void
,
sout_SAPDelete
,
(
sap_session_t
*
)
);
VLC_EXPORT
(
void
,
sout_SAPDelete
,
(
s
out_instance_t
*
,
s
ap_session_t
*
)
);
modules/stream_out/standard.c
View file @
08b246ea
...
...
@@ -2,7 +2,7 @@
* standard.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: standard.c,v 1.
3 2003/05/26 13:45:52
zorglub Exp $
* $Id: standard.c,v 1.
4 2003/06/12 11:37:48
zorglub Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
...
...
@@ -129,6 +129,11 @@ static int Open( vlc_object_t *p_this )
{
msg_Dbg
(
p_sout
,
"Creating SAP"
);
p_sap
=
sout_SAPNew
(
p_sout
,
psz_url
,
psz_port
,
psz_sap
);
if
(
!
p_sap
)
{
msg_Err
(
p_sout
,
"Unable to initialize SAP. SAP disabled"
);
p_sys
->
b_sap
=
0
;
}
}
/* XXX beurk */
...
...
@@ -158,7 +163,7 @@ static void Close( vlc_object_t * p_this )
sout_access_out_t
*
p_access
=
p_sys
->
p_mux
->
p_access
;
if
(
p_sys
->
b_sap
)
sout_SAPDelete
(
p_sys
->
p_sap
);
sout_SAPDelete
(
p_this
,
p_sys
->
p_sap
);
sout_MuxDelete
(
p_sys
->
p_mux
);
sout_AccessOutDelete
(
p_access
);
...
...
src/stream_output/announce.c
View file @
08b246ea
...
...
@@ -52,6 +52,9 @@ sap_session_t * sout_SAPNew ( sout_instance_t *p_sout , char * psz_url_arg , cha
p_new
=
(
sap_session_t
*
)
malloc
(
sizeof
(
sap_session_t
)
)
;
if
(
!
p_new
)
return
NULL
;
sprintf
(
p_new
->
psz_url
,
"%s"
,
psz_url_arg
);
sprintf
(
p_new
->
psz_name
,
"%s"
,
psz_name_arg
);
sprintf
(
p_new
->
psz_port
,
"%s"
,
psz_port_arg
);
/* Not implemented in SO */
...
...
@@ -91,10 +94,11 @@ sap_session_t * sout_SAPNew ( sout_instance_t *p_sout , char * psz_url_arg , cha
/*****************************************************************************
* sout_SAPDelete: Deletes a SAP Session
*****************************************************************************/
void
sout_SAPDelete
(
sap_session_t
*
p_this
)
void
sout_SAPDelete
(
s
out_instance_t
*
p_sout
,
s
ap_session_t
*
p_this
)
{
shutdown
(
p_this
->
socket
,
0
);
free
(
p_this
);
if
(
close
(
p_this
->
socket
)
)
msg_Err
(
p_sout
,
"Unable to close SAP socket"
);
if
(
p_this
)
free
(
p_this
);
}
/*****************************************************************************
...
...
@@ -112,11 +116,17 @@ void sout_SAPSend( sout_instance_t *p_sout, sap_session_t * p_this )
int
i_msg_size
;
int
i_size
;
if
(
p_this
->
sendnow
==
1
)
if
(
p_this
->
sendnow
==
24
)
{
i_header_size
=
9
+
strlen
(
payload_type
);
sap_head
=
(
char
*
)
malloc
(
i_header_size
*
sizeof
(
char
)
);
if
(
!
sap_head
)
{
msg_Err
(
p_sout
,
"No memory left"
);
return
;
}
sap_head
[
0
]
=
0x20
;
/* Means IPv4, not encrypted, not compressed */
sap_head
[
1
]
=
0x00
;
/* No authentification */
sap_head
[
2
]
=
0x42
;
/* Version */
...
...
@@ -145,6 +155,12 @@ a=type:test\n", p_this->psz_name , p_this->psz_port , p_this->psz_url );
sap_send
=
(
char
*
)
malloc
(
i_size
*
sizeof
(
char
)
);
if
(
!
sap_send
)
{
msg_Err
(
p_sout
,
"No memory left"
)
;
return
;
}
for
(
i
=
0
;
i
<
i_header_size
;
i
++
)
{
sap_send
[
i
]
=
sap_head
[
i
];
...
...
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