-
Notifications
You must be signed in to change notification settings - Fork 282
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
Video code enhancements #2507
Video code enhancements #2507
Conversation
mohamedchebbii
commented
Feb 10, 2023
- Rework of aspectRatio method for all video formats
- Rework of GUID's asf decoding
👇 Click on the image for a new way to code review
Legend |
Codecov Report
@@ Coverage Diff @@
## main #2507 +/- ##
==========================================
+ Coverage 64.46% 64.67% +0.21%
==========================================
Files 104 104
Lines 22389 22260 -129
Branches 10911 10848 -63
==========================================
- Hits 14432 14397 -35
+ Misses 5710 5622 -88
+ Partials 2247 2241 -6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
…xiv2 into video_code_enhancements
* | ||
*/ | ||
|
||
bool AsfVideo::GUIDTag::operator==(const AsfVideo::GUIDTag& other) const { |
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 is equivalent to = default. No need for this.
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 beleive you are talking about operator= but here I developped operator== to compare with other tags.
github/exiv2/src/asfvideo.cpp:203:17: error: invalid operands to binary expression ('const AsfVideo::GUIDTag' and 'AsfVideo::GUIDTag')
return Header == AsfVideo::GUIDTag(buf);
bool operator==(const GUIDTag& other) const; | ||
|
||
// Constructor to create a GUID object by passing individual values for each attribute | ||
GUIDTag(unsigned int data1, unsigned short data2, unsigned short data3, std::array<byte, 8> data4); |
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 don't think this is needed, {} can be used instead of ().
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.
but here I already have " GUIDTag(const uint8_t* bytes);" witch will delete the default initializer list
exiv2/src/asfvideo.cpp:92:25: error: no matching constructor for initialization of 'const AsfVideo::GUIDTag'
const AsfVideo::GUIDTag Header = {0x75B22630, 0x668E, 0x11CF, {0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
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.
that error comes from the std::array.
const AsfVideo::GUIDTag Header = {0x75B22630, 0x668E, 0x11CF, std::array<byte, 8>{0xA6, 0xD9, 0x00, 0xAA, 0x00, 0x62, 0xCE, 0x6C}};
should work. or don't use std::array. I can handle this in a later PR if you want.