mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
plugins: Fix compile errors introduced by CMake build framework 3.0
This commit is contained in:
parent
befce71219
commit
2bc4c69ee9
@ -317,14 +317,20 @@ obs_properties_t *alsa_get_properties(void *unused)
|
|||||||
obs_property_list_add_string(devices, descr, name);
|
obs_property_list_add_string(devices, descr, name);
|
||||||
|
|
||||||
next:
|
next:
|
||||||
if (name != NULL)
|
if (name != NULL) {
|
||||||
free(name), name = NULL;
|
free(name);
|
||||||
|
name = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (descr != NULL)
|
if (descr != NULL) {
|
||||||
free(descr), descr = NULL;
|
free(descr);
|
||||||
|
descr = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (io != NULL)
|
if (io != NULL) {
|
||||||
free(io), io = NULL;
|
free(io);
|
||||||
|
io = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
++hint;
|
++hint;
|
||||||
}
|
}
|
||||||
@ -412,11 +418,14 @@ void _alsa_close(struct alsa_data *data)
|
|||||||
|
|
||||||
if (data->handle) {
|
if (data->handle) {
|
||||||
snd_pcm_drop(data->handle);
|
snd_pcm_drop(data->handle);
|
||||||
snd_pcm_close(data->handle), data->handle = NULL;
|
snd_pcm_close(data->handle);
|
||||||
|
data->handle = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data->buffer)
|
if (data->buffer) {
|
||||||
bfree(data->buffer), data->buffer = NULL;
|
bfree(data->buffer);
|
||||||
|
data->buffer = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _alsa_configure(struct alsa_data *data)
|
bool _alsa_configure(struct alsa_data *data)
|
||||||
|
@ -390,7 +390,6 @@ void xcomp_create_pixmap(xcb_connection_t *conn, struct xcompcap *s,
|
|||||||
if (depth != 32) {
|
if (depth != 32) {
|
||||||
s->exclude_alpha = true;
|
s->exclude_alpha = true;
|
||||||
}
|
}
|
||||||
xcb_window_t root = geom->root;
|
|
||||||
free(geom);
|
free(geom);
|
||||||
|
|
||||||
uint32_t vert_borders = s->crop_top + s->crop_bot + 2 * s->border;
|
uint32_t vert_borders = s->crop_top + s->crop_bot + 2 * s->border;
|
||||||
|
@ -562,27 +562,35 @@ static bool vaapi_encode(void *data, struct encoder_frame *frame,
|
|||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
enc->first_packet = false;
|
enc->first_packet = false;
|
||||||
|
|
||||||
|
switch (enc->codec) {
|
||||||
|
case CODEC_HEVC:
|
||||||
#ifdef ENABLE_HEVC
|
#ifdef ENABLE_HEVC
|
||||||
if (enc->codec == CODEC_HEVC) {
|
|
||||||
obs_extract_hevc_headers(
|
obs_extract_hevc_headers(
|
||||||
enc->packet->data, enc->packet->size,
|
enc->packet->data, enc->packet->size,
|
||||||
&new_packet, &size, &enc->header,
|
&new_packet, &size, &enc->header,
|
||||||
&enc->header_size, &enc->sei,
|
&enc->header_size, &enc->sei,
|
||||||
&enc->sei_size);
|
&enc->sei_size);
|
||||||
} else
|
break;
|
||||||
|
#else
|
||||||
|
warn("vaapi_encode: HEVC codec is not supported");
|
||||||
|
goto fail;
|
||||||
#endif
|
#endif
|
||||||
if (enc->codec == CODEC_H264) {
|
case CODEC_H264:
|
||||||
obs_extract_avc_headers(
|
obs_extract_avc_headers(
|
||||||
enc->packet->data, enc->packet->size,
|
enc->packet->data, enc->packet->size,
|
||||||
&new_packet, &size, &enc->header,
|
&new_packet, &size, &enc->header,
|
||||||
&enc->header_size, &enc->sei,
|
&enc->header_size, &enc->sei,
|
||||||
&enc->sei_size);
|
&enc->sei_size);
|
||||||
} else if (enc->codec == CODEC_AV1) {
|
break;
|
||||||
|
|
||||||
|
case CODEC_AV1:
|
||||||
obs_extract_av1_headers(enc->packet->data,
|
obs_extract_av1_headers(enc->packet->data,
|
||||||
enc->packet->size,
|
enc->packet->size,
|
||||||
&new_packet, &size,
|
&new_packet, &size,
|
||||||
&enc->header,
|
&enc->header,
|
||||||
&enc->header_size);
|
&enc->header_size);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
da_copy_array(enc->buffer, new_packet, size);
|
da_copy_array(enc->buffer, new_packet, size);
|
||||||
|
@ -128,7 +128,6 @@ static uint32_t vaapi_display_ep_combo_rate_controls(VAProfile profile,
|
|||||||
VADisplay dpy,
|
VADisplay dpy,
|
||||||
const char *device_path)
|
const char *device_path)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
|
||||||
VAStatus va_status;
|
VAStatus va_status;
|
||||||
VAConfigAttrib attrib[1];
|
VAConfigAttrib attrib[1];
|
||||||
attrib->type = VAConfigAttribRateControl;
|
attrib->type = VAConfigAttribRateControl;
|
||||||
|
@ -252,7 +252,6 @@ static void vaapi_close(struct vaapi_device *device)
|
|||||||
static uint32_t vaapi_check_support(VADisplay display, VAProfile profile,
|
static uint32_t vaapi_check_support(VADisplay display, VAProfile profile,
|
||||||
VAEntrypoint entrypoint)
|
VAEntrypoint entrypoint)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
|
||||||
VAConfigAttrib attrib[1];
|
VAConfigAttrib attrib[1];
|
||||||
attrib->type = VAConfigAttribRateControl;
|
attrib->type = VAConfigAttribRateControl;
|
||||||
|
|
||||||
|
@ -1253,8 +1253,6 @@ static void parse_packet_av1(struct obs_qsv *obsqsv,
|
|||||||
|
|
||||||
packet->priority = priority;
|
packet->priority = priority;
|
||||||
|
|
||||||
bool pFrame = pBS->FrameType & MFX_FRAMETYPE_P;
|
|
||||||
|
|
||||||
packet->dts = ts_mfx_to_obs(pBS->DecodeTimeStamp, voi);
|
packet->dts = ts_mfx_to_obs(pBS->DecodeTimeStamp, voi);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@ -1276,8 +1274,6 @@ static void parse_packet_hevc(struct obs_qsv *obsqsv,
|
|||||||
const struct video_output_info *voi,
|
const struct video_output_info *voi,
|
||||||
bool *received_packet)
|
bool *received_packet)
|
||||||
{
|
{
|
||||||
bool is_vcl_packet = false;
|
|
||||||
|
|
||||||
if (pBS == NULL || pBS->DataLength == 0) {
|
if (pBS == NULL || pBS->DataLength == 0) {
|
||||||
*received_packet = false;
|
*received_packet = false;
|
||||||
return;
|
return;
|
||||||
|
@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include "oss-platform.h"
|
#include <sys/soundcard.h>
|
||||||
|
|
||||||
#define blog(level, msg, ...) blog(level, "oss-audio: " msg, ##__VA_ARGS__)
|
#define blog(level, msg, ...) blog(level, "oss-audio: " msg, ##__VA_ARGS__)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user