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
132
libobs/obs.h
132
libobs/obs.h
|
|
@ -116,7 +116,8 @@ enum obs_scale_type {
|
|||
OBS_SCALE_POINT,
|
||||
OBS_SCALE_BICUBIC,
|
||||
OBS_SCALE_BILINEAR,
|
||||
OBS_SCALE_LANCZOS
|
||||
OBS_SCALE_LANCZOS,
|
||||
OBS_SCALE_AREA,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -219,6 +220,10 @@ struct obs_source_audio {
|
|||
*
|
||||
* If a YUV format is specified, it will be automatically upsampled and
|
||||
* converted to RGB via shader on the graphics processor.
|
||||
*
|
||||
* NOTE: Non-YUV formats will always be treated as full range with this
|
||||
* structure! Use obs_source_frame2 along with obs_source_output_video2
|
||||
* instead if partial range support is desired for non-YUV video formats.
|
||||
*/
|
||||
struct obs_source_frame {
|
||||
uint8_t *data[MAX_AV_PLANES];
|
||||
|
|
@ -239,6 +244,27 @@ struct obs_source_frame {
|
|||
bool prev_frame;
|
||||
};
|
||||
|
||||
struct obs_source_frame2 {
|
||||
uint8_t *data[MAX_AV_PLANES];
|
||||
uint32_t linesize[MAX_AV_PLANES];
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint64_t timestamp;
|
||||
|
||||
enum video_format format;
|
||||
enum video_range_type range;
|
||||
float color_matrix[16];
|
||||
float color_range_min[3];
|
||||
float color_range_max[3];
|
||||
bool flip;
|
||||
};
|
||||
|
||||
/** Access to the argc/argv used to start OBS. What you see is what you get. */
|
||||
struct obs_cmdline_args {
|
||||
int argc;
|
||||
char **argv;
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* OBS context */
|
||||
|
||||
|
|
@ -291,6 +317,24 @@ EXPORT uint32_t obs_get_version(void);
|
|||
/** @return The current core version string */
|
||||
EXPORT const char *obs_get_version_string(void);
|
||||
|
||||
/**
|
||||
* Sets things up for calls to obs_get_cmdline_args. Called onl yonce at startup
|
||||
* and safely copies argv/argc from main(). Subsequent calls do nothing.
|
||||
*
|
||||
* @param argc The count of command line arguments, from main()
|
||||
* @param argv An array of command line arguments, copied from main() and ends
|
||||
* with NULL.
|
||||
*/
|
||||
EXPORT void obs_set_cmdline_args(int argc, const char * const *argv);
|
||||
|
||||
/**
|
||||
* Get the argc/argv used to start OBS
|
||||
*
|
||||
* @return The command line arguments used for main(). Don't modify this or
|
||||
* you'll mess things up for other callers.
|
||||
*/
|
||||
EXPORT struct obs_cmdline_args obs_get_cmdline_args(void);
|
||||
|
||||
/**
|
||||
* Sets a new locale to use for modules. This will call obs_module_set_locale
|
||||
* for each module with the new locale.
|
||||
|
|
@ -511,6 +555,9 @@ EXPORT audio_t *obs_get_audio(void);
|
|||
/** Gets the main video output handler for this OBS context */
|
||||
EXPORT video_t *obs_get_video(void);
|
||||
|
||||
/** Returns true if video is active, false otherwise */
|
||||
EXPORT bool obs_video_active(void);
|
||||
|
||||
/** Sets the primary output source for a channel. */
|
||||
EXPORT void obs_set_output_source(uint32_t channel, obs_source_t *source);
|
||||
|
||||
|
|
@ -532,6 +579,10 @@ EXPORT obs_source_t *obs_get_output_source(uint32_t channel);
|
|||
EXPORT void obs_enum_sources(bool (*enum_proc)(void*, obs_source_t*),
|
||||
void *param);
|
||||
|
||||
/** Enumerates scenes */
|
||||
EXPORT void obs_enum_scenes(bool (*enum_proc)(void*, obs_source_t*),
|
||||
void *param);
|
||||
|
||||
/** Enumerates outputs */
|
||||
EXPORT void obs_enum_outputs(bool (*enum_proc)(void*, obs_output_t*),
|
||||
void *param);
|
||||
|
|
@ -570,6 +621,8 @@ enum obs_base_effect {
|
|||
OBS_EFFECT_LANCZOS, /**< Lanczos downscale */
|
||||
OBS_EFFECT_BILINEAR_LOWRES, /**< Bilinear low resolution downscale */
|
||||
OBS_EFFECT_PREMULTIPLIED_ALPHA,/**< Premultiplied alpha */
|
||||
OBS_EFFECT_REPEAT, /**< RGB/YUV (repeating) */
|
||||
OBS_EFFECT_AREA, /**< Area rescale */
|
||||
};
|
||||
|
||||
/** Returns a commonly used base effect */
|
||||
|
|
@ -642,6 +695,7 @@ enum obs_obj_type {
|
|||
EXPORT enum obs_obj_type obs_obj_get_type(void *obj);
|
||||
EXPORT const char *obs_obj_get_id(void *obj);
|
||||
EXPORT bool obs_obj_invalid(void *obj);
|
||||
EXPORT void *obs_obj_get_data(void *obj);
|
||||
|
||||
typedef bool (*obs_enum_audio_device_cb)(void *data, const char *name,
|
||||
const char *id);
|
||||
|
|
@ -682,6 +736,8 @@ EXPORT uint64_t obs_get_average_frame_time_ns(void);
|
|||
EXPORT uint32_t obs_get_total_frames(void);
|
||||
EXPORT uint32_t obs_get_lagged_frames(void);
|
||||
|
||||
EXPORT bool obs_nv12_tex_active(void);
|
||||
|
||||
EXPORT void obs_apply_private_data(obs_data_t *settings);
|
||||
EXPORT void obs_set_private_data(obs_data_t *settings);
|
||||
EXPORT obs_data_t *obs_get_private_data(void);
|
||||
|
|
@ -724,7 +780,8 @@ EXPORT void obs_view_render(obs_view_t *view);
|
|||
* @return The new display context, or NULL if failed.
|
||||
*/
|
||||
EXPORT obs_display_t *obs_display_create(
|
||||
const struct gs_init_data *graphics_data);
|
||||
const struct gs_init_data *graphics_data,
|
||||
uint32_t backround_color);
|
||||
|
||||
/** Destroys a display context */
|
||||
EXPORT void obs_display_destroy(obs_display_t *display);
|
||||
|
|
@ -756,6 +813,9 @@ EXPORT bool obs_display_enabled(obs_display_t *display);
|
|||
EXPORT void obs_display_set_background_color(obs_display_t *display,
|
||||
uint32_t color);
|
||||
|
||||
EXPORT void obs_display_size(obs_display_t *display,
|
||||
uint32_t *width, uint32_t *height);
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Sources */
|
||||
|
|
@ -893,6 +953,15 @@ EXPORT void obs_source_set_volume(obs_source_t *source, float volume);
|
|||
/** Gets the user volume for a source that has audio output */
|
||||
EXPORT float obs_source_get_volume(const obs_source_t *source);
|
||||
|
||||
/* Gets speaker layout of a source */
|
||||
EXPORT enum speaker_layout obs_source_get_speaker_layout(obs_source_t *source);
|
||||
|
||||
/** Sets the balance value for a stereo audio source */
|
||||
EXPORT void obs_source_set_balance_value(obs_source_t *source, float balance);
|
||||
|
||||
/** Gets the balance value for a stereo audio source */
|
||||
EXPORT float obs_source_get_balance_value(const obs_source_t *source);
|
||||
|
||||
/** Sets the audio sync offset (in nanoseconds) for a source */
|
||||
EXPORT void obs_source_set_sync_offset(obs_source_t *source, int64_t offset);
|
||||
|
||||
|
|
@ -948,6 +1017,18 @@ EXPORT uint32_t obs_source_get_audio_mixers(const obs_source_t *source);
|
|||
*/
|
||||
EXPORT void obs_source_inc_showing(obs_source_t *source);
|
||||
|
||||
/**
|
||||
* Increments the 'active' reference counter to indicate that the source is
|
||||
* fully active. If the reference counter was 0, will call the 'activate'
|
||||
* callback.
|
||||
*
|
||||
* Unlike obs_source_inc_showing, this will cause children of this source to be
|
||||
* considered showing as well (currently used by transition previews to make
|
||||
* the stinger transition show correctly). obs_source_inc_showing should
|
||||
* generally be used instead.
|
||||
*/
|
||||
EXPORT void obs_source_inc_active(obs_source_t *source);
|
||||
|
||||
/**
|
||||
* Decrements the 'showing' reference counter to indicate that the source is
|
||||
* no longer being shown somewhere. If the reference counter is set to 0,
|
||||
|
|
@ -955,6 +1036,17 @@ EXPORT void obs_source_inc_showing(obs_source_t *source);
|
|||
*/
|
||||
EXPORT void obs_source_dec_showing(obs_source_t *source);
|
||||
|
||||
/**
|
||||
* Decrements the 'active' reference counter to indicate that the source is no
|
||||
* longer fully active. If the reference counter is set to 0, will call the
|
||||
* 'deactivate' callback
|
||||
*
|
||||
* Unlike obs_source_dec_showing, this will cause children of this source to be
|
||||
* considered not showing as well. obs_source_dec_showing should generally be
|
||||
* used instead.
|
||||
*/
|
||||
EXPORT void obs_source_dec_active(obs_source_t *source);
|
||||
|
||||
/** Enumerates filters assigned to the source */
|
||||
EXPORT void obs_source_enum_filters(obs_source_t *source,
|
||||
obs_source_enum_proc_t callback, void *param);
|
||||
|
|
@ -1070,13 +1162,29 @@ EXPORT void obs_source_draw_set_color_matrix(
|
|||
EXPORT void obs_source_draw(gs_texture_t *image, int x, int y,
|
||||
uint32_t cx, uint32_t cy, bool flip);
|
||||
|
||||
/** Outputs asynchronous video data. Set to NULL to deactivate the texture */
|
||||
/**
|
||||
* Outputs asynchronous video data. Set to NULL to deactivate the texture
|
||||
*
|
||||
* NOTE: Non-YUV formats will always be treated as full range with this
|
||||
* function! Use obs_source_output_video2 instead if partial range support is
|
||||
* desired for non-YUV video formats.
|
||||
*/
|
||||
EXPORT void obs_source_output_video(obs_source_t *source,
|
||||
const struct obs_source_frame *frame);
|
||||
EXPORT void obs_source_output_video2(obs_source_t *source,
|
||||
const struct obs_source_frame2 *frame);
|
||||
|
||||
/** Preloads asynchronous video data to allow instantaneous playback */
|
||||
/**
|
||||
* Preloads asynchronous video data to allow instantaneous playback
|
||||
*
|
||||
* NOTE: Non-YUV formats will always be treated as full range with this
|
||||
* function! Use obs_source_preload_video2 instead if partial range support is
|
||||
* desired for non-YUV video formats.
|
||||
*/
|
||||
EXPORT void obs_source_preload_video(obs_source_t *source,
|
||||
const struct obs_source_frame *frame);
|
||||
EXPORT void obs_source_preload_video2(obs_source_t *source,
|
||||
const struct obs_source_frame2 *frame);
|
||||
|
||||
/** Shows any preloaded video data */
|
||||
EXPORT void obs_source_show_preloaded_video(obs_source_t *source);
|
||||
|
|
@ -1257,6 +1365,8 @@ typedef float (*obs_transition_audio_mix_callback_t)(void *data, float t);
|
|||
|
||||
EXPORT float obs_transition_get_time(obs_source_t *transition);
|
||||
|
||||
EXPORT void obs_transition_force_stop(obs_source_t *transition);
|
||||
|
||||
EXPORT void obs_transition_video_render(obs_source_t *transition,
|
||||
obs_transition_video_render_callback_t callback);
|
||||
|
||||
|
|
@ -1406,6 +1516,8 @@ EXPORT void obs_sceneitem_get_draw_transform(const obs_sceneitem_t *item,
|
|||
struct matrix4 *transform);
|
||||
EXPORT void obs_sceneitem_get_box_transform(const obs_sceneitem_t *item,
|
||||
struct matrix4 *transform);
|
||||
EXPORT void obs_sceneitem_get_box_scale(const obs_sceneitem_t *item,
|
||||
struct vec2 *scale);
|
||||
|
||||
EXPORT bool obs_sceneitem_visible(const obs_sceneitem_t *item);
|
||||
EXPORT bool obs_sceneitem_set_visible(obs_sceneitem_t *item, bool visible);
|
||||
|
|
@ -1594,6 +1706,12 @@ EXPORT void obs_output_set_mixer(obs_output_t *output, size_t mixer_idx);
|
|||
/** Gets the current audio mixer for non-encoded outputs */
|
||||
EXPORT size_t obs_output_get_mixer(const obs_output_t *output);
|
||||
|
||||
/** Sets the current audio mixes (mask) for a non-encoded multi-track output */
|
||||
EXPORT void obs_output_set_mixers(obs_output_t *output, size_t mixers);
|
||||
|
||||
/** Gets the current audio mixes (mask) for a non-encoded multi-track output */
|
||||
EXPORT size_t obs_output_get_mixers(const obs_output_t *output);
|
||||
|
||||
/**
|
||||
* Sets the current video encoder associated with this output,
|
||||
* required for encoded outputs
|
||||
|
|
@ -1664,6 +1782,8 @@ EXPORT const char *obs_output_get_id(const obs_output_t *output);
|
|||
#if BUILD_CAPTIONS
|
||||
EXPORT void obs_output_output_caption_text1(obs_output_t *output,
|
||||
const char *text);
|
||||
EXPORT void obs_output_output_caption_text2(obs_output_t *output,
|
||||
const char *text, double display_duration);
|
||||
#endif
|
||||
|
||||
EXPORT float obs_output_get_congestion(obs_output_t *output);
|
||||
|
|
@ -1871,6 +1991,7 @@ EXPORT void *obs_encoder_get_type_data(obs_encoder_t *encoder);
|
|||
EXPORT const char *obs_encoder_get_id(const obs_encoder_t *encoder);
|
||||
|
||||
EXPORT uint32_t obs_get_encoder_caps(const char *encoder_id);
|
||||
EXPORT uint32_t obs_encoder_get_caps(const obs_encoder_t *encoder);
|
||||
|
||||
#ifndef SWIG
|
||||
/** Duplicates an encoder packet */
|
||||
|
|
@ -1886,6 +2007,9 @@ EXPORT void obs_encoder_packet_ref(struct encoder_packet *dst,
|
|||
struct encoder_packet *src);
|
||||
EXPORT void obs_encoder_packet_release(struct encoder_packet *packet);
|
||||
|
||||
EXPORT void *obs_encoder_create_rerouted(obs_encoder_t *encoder,
|
||||
const char *reroute_id);
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Stream Services */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue