summaryrefslogtreecommitdiff
path: root/libavcodec/mfenc.c
Commit message (Collapse)AuthorAge
* avcodec/mfenc: remove usage of avctx->pkt_timebaseJames Almer2021-08-06
| | | | | | The field is documented to be for decoding only. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec: Constify AVCodecsAndreas Rheinhardt2021-04-27
| | | | | | | | | | Given that the AVCodec.next pointer has now been removed, most of the AVCodecs are not modified at all any more and can therefore be made const (as this patch does); the only exceptions are the very few codecs for external libraries that have a init_static_data callback. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mfenc: use AVCodecContext.get_encode_buffer()James Almer2021-03-17
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/encode: restructure the core encoding codeJames Almer2020-06-18
| | | | | | | | | | | | | | | | This commit follows the same logic as 061a0c14bb, but for the encode API: The new public encoding API will no longer be a wrapper around the old deprecated one, and the internal API used by the encoders now consists of a single receive_packet() callback that pulls frames as required. amf encoders adapted by James Almer librav1e encoder adapted by James Almer nvidia encoders adapted by James Almer MediaFoundation encoders adapted by James Almer vaapi encoders adapted by Linjie Fu v4l2_m2m encoders adapted by Andriy Gelman Signed-off-by: James Almer <jamrial@gmail.com>
* mfenc: Avoid including codecapi.h, fix building in UWP mode with clangMartin Storsjö2020-05-27
| | | | | | | | | | | | | Including codecapi.h and uuids.h in UWP mode doesn't define all defines properly, ending up with constructs that MSVC silently tolerates, but that clang errors out on, like this: DEFINE_GUIDEX(CODECAPI_AVEncCommonFormatConstraint); Just avoid including codecapi.h completely and hardcode the last few enum values we use from there. We already use local versions of most enums from there, due to older mingw-w64 headers being incomplete. Signed-off-by: Martin Storsjö <martin@martin.st>
* mfenc: Remove an unused includeMartin Storsjö2020-05-27
| | | | | | | This might have been used originally for the decoder parts of the MediaFoundation wrapper, which aren't merged yet. Signed-off-by: Martin Storsjö <martin@martin.st>
* mfenc: Fall back to avctx->time_base if avctx->framerate isn't setMartin Storsjö2020-05-22
| | | | | | | | The framerate field is the one users are supposed to set, but not all users might be setting it, so it might be good to fall back time_base in that case. Signed-off-by: Martin Storsjö <martin@martin.st>
* mfenc: Fix setting has_b_frames for max_b_frames == 1Martin Storsjö2020-05-22
| | | | | | | This was a mistake in my own additions in 050b72ab5ef318605b305aa6cb920e8b52f1002e. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec: Add MediaFoundation encoder wrapperwm42020-05-19
This contains encoder wrappers for H264, HEVC, AAC, AC3 and MP3. This is based on top of an original patch by wm4 <nfxjfg@googlemail.com>. The original patch supported both encoding and decoding, but this patch only includes encoding. The patch contains further changes by Paweł Wegner <pawel.wegner95@gmail.com> (primarily for splitting out the encoding parts of the original patch) and further cleanup, build compatibility fixes and tweaks for use with Qualcomm encoders by Martin Storsjö. Signed-off-by: Martin Storsjö <martin@martin.st>