 |
Open Broadcaster Software
Free, open source software for live streaming and recording
|
Go to the documentation of this file.
39 #define NUM_TEXTURES 2
40 #define NUM_CHANNELS 3
41 #define MICROSECOND_DEN 1000000
42 #define NUM_ENCODE_TEXTURES 3
43 #define NUM_ENCODE_TEXTURE_FRAMES_TO_WAIT 1
45 static inline int64_t packet_dts_usec(
struct encoder_packet *packet)
56 void (*
draw)(
void *
param, uint32_t cx, uint32_t cy);
63 static inline bool obs_object_valid(
const void *obj,
const char *f,
74 #define obs_ptr_valid(ptr, func) obs_object_valid(ptr, func, #ptr)
75 #define obs_source_valid obs_ptr_valid
76 #define obs_output_valid obs_ptr_valid
77 #define obs_encoder_valid obs_ptr_valid
78 #define obs_service_valid obs_ptr_valid
96 uint32_t (*
ver)(void);
98 const char *(*name)(void);
99 const char *(*description)(void);
100 const char *(*author)(void);
120 static inline bool check_path(
const char *data,
const char *path,
124 dstr_cat(output, data);
184 struct obs_hotkey_name_map;
319 struct audio_monitor;
442 uint64_t end_ts_in, uint64_t *out_ts,
447 void (*callback)(
void *param,
struct video_data *frame),
450 void (*callback)(
void *param,
486 pthread_mutex_t *
mutex,
void *first);
500 static inline void obs_ref_addref(
struct obs_weak_ref *ref)
502 os_atomic_inc_long(&ref->
refs);
505 static inline bool obs_ref_release(
struct obs_weak_ref *ref)
507 return os_atomic_dec_long(&ref->
refs) == -1;
510 static inline void obs_weak_ref_addref(
struct obs_weak_ref *ref)
515 static inline bool obs_weak_ref_release(
struct obs_weak_ref *ref)
517 return os_atomic_dec_long(&ref->
weak_refs) == -1;
520 static inline bool obs_weak_ref_get_ref(
struct obs_weak_ref *ref)
522 long owners = ref->
refs;
523 while (owners > -1) {
524 if (os_atomic_compare_swap_long(&ref->
refs, owners, owners + 1))
762 uint32_t last_obs_ver);
770 static inline void obs_source_dosignal(
struct obs_source *source,
771 const char *signal_obs,
772 const char *signal_source)
777 calldata_init_fixed(&data,
stack,
sizeof(
stack));
778 calldata_set_ptr(&data,
"source", source);
787 #define MAX_TS_VAR 2000000000ULL
789 static inline bool frame_out_of_bounds(
const obs_source_t *source, uint64_t ts)
791 if (ts < source->last_frame_ts)
821 size_t channels,
size_t sample_rate,
868 #define CAPTION_LINE_CHARS (32)
869 #define CAPTION_LINE_BYTES (4 * CAPTION_LINE_CHARS)
976 static inline void do_output_signal(
struct obs_output *output,
980 calldata_set_ptr(¶ms,
"output", output);
982 calldata_free(¶ms);
1088 void (*new_packet)(
void *param,
1092 void (*new_packet)(
void *param,
Definition: obs-internal.h:568
void * param
Definition: obs-internal.h:57
Definition: obs-source.h:201
pthread_mutex_t monitoring_mutex
Definition: obs-internal.h:334
volatile bool data_active
Definition: obs-internal.h:899
#define MICROSECOND_DEN
Definition: obs-internal.h:41
obs_hotkey_registerer_t registerer_type
Definition: obs-internal.h:141
size_t planes
Definition: obs-internal.h:1028
float obs_source_get_target_volume(obs_source_t *source, obs_source_t *target)
obs_task_t task
Definition: obs-internal.h:238
bool strict_modifiers
Definition: obs-internal.h:380
void obs_hotkeys_context_release(struct obs_context_data *context)
pthread_mutex_t services_mutex
Definition: obs-internal.h:353
char * bin
Definition: obs-internal.h:108
void * media
Definition: obs-internal.h:1071
struct obs_weak_source * control
Definition: obs-internal.h:571
bool audio_failed
Definition: obs-internal.h:613
pthread_mutex_t mutex
Definition: obs-internal.h:370
size_t mixer_mask
Definition: obs-internal.h:933
struct obs_view main_view
Definition: obs-internal.h:359
enum obs_transition_scale_type transition_scale_type
Definition: obs-internal.h:729
@ AUDIO_ACTION_PTM
Definition: obs-internal.h:546
void(* post_load)(void)
Definition: obs-internal.h:93
volatile bool active
Definition: obs-internal.h:1039
void obs_view_free(struct obs_view *view)
Definition: obs-internal.h:495
enum obs_key obs_key_t
Definition: obs-hotkey.h:43
Definition: obs-internal.h:563
gs_stagesurf_t * mapped_surfaces[NUM_CHANNELS]
Definition: obs-internal.h:266
DARRAY(struct audio_action) audio_actions
char * data_path
Definition: obs-internal.h:87
gs_effect_t * opaque_effect
Definition: obs-internal.h:256
DARRAY(struct obs_source_info) filter_types
EXPORT void blog(int log_level, const char *format,...)
struct gs_stage_surface gs_stagesurf_t
Definition: graphics.h:267
pthread_mutex_t encoders_mutex
Definition: obs-internal.h:352
@ AUDIO_ACTION_VOL
Definition: obs-internal.h:543
void obs_source_audio_render(obs_source_t *source, uint32_t mixers, size_t channels, size_t sample_rate, size_t size)
gs_effect_t * deinterlace_blend_2x_effect
Definition: obs-internal.h:309
volatile bool reconnecting
Definition: obs-internal.h:917
DARRAY(struct obs_encoder_info) encoder_types
enum obs_hotkey_registerer_type obs_hotkey_registerer_t
Definition: obs-hotkey.h:61
bool obs_service_initialize(struct obs_service *service, struct obs_output *output)
void pause_reset(struct pause_data *pause)
void audio_monitor_reset(struct audio_monitor *monitor)
int64_t video_offset
Definition: obs-internal.h:901
obs_deinterlace_mode
Definition: obs.h:1107
bool transitioning_video
Definition: obs-internal.h:718
bool first_received
Definition: obs-internal.h:1059
void * param
Definition: obs-internal.h:565
char * push_to_mute
Definition: obs-internal.h:397
bool pressed0
Definition: obs-internal.h:151
void obs_transition_free(obs_source_t *transition)
video_t * video
Definition: obs-internal.h:284
pthread_mutex_t draw_info_mutex
Definition: obs-internal.h:208
uint64_t timestamp
Definition: obs-internal.h:223
DARRAY(struct obs_module_path) module_paths
bool modifiers_match
Definition: obs-internal.h:178
char * sceneitem_hide
Definition: obs-internal.h:400
obs_obj_type
Definition: obs.h:694
char * description
Definition: obs-internal.h:135
int total_frames
Definition: obs-internal.h:924
gs_effect_t * bicubic_effect
Definition: obs-internal.h:260
bool destroy
Definition: obs-internal.h:1127
struct obs_hotkeys_platform obs_hotkeys_platform_t
Definition: obs-internal.h:158
bool audio_conversion_set
Definition: obs-internal.h:949
void * module
Definition: obs-internal.h:88
void obs_context_data_remove(struct obs_context_data *context)
Definition: calldata.h:46
uint32_t scaled_height
Definition: obs-internal.h:1036
bool update_async_textures(struct obs_source *source, const struct obs_source_frame *frame, gs_texture_t *tex[MAX_AV_PLANES], gs_texrender_t *texrender)
obs_data_t * private_data
Definition: obs-internal.h:363
struct obs_service_info info
Definition: obs-internal.h:1120
void remove_async_frame(obs_source_t *source, struct obs_source_frame *frame)
gs_effect_t * deinterlace_linear_effect
Definition: obs-internal.h:306
bool transition_use_fixed_duration
Definition: obs-internal.h:727
struct obs_source_frame * filter_async_video(obs_source_t *source, struct obs_source_frame *in)
void stop_raw_video(video_t *video, void(*callback)(void *param, struct video_data *frame), void *param)
void(* obs_task_t)(void *param)
Definition: obs.h:748
encoded_callback_t delay_callback
Definition: obs-internal.h:961
pthread_mutex_t draw_callbacks_mutex
Definition: obs-internal.h:207
bool hotkey_thread_initialized
Definition: obs-internal.h:377
obs_source_t * transition_sources[2]
Definition: obs-internal.h:713
bool obs_display_init(struct obs_display *display, const struct gs_init_data *graphics_data)
long raw_active
Definition: obs-internal.h:268
float transition_manual_val
Definition: obs-internal.h:717
struct audio_monitor * audio_monitor_create(obs_source_t *source)
proc_handler_t * procs
Definition: obs-internal.h:418
gs_effect_t * repeat_effect
Definition: obs-internal.h:258
uint32_t scaled_width
Definition: obs-internal.h:1035
uint32_t transition_alignment
Definition: obs-internal.h:721
float conversion_width_i
Definition: obs-internal.h:293
double display_duration
Definition: obs-internal.h:872
bool size_changed
Definition: obs-internal.h:202
gs_swapchain_t * swap
Definition: obs-internal.h:206
gs_color_format
Definition: graphics.h:56
struct obs_core_data data
Definition: obs-internal.h:429
bool loaded
Definition: obs-internal.h:89
uint32_t delay_sec
Definition: obs-internal.h:964
uint64_t push_to_talk_delay
Definition: obs-internal.h:704
obs_hotkey_id pair_partner_id
Definition: obs-internal.h:144
DARRAY(obs_hotkey_binding_t) bindings
bool deinterlace_top_first
Definition: obs-internal.h:680
void obs_source_deactivate(obs_source_t *source, enum view_type type)
int pressed
Definition: obs-internal.h:139
pthread_t gpu_encode_thread
Definition: obs-internal.h:276
long unused_count
Definition: obs-internal.h:538
@ MAIN_VIEW
Definition: obs-internal.h:766
struct obs_output * output
Definition: obs-internal.h:1128
struct obs_weak_output * control
Definition: obs-internal.h:892
Definition: audio-io.h:104
int stop_code
Definition: obs-internal.h:909
bool rendering_filter
Definition: obs-internal.h:690
struct obs_service * first_service
Definition: obs-internal.h:347
struct obs_source * filter_target
Definition: obs-internal.h:685
int reconnect_retry_sec
Definition: obs-internal.h:911
obs_scale_type
Definition: obs.h:114
uint32_t async_width
Definition: obs-internal.h:664
@ OBS_KEY_LAST_VALUE
Definition: obs-hotkey.h:41
enum obs_transition_mode transition_mode
Definition: obs-internal.h:728
Definition: obs-internal.h:201
int count
Definition: obs-internal.h:233
const char * profile_encoder_encode_name
Definition: obs-internal.h:1078
uint32_t samplerate
Definition: obs-internal.h:1027
volatile bool delay_active
Definition: obs-internal.h:968
int count
Definition: obs-internal.h:224
bool obs_context_data_init(struct obs_context_data *context, enum obs_obj_type type, obs_data_t *settings, const char *name, obs_data_t *hotkey_data, bool private)
void obs_output_actual_stop(obs_output_t *output, bool force, uint64_t ts)
struct obs_source_frame * cur_async_frame
Definition: obs-internal.h:646
void obs_context_data_free(struct obs_context_data *context)
gs_effect_t * default_effect
Definition: obs-internal.h:254
pthread_mutex_t audio_actions_mutex
Definition: obs-internal.h:629
Definition: obs-internal.h:190
DARRAY(struct obs_modeless_ui) modeless_ui_callbacks
void obs_encoder_start(obs_encoder_t *encoder, void(*new_packet)(void *param, struct encoder_packet *packet), void *param)
pthread_mutex_t * mutex
Definition: obs-internal.h:472
bool do_encode(struct obs_encoder *encoder, struct encoder_frame *frame)
os_sem_t * gpu_encode_semaphore
Definition: obs-internal.h:274
uint64_t deinterlace_offset
Definition: obs-internal.h:672
void * data[2]
Definition: obs-internal.h:153
char * unmute
Definition: obs-internal.h:396
pthread_t end_data_capture_thread
Definition: obs-internal.h:905
@ GS_BGRA
Definition: graphics.h:62
struct pause_data pause
Definition: obs-internal.h:1076
char * name
Definition: obs-internal.h:134
bool obs_transition_init(obs_source_t *transition)
const struct obs_output_info * find_output(const char *id)
pthread_mutex_t gpu_encoder_mutex
Definition: obs-internal.h:270
pthread_mutex_t outputs_mutex
Definition: obs-internal.h:1065
enum video_format async_format
Definition: obs-internal.h:648
gs_texture_t * output_texture
Definition: obs-internal.h:246
void set_deinterlace_texture_size(obs_source_t *source)
obs_hotkey_pair_id pair_id
Definition: obs-internal.h:148
Definition: obs-encoder.h:115
uint32_t timebase_den
Definition: obs-internal.h:1047
#define AUDIO_OUTPUT_FRAMES
Definition: audio-io.h:30
enum audio_action_type type
Definition: obs-internal.h:551
uint32_t starting_drawn_count
Definition: obs-internal.h:920
Definition: graphics.h:484
Definition: audio-io.h:84
struct obs_weak_encoder * control
Definition: obs-internal.h:1020
bool owns_info_id
Definition: obs-internal.h:1044
uint32_t delay_flags
Definition: obs-internal.h:965
uint8_t * data
Definition: obs-encoder.h:45
DARRAY(struct obs_source *) render_order
DARRAY(struct obs_source_info) source_types
obs_hotkey_id hotkey_id
Definition: obs-internal.h:180
const struct obs_service_info * find_service(const char *id)
void obs_source_destroy(struct obs_source *source)
uint64_t transition_start_time
Definition: obs-internal.h:708
bool set_async_texture_size(struct obs_source *source, const struct obs_source_frame *frame)
size_t audio_storage_size
Definition: obs-internal.h:635
Definition: obs-output.h:34
struct obs_data obs_data_t
Definition: obs-data.h:42
@ VIDEO_FORMAT_BGRA
Definition: video-io.h:47
DARRAY(struct obs_output_info) output_types
bool owns_info_id
Definition: obs-internal.h:579
gs_stagesurf_t * copy_surfaces[NUM_TEXTURES][NUM_CHANNELS]
Definition: obs-internal.h:244
float balance
Definition: obs-internal.h:641
Definition: obs-internal.h:83
video_t * video
Definition: obs-internal.h:928
struct obs_context_data context
Definition: obs-internal.h:890
size_t planes
Definition: obs-internal.h:941
gs_texrender_t * transition_texrender[2]
Definition: obs-internal.h:711
EXPORT void bfree(void *ptr)
gs_texture_t * async_prev_textures[MAX_AV_PLANES]
Definition: obs-internal.h:676
struct obs_core_audio audio
Definition: obs-internal.h:428
gs_texture_t * convert_textures[NUM_CHANNELS]
Definition: obs-internal.h:247
Definition: obs-internal.h:222
obs_data_t * private_settings
Definition: obs-internal.h:735
struct obs_source * filter_parent
Definition: obs-internal.h:684
uint32_t async_convert_height[MAX_AV_PLANES]
Definition: obs-internal.h:669
uint32_t(* ver)(void)
Definition: obs-internal.h:96
Definition: obs-internal.h:457
struct obs_encoder_info info
Definition: obs-internal.h:1019
float transition_manual_clamp
Definition: obs-internal.h:714
gs_effect_t * default_rect_effect
Definition: obs-internal.h:255
void obs_display_free(struct obs_display *display)
obs_hotkey_id push_to_talk_key
Definition: obs-internal.h:695
uint32_t delay_cur_flags
Definition: obs-internal.h:966
size_t obs_hotkey_pair_id
Definition: obs-hotkey.h:25
void * param
Definition: obs-internal.h:1014
gs_effect_t * solid_effect
Definition: obs-internal.h:257
long gpu_encoder_active
Definition: obs-internal.h:269
bool obs_output_delay_start(obs_output_t *output)
uint32_t total_frames
Definition: obs-internal.h:286
float transition_manual_torque
Definition: obs-internal.h:715
bool audio_active
Definition: obs-internal.h:616
Definition: obs-internal.h:549
uint32_t flags
Definition: obs-internal.h:574
float color_matrix[16]
Definition: obs-internal.h:299
struct obs_source * source
Definition: obs-internal.h:560
DARRAY(struct obs_source_frame *) async_frames
pthread_mutex_t sources_mutex
Definition: obs-internal.h:349
struct audio_resampler audio_resampler_t
Definition: audio-resampler.h:28
struct encoder_packet packet
Definition: obs-internal.h:858
float user_volume
Definition: obs-internal.h:637
uint32_t cx
Definition: obs-internal.h:204
int reconnect_retry_max
Definition: obs-internal.h:912
const char * conversion_techs[NUM_CHANNELS]
Definition: obs-internal.h:291
bool used
Definition: obs-internal.h:539
bool async_gpu_conversion
Definition: obs-internal.h:647
bool owns_info_id
Definition: obs-internal.h:1124
bool gpu_conversion
Definition: obs-internal.h:290
uint32_t transition_actual_cx
Definition: obs-internal.h:722
@ VIDEO_FORMAT_YUVA
Definition: video-io.h:67
bool transition_source_active[2]
Definition: obs-internal.h:720
uint8_t * stack
Definition: calldata.h:47
uint64_t video_start_ts
Definition: obs-internal.h:939
uint64_t timestamp
Definition: obs-internal.h:550
bool push_to_talk_enabled
Definition: obs-internal.h:699
@ VIDEO_FORMAT_I40A
Definition: video-io.h:61
obs_task_handler_t ui_task_handler
Definition: obs-internal.h:432
void obs_transition_tick(obs_source_t *transition, float t)
pthread_mutex_t outputs_mutex
Definition: obs-internal.h:351
struct obs_context_data context
Definition: obs-internal.h:569
bool private
Definition: obs-internal.h:476
volatile bool delay_capturing
Definition: obs-internal.h:969
struct circlebuf vframe_info_buffer
Definition: obs-internal.h:252
enum video_format preferred_format
Definition: obs-internal.h:1037
DARRAY(struct obs_source_info) transition_types
void obs_encoder_packet_create_instance(struct encoder_packet *dst, const struct encoder_packet *src)
obs_transition_mode
Definition: obs.h:1367
DARRAY(struct audio_monitor *) monitors
void(* encoded_callback_t)(void *data, struct encoder_packet *packet)
Definition: obs-internal.h:861
obs_source_t * channels[MAX_CHANNELS]
Definition: obs-internal.h:192
audio_t * audio
Definition: obs-internal.h:929
DARRAY(struct obs_source *) filters
bool valid
Definition: obs-internal.h:958
gs_effect_t * deinterlace_yadif_2x_effect
Definition: obs-internal.h:311
void send_off_encoder_packet(obs_encoder_t *encoder, bool success, bool received, struct encoder_packet *pkt)
struct obs_encoder * first_encoder
Definition: obs-internal.h:346
obs_monitoring_type
Definition: obs.h:1133
char * sceneitem_show
Definition: obs-internal.h:399
uint8_t * audio_output_buffer[MAX_AV_PLANES]
Definition: obs-internal.h:1052
uint32_t deinterlace_half_duration
Definition: obs-internal.h:678
const char * obs_get_hotkey_translation(obs_key_t key, const char *def)
bool enabled
Definition: obs-internal.h:203
struct obs_core_video video
Definition: obs-internal.h:427
uint64_t audio_start_ts
Definition: obs-internal.h:938
struct obs_context_data context
Definition: obs-internal.h:1119
struct signal_handler signal_handler_t
Definition: signal.h:35
uint64_t next_audio_sys_ts_min
Definition: obs-internal.h:607
void add_alignment(struct vec2 *v, uint32_t align, int cx, int cy)
struct obs_source_info info
Definition: obs-internal.h:570
uint32_t lagged_frames
Definition: obs-internal.h:287
signal_handler_t * signals
Definition: obs-internal.h:461
bool user_push_to_talk_pressed
Definition: obs-internal.h:701
signal_handler_t * signals
Definition: obs-internal.h:392
gs_effect_t * bilinear_lowres_effect
Definition: obs-internal.h:263
bool textures_copied[NUM_TEXTURES]
Definition: obs-internal.h:249
bool pressed1
Definition: obs-internal.h:152
void obs_encoder_remove_output(struct obs_encoder *encoder, struct obs_output *output)
char * module_config_path
Definition: obs-internal.h:421
volatile long activate_refs
Definition: obs-internal.h:588
pthread_mutex_t draw_callbacks_mutex
Definition: obs-internal.h:355
#define MAX_CHANNELS
Definition: obs-defs.h:21
DARRAY(struct obs_source *) root_nodes
int reconnect_retries
Definition: obs-internal.h:913
signal_handler_t * signals
Definition: obs-internal.h:417
uint32_t background_color
Definition: obs-internal.h:205
void obs_encoder_stop(obs_encoder_t *encoder, void(*new_packet)(void *param, struct encoder_packet *packet), void *param)
uint64_t video_frame_interval_ns
Definition: obs-internal.h:281
gs_texrender_t * async_prev_texrender
Definition: obs-internal.h:677
void(* new_packet)(void *param, struct encoder_packet *packet)
Definition: obs-internal.h:1013
gs_texture_t * tex_uv
Definition: obs-internal.h:229
volatile bool paused
Definition: obs-internal.h:1040
struct obs_output_info info
Definition: obs-internal.h:891
obs_data_t * settings
Definition: obs-internal.h:460
struct circlebuf tasks
Definition: obs-internal.h:316
pthread_mutex_t filter_mutex
Definition: obs-internal.h:687
bool reroute_hotkeys
Definition: obs-internal.h:381
bool update_async_texture(struct obs_source *source, const struct obs_source_frame *frame, gs_texture_t *tex, gs_texrender_t *texrender)
uint64_t timestamp
Definition: obs-internal.h:231
struct obs_weak_service * control
Definition: obs-internal.h:1121
uint64_t push_to_talk_stop_time
Definition: obs-internal.h:705
void obs_encoder_shutdown(obs_encoder_t *encoder)
os_event_t * reconnect_stop_event
Definition: obs-internal.h:916
struct os_event_data os_event_t
Definition: threading.h:63
pthread_mutex_t displays_mutex
Definition: obs-internal.h:350
void * data
Definition: obs-internal.h:138
struct gs_texture gs_texture_t
Definition: graphics.h:266
gs_effect_t * premultiplied_alpha_effect
Definition: obs-internal.h:264
struct obs_context_data * next
Definition: obs-internal.h:473
struct obs_context_data context
Definition: obs-internal.h:1018
DARRAY(struct obs_service_info) service_types
bool obs_hotkeys_platform_init(struct obs_core_hotkeys *hotkeys)
struct obs_source_info * get_source_info2(const char *unversioned_id, uint32_t ver)
os_event_t * stopping_event
Definition: obs-internal.h:906
Definition: audio-io.h:78
#define NUM_TEXTURES
Definition: obs-internal.h:39
const char * file
Definition: obs-internal.h:85
bool(* obs_hotkey_active_func)(void *data, obs_hotkey_pair_id id, obs_hotkey_t *hotkey, bool pressed)
Definition: obs-hotkey.h:188
void obs_output_destroy(obs_output_t *output)
volatile bool reconnect_thread_active
Definition: obs-internal.h:918
float * audio_output_buf[MAX_AUDIO_MIXES][MAX_AUDIO_CHANNELS]
Definition: obs-internal.h:625
bool released
Definition: obs-internal.h:234
bool texture_converted
Definition: obs-internal.h:250
void obs_hotkeys_platform_free(struct obs_core_hotkeys *hotkeys)
enum obs_scale_type scale_type
Definition: obs-internal.h:300
void * obs_graphics_thread(void *param)
bool obs_hotkeys_platform_is_pressed(obs_hotkeys_platform_t *context, obs_key_t key)
volatile long show_refs
Definition: obs-internal.h:585
bool obs_source_init_context(struct obs_source *source, obs_data_t *settings, const char *name, obs_data_t *hotkey_data, bool private)
uint32_t last_obs_ver
Definition: obs-internal.h:576
uint64_t last_video_ts
Definition: obs-internal.h:878
bool conversion_needed
Definition: obs-internal.h:292
uint32_t starting_frame_count
Definition: obs-internal.h:922
pthread_mutex_t rename_cache_mutex
Definition: obs-internal.h:470
Definition: obs-internal.h:132
bool audio_pending
Definition: obs-internal.h:614
struct obs_encoder_info orig_info
Definition: obs-internal.h:1023
DARRAY(struct obs_modal_ui) modal_ui_callbacks
Definition: circlebuf.h:32
struct obs_source * next_audio_source
Definition: obs-internal.h:619
bool enabled
Definition: obs-internal.h:599
bool user_push_to_mute_pressed
Definition: obs-internal.h:698
void obs_service_activate(struct obs_service *service)
uint32_t transition_cx
Definition: obs-internal.h:724
@ AUDIO_ACTION_PTT
Definition: obs-internal.h:545
bool user_muted
Definition: obs-internal.h:617
struct matrix4 transition_matrices[2]
Definition: obs-internal.h:730
Definition: graphics-internal.h:329
bool obs_view_init(struct obs_view *view)
void(* obs_hotkey_func)(void *data, obs_hotkey_id id, obs_hotkey_t *hotkey, bool pressed)
Definition: obs-hotkey.h:156
bool sent_first_packet
Definition: obs-internal.h:1012
struct audio_convert_info audio_conversion
Definition: obs-internal.h:951
struct obs_source_info * get_source_info(const char *id)
uint64_t ts_offset
Definition: obs-internal.h:881
struct obs_encoder * encoder
Definition: obs-internal.h:1008
size_t framesize_bytes
Definition: obs-internal.h:1031
volatile long refs
Definition: obs-internal.h:496
volatile uint64_t timing_adjust
Definition: obs-internal.h:603
size_t sample_rate
Definition: obs-internal.h:942
size_t obs_hotkey_id
Definition: obs-hotkey.h:24
gs_effect_t * deinterlace_discard_effect
Definition: obs-internal.h:304
struct circlebuf audio_buffer[MAX_AUDIO_MIXES][MAX_AV_PLANES]
Definition: obs-internal.h:937
obs_encoder_t * audio_encoders[MAX_AUDIO_MIXES]
Definition: obs-internal.h:931
void(* obs_source_enum_proc_t)(obs_source_t *parent, obs_source_t *child, void *param)
Definition: obs-source.h:191
uint64_t resample_offset
Definition: obs-internal.h:604
size_t blocksize
Definition: obs-internal.h:1029
bool name_store_owned
Definition: obs-internal.h:422
audio_resampler_t * resampler
Definition: obs-internal.h:628
Definition: obs-internal.h:175
struct video_scale_info video_conversion
Definition: obs-internal.h:950
uint64_t last_sys_timestamp
Definition: obs-internal.h:609
uint64_t push_to_mute_delay
Definition: obs-internal.h:702
gs_effect_t * deinterlace_discard_2x_effect
Definition: obs-internal.h:305
struct gs_sampler_state gs_samplerstate_t
Definition: graphics.h:271
obs_hotkey_t * hotkey
Definition: obs-internal.h:181
int64_t last_sync_offset
Definition: obs-internal.h:640
struct obs_output * first_output
Definition: obs-internal.h:345
char * locale
Definition: obs-internal.h:420
uint32_t async_height
Definition: obs-internal.h:665
void * router_func_data
Definition: obs-internal.h:385
uint32_t scaled_height
Definition: obs-internal.h:946
bool video_pause_check(struct pause_data *pause, uint64_t timestamp)
bool async_rendered
Definition: obs-internal.h:610
struct profiler_name_store profiler_name_store_t
Definition: profiler.h:39
bool async_unbuffered
Definition: obs-internal.h:658
uint32_t audio_mixers
Definition: obs-internal.h:636
gs_effect_t * conversion_effect
Definition: obs-internal.h:259
uint64_t ts
Definition: obs-internal.h:857
void obs_transition_enum_sources(obs_source_t *transition, obs_source_enum_proc_t enum_callback, void *param)
gs_texture_t * tex
Definition: obs-internal.h:228
Definition: obs-internal.h:863
Definition: obs-internal.h:1118
int64_t offset_usec
Definition: obs-internal.h:1061
pthread_once_t name_map_init_token
Definition: obs-internal.h:389
char * monitoring_device_id
Definition: obs-internal.h:337
char * array
Definition: dstr.h:37
volatile bool active
Definition: obs-internal.h:926
struct circlebuf audio_input_buf[MAX_AUDIO_CHANNELS]
Definition: obs-internal.h:622
struct obs_module * next
Definition: obs-internal.h:102
struct obs_service * service
Definition: obs-internal.h:1115
bool defer_update
Definition: obs-internal.h:582
@ DELAY_MSG_PACKET
Definition: obs-internal.h:850
pthread_mutex_t audio_sources_mutex
Definition: obs-internal.h:354
bool texture_rendered
Definition: obs-internal.h:248
double caption_timestamp
Definition: obs-internal.h:954
bool wait_for_video
Definition: obs-internal.h:1058
char * data
Definition: obs-internal.h:109
void(* unload)(void)
Definition: obs-internal.h:92
float user_volume
Definition: obs-internal.h:332
gs_texrender_t * filter_texrender
Definition: obs-internal.h:688
enum delay_msg msg
Definition: obs-internal.h:856
struct obs_source * first_source
Definition: obs-internal.h:342
DARRAY(struct draw_callback) draw_callbacks
float * audio_mix_buf[MAX_AUDIO_CHANNELS]
Definition: obs-internal.h:626
uint32_t default_flags
Definition: obs-internal.h:575
bool obs_encoder_initialize(obs_encoder_t *encoder)
Definition: obs-internal.h:558
bool received_video
Definition: obs-internal.h:897
DARRAY(obs_output_t *) outputs
gs_effect_t * deinterlace_effect
Definition: obs-internal.h:674
pthread_mutex_t delay_mutex
Definition: obs-internal.h:963
int32_t timebase_den
Definition: obs-encoder.h:52
void obs_transition_save(obs_source_t *source, obs_data_t *data)
struct resample_info sample_info
Definition: obs-internal.h:627
uint64_t first_raw_ts
Definition: obs-internal.h:1062
volatile bool timing_set
Definition: obs-internal.h:602
Definition: obs-service.h:31
@ VIDEO_FORMAT_I42A
Definition: video-io.h:64
volatile bool paused
Definition: obs-internal.h:927
gs_effect_t * lanczos_effect
Definition: obs-internal.h:261
uint64_t lock_key
Definition: obs-internal.h:232
size_t mixer_idx
Definition: obs-internal.h:1033
bool removed
Definition: obs-internal.h:593
Definition: obs-internal.h:227
Definition: obs-internal.h:403
volatile long weak_refs
Definition: obs-internal.h:497
bool push_to_mute_enabled
Definition: obs-internal.h:696
bool obs_output_actual_start(obs_output_t *output)
struct obs_context_data ** prev_next
Definition: obs-internal.h:474
bool audio_pause_check(struct pause_data *pause, struct audio_data *data, size_t sample_rate)
void * obs_hotkey_thread(void *param)
int64_t cur_pts
Definition: obs-internal.h:1049
bool push_to_mute_pressed
Definition: obs-internal.h:697
volatile bool valid
Definition: obs-internal.h:365
bool initialized
Definition: obs-internal.h:1041
DARRAY(obs_hotkey_t) hotkeys
void * param
Definition: obs-internal.h:52
void(* set_pointer)(obs_module_t *module)
Definition: obs-internal.h:97
DARRAY(obs_hotkey_id) hotkeys
struct audio_monitor * monitor
Definition: obs-internal.h:732
Definition: obs-internal.h:107
void start_raw_video(video_t *video, const struct video_scale_info *conversion, void(*callback)(void *param, struct video_data *frame), void *param)
void obs_encoder_add_output(struct obs_encoder *encoder, struct obs_output *output)
struct caption_text * next
Definition: obs-internal.h:873
gs_texture_t * transparent_texture
Definition: obs-internal.h:302
void(* obs_task_handler_t)(obs_task_t task, void *param, bool wait)
Definition: obs.h:758
bool using_nv12_tex
Definition: obs-internal.h:251
uint32_t transition_cy
Definition: obs-internal.h:725
Definition: obs-internal.h:369
double video_fps
Definition: obs-internal.h:283
#define success(stat, call)
Definition: mac-helpers.h:13
int cur_texture
Definition: obs-internal.h:267
bool async_flip
Definition: obs-internal.h:655
DARRAY(struct obs_source_info) input_types
Definition: obs-hotkey.h:45
volatile bool gpu_encode_stop
Definition: obs-internal.h:278
struct obs_hotkey_name_map * name_map
Definition: obs-internal.h:390
bool showing
Definition: obs-internal.h:596
DARRAY(obs_hotkey_pair_id) hotkey_pairs
#define CAPTION_LINE_BYTES
Definition: obs-internal.h:869
struct obs_display ** prev_next
Definition: obs-internal.h:212
float volume
Definition: obs-internal.h:638
void obs_output_remove_encoder(struct obs_output *output, struct obs_encoder *encoder)
enum video_format async_cache_format
Definition: obs-internal.h:650
struct pause_data pause
Definition: obs-internal.h:935
pthread_mutex_t audio_mutex
Definition: obs-internal.h:631
pthread_t hotkey_thread
Definition: obs-internal.h:376
struct obs_source_frame * prev_async_frame
Definition: obs-internal.h:675
bool gpu_encode_thread_initialized
Definition: obs-internal.h:277
void obs_source_activate(obs_source_t *source, enum view_type type)
obs_hotkey_active_func func[2]
Definition: obs-internal.h:150
struct obs_source_frame * frame
Definition: obs-internal.h:537
bool thread_initialized
Definition: obs-internal.h:288
Definition: obs-internal.h:876
gs_effect_t * deinterlace_linear_2x_effect
Definition: obs-internal.h:307
struct circlebuf vframe_info_buffer_gpu
Definition: obs-internal.h:253
void(* draw)(void *param, uint32_t cx, uint32_t cy)
Definition: obs-internal.h:56
struct obs_core_hotkeys hotkeys
Definition: obs-internal.h:430
EXPORT void signal_handler_signal(signal_handler_t *handler, const char *signal, calldata_t *params)
@ AUX_VIEW
Definition: obs-internal.h:767
gs_effect_t * deinterlace_yadif_effect
Definition: obs-internal.h:310
enum gs_color_format async_texture_formats[MAX_AV_PLANES]
Definition: obs-internal.h:652
obs_encoder_t * video_encoder
Definition: obs-internal.h:930
Definition: obs-internal.h:237
void process_delay(void *data, struct encoder_packet *packet)
Definition: audio-resampler.h:30
uint32_t timebase_num
Definition: obs-internal.h:1046
uint32_t async_cache_height
Definition: obs-internal.h:667
int total_buffering_ticks
Definition: obs-internal.h:330
uint32_t scaled_width
Definition: obs-internal.h:945
void * registerer
Definition: obs-internal.h:142
struct proc_handler proc_handler_t
Definition: proc.h:36
@ GS_RGBA
Definition: graphics.h:60
Definition: obs-internal.h:55
@ DELAY_MSG_STOP
Definition: obs-internal.h:852
size_t framesize
Definition: obs-internal.h:1030
void audio_monitor_destroy(struct audio_monitor *monitor)
char * last_error_message
Definition: obs-internal.h:971
os_event_t * gpu_encode_inactive
Definition: obs-internal.h:275
Definition: obs-encoder.h:44
uint64_t last_frame_ts
Definition: obs-internal.h:608
bool(* load)(void)
Definition: obs-internal.h:91
void obs_context_data_insert(struct obs_context_data *context, pthread_mutex_t *mutex, void *first)
#define NUM_CHANNELS
Definition: obs-internal.h:40
@ LOG_DEBUG
Definition: base.h:65
struct obs_source_frame * async_preload_frame
Definition: obs-internal.h:660
pthread_mutex_t caption_mutex
Definition: obs-internal.h:953
bool push_to_talk_pressed
Definition: obs-internal.h:700
uint64_t ts_end
Definition: obs-internal.h:880
graphics_t * graphics
Definition: obs-internal.h:243
void obs_transition_load(obs_source_t *source, obs_data_t *data)
uint32_t async_convert_width[MAX_AV_PLANES]
Definition: obs-internal.h:668
Definition: obs-internal.h:341
struct obs_display * first_display
Definition: obs-internal.h:344
#define MAX_AUDIO_MIXES
Definition: audio-io.h:28
bool muted
Definition: obs-internal.h:618
EXPORT void dstr_copy(struct dstr *dst, const char *array)
bool set
Definition: obs-internal.h:554
Definition: obs-internal.h:50
struct obs_weak_ref ref
Definition: obs-internal.h:559
Definition: obs-internal.h:889
uint64_t ts_start
Definition: obs-internal.h:879
void obs_source_video_tick(obs_source_t *source, float seconds)
void(* set_locale)(const char *locale)
Definition: obs-internal.h:94
bool active
Definition: obs-internal.h:595
obs_hotkey_callback_router_func router_func
Definition: obs-internal.h:384
const char * unversioned_id
Definition: obs-source.h:529
void deinterlace_process_last_frame(obs_source_t *source, uint64_t sys_time)
struct obs_weak_ref ref
Definition: obs-internal.h:864
struct obs_source * first_audio_source
Definition: obs-internal.h:343
obs_allow_direct_render
Definition: obs.h:109
int64_t audio_offsets[MAX_AUDIO_MIXES]
Definition: obs-internal.h:902
uint32_t cy
Definition: obs-internal.h:204
pthread_mutex_t async_mutex
Definition: obs-internal.h:663
long async_rotation
Definition: obs-internal.h:654
enum obs_obj_type type
Definition: obs-internal.h:463
struct obs_display * next
Definition: obs-internal.h:211
Definition: obs-internal.h:536
int reconnect_retry_cur_sec
Definition: obs-internal.h:914
obs_hotkey_pair_id mute_unmute_key
Definition: obs-internal.h:693
audio_t * audio
Definition: obs-internal.h:322
Definition: obs-internal.h:1017
obs_hotkey_id next_id
Definition: obs-internal.h:372
bool video_conversion_set
Definition: obs-internal.h:948
Definition: video-io.h:86
uint32_t base_width
Definition: obs-internal.h:297
Definition: obs-internal.h:242
uint64_t buffered_ts
Definition: obs-internal.h:327
struct circlebuf gpu_encoder_avail_queue
Definition: obs-internal.h:272
bool active
Definition: obs-internal.h:1126
bool audio_callback(void *param, uint64_t start_ts_in, uint64_t end_ts_in, uint64_t *out_ts, uint32_t mixers, struct audio_output_data *mixes)
gs_effect_t * area_effect
Definition: obs-internal.h:262
@ DELAY_MSG_START
Definition: obs-internal.h:851
void obs_service_deactivate(struct obs_service *service, bool remove)
@ VIDEO_FORMAT_AYUV
Definition: video-io.h:70
int64_t sync_offset
Definition: obs-internal.h:639
char * push_to_talk
Definition: obs-internal.h:398
size_t last_audio_input_buf_size
Definition: obs-internal.h:623
size_t audio_size
Definition: obs-internal.h:940
void stop_gpu_encode(obs_encoder_t *encoder)
struct circlebuf audio_input_buffer[MAX_AV_PLANES]
Definition: obs-internal.h:1051
bool pending_stop
Definition: obs-internal.h:615
video_format
Definition: video-io.h:33
pthread_mutex_t transition_tex_mutex
Definition: obs-internal.h:710
char * name
Definition: obs-internal.h:458
DARRAY(char *) rename_cache
bool start_gpu_encode(obs_encoder_t *encoder)
struct gs_texture_render gs_texrender_t
Definition: graphics.h:275
struct os_sem_data os_sem_t
Definition: threading.h:64
struct audio_output audio_t
Definition: audio-io.h:42
void * param
Definition: obs-internal.h:239
struct obs_weak_ref ref
Definition: obs-internal.h:1007
obs_hotkey_id id
Definition: obs-internal.h:133
float vol
Definition: obs-internal.h:553
pthread_mutex_t transition_mutex
Definition: obs-internal.h:712
os_event_t * stop_event
Definition: obs-internal.h:378
DARRAY(struct encoder_packet) interleaved_packets
struct video_output video_t
Definition: video-io.h:31
struct obs_weak_ref ref
Definition: obs-internal.h:1114
obs_service_t * service
Definition: obs-internal.h:932
obs_source_audio_capture_t callback
Definition: obs-internal.h:564
struct circlebuf buffered_timestamps
Definition: obs-internal.h:328
struct gs_swap_chain gs_swapchain_t
Definition: graphics.h:272
void obs_output_delay_stop(obs_output_t *output)
uint32_t transition_actual_cy
Definition: obs-internal.h:723
audio_action_type
Definition: obs-internal.h:542
#define MAX_AUDIO_CHANNELS
Definition: audio-io.h:29
Definition: obs-encoder.h:91
proc_handler_t * procs
Definition: obs-internal.h:462
pthread_mutex_t init_mutex
Definition: obs-internal.h:1025
struct obs_encoder * paired_encoder
Definition: obs-internal.h:1060
uint64_t active_delay_ns
Definition: obs-internal.h:960
size_t size
Definition: calldata.h:48
uint32_t base_height
Definition: obs-internal.h:298
pthread_mutex_t mutex
Definition: obs-internal.h:877
uint32_t transition_fixed_duration
Definition: obs-internal.h:726
pthread_mutex_t task_mutex
Definition: obs-internal.h:315
Definition: obs-internal.h:1011
pthread_mutex_t interleaved_mutex
Definition: obs-internal.h:907
void obs_hotkey_name_map_free(void)
Definition: video-io.h:213
void obs_output_cleanup_delay(obs_output_t *output)
gs_effect_t * obs_load_effect(gs_effect_t **effect, const char *file)
uint64_t audio_ts
Definition: obs-internal.h:621
void obs_encoder_destroy(obs_encoder_t *encoder)
struct circlebuf gpu_encoder_queue
Definition: obs-internal.h:271
char * last_error_message
Definition: obs-internal.h:1079
uint64_t next_audio_ts_min
Definition: obs-internal.h:606
void obs_context_data_setname(struct obs_context_data *context, const char *name)
obs_source_t * obs_source_create_set_last_ver(const char *id, const char *name, obs_data_t *settings, obs_data_t *hotkey_data, uint32_t last_obs_ver)
pthread_mutex_t channels_mutex
Definition: obs-internal.h:191
volatile long delay_restart_refs
Definition: obs-internal.h:967
void deinterlace_render(obs_source_t *s)
void(* free_locale)(void)
Definition: obs-internal.h:95
struct caption_text * caption_tail
Definition: obs-internal.h:956
Definition: obs-internal.h:1006
pthread_mutex_t audio_cb_mutex
Definition: obs-internal.h:632
int async_channel_count
Definition: obs-internal.h:653
uint64_t push_to_mute_stop_time
Definition: obs-internal.h:703
obs_key_combination_t key
Definition: obs-internal.h:176
Definition: obs-internal.h:855
obs_hotkeys_platform_t * platform_context
Definition: obs-internal.h:387
gs_texture_t * render_texture
Definition: obs-internal.h:245
int64_t highest_audio_ts
Definition: obs-internal.h:903
char text[CAPTION_LINE_BYTES+1]
Definition: obs-internal.h:871
bool async_cache_full_range
Definition: obs-internal.h:651
bool deinterlace_rendered
Definition: obs-internal.h:681
struct obs_source ** prev_next_audio_source
Definition: obs-internal.h:620
@ GS_BGRX
Definition: graphics.h:61
uint64_t last_audio_ts
Definition: obs-internal.h:605
bool async_active
Definition: obs-internal.h:656
#define MAX_TS_VAR
Definition: obs-internal.h:787
void obs_service_destroy(obs_service_t *service)
obs_hotkey_func func
Definition: obs-internal.h:137
DARRAY(obs_encoder_t *) gpu_encoders
bool transitioning_audio
Definition: obs-internal.h:719
DARRAY(struct audio_cb_info) audio_cb_list
void obs_hotkeys_free(void)
uint64_t deinterlace_frame_ts
Definition: obs-internal.h:673
uint64_t transition_duration
Definition: obs-internal.h:709
obs_transition_scale_type
Definition: obs.h:1382
size_t total_audio_frames
Definition: obs-internal.h:943
obs_data_t * hotkey_data
Definition: obs-internal.h:467
gs_effect_t * deinterlace_blend_effect
Definition: obs-internal.h:308
profiler_name_store_t * name_store
Definition: obs-internal.h:423
void(* obs_hotkey_callback_router_func)(void *data, obs_hotkey_id id, bool pressed)
Definition: obs-hotkey.h:284
struct obs_encoder_info * find_encoder(const char *id)
uint32_t output_width
Definition: obs-internal.h:295
uint32_t starting_lagged_count
Definition: obs-internal.h:921
enum obs_deinterlace_mode deinterlace_mode
Definition: obs-internal.h:679
obs_hotkey_id push_to_mute_key
Definition: obs-internal.h:694
pthread_t reconnect_thread
Definition: obs-internal.h:915
bool thread_disable_press
Definition: obs-internal.h:379
struct caption_text * caption_head
Definition: obs-internal.h:955
uint64_t video_avg_frame_time_ns
Definition: obs-internal.h:282
void deinterlace_update_async_video(obs_source_t *source)
void(* obs_source_audio_capture_t)(void *param, obs_source_t *source, const struct audio_data *audio_data, bool muted)
Definition: obs.h:1098
@ VIDEO_FORMAT_RGBA
Definition: video-io.h:46
pthread_t video_thread
Definition: obs-internal.h:285
bool async_decoupled
Definition: obs-internal.h:659
enum obs_monitoring_type monitoring_type
Definition: obs-internal.h:733
DARRAY(struct async_frame) async_cache
bool received_audio
Definition: obs-internal.h:898
@ AUDIO_ACTION_MUTE
Definition: obs-internal.h:544
Definition: obs-internal.h:321
Definition: obs-internal.h:1113
volatile bool end_data_capture_thread_active
Definition: obs-internal.h:900
uint32_t async_cache_width
Definition: obs-internal.h:666
struct obs_module * first_module
Definition: obs-internal.h:404
bool async_update_texture
Definition: obs-internal.h:657
float transition_manual_target
Definition: obs-internal.h:716
char * bin_path
Definition: obs-internal.h:86
pthread_mutex_t audio_buf_mutex
Definition: obs-internal.h:630
char * mute
Definition: obs-internal.h:395
delay_msg
Definition: obs-internal.h:849
char * monitoring_device_name
Definition: obs-internal.h:336
void(* tick)(void *param, float seconds)
Definition: obs-internal.h:51
uint32_t handle
Definition: obs-internal.h:230
struct obs_video_info ovi
Definition: obs-internal.h:313
uint64_t start_ts
Definition: obs-internal.h:1063
bool async_full_range
Definition: obs-internal.h:649
Definition: obs-internal.h:870
void * data
Definition: obs-internal.h:459
uint64_t video_time
Definition: obs-internal.h:280
struct obs_output * output
Definition: obs-internal.h:865
view_type
Definition: obs-internal.h:765
int64_t dts
Definition: obs-encoder.h:49
Definition: obs-internal.h:147
void free_module(struct obs_module *mod)
char * mod_name
Definition: obs-internal.h:84
obs_hotkey_pair_id next_pair_id
Definition: obs-internal.h:374
pthread_mutex_t callbacks_mutex
Definition: obs-internal.h:1073
bool pressed
Definition: obs-internal.h:177
bool destroy_on_stop
Definition: obs-internal.h:1068
uint32_t output_height
Definition: obs-internal.h:296
gs_texture_t * async_textures[MAX_AV_PLANES]
Definition: obs-internal.h:644
bool owns_info_id
Definition: obs-internal.h:895
gs_samplerstate_t * point_sampler
Definition: obs-internal.h:265
DARRAY(struct draw_callback) draw_callbacks
int64_t highest_video_ts
Definition: obs-internal.h:904
enum obs_allow_direct_render allow_direct
Definition: obs-internal.h:689
long long unnamed_index
Definition: obs-internal.h:361
int buffering_wait_ticks
Definition: obs-internal.h:329
char * translations[OBS_KEY_LAST_VALUE]
Definition: obs-internal.h:394
DARRAY(obs_hotkey_pair_t) hotkey_pairs
gs_texrender_t * async_texrender
Definition: obs-internal.h:645