New upstream version 23.2.1+dfsg1
This commit is contained in:
parent
cdc9a9fc87
commit
b14f9eae6d
1017 changed files with 37232 additions and 11111 deletions
|
|
@ -6,6 +6,8 @@
|
|||
#include <VideoToolbox/VTVideoEncoderList.h>
|
||||
#include <CoreMedia/CoreMedia.h>
|
||||
|
||||
#include <util/apple/cfstring-utils.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#define VT_LOG(level, format, ...) \
|
||||
|
|
@ -74,23 +76,20 @@ struct vt_h264_encoder
|
|||
static void log_osstatus(int log_level, struct vt_h264_encoder *enc,
|
||||
const char *context, OSStatus code)
|
||||
{
|
||||
char *c_str = NULL;
|
||||
CFErrorRef err = CFErrorCreate(kCFAllocatorDefault,
|
||||
kCFErrorDomainOSStatus, code, NULL);
|
||||
CFStringRef str = CFErrorCopyDescription(err);
|
||||
|
||||
CFIndex length = CFStringGetLength(str);
|
||||
CFIndex max_size = CFStringGetMaximumSizeForEncoding(length,
|
||||
kCFStringEncodingUTF8);
|
||||
|
||||
char *c_str = malloc(max_size);
|
||||
if (CFStringGetCString(str, c_str, max_size, kCFStringEncodingUTF8)) {
|
||||
c_str = cfstr_copy_cstr(str, kCFStringEncodingUTF8);
|
||||
if (c_str) {
|
||||
if (enc)
|
||||
VT_BLOG(log_level, "Error in %s: %s", context, c_str);
|
||||
else
|
||||
VT_LOG(log_level, "Error in %s: %s", context, c_str);
|
||||
}
|
||||
|
||||
free(c_str);
|
||||
bfree(c_str);
|
||||
CFRelease(str);
|
||||
CFRelease(err);
|
||||
}
|
||||
|
|
@ -875,14 +874,18 @@ static obs_properties_t *vt_h264_properties(void *unused)
|
|||
obs_properties_t *props = obs_properties_create();
|
||||
obs_property_t *p;
|
||||
|
||||
obs_properties_add_int(props, "bitrate", TEXT_BITRATE, 50, 10000000, 1);
|
||||
p = obs_properties_add_int(props, "bitrate",
|
||||
TEXT_BITRATE, 50, 10000000, 50);
|
||||
obs_property_int_set_suffix(p, " Kbps");
|
||||
|
||||
p = obs_properties_add_bool(props, "limit_bitrate",
|
||||
TEXT_USE_MAX_BITRATE);
|
||||
obs_property_set_modified_callback(p, limit_bitrate_modified);
|
||||
|
||||
obs_properties_add_int(props, "max_bitrate", TEXT_MAX_BITRATE, 50,
|
||||
10000000, 1);
|
||||
p = obs_properties_add_int(props, "max_bitrate", TEXT_MAX_BITRATE, 50,
|
||||
10000000, 50);
|
||||
obs_property_int_set_suffix(p, " Kbps");
|
||||
|
||||
obs_properties_add_float(props, "max_bitrate_window",
|
||||
TEXT_MAX_BITRATE_WINDOW, 0.10f, 10.0f, 0.25f);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue