Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
70a513b9
Commit
70a513b9
authored
Aug 25, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter: separate hard-coded "record" stream filter insertion
parent
15a2182a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
19 deletions
+12
-19
src/input/input.c
src/input/input.c
+4
-2
src/input/stream.h
src/input/stream.h
+3
-6
src/input/stream_filter.c
src/input/stream_filter.c
+5
-11
No files found.
src/input/input.c
View file @
70a513b9
...
...
@@ -2313,10 +2313,12 @@ static int InputSourceInit( input_thread_t *p_input,
char
*
psz_stream_filter
=
var_GetNonEmptyString
(
p_input
,
"stream-filter"
);
p_stream
=
stream_FilterChainNew
(
p_stream
,
psz_stream_filter
,
var_GetBool
(
p_input
,
"input-record-native"
)
);
p_stream
=
stream_FilterChainNew
(
p_stream
,
psz_stream_filter
);
free
(
psz_stream_filter
);
if
(
var_GetBool
(
p_input
,
"input-record-native"
)
)
p_stream
=
stream_FilterChainNew
(
p_stream
,
"record"
);
if
(
!
p_input
->
b_preparsing
)
{
bool
b
;
...
...
src/input/stream.h
View file @
70a513b9
...
...
@@ -55,14 +55,11 @@ stream_t *stream_FilterNew( stream_t *p_source,
stream_t
*
stream_FilterAutoNew
(
stream_t
*
source
)
VLC_USED
;
/**
* This function creates a chain of filters:
* - optional user filters (configured by psz_chain) are inserted.
* - an optional record filter is inserted if b_record is true.
* This function creates a chain of filters according to the colon-separated
* list.
*
* You must release the returned value using stream_Delete unless it is used as a
* source to another filter.
*/
stream_t
*
stream_FilterChainNew
(
stream_t
*
p_source
,
const
char
*
psz_chain
,
bool
b_record
);
stream_t
*
stream_FilterChainNew
(
stream_t
*
p_source
,
const
char
*
psz_chain
);
#endif
src/input/stream_filter.c
View file @
70a513b9
...
...
@@ -88,12 +88,13 @@ stream_t *stream_FilterAutoNew( stream_t *p_source )
return
p_source
;
}
stream_t
*
stream_FilterChainNew
(
stream_t
*
p_source
,
const
char
*
psz_chain
,
bool
b_record
)
stream_t
*
stream_FilterChainNew
(
stream_t
*
p_source
,
const
char
*
psz_chain
)
{
if
(
psz_chain
==
NULL
)
return
p_source
;
/* Add user stream filter */
char
*
psz_tmp
=
psz_chain
?
strdup
(
psz_chain
)
:
NULL
;
char
*
psz_tmp
=
strdup
(
psz_chain
)
;
char
*
psz
=
psz_tmp
;
while
(
psz
&&
*
psz
)
{
...
...
@@ -113,13 +114,6 @@ stream_t *stream_FilterChainNew( stream_t *p_source,
}
free
(
psz_tmp
);
/* Add record filter if useful */
if
(
b_record
)
{
stream_t
*
p_filter
=
stream_FilterNew
(
p_source
,
"record"
);
if
(
p_filter
)
p_source
=
p_filter
;
}
return
p_source
;
}
...
...
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