Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
822e80fd
Commit
822e80fd
authored
Oct 08, 2015
by
Rodger Combs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: add internal API to append a bsf to a stream's list
parent
1f9139b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
internal.h
libavformat/internal.h
+11
-0
utils.c
libavformat/utils.c
+22
-0
No files found.
libavformat/internal.h
View file @
822e80fd
...
...
@@ -464,6 +464,17 @@ enum AVChromaLocation ff_choose_chroma_location(AVFormatContext *s, AVStream *st
*/
int
ff_generate_avci_extradata
(
AVStream
*
st
);
/**
* Add a bitstream filter to a stream.
*
* @param st output stream to add a filter to
* @param name the name of the filter to add
* @param args filter-specific argument string
* @return >0 on success;
* AVERROR code on failure
*/
int
ff_stream_add_bitstream_filter
(
AVStream
*
st
,
const
char
*
name
,
const
char
*
args
);
/**
* Wrap errno on rename() error.
*
...
...
libavformat/utils.c
View file @
822e80fd
...
...
@@ -4651,6 +4651,28 @@ uint8_t *av_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type,
return
data
;
}
int
ff_stream_add_bitstream_filter
(
AVStream
*
st
,
const
char
*
name
,
const
char
*
args
)
{
AVBitStreamFilterContext
*
bsfc
=
NULL
;
AVBitStreamFilterContext
**
dest
=
&
st
->
internal
->
bsfc
;
while
(
*
dest
&&
(
*
dest
)
->
next
)
dest
=
&
(
*
dest
)
->
next
;
if
(
!
(
bsfc
=
av_bitstream_filter_init
(
name
)))
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"Unknown bitstream filter '%s'
\n
"
,
name
);
return
AVERROR
(
EINVAL
);
}
if
(
args
&&
!
(
bsfc
->
args
=
av_strdup
(
args
)))
{
av_bitstream_filter_close
(
bsfc
);
return
AVERROR
(
ENOMEM
);
}
av_log
(
st
->
codec
,
AV_LOG_VERBOSE
,
"Automatically inserted bitstream filter '%s'; args='%s'
\n
"
,
name
,
args
?
args
:
""
);
*
dest
=
bsfc
;
return
1
;
}
int
av_apply_bitstream_filters
(
AVCodecContext
*
codec
,
AVPacket
*
pkt
,
AVBitStreamFilterContext
*
bsfc
)
{
...
...
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