New upstream version 24.0.1+dfsg1

This commit is contained in:
Sebastian Ramacher 2019-09-22 23:19:10 +02:00
parent b14f9eae6d
commit 5a730d6ec3
842 changed files with 42245 additions and 33385 deletions

View file

@ -29,8 +29,9 @@
extern "C" {
#endif
#define OBS_ENCODER_CAP_DEPRECATED (1<<0)
#define OBS_ENCODER_CAP_PASS_TEXTURE (1<<1)
#define OBS_ENCODER_CAP_DEPRECATED (1 << 0)
#define OBS_ENCODER_CAP_PASS_TEXTURE (1 << 1)
#define OBS_ENCODER_CAP_DYN_BITRATE (1 << 2)
/** Specifies the encoder type */
enum obs_encoder_type {
@ -40,27 +41,27 @@ enum obs_encoder_type {
/** Encoder output packet */
struct encoder_packet {
uint8_t *data; /**< Packet data */
size_t size; /**< Packet size */
uint8_t *data; /**< Packet data */
size_t size; /**< Packet size */
int64_t pts; /**< Presentation timestamp */
int64_t dts; /**< Decode timestamp */
int64_t pts; /**< Presentation timestamp */
int64_t dts; /**< Decode timestamp */
int32_t timebase_num; /**< Timebase numerator */
int32_t timebase_den; /**< Timebase denominator */
int32_t timebase_num; /**< Timebase numerator */
int32_t timebase_den; /**< Timebase denominator */
enum obs_encoder_type type; /**< Encoder type */
enum obs_encoder_type type; /**< Encoder type */
bool keyframe; /**< Is a keyframe */
bool keyframe; /**< Is a keyframe */
/* ---------------------------------------------------------------- */
/* Internal video variables (will be parsed automatically) */
/* DTS in microseconds */
int64_t dts_usec;
int64_t dts_usec;
/* System DTS in microseconds */
int64_t sys_dts_usec;
int64_t sys_dts_usec;
/**
* Packet priority
@ -68,7 +69,7 @@ struct encoder_packet {
* This is generally use by video encoders to specify the priority
* of the packet.
*/
int priority;
int priority;
/**
* Dropped packet priority
@ -76,28 +77,28 @@ struct encoder_packet {
* If this packet needs to be dropped, the next packet must be of this
* priority or higher to continue transmission.
*/
int drop_priority;
int drop_priority;
/** Audio track index (used with outputs) */
size_t track_idx;
size_t track_idx;
/** Encoder from which the track originated from */
obs_encoder_t *encoder;
obs_encoder_t *encoder;
};
/** Encoder input frame */
struct encoder_frame {
/** Data for the frame/audio */
uint8_t *data[MAX_AV_PLANES];
uint8_t *data[MAX_AV_PLANES];
/** size of each plane */
uint32_t linesize[MAX_AV_PLANES];
uint32_t linesize[MAX_AV_PLANES];
/** Number of frames (audio only) */
uint32_t frames;
uint32_t frames;
/** Presentation timestamp */
int64_t pts;
int64_t pts;
};
/**
@ -161,7 +162,7 @@ struct obs_encoder_info {
* @return true if successful, false otherwise.
*/
bool (*encode)(void *data, struct encoder_frame *frame,
struct encoder_packet *packet, bool *received_packet);
struct encoder_packet *packet, bool *received_packet);
/** Audio encoder only: Returns the frame size for this encoder */
size_t (*get_frame_size)(void *data);
@ -238,6 +239,9 @@ struct obs_encoder_info {
/**
* Gets the default settings for this encoder
*
* If get_defaults is also defined both will be called, and the first
* call will be to get_defaults, then to get_defaults2.
*
* @param[out] settings Data to assign default settings to
* @param[in] typedata Type Data
@ -254,12 +258,13 @@ struct obs_encoder_info {
obs_properties_t *(*get_properties2)(void *data, void *type_data);
bool (*encode_texture)(void *data, uint32_t handle, int64_t pts,
uint64_t lock_key, uint64_t *next_key,
struct encoder_packet *packet, bool *received_packet);
uint64_t lock_key, uint64_t *next_key,
struct encoder_packet *packet,
bool *received_packet);
};
EXPORT void obs_register_encoder_s(const struct obs_encoder_info *info,
size_t size);
size_t size);
/**
* Register an encoder definition to the current obs context. This should be