-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(video): move encoder declarations to header #2185
refactor(video): move encoder declarations to header #2185
Conversation
73c1b85
to
a11a795
Compare
Docs build fails due to duplicate C++ declaration. breathe-doc/breathe#972 |
a11a795
to
857030e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My using
directive comment is the only one that might warrant a change.
857030e
to
578133d
Compare
src/video.h
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was refactored slightly to avoid using namespace std::literal;
in the header.
578133d
to
20994a4
Compare
@@ -14,7 +14,6 @@ extern "C" { | |||
#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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is something else pulling this in for the swscale APIs below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably swscale from the video.h
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.