Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
2e3d76dc
Commit
2e3d76dc
authored
Dec 10, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decomp: implement minimal controls
parent
d81b33c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
5 deletions
+28
-5
modules/stream_filter/decomp.c
modules/stream_filter/decomp.c
+28
-5
No files found.
modules/stream_filter/decomp.c
View file @
2e3d76dc
...
@@ -57,6 +57,7 @@ vlc_module_end ()
...
@@ -57,6 +57,7 @@ vlc_module_end ()
struct
stream_sys_t
struct
stream_sys_t
{
{
block_t
*
peeked
;
block_t
*
peeked
;
uint64_t
offset
;
vlc_thread_t
thread
;
vlc_thread_t
thread
;
pid_t
pid
;
pid_t
pid
;
int
write_fd
,
read_fd
;
int
write_fd
,
read_fd
;
...
@@ -158,7 +159,11 @@ static int Read (stream_t *stream, void *buf, unsigned int buflen)
...
@@ -158,7 +159,11 @@ static int Read (stream_t *stream, void *buf, unsigned int buflen)
}
}
length
=
net_Read
(
stream
,
p_sys
->
read_fd
,
NULL
,
buf
,
buflen
,
false
);
length
=
net_Read
(
stream
,
p_sys
->
read_fd
,
NULL
,
buf
,
buflen
,
false
);
return
bonus
+
((
length
>=
0
)
?
length
:
0
);
if
(
length
<
0
)
return
0
;
length
+=
bonus
;
p_sys
->
offset
+=
length
;
return
length
;
}
}
/**
/**
...
@@ -198,10 +203,27 @@ static int Peek (stream_t *stream, const uint8_t **pbuf, unsigned int len)
...
@@ -198,10 +203,27 @@ static int Peek (stream_t *stream, const uint8_t **pbuf, unsigned int len)
*/
*/
static
int
Control
(
stream_t
*
stream
,
int
query
,
va_list
args
)
static
int
Control
(
stream_t
*
stream
,
int
query
,
va_list
args
)
{
{
/*stream_sys_t *p_sys = stream->p_sys;*/
stream_sys_t
*
p_sys
=
stream
->
p_sys
;
(
void
)
stream
;
(
void
)
query
;
(
void
)
args
;
switch
(
query
)
return
VLC_EGENERIC
;
{
case
STREAM_CAN_SEEK
:
case
STREAM_CAN_FASTSEEK
:
*
(
va_arg
(
args
,
bool
*
))
=
false
;
break
;
case
STREAM_GET_POSITION
:
*
(
va_arg
(
args
,
int64_t
*
))
=
p_sys
->
offset
;
break
;
case
STREAM_GET_SIZE
:
*
(
va_arg
(
args
,
int64_t
*
))
=
0
;
break
;
case
STREAM_GET_MTU
:
*
(
va_arg
(
args
,
int
*
))
=
0
;
break
;
default:
return
VLC_EGENERIC
;
}
return
VLC_SUCCESS
;
}
}
/**
/**
...
@@ -219,6 +241,7 @@ static int Open (stream_t *stream, const char *path)
...
@@ -219,6 +241,7 @@ static int Open (stream_t *stream, const char *path)
stream
->
pf_peek
=
Peek
;
stream
->
pf_peek
=
Peek
;
stream
->
pf_control
=
Control
;
stream
->
pf_control
=
Control
;
p_sys
->
peeked
=
NULL
;
p_sys
->
peeked
=
NULL
;
p_sys
->
offset
=
0
;
p_sys
->
pid
=
-
1
;
p_sys
->
pid
=
-
1
;
/* I am not a big fan of the pyramid style, but I cannot think of anything
/* I am not a big fan of the pyramid style, but I cannot think of anything
...
...
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