refactor(video): move encoder declarations to header#2185
refactor(video): move encoder declarations to header#2185ReenigneArcher merged 1 commit intonightlyfrom
Conversation
73c1b85 to
a11a795
Compare
|
Docs build fails due to duplicate C++ declaration. breathe-doc/breathe#972 |
a11a795 to
857030e
Compare
kentyman23
left a comment
There was a problem hiding this comment.
My using directive comment is the only one that might warrant a change.
857030e to
578133d
Compare
| static std::string_view | ||
| from_flag(flag_e flag) { | ||
| #define _CONVERT(x) \ | ||
| case flag_e::x: \ | ||
| std::string_view(#x) | ||
| switch (flag) { | ||
| _CONVERT(PASSED); | ||
| _CONVERT(REF_FRAMES_RESTRICT); | ||
| _CONVERT(CBR); | ||
| _CONVERT(DYNAMIC_RANGE); | ||
| _CONVERT(VUI_PARAMETERS); | ||
| _CONVERT(MAX_FLAGS); | ||
| } | ||
| #undef _CONVERT | ||
|
|
||
| return {"unknown"}; | ||
| } |
There was a problem hiding this comment.
This was refactored slightly to avoid using namespace std::literal; in the header.
578133d to
20994a4
Compare
| #include <libavutil/mastering_display_metadata.h> | ||
| #include <libavutil/opt.h> | ||
| #include <libavutil/pixdesc.h> | ||
| #include <libswscale/swscale.h> |
There was a problem hiding this comment.
Is something else pulling this in for the swscale APIs below?
There was a problem hiding this comment.
Probably swscale from the video.h
There was a problem hiding this comment.
I can leave it in video.cpp as well, if that's preferred.
f443666 to
5c22ff9
Compare
|
Converted to draft as there are a probably a few declarations that would need to be moved to the header in order to use for unit testing. At least the following, but maybe more. bool
validate_encoder(encoder_t &encoder, bool expect_failure); |
5c22ff9 to
df6ac6b
Compare
df6ac6b to
73b3838
Compare
|
I have a working H264 software encoder fixture, so I think this is ready Edit: I now have parametrized encoder fixtures, unavailable encoders are skipped automatically except the software encoder which is set to fail since it "should" be available in all cases. |
815d277 to
bdda93b
Compare
bdda93b to
6b45fe5
Compare
6b45fe5 to
d6abb19
Compare
d6abb19 to
f7ebffc
Compare
Description
This PR aims to simplify creation of encoder fixtures for unit testing (#1603).
Screenshot
Issues Fixed or Closed
Type of Change
.github/...)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.