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
68cdf347
Commit
68cdf347
authored
Sep 01, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DSO friendliness
parent
be9cd599
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
40 deletions
+5
-40
modules/access_output/udp.c
modules/access_output/udp.c
+1
-36
modules/stream_out/standard.c
modules/stream_out/standard.c
+4
-4
No files found.
modules/access_output/udp.c
View file @
68cdf347
...
@@ -134,7 +134,6 @@ vlc_module_begin();
...
@@ -134,7 +134,6 @@ vlc_module_begin();
set_capability
(
"sout access"
,
100
);
set_capability
(
"sout access"
,
100
);
add_shortcut
(
"udp"
);
add_shortcut
(
"udp"
);
add_shortcut
(
"rtp"
);
// Will work only with ts muxer
set_callbacks
(
Open
,
Close
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
vlc_module_end
();
...
@@ -203,11 +202,7 @@ typedef struct sout_access_thread_t
...
@@ -203,11 +202,7 @@ typedef struct sout_access_thread_t
struct
sout_access_out_sys_t
struct
sout_access_out_sys_t
{
{
int
i_mtu
;
int
i_mtu
;
vlc_bool_t
b_rtpts
;
// true for RTP/MP2 encapsulation
vlc_bool_t
b_mtu_warning
;
vlc_bool_t
b_mtu_warning
;
uint16_t
i_sequence_number
;
uint32_t
i_ssrc
;
block_t
*
p_buffer
;
block_t
*
p_buffer
;
...
@@ -257,12 +252,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -257,12 +252,6 @@ static int Open( vlc_object_t *p_this )
}
}
p_access
->
p_sys
=
p_sys
;
p_access
->
p_sys
=
p_sys
;
if
(
p_access
->
psz_access
!=
NULL
)
{
if
(
strcmp
(
p_access
->
psz_access
,
"rtp"
)
==
0
)
p_sys
->
b_rtpts
=
VLC_TRUE
;
}
if
(
var_GetBool
(
p_access
,
SOUT_CFG_PREFIX
"lite"
))
if
(
var_GetBool
(
p_access
,
SOUT_CFG_PREFIX
"lite"
))
{
{
protoname
=
"UDP-Lite"
;
protoname
=
"UDP-Lite"
;
...
@@ -381,13 +370,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -381,13 +370,7 @@ static int Open( vlc_object_t *p_this )
var_GetInteger
(
p_access
,
SOUT_CFG_PREFIX
"group"
);
var_GetInteger
(
p_access
,
SOUT_CFG_PREFIX
"group"
);
p_sys
->
i_mtu
=
var_CreateGetInteger
(
p_this
,
"mtu"
);
p_sys
->
i_mtu
=
var_CreateGetInteger
(
p_this
,
"mtu"
);
if
(
p_sys
->
b_rtpts
&&
(
p_sys
->
i_mtu
<
RTP_HEADER_LENGTH
)
)
p_sys
->
i_mtu
=
576
-
20
-
8
;
srand
(
(
uint32_t
)
mdate
());
p_sys
->
p_buffer
=
NULL
;
p_sys
->
p_buffer
=
NULL
;
p_sys
->
i_sequence_number
=
rand
()
&
0xffff
;
p_sys
->
i_ssrc
=
rand
()
&
0xffffffff
;
if
(
i_rtcp_port
&&
OpenRTCP
(
VLC_OBJECT
(
p_access
),
&
p_sys
->
p_thread
->
rtcp
,
if
(
i_rtcp_port
&&
OpenRTCP
(
VLC_OBJECT
(
p_access
),
&
p_sys
->
p_thread
->
rtcp
,
i_handle
,
proto
,
i_rtcp_port
))
i_handle
,
proto
,
i_rtcp_port
))
...
@@ -499,8 +482,6 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
...
@@ -499,8 +482,6 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
while
(
p_buffer
->
i_buffer
)
while
(
p_buffer
->
i_buffer
)
{
{
int
i_payload_size
=
p_sys
->
i_mtu
;
int
i_payload_size
=
p_sys
->
i_mtu
;
if
(
p_sys
->
b_rtpts
)
i_payload_size
-=
RTP_HEADER_LENGTH
;
int
i_write
=
__MIN
(
p_buffer
->
i_buffer
,
i_payload_size
);
int
i_write
=
__MIN
(
p_buffer
->
i_buffer
,
i_payload_size
);
...
@@ -605,22 +586,6 @@ static block_t *NewUDPPacket( sout_access_out_t *p_access, mtime_t i_dts)
...
@@ -605,22 +586,6 @@ static block_t *NewUDPPacket( sout_access_out_t *p_access, mtime_t i_dts)
p_buffer
->
i_dts
=
i_dts
;
p_buffer
->
i_dts
=
i_dts
;
p_buffer
->
i_buffer
=
0
;
p_buffer
->
i_buffer
=
0
;
if
(
p_sys
->
b_rtpts
)
{
mtime_t
i_timestamp
=
p_buffer
->
i_dts
*
9
/
100
;
/* add rtp/ts header */
p_buffer
->
p_buffer
[
0
]
=
0x80
;
p_buffer
->
p_buffer
[
1
]
=
33
;
// mpeg2-ts
SetWBE
(
p_buffer
->
p_buffer
+
2
,
p_sys
->
i_sequence_number
);
p_sys
->
i_sequence_number
++
;
SetDWBE
(
p_buffer
->
p_buffer
+
4
,
i_timestamp
);
SetDWBE
(
p_buffer
->
p_buffer
+
8
,
p_sys
->
i_ssrc
);
p_buffer
->
i_buffer
=
RTP_HEADER_LENGTH
;
}
return
p_buffer
;
return
p_buffer
;
}
}
...
...
modules/stream_out/standard.c
View file @
68cdf347
...
@@ -179,7 +179,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -179,7 +179,7 @@ static int Open( vlc_object_t *p_this )
if
(
psz_url
&&
strrchr
(
psz_url
,
'.'
)
)
if
(
psz_url
&&
strrchr
(
psz_url
,
'.'
)
)
{
{
/* by extension */
/* by extension */
static
struct
{
const
char
*
ext
;
const
char
*
mux
;
}
exttomux
[]
=
static
struct
{
const
char
ext
[
6
];
const
char
mux
[
16
]
;
}
exttomux
[]
=
{
{
{
"avi"
,
"avi"
},
{
"avi"
,
"avi"
},
{
"ogg"
,
"ogg"
},
{
"ogg"
,
"ogg"
},
...
@@ -196,15 +196,15 @@ static int Open( vlc_object_t *p_this )
...
@@ -196,15 +196,15 @@ static int Open( vlc_object_t *p_this )
{
"mpeg"
,
"ps"
},
{
"mpeg"
,
"ps"
},
{
"ps"
,
"ps"
},
{
"ps"
,
"ps"
},
{
"mpeg1"
,
"mpeg1"
},
{
"mpeg1"
,
"mpeg1"
},
{
"wav"
,
"wav"
},
{
"wav"
,
"wav"
},
{
"flv"
,
"ffmpeg{mux=flv}"
},
{
"flv"
,
"ffmpeg{mux=flv}"
},
{
NULL
,
NULL
}
{
""
,
""
}
};
};
const
char
*
psz_ext
=
strrchr
(
psz_url
,
'.'
)
+
1
;
const
char
*
psz_ext
=
strrchr
(
psz_url
,
'.'
)
+
1
;
int
i
;
int
i
;
msg_Dbg
(
p_this
,
"extension is %s"
,
psz_ext
);
msg_Dbg
(
p_this
,
"extension is %s"
,
psz_ext
);
for
(
i
=
0
;
exttomux
[
i
].
ext
!=
NULL
;
i
++
)
for
(
i
=
0
;
exttomux
[
i
].
ext
[
0
]
;
i
++
)
{
{
if
(
!
strcasecmp
(
psz_ext
,
exttomux
[
i
].
ext
)
)
if
(
!
strcasecmp
(
psz_ext
,
exttomux
[
i
].
ext
)
)
{
{
...
...
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