style(macos): various code style fixes (#2086)
This commit is contained in:
@@ -130,9 +130,9 @@
|
|||||||
|
|
||||||
CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer(sampleBuffer, NULL, &audioBufferList, sizeof(audioBufferList), NULL, NULL, 0, &blockBuffer);
|
CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer(sampleBuffer, NULL, &audioBufferList, sizeof(audioBufferList), NULL, NULL, 0, &blockBuffer);
|
||||||
|
|
||||||
// NSAssert(audioBufferList.mNumberBuffers == 1, @"Expected interlveaved PCM format but buffer contained %u streams", audioBufferList.mNumberBuffers);
|
// NSAssert(audioBufferList.mNumberBuffers == 1, @"Expected interleaved PCM format but buffer contained %u streams", audioBufferList.mNumberBuffers);
|
||||||
|
|
||||||
// this is safe, because an interleaved PCM stream has exactly one buffer
|
// this is safe, because an interleaved PCM stream has exactly one buffer,
|
||||||
// and we don't want to do sanity checks in a performance critical exec path
|
// and we don't want to do sanity checks in a performance critical exec path
|
||||||
AudioBuffer audioBuffer = audioBufferList.mBuffers[0];
|
AudioBuffer audioBuffer = audioBufferList.mBuffers[0];
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace platf {
|
namespace platf {
|
||||||
struct av_sample_buf_t {
|
struct av_sample_buf_t {
|
||||||
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() {
|
~av_sample_buf_t() {
|
||||||
@@ -22,12 +22,12 @@ namespace platf {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct av_pixel_buf_t {
|
struct av_pixel_buf_t {
|
||||||
av_pixel_buf_t(CVPixelBufferRef buf):
|
explicit av_pixel_buf_t(CVPixelBufferRef buf):
|
||||||
buf((CVPixelBufferRef) CFRetain(buf)),
|
buf((CVPixelBufferRef) CFRetain(buf)),
|
||||||
locked(false) {}
|
locked(false) {}
|
||||||
|
|
||||||
uint8_t *
|
[[nodiscard]] uint8_t *
|
||||||
lock() {
|
lock() const {
|
||||||
if (!locked) {
|
if (!locked) {
|
||||||
CVPixelBufferLockBaseAddress(buf, kCVPixelBufferLock_ReadOnly);
|
CVPixelBufferLockBaseAddress(buf, kCVPixelBufferLock_ReadOnly);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
|
|
||||||
self.displayID = displayID;
|
self.displayID = displayID;
|
||||||
self.pixelFormat = kCVPixelFormatType_32BGRA;
|
self.pixelFormat = kCVPixelFormatType_32BGRA;
|
||||||
self.frameWidth = CGDisplayModeGetPixelWidth(mode);
|
self.frameWidth = (int) CGDisplayModeGetPixelWidth(mode);
|
||||||
self.frameHeight = CGDisplayModeGetPixelHeight(mode);
|
self.frameHeight = (int) CGDisplayModeGetPixelHeight(mode);
|
||||||
self.minFrameDuration = CMTimeMake(1, frameRate);
|
self.minFrameDuration = CMTimeMake(1, frameRate);
|
||||||
self.session = [[AVCaptureSession alloc] init];
|
self.session = [[AVCaptureSession alloc] init];
|
||||||
self.videoOutputs = [[NSMapTable alloc] init];
|
self.videoOutputs = [[NSMapTable alloc] init];
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
#include "src/platform/macos/nv12_zero_device.h"
|
#include "src/platform/macos/nv12_zero_device.h"
|
||||||
|
|
||||||
#include "src/config.h"
|
#include "src/config.h"
|
||||||
#include "src/main.h"
|
|
||||||
|
|
||||||
// Avoid conflict between AVFoundation and libavutil both defining AVMediaType
|
// Avoid conflict between AVFoundation and libavutil both defining AVMediaType
|
||||||
#define AVMediaType AVMediaType_FFmpeg
|
#define AVMediaType AVMediaType_FFmpeg
|
||||||
@@ -21,10 +20,10 @@ namespace platf {
|
|||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
|
|
||||||
struct av_display_t: public display_t {
|
struct av_display_t: public display_t {
|
||||||
AVVideo *av_capture;
|
AVVideo *av_capture {};
|
||||||
CGDirectDisplayID display_id;
|
CGDirectDisplayID display_id {};
|
||||||
|
|
||||||
~av_display_t() {
|
~av_display_t() override {
|
||||||
[av_capture release];
|
[av_capture release];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,9 +44,9 @@ namespace platf {
|
|||||||
av_img->pixel_buffer = std::make_shared<av_pixel_buf_t>(pixelBuffer);
|
av_img->pixel_buffer = std::make_shared<av_pixel_buf_t>(pixelBuffer);
|
||||||
img_out->data = av_img->pixel_buffer->lock();
|
img_out->data = av_img->pixel_buffer->lock();
|
||||||
|
|
||||||
img_out->width = CVPixelBufferGetWidth(pixelBuffer);
|
img_out->width = (int) CVPixelBufferGetWidth(pixelBuffer);
|
||||||
img_out->height = CVPixelBufferGetHeight(pixelBuffer);
|
img_out->height = (int) CVPixelBufferGetHeight(pixelBuffer);
|
||||||
img_out->row_pitch = CVPixelBufferGetBytesPerRow(pixelBuffer);
|
img_out->row_pitch = (int) CVPixelBufferGetBytesPerRow(pixelBuffer);
|
||||||
img_out->pixel_pitch = img_out->row_pitch / img_out->width;
|
img_out->pixel_pitch = img_out->row_pitch / img_out->width;
|
||||||
|
|
||||||
if (!push_captured_image_cb(std::move(img_out), true)) {
|
if (!push_captured_image_cb(std::move(img_out), true)) {
|
||||||
@@ -101,9 +100,9 @@ namespace platf {
|
|||||||
av_img->pixel_buffer = std::make_shared<av_pixel_buf_t>(pixelBuffer);
|
av_img->pixel_buffer = std::make_shared<av_pixel_buf_t>(pixelBuffer);
|
||||||
img->data = av_img->pixel_buffer->lock();
|
img->data = av_img->pixel_buffer->lock();
|
||||||
|
|
||||||
img->width = CVPixelBufferGetWidth(pixelBuffer);
|
img->width = (int) CVPixelBufferGetWidth(pixelBuffer);
|
||||||
img->height = CVPixelBufferGetHeight(pixelBuffer);
|
img->height = (int) CVPixelBufferGetHeight(pixelBuffer);
|
||||||
img->row_pitch = CVPixelBufferGetBytesPerRow(pixelBuffer);
|
img->row_pitch = (int) CVPixelBufferGetBytesPerRow(pixelBuffer);
|
||||||
img->pixel_pitch = img->row_pitch / img->width;
|
img->pixel_pitch = img->row_pitch / img->width;
|
||||||
|
|
||||||
// returning false here stops capture backend
|
// returning false here stops capture backend
|
||||||
@@ -177,7 +176,7 @@ namespace platf {
|
|||||||
display_names.reserve([display_array count]);
|
display_names.reserve([display_array count]);
|
||||||
[display_array enumerateObjectsUsingBlock:^(NSDictionary *_Nonnull obj, NSUInteger idx, BOOL *_Nonnull stop) {
|
[display_array enumerateObjectsUsingBlock:^(NSDictionary *_Nonnull obj, NSUInteger idx, BOOL *_Nonnull stop) {
|
||||||
NSString *name = obj[@"name"];
|
NSString *name = obj[@"name"];
|
||||||
display_names.push_back(name.UTF8String);
|
display_names.emplace_back(name.UTF8String);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
return display_names;
|
return display_names;
|
||||||
|
|||||||
@@ -21,17 +21,17 @@ namespace platf {
|
|||||||
|
|
||||||
struct macos_input_t {
|
struct macos_input_t {
|
||||||
public:
|
public:
|
||||||
CGDirectDisplayID display;
|
CGDirectDisplayID display {};
|
||||||
CGFloat displayScaling;
|
CGFloat displayScaling {};
|
||||||
CGEventSourceRef source;
|
CGEventSourceRef source {};
|
||||||
|
|
||||||
// keyboard related stuff
|
// keyboard related stuff
|
||||||
CGEventRef kb_event;
|
CGEventRef kb_event {};
|
||||||
CGEventFlags kb_flags;
|
CGEventFlags kb_flags {};
|
||||||
|
|
||||||
// mouse related stuff
|
// mouse related stuff
|
||||||
CGEventRef mouse_event; // mouse event source
|
CGEventRef mouse_event {}; // mouse event source
|
||||||
bool mouse_down[3]; // mouse button status
|
bool mouse_down[3] {}; // mouse button status
|
||||||
std::chrono::steady_clock::steady_clock::time_point last_mouse_event[3][2]; // timestamp of last mouse events
|
std::chrono::steady_clock::steady_clock::time_point last_mouse_event[3][2]; // timestamp of last mouse events
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ const KeyCodeMap kKeyCodesMap[] = {
|
|||||||
|
|
||||||
int
|
int
|
||||||
keysym(int keycode) {
|
keysym(int keycode) {
|
||||||
KeyCodeMap key_map;
|
KeyCodeMap key_map {};
|
||||||
|
|
||||||
key_map.win_keycode = keycode;
|
key_map.win_keycode = keycode;
|
||||||
const KeyCodeMap *temp_map = std::lower_bound(
|
const KeyCodeMap *temp_map = std::lower_bound(
|
||||||
@@ -330,13 +330,13 @@ const KeyCodeMap kKeyCodesMap[] = {
|
|||||||
|
|
||||||
if (location.x < 0)
|
if (location.x < 0)
|
||||||
location.x = 0;
|
location.x = 0;
|
||||||
if (location.x >= CGDisplayPixelsWide(display))
|
if (location.x >= (double) CGDisplayPixelsWide(display))
|
||||||
location.x = CGDisplayPixelsWide(display) - 1;
|
location.x = (double) CGDisplayPixelsWide(display) - 1;
|
||||||
|
|
||||||
if (location.y < 0)
|
if (location.y < 0)
|
||||||
location.y = 0;
|
location.y = 0;
|
||||||
if (location.y >= CGDisplayPixelsHigh(display))
|
if (location.y >= (double) CGDisplayPixelsHigh(display))
|
||||||
location.y = CGDisplayPixelsHigh(display) - 1;
|
location.y = (double) CGDisplayPixelsHigh(display) - 1;
|
||||||
|
|
||||||
CGEventSetType(event, type);
|
CGEventSetType(event, type);
|
||||||
CGEventSetLocation(event, location);
|
CGEventSetLocation(event, location);
|
||||||
@@ -428,7 +428,7 @@ const KeyCodeMap kKeyCodesMap[] = {
|
|||||||
void
|
void
|
||||||
scroll(input_t &input, int high_res_distance) {
|
scroll(input_t &input, int high_res_distance) {
|
||||||
CGEventRef upEvent = CGEventCreateScrollWheelEvent(
|
CGEventRef upEvent = CGEventCreateScrollWheelEvent(
|
||||||
NULL,
|
nullptr,
|
||||||
kCGScrollEventUnitLine,
|
kCGScrollEventUnitLine,
|
||||||
2, high_res_distance > 0 ? 1 : -1, high_res_distance);
|
2, high_res_distance > 0 ? 1 : -1, high_res_distance);
|
||||||
CGEventPost(kCGHIDEventTap, upEvent);
|
CGEventPost(kCGHIDEventTap, upEvent);
|
||||||
|
|||||||
@@ -6,15 +6,14 @@
|
|||||||
#include "src/platform/macos/av_audio.h"
|
#include "src/platform/macos/av_audio.h"
|
||||||
|
|
||||||
#include "src/config.h"
|
#include "src/config.h"
|
||||||
#include "src/main.h"
|
|
||||||
|
|
||||||
namespace platf {
|
namespace platf {
|
||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
|
|
||||||
struct av_mic_t: public mic_t {
|
struct av_mic_t: public mic_t {
|
||||||
AVAudio *av_audio_capture;
|
AVAudio *av_audio_capture {};
|
||||||
|
|
||||||
~av_mic_t() {
|
~av_mic_t() override {
|
||||||
[av_audio_capture release];
|
[av_audio_capture release];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +41,7 @@ namespace platf {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct macos_audio_control_t: public audio_control_t {
|
struct macos_audio_control_t: public audio_control_t {
|
||||||
AVCaptureDevice *audio_capture_device;
|
AVCaptureDevice *audio_capture_device {};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int
|
int
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include <CoreGraphics/CoreGraphics.h>
|
#include <CoreGraphics/CoreGraphics.h>
|
||||||
|
|
||||||
namespace dyn {
|
namespace dyn {
|
||||||
typedef void (*apiproc)(void);
|
typedef void (*apiproc)();
|
||||||
|
|
||||||
int
|
int
|
||||||
load(void *handle, const std::vector<std::tuple<apiproc *, const char *>> &funcs, bool strict = true);
|
load(void *handle, const std::vector<std::tuple<apiproc *, const char *>> &funcs, bool strict = true);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Required for IPV6_PKTINFO with Darwin headers
|
// Required for IPV6_PKTINFO with Darwin headers
|
||||||
#ifndef __APPLE_USE_RFC_3542
|
#ifndef __APPLE_USE_RFC_3542 // NOLINT(bugprone-reserved-identifier)
|
||||||
#define __APPLE_USE_RFC_3542 1
|
#define __APPLE_USE_RFC_3542 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ namespace platf {
|
|||||||
// Xcode 12.2 and later, these functions are not weakly linked and will never
|
// Xcode 12.2 and later, these functions are not weakly linked and will never
|
||||||
// be null, and therefore generate this warning. Since we are weakly linking
|
// be null, and therefore generate this warning. Since we are weakly linking
|
||||||
// when compiling with earlier Xcode versions, the check for null is
|
// when compiling with earlier Xcode versions, the check for null is
|
||||||
// necessary and so we ignore the warning.
|
// necessary, and so we ignore the warning.
|
||||||
#pragma clang diagnostic push
|
#pragma clang diagnostic push
|
||||||
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
|
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
|
||||||
#pragma clang diagnostic ignored "-Wtautological-pointer-compare"
|
#pragma clang diagnostic ignored "-Wtautological-pointer-compare"
|
||||||
@@ -141,7 +141,7 @@ namespace platf {
|
|||||||
std::string mac_address;
|
std::string mac_address;
|
||||||
|
|
||||||
if (getifaddrs(&ifap) == 0) {
|
if (getifaddrs(&ifap) == 0) {
|
||||||
for (ifaptr = ifap; ifaptr != NULL; ifaptr = (ifaptr)->ifa_next) {
|
for (ifaptr = ifap; ifaptr != nullptr; ifaptr = (ifaptr)->ifa_next) {
|
||||||
if (!strcmp((ifaptr)->ifa_name, pos->ifa_name) && (((ifaptr)->ifa_addr)->sa_family == AF_LINK)) {
|
if (!strcmp((ifaptr)->ifa_name, pos->ifa_name) && (((ifaptr)->ifa_addr)->sa_family == AF_LINK)) {
|
||||||
ptr = (unsigned char *) LLADDR((struct sockaddr_dl *) (ifaptr)->ifa_addr);
|
ptr = (unsigned char *) LLADDR((struct sockaddr_dl *) (ifaptr)->ifa_addr);
|
||||||
char buff[100];
|
char buff[100];
|
||||||
@@ -155,7 +155,7 @@ namespace platf {
|
|||||||
|
|
||||||
freeifaddrs(ifap);
|
freeifaddrs(ifap);
|
||||||
|
|
||||||
if (ifaptr != NULL) {
|
if (ifaptr != nullptr) {
|
||||||
BOOST_LOG(verbose) << "Found MAC of "sv << pos->ifa_name << ": "sv << mac_address;
|
BOOST_LOG(verbose) << "Found MAC of "sv << pos->ifa_name << ": "sv << mac_address;
|
||||||
return mac_address;
|
return mac_address;
|
||||||
}
|
}
|
||||||
@@ -336,7 +336,7 @@ namespace platf {
|
|||||||
union {
|
union {
|
||||||
char buf[std::max(CMSG_SPACE(sizeof(struct in_pktinfo)), CMSG_SPACE(sizeof(struct in6_pktinfo)))];
|
char buf[std::max(CMSG_SPACE(sizeof(struct in_pktinfo)), CMSG_SPACE(sizeof(struct in6_pktinfo)))];
|
||||||
struct cmsghdr alignment;
|
struct cmsghdr alignment;
|
||||||
} cmbuf;
|
} cmbuf {};
|
||||||
socklen_t cmbuflen = 0;
|
socklen_t cmbuflen = 0;
|
||||||
|
|
||||||
msg.msg_control = cmbuf.buf;
|
msg.msg_control = cmbuf.buf;
|
||||||
@@ -344,7 +344,7 @@ namespace platf {
|
|||||||
|
|
||||||
auto pktinfo_cm = CMSG_FIRSTHDR(&msg);
|
auto pktinfo_cm = CMSG_FIRSTHDR(&msg);
|
||||||
if (send_info.source_address.is_v6()) {
|
if (send_info.source_address.is_v6()) {
|
||||||
struct in6_pktinfo pktInfo;
|
struct in6_pktinfo pktInfo {};
|
||||||
|
|
||||||
struct sockaddr_in6 saddr_v6 = to_sockaddr(send_info.source_address.to_v6(), 0);
|
struct sockaddr_in6 saddr_v6 = to_sockaddr(send_info.source_address.to_v6(), 0);
|
||||||
pktInfo.ipi6_addr = saddr_v6.sin6_addr;
|
pktInfo.ipi6_addr = saddr_v6.sin6_addr;
|
||||||
@@ -358,7 +358,7 @@ namespace platf {
|
|||||||
memcpy(CMSG_DATA(pktinfo_cm), &pktInfo, sizeof(pktInfo));
|
memcpy(CMSG_DATA(pktinfo_cm), &pktInfo, sizeof(pktInfo));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
struct in_pktinfo pktInfo;
|
struct in_pktinfo pktInfo {};
|
||||||
|
|
||||||
struct sockaddr_in saddr_v4 = to_sockaddr(send_info.source_address.to_v4(), 0);
|
struct sockaddr_in saddr_v4 = to_sockaddr(send_info.source_address.to_v4(), 0);
|
||||||
pktInfo.ipi_spec_dst = saddr_v4.sin_addr;
|
pktInfo.ipi_spec_dst = saddr_v4.sin_addr;
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
* @file src/platform/macos/nv12_zero_device.cpp
|
* @file src/platform/macos/nv12_zero_device.cpp
|
||||||
* @brief todo
|
* @brief todo
|
||||||
*/
|
*/
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "src/platform/macos/nv12_zero_device.h"
|
#include "src/platform/macos/nv12_zero_device.h"
|
||||||
|
|
||||||
#include "src/video.h"
|
#include "src/video.h"
|
||||||
@@ -24,7 +26,7 @@ namespace platf {
|
|||||||
|
|
||||||
int
|
int
|
||||||
nv12_zero_device::convert(platf::img_t &img) {
|
nv12_zero_device::convert(platf::img_t &img) {
|
||||||
av_img_t *av_img = (av_img_t *) &img;
|
auto *av_img = (av_img_t *) &img;
|
||||||
|
|
||||||
// Release any existing CVPixelBuffer previously retained for encoding
|
// Release any existing CVPixelBuffer previously retained for encoding
|
||||||
av_buffer_unref(&av_frame->buf[0]);
|
av_buffer_unref(&av_frame->buf[0]);
|
||||||
@@ -34,7 +36,7 @@ namespace platf {
|
|||||||
//
|
//
|
||||||
// The presence of the AVBufferRef allows FFmpeg to simply add a reference to the buffer
|
// The presence of the AVBufferRef allows FFmpeg to simply add a reference to the buffer
|
||||||
// rather than having to perform a deep copy of the data buffers in avcodec_send_frame().
|
// rather than having to perform a deep copy of the data buffers in avcodec_send_frame().
|
||||||
av_frame->buf[0] = av_buffer_create((uint8_t *) CFRetain(av_img->pixel_buffer->buf), 0, free_buffer, NULL, 0);
|
av_frame->buf[0] = av_buffer_create((uint8_t *) CFRetain(av_img->pixel_buffer->buf), 0, free_buffer, nullptr, 0);
|
||||||
|
|
||||||
// Place a CVPixelBufferRef at data[3] as required by AV_PIX_FMT_VIDEOTOOLBOX
|
// Place a CVPixelBufferRef at data[3] as required by AV_PIX_FMT_VIDEOTOOLBOX
|
||||||
av_frame->data[3] = (uint8_t *) av_img->pixel_buffer->buf;
|
av_frame->data[3] = (uint8_t *) av_img->pixel_buffer->buf;
|
||||||
@@ -54,15 +56,15 @@ namespace platf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
nv12_zero_device::init(void *display, pix_fmt_e pix_fmt, resolution_fn_t resolution_fn, pixel_format_fn_t pixel_format_fn) {
|
nv12_zero_device::init(void *display, pix_fmt_e pix_fmt, resolution_fn_t resolution_fn, const pixel_format_fn_t &pixel_format_fn) {
|
||||||
pixel_format_fn(display, pix_fmt == pix_fmt_e::nv12 ?
|
pixel_format_fn(display, pix_fmt == pix_fmt_e::nv12 ?
|
||||||
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange :
|
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange :
|
||||||
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange);
|
kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange);
|
||||||
|
|
||||||
this->display = display;
|
this->display = display;
|
||||||
this->resolution_fn = resolution_fn;
|
this->resolution_fn = std::move(resolution_fn);
|
||||||
|
|
||||||
// we never use this pointer but it's existence is checked/used
|
// we never use this pointer, but its existence is checked/used
|
||||||
// by the platform independent code
|
// by the platform independent code
|
||||||
data = this;
|
data = this;
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ namespace platf {
|
|||||||
using pixel_format_fn_t = std::function<void(void *display, int pixelFormat)>;
|
using pixel_format_fn_t = std::function<void(void *display, int pixelFormat)>;
|
||||||
|
|
||||||
int
|
int
|
||||||
init(void *display, pix_fmt_e pix_fmt, resolution_fn_t resolution_fn, pixel_format_fn_t pixel_format_fn);
|
init(void *display, pix_fmt_e pix_fmt, resolution_fn_t resolution_fn, const pixel_format_fn_t &pixel_format_fn);
|
||||||
|
|
||||||
int
|
int
|
||||||
convert(img_t &img);
|
convert(img_t &img) override;
|
||||||
int
|
int
|
||||||
set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx);
|
set_frame(AVFrame *frame, AVBufferRef *hw_frames_ctx) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
util::safe_ptr<AVFrame, free_frame> av_frame;
|
util::safe_ptr<AVFrame, free_frame> av_frame;
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ namespace platf::publish {
|
|||||||
public:
|
public:
|
||||||
std::thread poll_thread;
|
std::thread poll_thread;
|
||||||
|
|
||||||
deinit_t(std::thread poll_thread):
|
explicit deinit_t(std::thread poll_thread):
|
||||||
poll_thread { std::move(poll_thread) } {}
|
poll_thread { std::move(poll_thread) } {}
|
||||||
|
|
||||||
~deinit_t() override {
|
~deinit_t() override {
|
||||||
|
|||||||
Reference in New Issue
Block a user