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
94db15a8
Commit
94db15a8
authored
Nov 01, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* udp: added a new option: raw, to use it udp{raw} (It doesn't try to
fill packet send to mtu size, needed by rtp)
parent
d41734c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
modules/access_output/udp.c
modules/access_output/udp.c
+25
-4
No files found.
modules/access_output/udp.c
View file @
94db15a8
...
...
@@ -2,7 +2,7 @@
* udp.c
*****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN
* $Id: udp.c,v 1.1
3 2003/08/18 17:30:48
fenrir Exp $
* $Id: udp.c,v 1.1
4 2003/11/01 00:11:31
fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
...
...
@@ -61,8 +61,9 @@
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
int
Write
(
sout_access_out_t
*
,
sout_buffer_t
*
);
static
int
Seek
(
sout_access_out_t
*
,
off_t
);
static
int
Write
(
sout_access_out_t
*
,
sout_buffer_t
*
);
static
int
WriteRaw
(
sout_access_out_t
*
,
sout_buffer_t
*
);
static
int
Seek
(
sout_access_out_t
*
,
off_t
);
static
void
ThreadWrite
(
vlc_object_t
*
);
...
...
@@ -216,6 +217,7 @@ static int Open( vlc_object_t *p_this )
{
p_sys
->
p_thread
->
i_caching
=
atoll
(
val
)
*
1000
;
}
p_sys
->
i_mtu
=
socket_desc
.
i_mtu
;
if
(
vlc_thread_create
(
p_sys
->
p_thread
,
"sout write thread"
,
ThreadWrite
,
...
...
@@ -231,7 +233,14 @@ static int Open( vlc_object_t *p_this )
p_sys
->
i_sequence_number
=
rand
()
&
0xffff
;
p_sys
->
i_ssrc
=
rand
()
&
0xffffffff
;
p_access
->
pf_write
=
Write
;
if
(
sout_cfg_find
(
p_access
->
p_cfg
,
"raw"
)
)
{
p_access
->
pf_write
=
WriteRaw
;
}
else
{
p_access
->
pf_write
=
Write
;
}
p_access
->
pf_seek
=
Seek
;
msg_Info
(
p_access
,
"Open: addr:`%s' port:`%d'"
,
...
...
@@ -330,6 +339,18 @@ static int Write( sout_access_out_t *p_access, sout_buffer_t *p_buffer )
return
(
p_sys
->
p_thread
->
b_error
?
-
1
:
0
);
}
/*****************************************************************************
* WriteRaw: write p_buffer without trying to fill mtu
*****************************************************************************/
static
int
WriteRaw
(
sout_access_out_t
*
p_access
,
sout_buffer_t
*
p_buffer
)
{
sout_access_out_sys_t
*
p_sys
=
p_access
->
p_sys
;
sout_FifoPut
(
p_sys
->
p_thread
->
p_fifo
,
p_buffer
);
return
(
p_sys
->
p_thread
->
b_error
?
-
1
:
0
);
}
/*****************************************************************************
* Seek: seek to a specific location in a file
*****************************************************************************/
...
...
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