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
033efbad
Commit
033efbad
authored
Dec 09, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics.
parent
2c7d795f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
44 deletions
+58
-44
src/input/input.c
src/input/input.c
+7
-44
src/input/stream.h
src/input/stream.h
+4
-0
src/input/stream_filter.c
src/input/stream_filter.c
+47
-0
No files found.
src/input/input.c
View file @
033efbad
...
...
@@ -2325,8 +2325,6 @@ static int InputSourceInit( input_thread_t *p_input,
const
char
*
psz_access
;
const
char
*
psz_demux
;
char
*
psz_path
;
char
*
psz_tmp
;
char
*
psz
;
vlc_value_t
val
;
double
f_fps
;
...
...
@@ -2520,48 +2518,13 @@ static int InputSourceInit( input_thread_t *p_input,
goto
error
;
}
/* Add auto stream filter */
for
(
;;
)
{
stream_t
*
p_filter
=
stream_FilterNew
(
in
->
p_stream
,
NULL
);
if
(
!
p_filter
)
break
;
msg_Dbg
(
p_input
,
"Inserted a stream filter"
);
in
->
p_stream
=
p_filter
;
}
/* Add user stream filter */
psz_tmp
=
psz
=
var_GetNonEmptyString
(
p_input
,
"stream-filter"
);
while
(
psz
&&
*
psz
)
{
stream_t
*
p_filter
;
char
*
psz_end
=
strchr
(
psz
,
':'
);
if
(
psz_end
)
*
psz_end
++
=
'\0'
;
p_filter
=
stream_FilterNew
(
in
->
p_stream
,
psz
);
if
(
p_filter
)
in
->
p_stream
=
p_filter
;
else
msg_Warn
(
p_input
,
"failed to insert stream filter %s"
,
psz
);
psz
=
psz_end
;
}
free
(
psz_tmp
);
/* Add record filter if usefull */
if
(
var_GetBool
(
p_input
,
"input-record-native"
)
)
{
stream_t
*
p_filter
;
p_filter
=
stream_FilterNew
(
in
->
p_stream
,
"stream_filter_record"
);
if
(
p_filter
)
in
->
p_stream
=
p_filter
;
else
var_SetBool
(
p_input
,
"input-record-native"
,
false
);
}
/* Add stream filters */
char
*
psz_stream_filter
=
var_GetNonEmptyString
(
p_input
,
"stream-filter"
);
in
->
p_stream
=
stream_FilterChainNew
(
in
->
p_stream
,
psz_stream_filter
,
var_GetBool
(
p_input
,
"input-record-native"
)
);
free
(
psz_stream_filter
);
/* Open a demuxer */
if
(
*
psz_demux
==
'\0'
&&
*
in
->
p_access
->
psz_demux
)
...
...
src/input/stream.h
View file @
033efbad
...
...
@@ -51,5 +51,9 @@ stream_t *stream_AccessNew( access_t *p_access, bool );
stream_t
*
stream_FilterNew
(
stream_t
*
p_source
,
const
char
*
psz_stream_filter
);
/* */
stream_t
*
stream_FilterChainNew
(
stream_t
*
p_source
,
const
char
*
psz_chain
,
bool
b_record
);
#endif
src/input/stream_filter.c
View file @
033efbad
...
...
@@ -61,6 +61,53 @@ stream_t *stream_FilterNew( stream_t *p_source,
return
s
;
}
stream_t
*
stream_FilterChainNew
(
stream_t
*
p_source
,
const
char
*
psz_chain
,
bool
b_record
)
{
/* Add auto stream filter */
for
(
;;
)
{
stream_t
*
p_filter
=
stream_FilterNew
(
p_source
,
NULL
);
if
(
!
p_filter
)
break
;
msg_Dbg
(
p_filter
,
"Inserted a stream filter"
);
p_source
=
p_filter
;
}
/* Add user stream filter */
char
*
psz_tmp
=
psz_chain
?
strdup
(
psz_chain
)
:
NULL
;
char
*
psz
=
psz_tmp
;
while
(
psz
&&
*
psz
)
{
stream_t
*
p_filter
;
char
*
psz_end
=
strchr
(
psz
,
':'
);
if
(
psz_end
)
*
psz_end
++
=
'\0'
;
p_filter
=
stream_FilterNew
(
p_source
,
psz
);
if
(
p_filter
)
p_source
=
p_filter
;
else
msg_Warn
(
p_source
,
"failed to insert stream filter %s"
,
psz
);
psz
=
psz_end
;
}
free
(
psz_tmp
);
/* Add record filter if usefull */
if
(
b_record
)
{
stream_t
*
p_filter
=
stream_FilterNew
(
p_source
,
"stream_filter_record"
);
if
(
p_filter
)
p_source
=
p_filter
;
}
return
p_source
;
}
static
void
StreamDelete
(
stream_t
*
s
)
{
module_unneed
(
s
,
s
->
p_module
);
...
...
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