1
0
Fork 0
Commit Graph

15 Commits

Author SHA1 Message Date
Marvin Scholz 0d34137925 avcodec/bsf: document missing arguments 2022-10-17 09:56:47 +02:00
Andreas Rheinhardt f4098bbc3b avcodec/bsf: Add FFBitStreamFilter, hide internals of BSFs
This patch is analogous to 20f972701806be20a77f808db332d9489343bb78:
It hides the internal part of AVBitStreamFilter by adding a new
internal structure FFBitStreamFilter (declared in bsf_internal.h)
that has an AVBitStreamFilter as its first member; the internal
part of AVBitStreamFilter is moved to this new structure.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-23 23:45:45 +01:00
Anton Khirnov a24e6ca8bf lavc/bsf: improve doxy 2022-03-19 15:59:58 +01:00
Anton Khirnov 5e7643eff7 lavc/bsf: add general documentation
Also, place the BSF api docs in their own doxygen group.
2022-03-19 15:59:07 +01:00
Andreas Rheinhardt afeefb306e avcodec/bsf: Avoid allocation for AVBSFInternal
Do this by allocating AVBSFContext together with the data that is
currently in AVBSFInternal; or rather: Put AVBSFContext at the beginning
of a new structure called FFBSFContext (which encompasses more than just
the internal fields and is a proper context in its own right, hence the
name) and remove the AVBSFInternal altogether.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-08-25 23:01:54 +02:00
James Almer 161d7f3fee avcodec/bsf: improve the doxy for av_bsf_flush()
Mention an example scenario where the function should be used.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-15 15:55:22 -03:00
James Almer 1e8ed181e3 avcodec/bsf: mention that av_bsf_send_packet() returning EAGAIN is not an error
EAGAIN is returned when input is provided but can't be consumed. The filtering
process is unaffected in this case, and the function will be able to consume
new input after retrieving filtered packets with av_bsf_receive_packet().

Remove the line about empty packets never failing added in
41b05b849f while at it. Even if it's currently
the case, it unnecessarily constrains the API and could be changed in the future
in case it needs to be extended.
The user should always check for errors and never expect a call to never fail.

Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-05-22 11:16:40 -03:00
Anton Khirnov bdd6aa25c1 avcodec.h: split bitstream filters API into its own header 2020-05-22 14:38:57 +02:00
Anton Khirnov bf80725352 lavc: rename bsf.h to bsf_internal.h
This will allow adding a public header named bsf.h
2020-05-22 14:38:57 +02:00
Andreas Rheinhardt 47cd3c88c5 avcodec/bsf: Restrict ff_bsf_get_packet_ref() return values to <= 0
Up until now the documentation of ff_bsf_get_packet_ref() allowed return
values >= 0 in case of success, whereas av_bsf_receive_packet() only
allows 0 on success. Given that for some bitstream filters the return
value of ff_bsf_get_packet_ref() is forwarded to the caller of
av_bsf_receive_packet() without any filtering, there would be a problem
if ff_bsf_get_packet_ref() actually returned values > 0. But it
currently doesn't and there is no reason why it should ever do so.
Therefore this commit aligns the return values of these functions by
restricting ff_bsf_get_packet_ref() to always returns 0 on success.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-05-08 20:54:15 +02:00
Jan Sebechlebsky 7ae52f8a6b avcodec/bsf: Add ff_bsf_get_packet_ref() function
Use of this function can save unnecessary malloc operation
in bitstream filter.

Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-13 12:46:18 +02:00
Clément Bœsch 8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Vittorio Giovara 41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Derek Buitenhuis af9cac1be1 Merge commit '33d18982fa03feb061c8f744a4f0a9175c1f63ab'
* commit '33d18982fa03feb061c8f744a4f0a9175c1f63ab':
  lavc: add a new bitstream filtering API

Conversions-by: Hendrik Leppkes <h.leppkes@gmail.com>
Conversions-by: Derek Buitenguis <derek.buitenhuis@gmail.com>
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 18:47:40 +01:00
Anton Khirnov 33d18982fa lavc: add a new bitstream filtering API
Deprecate the current bitstream filtering API.
2016-03-20 08:15:01 +01:00