Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
42051dfb
Commit
42051dfb
authored
Aug 29, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement ACCESS_OUT_CONTROLS_PACE as needed
parent
9b792408
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
74 additions
and
20 deletions
+74
-20
modules/access_output/file.c
modules/access_output/file.c
+19
-8
modules/access_output/http.c
modules/access_output/http.c
+18
-7
modules/access_output/shout.c
modules/access_output/shout.c
+19
-0
modules/access_output/udp.c
modules/access_output/udp.c
+18
-5
No files found.
modules/access_output/file.c
View file @
42051dfb
...
...
@@ -89,6 +89,7 @@ static const char *const ppsz_sout_options[] = {
static
ssize_t
Write
(
sout_access_out_t
*
,
block_t
*
);
static
int
Seek
(
sout_access_out_t
*
,
off_t
);
static
ssize_t
Read
(
sout_access_out_t
*
,
block_t
*
);
static
int
Control
(
sout_access_out_t
*
,
int
,
va_list
);
struct
sout_access_out_sys_t
{
...
...
@@ -140,16 +141,13 @@ static int Open( vlc_object_t *p_this )
p_access
->
pf_write
=
Write
;
p_access
->
pf_read
=
Read
;
p_access
->
pf_seek
=
Seek
;
p_access
->
pf_control
=
Control
;
p_access
->
p_sys
=
(
void
*
)(
intptr_t
)
fd
;
msg_Dbg
(
p_access
,
"file access output opened (%s)"
,
p_access
->
psz_path
);
if
(
append
)
lseek
(
fd
,
0
,
SEEK_END
);
/* Update pace control flag */
if
(
p_access
->
psz_access
&&
!
strcmp
(
p_access
->
psz_access
,
"stream"
)
)
p_access
->
p_sout
->
i_out_pace_nocontrol
++
;
return
VLC_SUCCESS
;
}
...
...
@@ -162,13 +160,26 @@ static void Close( vlc_object_t * p_this )
close
(
(
intptr_t
)
p_access
->
p_sys
);
/* Update pace control flag */
if
(
p_access
->
psz_access
&&
!
strcmp
(
p_access
->
psz_access
,
"stream"
)
)
p_access
->
p_sout
->
i_out_pace_nocontrol
--
;
msg_Dbg
(
p_access
,
"file access output closed"
);
}
static
int
Control
(
sout_access_out_t
*
p_access
,
int
i_query
,
va_list
args
)
{
switch
(
i_query
)
{
case
ACCESS_OUT_CONTROLS_PACE
:
{
bool
*
pb
=
va_arg
(
args
,
bool
*
);
*
pb
=
strcmp
(
p_access
->
psz_access
,
"stream"
);
break
;
}
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Read: standard read on a file descriptor.
*****************************************************************************/
...
...
modules/access_output/http.c
View file @
42051dfb
...
...
@@ -129,6 +129,7 @@ static const char *const ppsz_sout_options[] = {
static
ssize_t
Write
(
sout_access_out_t
*
,
block_t
*
);
static
int
Seek
(
sout_access_out_t
*
,
off_t
);
static
int
Control
(
sout_access_out_t
*
,
int
,
va_list
);
struct
sout_access_out_sys_t
{
...
...
@@ -343,10 +344,7 @@ static int Open( vlc_object_t *p_this )
p_access
->
pf_write
=
Write
;
p_access
->
pf_seek
=
Seek
;
/* update p_sout->i_out_pace_nocontrol */
p_access
->
p_sout
->
i_out_pace_nocontrol
++
;
p_access
->
pf_control
=
Control
;
return
VLC_SUCCESS
;
}
...
...
@@ -364,9 +362,6 @@ static void Close( vlc_object_t * p_this )
bonjour_stop_service
(
p_sys
->
p_bonjour
);
#endif
/* update p_sout->i_out_pace_nocontrol */
p_access
->
p_sout
->
i_out_pace_nocontrol
--
;
httpd_StreamDelete
(
p_sys
->
p_httpd_stream
);
httpd_HostDelete
(
p_sys
->
p_httpd_host
);
...
...
@@ -377,6 +372,22 @@ static void Close( vlc_object_t * p_this )
free
(
p_sys
);
}
static
int
Control
(
sout_access_out_t
*
p_access
,
int
i_query
,
va_list
args
)
{
(
void
)
p_access
;
switch
(
i_query
)
{
case
ACCESS_OUT_CONTROLS_PACE
:
*
va_arg
(
args
,
bool
*
)
=
false
;
break
;
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Write:
*****************************************************************************/
...
...
modules/access_output/shout.c
View file @
42051dfb
...
...
@@ -151,6 +151,7 @@ static const char *const ppsz_sout_options[] = {
*****************************************************************************/
static
ssize_t
Write
(
sout_access_out_t
*
,
block_t
*
);
static
int
Seek
(
sout_access_out_t
*
,
off_t
);
static
int
Control
(
sout_access_out_t
*
,
int
,
va_list
);
struct
sout_access_out_sys_t
{
...
...
@@ -459,6 +460,7 @@ static int Open( vlc_object_t *p_this )
p_access
->
pf_write
=
Write
;
p_access
->
pf_seek
=
Seek
;
p_access
->
pf_control
=
Control
;
msg_Dbg
(
p_access
,
"shout access output opened (%s@%s:%i/%s)"
,
psz_user
,
psz_host
,
i_port
,
psz_mount
);
...
...
@@ -497,6 +499,23 @@ static void Close( vlc_object_t * p_this )
msg_Dbg
(
p_access
,
"shout access output closed"
);
}
static
int
Control
(
sout_access_out_t
*
p_access
,
int
i_query
,
va_list
args
)
{
switch
(
i_query
)
{
case
ACCESS_OUT_CONTROLS_PACE
:
{
bool
*
pb
=
va_arg
(
args
,
bool
*
);
*
pb
=
strcmp
(
p_access
->
psz_access
,
"stream"
);
break
;
}
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Write: standard write
*****************************************************************************/
...
...
modules/access_output/udp.c
View file @
42051dfb
...
...
@@ -113,6 +113,7 @@ static const char *const ppsz_core_options[] = {
static
ssize_t
Write
(
sout_access_out_t
*
,
block_t
*
);
static
int
Seek
(
sout_access_out_t
*
,
off_t
);
static
int
Control
(
sout_access_out_t
*
,
int
,
va_list
);
static
void
*
ThreadWrite
(
vlc_object_t
*
);
static
block_t
*
NewUDPPacket
(
sout_access_out_t
*
,
mtime_t
);
...
...
@@ -260,9 +261,7 @@ static int Open( vlc_object_t *p_this )
p_access
->
pf_write
=
Write
;
p_access
->
pf_seek
=
Seek
;
/* update p_sout->i_out_pace_nocontrol */
p_access
->
p_sout
->
i_out_pace_nocontrol
++
;
p_access
->
pf_control
=
Control
;
return
VLC_SUCCESS
;
}
...
...
@@ -298,13 +297,27 @@ static void Close( vlc_object_t * p_this )
vlc_object_detach
(
p_sys
->
p_thread
);
vlc_object_release
(
p_sys
->
p_thread
);
/* update p_sout->i_out_pace_nocontrol */
p_access
->
p_sout
->
i_out_pace_nocontrol
--
;
msg_Dbg
(
p_access
,
"UDP access output closed"
);
free
(
p_sys
);
}
static
int
Control
(
sout_access_out_t
*
p_access
,
int
i_query
,
va_list
args
)
{
(
void
)
p_access
;
switch
(
i_query
)
{
case
ACCESS_OUT_CONTROLS_PACE
:
*
va_arg
(
args
,
bool
*
)
=
false
;
break
;
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
/*****************************************************************************
* Write: standard write on a file descriptor.
*****************************************************************************/
...
...
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