style: adjust clang-format rules (#2186)
Co-authored-by: Vithorio Polten <reach@vithor.io>
This commit is contained in:
@@ -4,17 +4,20 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "src/platform/common.h"
|
||||
|
||||
// platform includes
|
||||
#include <CoreMedia/CoreMedia.h>
|
||||
#include <CoreVideo/CoreVideo.h>
|
||||
|
||||
// local includes
|
||||
#include "src/platform/common.h"
|
||||
|
||||
namespace platf {
|
||||
struct av_sample_buf_t {
|
||||
CMSampleBufferRef buf;
|
||||
|
||||
explicit av_sample_buf_t(CMSampleBufferRef buf):
|
||||
buf((CMSampleBufferRef) CFRetain(buf)) {}
|
||||
buf((CMSampleBufferRef) CFRetain(buf)) {
|
||||
}
|
||||
|
||||
~av_sample_buf_t() {
|
||||
if (buf != nullptr) {
|
||||
@@ -29,12 +32,12 @@ namespace platf {
|
||||
// Constructor
|
||||
explicit av_pixel_buf_t(CMSampleBufferRef sb):
|
||||
buf(
|
||||
CMSampleBufferGetImageBuffer(sb)) {
|
||||
CMSampleBufferGetImageBuffer(sb)
|
||||
) {
|
||||
CVPixelBufferLockBaseAddress(buf, kCVPixelBufferLock_ReadOnly);
|
||||
}
|
||||
|
||||
[[nodiscard]] uint8_t *
|
||||
data() const {
|
||||
[[nodiscard]] uint8_t *data() const {
|
||||
return static_cast<uint8_t *>(CVPixelBufferGetBaseAddress(buf));
|
||||
}
|
||||
|
||||
@@ -59,8 +62,11 @@ namespace platf {
|
||||
temp_retain_av_img_t(
|
||||
std::shared_ptr<av_sample_buf_t> sb,
|
||||
std::shared_ptr<av_pixel_buf_t> pb,
|
||||
uint8_t *dt):
|
||||
uint8_t *dt
|
||||
):
|
||||
sample_buffer(std::move(sb)),
|
||||
pixel_buffer(std::move(pb)), data(dt) {}
|
||||
pixel_buffer(std::move(pb)),
|
||||
data(dt) {
|
||||
}
|
||||
};
|
||||
} // namespace platf
|
||||
|
||||
Reference in New Issue
Block a user