Open Broadcaster Software
Free, open source software for live streaming and recording
obs-internal.h
Go to the documentation of this file.
1 /******************************************************************************
2  Copyright (C) 2013-2014 by Hugh Bailey <obs.jim@gmail.com>
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ******************************************************************************/
17 
18 #pragma once
19 
20 #include "util/c99defs.h"
21 #include "util/darray.h"
22 #include "util/circlebuf.h"
23 #include "util/dstr.h"
24 #include "util/threading.h"
25 #include "util/platform.h"
26 #include "util/profiler.h"
27 #include "callback/signal.h"
28 #include "callback/proc.h"
29 
30 #include "graphics/graphics.h"
31 #include "graphics/matrix4.h"
32 
34 #include "media-io/video-io.h"
35 #include "media-io/audio-io.h"
36 
37 #include "obs.h"
38 
39 #define NUM_TEXTURES 2
40 #define MICROSECOND_DEN 1000000
41 
42 static inline int64_t packet_dts_usec(struct encoder_packet *packet)
43 {
44  return packet->dts * MICROSECOND_DEN / packet->timebase_den;
45 }
46 
47 struct draw_callback {
48  void (*draw)(void *param, uint32_t cx, uint32_t cy);
49  void *param;
50 };
51 
52 /* ------------------------------------------------------------------------- */
53 /* validity checks */
54 
55 static inline bool obs_object_valid(const void *obj, const char *f,
56  const char *t)
57 {
58  if (!obj) {
59  blog(LOG_DEBUG, "%s: Null '%s' parameter", f, t);
60  return false;
61  }
62 
63  return true;
64 }
65 
66 #define obs_ptr_valid(ptr, func) obs_object_valid(ptr, func, #ptr)
67 #define obs_source_valid obs_ptr_valid
68 #define obs_output_valid obs_ptr_valid
69 #define obs_encoder_valid obs_ptr_valid
70 #define obs_service_valid obs_ptr_valid
71 
72 /* ------------------------------------------------------------------------- */
73 /* modules */
74 
75 struct obs_module {
76  char *mod_name;
77  const char *file;
78  char *bin_path;
79  char *data_path;
80  void *module;
81  bool loaded;
82 
83  bool (*load)(void);
84  void (*unload)(void);
85  void (*post_load)(void);
86  void (*set_locale)(const char *locale);
87  void (*free_locale)(void);
88  uint32_t (*ver)(void);
89  void (*set_pointer)(obs_module_t *module);
90  const char *(*name)(void);
91  const char *(*description)(void);
92  const char *(*author)(void);
93 
94  struct obs_module *next;
95 };
96 
97 extern void free_module(struct obs_module *mod);
98 
100  char *bin;
101  char *data;
102 };
103 
104 static inline void free_module_path(struct obs_module_path *omp)
105 {
106  if (omp) {
107  bfree(omp->bin);
108  bfree(omp->data);
109  }
110 }
111 
112 static inline bool check_path(const char *data, const char *path,
113  struct dstr *output)
114 {
115  dstr_copy(output, path);
116  dstr_cat(output, data);
117 
118  return os_file_exists(output->array);
119 }
120 
121 
122 /* ------------------------------------------------------------------------- */
123 /* hotkeys */
124 
125 struct obs_hotkey {
127  char *name;
128  char *description;
129 
131  void *data;
132  int pressed;
133 
135  void *registerer;
136 
138 };
139 
144  bool pressed0;
145  bool pressed1;
146  void *data[2];
147 };
148 
150 
151 typedef struct obs_hotkeys_platform obs_hotkeys_platform_t;
152 
153 void *obs_hotkey_thread(void *param);
154 
155 struct obs_core_hotkeys;
156 bool obs_hotkeys_platform_init(struct obs_core_hotkeys *hotkeys);
157 void obs_hotkeys_platform_free(struct obs_core_hotkeys *hotkeys);
159  obs_key_t key);
160 
161 const char *obs_get_hotkey_translation(obs_key_t key, const char *def);
162 
163 struct obs_context_data;
164 void obs_hotkeys_context_release(struct obs_context_data *context);
165 
166 void obs_hotkeys_free(void);
167 
170  bool pressed;
172 
175 };
176 
177 struct obs_hotkey_name_map;
178 void obs_hotkey_name_map_free(void);
179 
180 
181 /* ------------------------------------------------------------------------- */
182 /* views */
183 
184 struct obs_view {
185  pthread_mutex_t channels_mutex;
187 };
188 
189 extern bool obs_view_init(struct obs_view *view);
190 extern void obs_view_free(struct obs_view *view);
191 
192 
193 /* ------------------------------------------------------------------------- */
194 /* displays */
195 
196 struct obs_display {
198  bool enabled;
202  pthread_mutex_t draw_callbacks_mutex;
203  pthread_mutex_t draw_info_mutex;
204  DARRAY(struct draw_callback) draw_callbacks;
205 
206  struct obs_display *next;
208 };
209 
210 extern bool obs_display_init(struct obs_display *display,
211  const struct gs_init_data *graphics_data);
212 extern void obs_display_free(struct obs_display *display);
213 
214 
215 /* ------------------------------------------------------------------------- */
216 /* core */
217 
220  int count;
221 };
222 
225  gs_stagesurf_t *copy_surfaces[NUM_TEXTURES];
226  gs_texture_t *render_textures[NUM_TEXTURES];
227  gs_texture_t *output_textures[NUM_TEXTURES];
228  gs_texture_t *convert_textures[NUM_TEXTURES];
229  bool textures_rendered[NUM_TEXTURES];
230  bool textures_output[NUM_TEXTURES];
231  bool textures_copied[NUM_TEXTURES];
232  bool textures_converted[NUM_TEXTURES];
233  struct circlebuf vframe_info_buffer;
246 
249  double video_fps;
251  pthread_t video_thread;
255 
257  const char *conversion_tech;
259  uint32_t plane_offsets[3];
260  uint32_t plane_sizes[3];
261  uint32_t plane_linewidth[3];
262 
267  float color_matrix[16];
268  enum obs_scale_type scale_type;
269 
271 
280 
281  struct obs_video_info ovi;
282 };
283 
284 struct audio_monitor;
285 
288 
289  DARRAY(struct obs_source*) render_order;
290  DARRAY(struct obs_source*) root_nodes;
291 
293  struct circlebuf buffered_timestamps;
296 
297  float user_volume;
298 
299  pthread_mutex_t monitoring_mutex;
300  DARRAY(struct audio_monitor*) monitors;
303 };
304 
305 /* user sources, output channels, and displays */
313 
314  pthread_mutex_t sources_mutex;
315  pthread_mutex_t displays_mutex;
316  pthread_mutex_t outputs_mutex;
317  pthread_mutex_t encoders_mutex;
318  pthread_mutex_t services_mutex;
319  pthread_mutex_t audio_sources_mutex;
320  pthread_mutex_t draw_callbacks_mutex;
321  DARRAY(struct draw_callback) draw_callbacks;
322 
323  struct obs_view main_view;
324 
325  long long unnamed_index;
326 
327  volatile bool valid;
328 };
329 
330 /* user hotkeys */
332  pthread_mutex_t mutex;
333  DARRAY(obs_hotkey_t) hotkeys;
335  DARRAY(obs_hotkey_pair_t) hotkey_pairs;
337 
338  pthread_t hotkey_thread;
344  DARRAY(obs_hotkey_binding_t) bindings;
345 
348 
350 
351  pthread_once_t name_map_init_token;
352  struct obs_hotkey_name_map *name_map;
353 
355 
356  char *translations[OBS_KEY_LAST_VALUE];
357  char *mute;
358  char *unmute;
363 };
364 
365 struct obs_core {
367  DARRAY(struct obs_module_path) module_paths;
368 
369  DARRAY(struct obs_source_info) source_types;
370  DARRAY(struct obs_source_info) input_types;
371  DARRAY(struct obs_source_info) filter_types;
372  DARRAY(struct obs_source_info) transition_types;
373  DARRAY(struct obs_output_info) output_types;
374  DARRAY(struct obs_encoder_info) encoder_types;
375  DARRAY(struct obs_service_info) service_types;
376  DARRAY(struct obs_modal_ui) modal_ui_callbacks;
377  DARRAY(struct obs_modeless_ui) modeless_ui_callbacks;
378 
381 
382  char *locale;
386 
387  /* segmented into multiple sub-structures to keep things a bit more
388  * clean and organized */
391  struct obs_core_data data;
392  struct obs_core_hotkeys hotkeys;
393 };
394 
395 extern struct obs_core *obs;
396 
397 extern void *obs_video_thread(void *param);
398 
399 extern gs_effect_t *obs_load_effect(gs_effect_t **effect, const char *file);
400 
401 extern bool audio_callback(void *param,
402  uint64_t start_ts_in, uint64_t end_ts_in, uint64_t *out_ts,
403  uint32_t mixers, struct audio_output_data *mixes);
404 
405 
406 /* ------------------------------------------------------------------------- */
407 /* obs shared context data */
408 
410  char *name;
411  void *data;
415  enum obs_obj_type type;
416 
417  DARRAY(obs_hotkey_id) hotkeys;
418  DARRAY(obs_hotkey_pair_id) hotkey_pairs;
420 
421  DARRAY(char*) rename_cache;
422  pthread_mutex_t rename_cache_mutex;
423 
424  pthread_mutex_t *mutex;
427 
428  bool private;
429 };
430 
431 extern bool obs_context_data_init(
432  struct obs_context_data *context,
433  enum obs_obj_type type,
435  const char *name,
437  bool private);
438 extern void obs_context_data_free(struct obs_context_data *context);
439 
440 extern void obs_context_data_insert(struct obs_context_data *context,
441  pthread_mutex_t *mutex, void *first);
442 extern void obs_context_data_remove(struct obs_context_data *context);
443 
444 extern void obs_context_data_setname(struct obs_context_data *context,
445  const char *name);
446 
447 
448 /* ------------------------------------------------------------------------- */
449 /* ref-counting */
450 
451 struct obs_weak_ref {
452  volatile long refs;
453  volatile long weak_refs;
454 };
455 
456 static inline void obs_ref_addref(struct obs_weak_ref *ref)
457 {
458  os_atomic_inc_long(&ref->refs);
459 }
460 
461 static inline bool obs_ref_release(struct obs_weak_ref *ref)
462 {
463  return os_atomic_dec_long(&ref->refs) == -1;
464 }
465 
466 static inline void obs_weak_ref_addref(struct obs_weak_ref *ref)
467 {
468  os_atomic_inc_long(&ref->weak_refs);
469 }
470 
471 static inline bool obs_weak_ref_release(struct obs_weak_ref *ref)
472 {
473  return os_atomic_dec_long(&ref->weak_refs) == -1;
474 }
475 
476 static inline bool obs_weak_ref_get_ref(struct obs_weak_ref *ref)
477 {
478  long owners = ref->refs;
479  while (owners > -1) {
480  if (os_atomic_compare_swap_long(&ref->refs, owners, owners + 1))
481  return true;
482 
483  owners = ref->refs;
484  }
485 
486  return false;
487 }
488 
489 
490 /* ------------------------------------------------------------------------- */
491 /* sources */
492 
493 struct async_frame {
496  bool used;
497 };
498 
504 };
505 
506 struct audio_action {
508  enum audio_action_type type;
509  union {
510  float vol;
511  bool set;
512  };
513 };
514 
516  struct obs_weak_ref ref;
518 };
519 
522  void *param;
523 };
524 
525 struct obs_source {
526  struct obs_context_data context;
527  struct obs_source_info info;
529 
530  /* general exposed flags that can be set for the source */
533 
534  /* indicates ownership of the info.id buffer */
536 
537  /* signals to call the source update in the video thread */
539 
540  /* ensures show/hide are only called once */
541  volatile long show_refs;
542 
543  /* ensures activate/deactivate are only called once */
544  volatile long activate_refs;
545 
546  /* used to indicate that the source has been removed and all
547  * references to it should be released (not exactly how I would prefer
548  * to handle things but it's the best option) */
549  bool removed;
550 
551  bool active;
552  bool showing;
553 
554  /* used to temporarily disable sources if needed */
555  bool enabled;
556 
557  /* timing (if video is present, is based upon video) */
558  volatile bool timing_set;
567 
568  /* audio */
573  bool muted;
577  struct circlebuf audio_input_buf[MAX_AUDIO_CHANNELS];
579  DARRAY(struct audio_action) audio_actions;
580  float *audio_output_buf[MAX_AUDIO_MIXES][MAX_AUDIO_CHANNELS];
581  struct resample_info sample_info;
583  pthread_mutex_t audio_actions_mutex;
584  pthread_mutex_t audio_buf_mutex;
585  pthread_mutex_t audio_mutex;
586  pthread_mutex_t audio_cb_mutex;
587  DARRAY(struct audio_cb_info) audio_cb_list;
591  float user_volume;
592  float volume;
595 
596  /* async video data */
601  enum video_format async_format;
602  enum video_format async_cache_format;
603  enum gs_color_format async_texture_format;
604  float async_color_matrix[16];
606  float async_color_range_min[3];
607  float async_color_range_max[3];
608  int async_plane_offset[2];
614  DARRAY(struct async_frame) async_cache;
615  DARRAY(struct obs_source_frame*)async_frames;
616  pthread_mutex_t async_mutex;
623 
624  /* async video deinterlacing */
632  enum obs_deinterlace_mode deinterlace_mode;
635 
636  /* filters */
639  DARRAY(struct obs_source*) filters;
640  pthread_mutex_t filter_mutex;
644 
645  /* sources specific hotkeys */
659 
660  /* transitions */
663  pthread_mutex_t transition_tex_mutex;
665  pthread_mutex_t transition_mutex;
679  struct matrix4 transition_matrices[2];
680 
681  struct audio_monitor *monitor;
682  enum obs_monitoring_type monitoring_type;
683 };
684 
685 extern const struct obs_source_info *get_source_info(const char *id);
686 extern bool obs_source_init_context(struct obs_source *source,
687  obs_data_t *settings, const char *name,
688  obs_data_t *hotkey_data, bool private);
689 
690 extern void obs_source_save(obs_source_t *source);
691 extern void obs_source_load(obs_source_t *source);
692 
693 extern bool obs_transition_init(obs_source_t *transition);
694 extern void obs_transition_free(obs_source_t *transition);
695 extern void obs_transition_tick(obs_source_t *transition);
696 extern void obs_transition_enum_sources(obs_source_t *transition,
697  obs_source_enum_proc_t enum_callback, void *param);
698 extern void obs_transition_save(obs_source_t *source, obs_data_t *data);
699 extern void obs_transition_load(obs_source_t *source, obs_data_t *data);
700 
701 struct audio_monitor *audio_monitor_create(obs_source_t *source);
702 void audio_monitor_reset(struct audio_monitor *monitor);
703 extern void audio_monitor_destroy(struct audio_monitor *monitor);
704 
705 extern void obs_source_destroy(struct obs_source *source);
706 
707 enum view_type {
710 };
711 
712 static inline void obs_source_dosignal(struct obs_source *source,
713  const char *signal_obs, const char *signal_source)
714 {
715  struct calldata data;
716  uint8_t stack[128];
717 
718  calldata_init_fixed(&data, stack, sizeof(stack));
719  calldata_set_ptr(&data, "source", source);
720  if (signal_obs && !source->context.private)
721  signal_handler_signal(obs->signals, signal_obs, &data);
722  if (signal_source)
723  signal_handler_signal(source->context.signals, signal_source,
724  &data);
725 }
726 
727 /* maximum timestamp variance in nanoseconds */
728 #define MAX_TS_VAR 2000000000ULL
729 
730 static inline bool frame_out_of_bounds(const obs_source_t *source, uint64_t ts)
731 {
732  if (ts < source->last_frame_ts)
733  return ((source->last_frame_ts - ts) > MAX_TS_VAR);
734  else
735  return ((ts - source->last_frame_ts) > MAX_TS_VAR);
736 }
737 
738 static inline enum gs_color_format convert_video_format(
739  enum video_format format)
740 {
741  if (format == VIDEO_FORMAT_RGBA)
742  return GS_RGBA;
743  else if (format == VIDEO_FORMAT_BGRA)
744  return GS_BGRA;
745 
746  return GS_BGRX;
747 }
748 
749 extern void obs_source_activate(obs_source_t *source, enum view_type type);
750 extern void obs_source_deactivate(obs_source_t *source, enum view_type type);
751 extern void obs_source_video_tick(obs_source_t *source, float seconds);
752 extern float obs_source_get_target_volume(obs_source_t *source,
753  obs_source_t *target);
754 
755 extern void obs_source_audio_render(obs_source_t *source, uint32_t mixers,
756  size_t channels, size_t sample_rate, size_t size);
757 
758 extern void add_alignment(struct vec2 *v, uint32_t align, int cx, int cy);
759 
760 extern struct obs_source_frame *filter_async_video(obs_source_t *source,
761  struct obs_source_frame *in);
762 extern bool update_async_texture(struct obs_source *source,
763  const struct obs_source_frame *frame,
764  gs_texture_t *tex, gs_texrender_t *texrender);
765 extern bool set_async_texture_size(struct obs_source *source,
766  const struct obs_source_frame *frame);
767 extern void remove_async_frame(obs_source_t *source,
768  struct obs_source_frame *frame);
769 
770 extern void set_deinterlace_texture_size(obs_source_t *source);
771 extern void deinterlace_process_last_frame(obs_source_t *source,
772  uint64_t sys_time);
773 extern void deinterlace_update_async_video(obs_source_t *source);
774 extern void deinterlace_render(obs_source_t *s);
775 
776 
777 /* ------------------------------------------------------------------------- */
778 /* outputs */
779 
780 enum delay_msg {
784 };
785 
786 struct delay_data {
787  enum delay_msg msg;
789  struct encoder_packet packet;
790 };
791 
792 typedef void (*encoded_callback_t)(void *data, struct encoder_packet *packet);
793 
795  struct obs_weak_ref ref;
797 };
798 
799 #define CAPTION_LINE_CHARS (32)
800 #define CAPTION_LINE_BYTES (4*CAPTION_LINE_CHARS)
801 struct caption_text {
802  char text[CAPTION_LINE_BYTES+1];
804 };
805 
806 struct obs_output {
807  struct obs_context_data context;
808  struct obs_output_info info;
810 
811  /* indicates ownership of the info.id buffer */
813 
816  volatile bool data_active;
819  int64_t audio_offsets[MAX_AUDIO_MIXES];
824  pthread_mutex_t interleaved_mutex;
825  DARRAY(struct encoder_packet) interleaved_packets;
827 
832  pthread_t reconnect_thread;
834  volatile bool reconnecting;
835  volatile bool reconnect_thread_active;
836 
840 
842 
843  volatile bool active;
847  obs_encoder_t *audio_encoders[MAX_AUDIO_MIXES];
849  size_t mixer_idx;
850 
853 
856  struct video_scale_info video_conversion;
857  struct audio_convert_info audio_conversion;
858 
859  pthread_mutex_t caption_mutex;
863 
864  bool valid;
865 
868  struct circlebuf delay_data; /* struct delay_data */
869  pthread_mutex_t delay_mutex;
873  volatile long delay_restart_refs;
874  volatile bool delay_active;
875  volatile bool delay_capturing;
876 
878 };
879 
880 static inline void do_output_signal(struct obs_output *output,
881  const char *signal)
882 {
883  struct calldata params = {0};
884  calldata_set_ptr(&params, "output", output);
885  signal_handler_signal(output->context.signals, signal, &params);
886  calldata_free(&params);
887 }
888 
889 extern void process_delay(void *data, struct encoder_packet *packet);
890 extern void obs_output_cleanup_delay(obs_output_t *output);
891 extern bool obs_output_delay_start(obs_output_t *output);
892 extern void obs_output_delay_stop(obs_output_t *output);
893 extern bool obs_output_actual_start(obs_output_t *output);
894 extern void obs_output_actual_stop(obs_output_t *output, bool force,
895  uint64_t ts);
896 
897 extern const struct obs_output_info *find_output(const char *id);
898 
899 extern void obs_output_remove_encoder(struct obs_output *output,
900  struct obs_encoder *encoder);
901 
902 extern void obs_encoder_packet_create_instance(struct encoder_packet *dst,
903  const struct encoder_packet *src);
904 void obs_output_destroy(obs_output_t *output);
905 
906 
907 /* ------------------------------------------------------------------------- */
908 /* encoders */
909 
911  struct obs_weak_ref ref;
913 };
914 
917  void (*new_packet)(void *param, struct encoder_packet *packet);
918  void *param;
919 };
920 
921 struct obs_encoder {
922  struct obs_context_data context;
923  struct obs_encoder_info info;
925 
926  pthread_mutex_t init_mutex;
927 
929  size_t planes;
930  size_t blocksize;
931  size_t framesize;
933 
934  size_t mixer_idx;
935 
938  enum video_format preferred_format;
939 
940  volatile bool active;
942 
943  /* indicates ownership of the info.id buffer */
945 
948 
950 
951  struct circlebuf audio_input_buffer[MAX_AV_PLANES];
952  uint8_t *audio_output_buffer[MAX_AV_PLANES];
953 
954  /* if a video encoder is paired with an audio encoder, make it start
955  * up at the specific timestamp. if this is the audio encoder,
956  * wait_for_video makes it wait until it's ready to sync up with
957  * video */
964 
965  pthread_mutex_t outputs_mutex;
966  DARRAY(obs_output_t*) outputs;
967 
969 
970  /* stores the video/audio media output pointer. video_t *or audio_t **/
971  void *media;
972 
973  pthread_mutex_t callbacks_mutex;
974  DARRAY(struct encoder_callback) callbacks;
975 
977 };
978 
979 extern struct obs_encoder_info *find_encoder(const char *id);
980 
981 extern bool obs_encoder_initialize(obs_encoder_t *encoder);
982 extern void obs_encoder_shutdown(obs_encoder_t *encoder);
983 
984 extern void obs_encoder_start(obs_encoder_t *encoder,
985  void (*new_packet)(void *param, struct encoder_packet *packet),
986  void *param);
987 extern void obs_encoder_stop(obs_encoder_t *encoder,
988  void (*new_packet)(void *param, struct encoder_packet *packet),
989  void *param);
990 
991 extern void obs_encoder_add_output(struct obs_encoder *encoder,
992  struct obs_output *output);
993 extern void obs_encoder_remove_output(struct obs_encoder *encoder,
994  struct obs_output *output);
995 
996 void obs_encoder_destroy(obs_encoder_t *encoder);
997 
998 /* ------------------------------------------------------------------------- */
999 /* services */
1000 
1002  struct obs_weak_ref ref;
1004 };
1005 
1006 struct obs_service {
1007  struct obs_context_data context;
1008  struct obs_service_info info;
1010 
1011  /* indicates ownership of the info.id buffer */
1013 
1014  bool active;
1015  bool destroy;
1017 };
1018 
1019 extern const struct obs_service_info *find_service(const char *id);
1020 
1021 extern void obs_service_activate(struct obs_service *service);
1022 extern void obs_service_deactivate(struct obs_service *service, bool remove);
1023 extern bool obs_service_initialize(struct obs_service *service,
1024  struct obs_output *output);
1025 
1026 void obs_service_destroy(obs_service_t *service);
1027 
uint32_t transition_fixed_duration
Definition: obs-internal.h:675
bool obs_encoder_initialize(obs_encoder_t *encoder)
Definition: obs-hotkey.h:513
volatile uint64_t timing_adjust
Definition: obs-internal.h:559
pthread_mutex_t callbacks_mutex
Definition: obs-internal.h:973
Definition: graphics.h:60
bool async_flip
Definition: obs-internal.h:609
audio_resampler_t * resampler
Definition: obs-internal.h:582
pthread_mutex_t * mutex
Definition: obs-internal.h:424
Definition: calldata.h:46
uint32_t async_convert_height
Definition: obs-internal.h:622
bool user_muted
Definition: obs-internal.h:572
volatile bool active
Definition: obs-internal.h:843
gs_texrender_t * filter_texrender
Definition: obs-internal.h:641
uint32_t transition_actual_cy
Definition: obs-internal.h:672
pthread_mutex_t init_mutex
Definition: obs-internal.h:926
struct audio_resampler audio_resampler_t
Definition: audio-resampler.h:28
struct obs_hotkey_name_map * name_map
Definition: obs-internal.h:352
void obs_encoder_stop(obs_encoder_t *encoder, void(*new_packet)(void *param, struct encoder_packet *packet), void *param)
uint8_t * data
Definition: obs-encoder.h:42
int buffering_wait_ticks
Definition: obs-internal.h:294
void obs_encoder_start(obs_encoder_t *encoder, void(*new_packet)(void *param, struct encoder_packet *packet), void *param)
Definition: obs-internal.h:709
size_t planes
Definition: obs-internal.h:929
struct obs_encoder * encoder
Definition: obs-internal.h:912
size_t obs_hotkey_id
Definition: obs-hotkey.h:24
struct obs_source_frame * cur_async_frame
Definition: obs-internal.h:599
void(* draw)(void *param, uint32_t cx, uint32_t cy)
Definition: obs-internal.h:48
struct obs_display ** prev_next
Definition: obs-internal.h:207
pthread_mutex_t displays_mutex
Definition: obs-internal.h:315
bool defer_update
Definition: obs-internal.h:538
obs_data_t * settings
Definition: obs-internal.h:412
volatile bool active
Definition: obs-internal.h:940
Definition: video-io.h:135
Definition: obs-internal.h:520
bool size_changed
Definition: obs-internal.h:197
bool active
Definition: obs-internal.h:1014
struct obs_source_frame * filter_async_video(obs_source_t *source, struct obs_source_frame *in)
bool received_video
Definition: obs-internal.h:814
Definition: obs-internal.h:140
gs_effect_t * opaque_effect
Definition: obs-internal.h:236
Definition: obs-internal.h:223
struct obs_display * first_display
Definition: obs-internal.h:309
enum obs_allow_direct_render allow_direct
Definition: obs-internal.h:642
void obs_source_save(obs_source_t *source)
obs_hotkey_pair_id next_pair_id
Definition: obs-internal.h:336
uint64_t next_audio_sys_ts_min
Definition: obs-internal.h:563
Definition: video-io.h:47
uint32_t starting_drawn_count
Definition: obs-internal.h:837
struct obs_output * output
Definition: obs-internal.h:1016
uint32_t starting_lagged_count
Definition: obs-internal.h:838
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)
char * monitoring_device_name
Definition: obs-internal.h:301
void process_delay(void *data, struct encoder_packet *packet)
video_t * video
Definition: obs-internal.h:250
char * name
Definition: obs-internal.h:127
#define CAPTION_LINE_BYTES
Definition: obs-internal.h:800
bool audio_failed
Definition: obs-internal.h:569
char * data
Definition: obs-internal.h:101
uint8_t * stack
Definition: calldata.h:47
gs_effect_t * bicubic_effect
Definition: obs-internal.h:239
pthread_mutex_t outputs_mutex
Definition: obs-internal.h:965
struct obs_output * output
Definition: obs-internal.h:796
void deinterlace_update_async_video(obs_source_t *source)
struct obs_context_data context
Definition: obs-internal.h:807
Definition: obs-internal.h:806
volatile bool reconnecting
Definition: obs-internal.h:834
gs_samplerstate_t * point_sampler
Definition: obs-internal.h:243
bool enabled
Definition: obs-internal.h:198
unsigned uint32_t
Definition: vc_stdint.h:31
float volume
Definition: obs-internal.h:592
uint64_t push_to_mute_stop_time
Definition: obs-internal.h:656
#define MAX_AUDIO_CHANNELS
Definition: audio-io.h:29
Definition: obs-internal.h:794
uint32_t scaled_height
Definition: obs-internal.h:937
void(* obs_source_enum_proc_t)(obs_source_t *parent, obs_source_t *child, void *param)
Definition: obs-source.h:135
Definition: circlebuf.h:32
gs_swapchain_t * swap
Definition: obs-internal.h:201
void obs_transition_tick(obs_source_t *transition)
double caption_timestamp
Definition: obs-internal.h:860
obs_hotkey_t * hotkey
Definition: obs-internal.h:174
Definition: obs-internal.h:525
#define MAX_CHANNELS
Definition: obs-defs.h:21
pthread_mutex_t monitoring_mutex
Definition: obs-internal.h:299
obs_hotkey_id pair_partner_id
Definition: obs-internal.h:137
Definition: obs-internal.h:365
Definition: obs-internal.h:910
struct obs_output * first_output
Definition: obs-internal.h:310
volatile bool end_data_capture_thread_active
Definition: obs-internal.h:817
bool received_audio
Definition: obs-internal.h:815
uint32_t cy
Definition: obs-internal.h:199
char * bin_path
Definition: obs-internal.h:78
bool(* obs_hotkey_active_func)(void *data, obs_hotkey_pair_id id, obs_hotkey_t *hotkey, bool pressed)
Definition: obs-hotkey.h:154
void audio_monitor_reset(struct audio_monitor *monitor)
void audio_monitor_destroy(struct audio_monitor *monitor)
video_format
Definition: video-io.h:33
typedef DARRAY(profiler_time_entry_t) profiler_time_entries_t
void obs_context_data_insert(struct obs_context_data *context, pthread_mutex_t *mutex, void *first)
delay_msg
Definition: obs-internal.h:780
Definition: obs-ui.h:40
int64_t cur_pts
Definition: obs-internal.h:949
void obs_encoder_packet_create_instance(struct encoder_packet *dst, const struct encoder_packet *src)
Definition: obs-internal.h:783
struct gs_stage_surface gs_stagesurf_t
Definition: graphics.h:259
struct obs_source * next_audio_source
Definition: obs-internal.h:574
obs_obj_type
Definition: obs.h:580
void obs_output_remove_encoder(struct obs_output *output, struct obs_encoder *encoder)
struct obs_source * first_source
Definition: obs-internal.h:307
gs_texrender_t * async_texrender
Definition: obs-internal.h:598
bool initialized
Definition: obs-internal.h:941
bool user_push_to_talk_pressed
Definition: obs-internal.h:654
gs_effect_t * deinterlace_blend_2x_effect
Definition: obs-internal.h:277
bool obs_transition_init(obs_source_t *transition)
gs_effect_t * default_rect_effect
Definition: obs-internal.h:235
char * description
Definition: obs-internal.h:128
gs_effect_t * bilinear_lowres_effect
Definition: obs-internal.h:241
Definition: vec2.h:27
uint64_t ts
Definition: obs-internal.h:788
Definition: obs-internal.h:782
void set_deinterlace_texture_size(obs_source_t *source)
int32_t timebase_den
Definition: obs-encoder.h:49
void obs_output_cleanup_delay(obs_output_t *output)
bool push_to_mute_pressed
Definition: obs-internal.h:650
gs_effect_t * solid_effect
Definition: obs-internal.h:237
Definition: audio-io.h:74
gs_texture_t * async_texture
Definition: obs-internal.h:597
uint64_t last_frame_ts
Definition: obs-internal.h:564
Definition: graphics.h:443
void * param
Definition: obs-internal.h:522
EXPORT void blog(int log_level, const char *format,...)
os_event_t * stopping_event
Definition: obs-internal.h:823
bool rendering_filter
Definition: obs-internal.h:643
bool hotkey_thread_initialized
Definition: obs-internal.h:339
bool obs_source_init_context(struct obs_source *source, obs_data_t *settings, const char *name, obs_data_t *hotkey_data, bool private)
unsigned __int64 uint64_t
Definition: vc_stdint.h:33
gs_effect_t * deinterlace_linear_effect
Definition: obs-internal.h:274
gs_effect_t * premultiplied_alpha_effect
Definition: obs-internal.h:242
obs_hotkey_callback_router_func router_func
Definition: obs-internal.h:346
struct caption_text * caption_head
Definition: obs-internal.h:861
Definition: obs-hotkey.h:37
volatile long refs
Definition: obs-internal.h:452
enum obs_transition_mode transition_mode
Definition: obs-internal.h:677
pthread_t hotkey_thread
Definition: obs-internal.h:338
int stop_code
Definition: obs-internal.h:826
struct obs_weak_source * control
Definition: obs-internal.h:528
Definition: audio-io.h:93
bool obs_display_init(struct obs_display *display, const struct gs_init_data *graphics_data)
gs_color_format
Definition: graphics.h:56
Definition: obs-internal.h:493
uint64_t transition_duration
Definition: obs-internal.h:662
char * sceneitem_show
Definition: obs-internal.h:361
void obs_encoder_remove_output(struct obs_encoder *encoder, struct obs_output *output)
obs_transition_mode
Definition: obs.h:1130
pthread_mutex_t audio_mutex
Definition: obs-internal.h:585
obs_deinterlace_mode
Definition: obs.h:923
char * sceneitem_hide
Definition: obs-internal.h:362
Definition: obs-encoder.h:41
unsigned char uint8_t
Definition: vc_stdint.h:27
struct obs_data obs_data_t
Definition: obs-data.h:42
Definition: obs-source.h:145
void obs_output_destroy(obs_output_t *output)
uint32_t timebase_num
Definition: obs-internal.h:946
Definition: obs-output.h:33
volatile bool data_active
Definition: obs-internal.h:816
uint32_t lagged_frames
Definition: obs-internal.h:253
void * obs_hotkey_thread(void *param)
Definition: obs-internal.h:331
size_t last_audio_input_buf_size
Definition: obs-internal.h:578
bool deinterlace_rendered
Definition: obs-internal.h:634
pthread_mutex_t transition_tex_mutex
Definition: obs-internal.h:663
gs_effect_t * default_effect
Definition: obs-internal.h:234
void obs_hotkeys_context_release(struct obs_context_data *context)
bool update_async_texture(struct obs_source *source, const struct obs_source_frame *frame, gs_texture_t *tex, gs_texrender_t *texrender)
pthread_mutex_t transition_mutex
Definition: obs-internal.h:665
uint32_t delay_flags
Definition: obs-internal.h:871
bool set_async_texture_size(struct obs_source *source, const struct obs_source_frame *frame)
int reconnect_retry_max
Definition: obs-internal.h:829
volatile bool valid
Definition: obs-internal.h:327
uint32_t conversion_height
Definition: obs-internal.h:258
void obs_transition_enum_sources(obs_source_t *transition, obs_source_enum_proc_t enum_callback, void *param)
uint64_t start_ts
Definition: obs-internal.h:963
void obs_transition_free(obs_source_t *transition)
struct audio_monitor * monitor
Definition: obs-internal.h:681
size_t blocksize
Definition: obs-internal.h:930
bool transition_use_fixed_duration
Definition: obs-internal.h:676
bool pending_stop
Definition: obs-internal.h:571
Definition: obs-internal.h:168
uint32_t transition_cy
Definition: obs-internal.h:674
obs_transition_scale_type
Definition: obs.h:1140
profiler_name_store_t * name_store
Definition: obs-internal.h:385
Definition: obs-internal.h:503
void obs_source_load(obs_source_t *source)
pthread_mutex_t services_mutex
Definition: obs-internal.h:318
char * monitoring_device_id
Definition: obs-internal.h:302
uint64_t first_raw_ts
Definition: obs-internal.h:962
bool destroy_on_stop
Definition: obs-internal.h:968
void deinterlace_render(obs_source_t *s)
uint32_t async_cache_width
Definition: obs-internal.h:619
bool transitioning_audio
Definition: obs-internal.h:668
uint32_t delay_cur_flags
Definition: obs-internal.h:872
char * bin
Definition: obs-internal.h:100
pthread_mutex_t audio_buf_mutex
Definition: obs-internal.h:584
obs_hotkey_pair_id mute_unmute_key
Definition: obs-internal.h:646
gs_effect_t * deinterlace_yadif_2x_effect
Definition: obs-internal.h:279
uint64_t next_audio_ts_min
Definition: obs-internal.h:562
pthread_mutex_t rename_cache_mutex
Definition: obs-internal.h:422
pthread_mutex_t encoders_mutex
Definition: obs-internal.h:317
void * media
Definition: obs-internal.h:971
gs_texture_t * async_prev_texture
Definition: obs-internal.h:629
pthread_mutex_t mutex
Definition: obs-internal.h:332
struct obs_source * first_audio_source
Definition: obs-internal.h:308
bool obs_output_actual_start(obs_output_t *output)
uint64_t last_audio_ts
Definition: obs-internal.h:561
size_t framesize_bytes
Definition: obs-internal.h:932
Definition: obs-internal.h:801
Definition: obs-internal.h:515
bool async_update_texture
Definition: obs-internal.h:611
#define MAX_TS_VAR
Definition: obs-internal.h:728
uint64_t transition_start_time
Definition: obs-internal.h:661
Definition: obs-ui.h:84
bool thread_disable_press
Definition: obs-internal.h:341
bool obs_hotkeys_platform_init(struct obs_core_hotkeys *hotkeys)
pthread_mutex_t audio_actions_mutex
Definition: obs-internal.h:583
struct obs_weak_encoder * control
Definition: obs-internal.h:924
Definition: obs-internal.h:184
uint32_t total_frames
Definition: obs-internal.h:252
uint32_t async_cache_height
Definition: obs-internal.h:620
float user_volume
Definition: obs-internal.h:591
pthread_mutex_t audio_cb_mutex
Definition: obs-internal.h:586
bool async_full_range
Definition: obs-internal.h:605
bool gpu_conversion
Definition: obs-internal.h:256
Definition: obs-internal.h:786
#define MAX_AUDIO_MIXES
Definition: audio-io.h:28
Definition: graphics-internal.h:271
uint32_t delay_sec
Definition: obs-internal.h:870
struct obs_hotkeys_platform obs_hotkeys_platform_t
Definition: obs-internal.h:151
struct obs_source_frame * frame
Definition: obs-internal.h:494
bool push_to_talk_enabled
Definition: obs-internal.h:652
gs_texture_t * transparent_texture
Definition: obs-internal.h:270
struct obs_context_data ** prev_next
Definition: obs-internal.h:426
struct obs_context_data * next
Definition: obs-internal.h:425
Definition: obs-internal.h:286
uint32_t default_flags
Definition: obs-internal.h:532
gs_effect_t * deinterlace_effect
Definition: obs-internal.h:627
Definition: obs-internal.h:921
Definition: obs-internal.h:75
Definition: obs-internal.h:306
void obs_source_activate(obs_source_t *source, enum view_type type)
bool obs_output_delay_start(obs_output_t *output)
int count
Definition: obs-internal.h:220
struct caption_text * caption_tail
Definition: obs-internal.h:862
bool muted
Definition: obs-internal.h:573
volatile bool timing_set
Definition: obs-internal.h:558
double video_fps
Definition: obs-internal.h:249
enum obs_key obs_key_t
Definition: obs-hotkey.h:35
EXPORT void dstr_copy(struct dstr *dst, const char *array)
pthread_mutex_t delay_mutex
Definition: obs-internal.h:869
void obs_hotkey_name_map_free(void)
volatile long delay_restart_refs
Definition: obs-internal.h:873
int cur_texture
Definition: obs-internal.h:245
Definition: effect.h:139
struct obs_service * first_service
Definition: obs-internal.h:312
obs_scale_type
Definition: obs.h:114
uint32_t transition_alignment
Definition: obs-internal.h:670
pthread_mutex_t draw_callbacks_mutex
Definition: obs-internal.h:202
Definition: obs-internal.h:99
void obs_source_deactivate(obs_source_t *source, enum view_type type)
size_t mixer_idx
Definition: obs-internal.h:849
void obs_context_data_free(struct obs_context_data *context)
pthread_mutex_t async_mutex
Definition: obs-internal.h:616
struct obs_module * first_module
Definition: obs-internal.h:366
uint32_t transition_actual_cx
Definition: obs-internal.h:671
void obs_source_audio_render(obs_source_t *source, uint32_t mixers, size_t channels, size_t sample_rate, size_t size)
bool deinterlace_top_first
Definition: obs-internal.h:633
size_t framesize
Definition: obs-internal.h:931
signal_handler_t * signals
Definition: obs-internal.h:413
int64_t dts
Definition: obs-encoder.h:46
uint32_t scaled_width
Definition: obs-internal.h:936
void obs_source_video_tick(obs_source_t *source, float seconds)
Definition: obs-internal.h:500
void * module
Definition: obs-internal.h:80
void remove_async_frame(obs_source_t *source, struct obs_source_frame *frame)
Definition: obs-internal.h:409
obs_key_combination_t key
Definition: obs-internal.h:169
Definition: obs-encoder.h:112
struct obs_source_frame * async_preload_frame
Definition: obs-internal.h:613
int reconnect_retries
Definition: obs-internal.h:830
void obs_encoder_destroy(obs_encoder_t *encoder)
obs_hotkey_pair_id pair_id
Definition: obs-internal.h:141
void free_module(struct obs_module *mod)
Definition: matrix4.h:32
const struct obs_service_info * find_service(const char *id)
void add_alignment(struct vec2 *v, uint32_t align, int cx, int cy)
pthread_mutex_t sources_mutex
Definition: obs-internal.h:314
void obs_encoder_shutdown(obs_encoder_t *encoder)
obs_hotkey_id push_to_mute_key
Definition: obs-internal.h:647
uint32_t samplerate
Definition: obs-internal.h:928
obs_hotkeys_platform_t * platform_context
Definition: obs-internal.h:349
struct obs_encoder_info * find_encoder(const char *id)
void obs_hotkeys_platform_free(struct obs_core_hotkeys *hotkeys)
EXPORT void signal_handler_signal(signal_handler_t *handler, const char *signal, calldata_t *params)
gs_effect_t * deinterlace_discard_2x_effect
Definition: obs-internal.h:273
pthread_t reconnect_thread
Definition: obs-internal.h:832
void obs_hotkeys_free(void)
struct gs_texture gs_texture_t
Definition: graphics.h:258
void * obs_video_thread(void *param)
pthread_once_t name_map_init_token
Definition: obs-internal.h:351
uint32_t starting_frame_count
Definition: obs-internal.h:839
gs_effect_t * obs_load_effect(gs_effect_t **effect, const char *file)
pthread_mutex_t caption_mutex
Definition: obs-internal.h:859
char * array
Definition: dstr.h:37
bool valid
Definition: obs-internal.h:864
view_type
Definition: obs-internal.h:707
Definition: obs.h:221
encoded_callback_t delay_callback
Definition: obs-internal.h:867
gs_texrender_t * async_prev_texrender
Definition: obs-internal.h:630
void obs_output_delay_stop(obs_output_t *output)
char * data_path
Definition: obs-internal.h:79
const struct obs_source_info * get_source_info(const char *id)
bool loaded
Definition: obs-internal.h:81
struct obs_encoder * first_encoder
Definition: obs-internal.h:311
size_t obs_hotkey_pair_id
Definition: obs-hotkey.h:26
uint64_t resample_offset
Definition: obs-internal.h:560
bool owns_info_id
Definition: obs-internal.h:535
uint64_t push_to_talk_delay
Definition: obs-internal.h:657
int64_t video_offset
Definition: obs-internal.h:818
struct obs_weak_service * control
Definition: obs-internal.h:1009
audio_t * audio
Definition: obs-internal.h:287
bool sent_first_packet
Definition: obs-internal.h:916
Definition: audio-io.h:68
struct obs_service * service
Definition: obs-internal.h:1003
int reconnect_retry_sec
Definition: obs-internal.h:828
pthread_mutex_t channels_mutex
Definition: obs-internal.h:185
Definition: obs.h:151
int64_t highest_video_ts
Definition: obs-internal.h:821
uint32_t transition_cx
Definition: obs-internal.h:673
bool wait_for_video
Definition: obs-internal.h:958
bool strict_modifiers
Definition: obs-internal.h:342
gs_stagesurf_t * mapped_surface
Definition: obs-internal.h:244
void * data
Definition: obs-internal.h:131
struct signal_handler signal_handler_t
Definition: signal.h:35
void(* obs_hotkey_func)(void *data, obs_hotkey_id id, obs_hotkey_t *hotkey, bool pressed)
Definition: obs-hotkey.h:132
Definition: obs-internal.h:501
video_t * video
Definition: obs-internal.h:844
Definition: obs-internal.h:506
uint32_t async_width
Definition: obs-internal.h:617
gs_effect_t * deinterlace_yadif_effect
Definition: obs-internal.h:278
bool async_active
Definition: obs-internal.h:610
bool active
Definition: obs-internal.h:551
bool private
Definition: obs-internal.h:428
const char * conversion_tech
Definition: obs-internal.h:257
void * data
Definition: obs-internal.h:411
void obs_service_activate(struct obs_service *service)
uint64_t deinterlace_frame_ts
Definition: obs-internal.h:626
pthread_mutex_t draw_callbacks_mutex
Definition: obs-internal.h:320
bool first_received
Definition: obs-internal.h:959
void obs_context_data_setname(struct obs_context_data *context, const char *name)
char * name
Definition: obs-internal.h:410
gs_effect_t * deinterlace_discard_effect
Definition: obs-internal.h:272
bool reroute_hotkeys
Definition: obs-internal.h:343
Definition: dstr.h:36
Definition: obs-internal.h:1001
pthread_mutex_t draw_info_mutex
Definition: obs-internal.h:203
bool audio_pending
Definition: obs-internal.h:570
uint64_t timestamp
Definition: obs-internal.h:219
obs_encoder_t * video_encoder
Definition: obs-internal.h:846
proc_handler_t * procs
Definition: obs-internal.h:380
pthread_mutex_t outputs_mutex
Definition: obs-internal.h:316
char * unmute
Definition: obs-internal.h:358
struct gs_sampler_state gs_samplerstate_t
Definition: graphics.h:263
bool modifiers_match
Definition: obs-internal.h:171
bool audio_conversion_set
Definition: obs-internal.h:855
struct obs_source * filter_target
Definition: obs-internal.h:638
bool obs_service_initialize(struct obs_service *service, struct obs_output *output)
gs_effect_t * conversion_effect
Definition: obs-internal.h:238
obs_hotkey_registerer_t registerer_type
Definition: obs-internal.h:134
bool owns_info_id
Definition: obs-internal.h:1012
struct obs_source ** prev_next_audio_source
Definition: obs-internal.h:575
graphics_t * graphics
Definition: obs-internal.h:224
#define MICROSECOND_DEN
Definition: obs-internal.h:40
obs_allow_direct_render
Definition: obs.h:109
struct obs_context_data context
Definition: obs-internal.h:526
struct video_output video_t
Definition: video-io.h:31
int reconnect_retry_cur_sec
Definition: obs-internal.h:831
volatile bool delay_capturing
Definition: obs-internal.h:875
void obs_view_free(struct obs_view *view)
uint64_t audio_ts
Definition: obs-internal.h:576
bool pressed1
Definition: obs-internal.h:145
void obs_service_destroy(obs_service_t *service)
bool owns_info_id
Definition: obs-internal.h:812
uint32_t flags
Definition: obs-internal.h:531
Definition: obs-internal.h:915
bool thread_initialized
Definition: obs-internal.h:254
uint32_t base_width
Definition: obs-internal.h:265
struct obs_core * obs
obs_source_t * transition_sources[2]
Definition: obs-internal.h:666
bool async_gpu_conversion
Definition: obs-internal.h:600
float user_volume
Definition: obs-internal.h:297
struct audio_monitor * audio_monitor_create(obs_source_t *source)
uint64_t buffered_ts
Definition: obs-internal.h:292
struct obs_display * next
Definition: obs-internal.h:206
gs_effect_t * deinterlace_linear_2x_effect
Definition: obs-internal.h:275
long long unnamed_index
Definition: obs-internal.h:325
void obs_output_actual_stop(obs_output_t *output, bool force, uint64_t ts)
struct obs_weak_output * control
Definition: obs-internal.h:809
void obs_context_data_remove(struct obs_context_data *context)
gs_effect_t * lanczos_effect
Definition: obs-internal.h:240
obs_hotkey_id id
Definition: obs-internal.h:126
uint32_t scaled_width
Definition: obs-internal.h:851
char * mute
Definition: obs-internal.h:357
char * push_to_talk
Definition: obs-internal.h:360
size_t size
Definition: calldata.h:48
const char * file
Definition: obs-internal.h:77
bool push_to_mute_enabled
Definition: obs-internal.h:649
#define NUM_TEXTURES
Definition: obs-internal.h:39
int total_buffering_ticks
Definition: obs-internal.h:295
char * mod_name
Definition: obs-internal.h:76
struct caption_text * next
Definition: obs-internal.h:803
#define MAX_AV_PLANES
Definition: media-io-defs.h:20
struct obs_module * next
Definition: obs-internal.h:94
pthread_mutex_t interleaved_mutex
Definition: obs-internal.h:824
enum obs_transition_scale_type transition_scale_type
Definition: obs-internal.h:678
os_event_t * reconnect_stop_event
Definition: obs-internal.h:833
void deinterlace_process_last_frame(obs_source_t *source, uint64_t sys_time)
float vol
Definition: obs-internal.h:510
Definition: graphics.h:61
Definition: obs-internal.h:47
uint32_t output_width
Definition: obs-internal.h:263
uint32_t async_height
Definition: obs-internal.h:618
volatile bool delay_active
Definition: obs-internal.h:874
uint32_t timebase_den
Definition: obs-internal.h:947
bool async_rendered
Definition: obs-internal.h:566
bool pressed0
Definition: obs-internal.h:144
size_t mixer_idx
Definition: obs-internal.h:934
bool removed
Definition: obs-internal.h:549
obs_service_t * service
Definition: obs-internal.h:848
uint32_t background_color
Definition: obs-internal.h:200
struct obs_source * source
Definition: obs-internal.h:517
bool showing
Definition: obs-internal.h:552
audio_action_type
Definition: obs-internal.h:499
struct obs_encoder * paired_encoder
Definition: obs-internal.h:960
gs_texrender_t * transition_texrender[2]
Definition: obs-internal.h:664
int pressed
Definition: obs-internal.h:132
uint32_t deinterlace_half_duration
Definition: obs-internal.h:631
bool owns_info_id
Definition: obs-internal.h:944
struct obs_source_frame * prev_async_frame
Definition: obs-internal.h:628
Definition: base.h:65
bool obs_hotkeys_platform_is_pressed(obs_hotkeys_platform_t *context, obs_key_t key)
Definition: obs-internal.h:1006
uint32_t output_height
Definition: obs-internal.h:264
obs_hotkey_id next_id
Definition: obs-internal.h:334
void obs_source_destroy(struct obs_source *source)
char * module_config_path
Definition: obs-internal.h:383
uint64_t timestamp
Definition: obs-internal.h:507
int total_frames
Definition: obs-internal.h:841
size_t audio_storage_size
Definition: obs-internal.h:589
enum obs_hotkey_registerer_type obs_hotkey_registerer_t
Definition: obs-hotkey.h:53
Definition: obs-internal.h:218
obs_monitoring_type
Definition: obs.h:949
void obs_encoder_add_output(struct obs_encoder *encoder, struct obs_output *output)
char * last_error_message
Definition: obs-internal.h:877
obs_data_t * hotkey_data
Definition: obs-internal.h:419
struct os_event_data os_event_t
Definition: threading.h:63
struct proc_handler proc_handler_t
Definition: proc.h:36
gs_effect_t * deinterlace_blend_effect
Definition: obs-internal.h:276
Main libobs header used by applications.
Definition: audio-resampler.h:30
volatile long weak_refs
Definition: obs-internal.h:453
os_event_t * stop_event
Definition: obs-internal.h:340
Definition: graphics.h:62
bool pressed
Definition: obs-internal.h:170
uint64_t push_to_talk_stop_time
Definition: obs-internal.h:658
int64_t highest_audio_ts
Definition: obs-internal.h:820
Definition: obs-internal.h:708
struct obs_source * filter_parent
Definition: obs-internal.h:637
obs_hotkey_func func
Definition: obs-internal.h:130
Definition: obs-internal.h:451
int64_t sync_offset
Definition: obs-internal.h:593
proc_handler_t * procs
Definition: obs-internal.h:414
obs_hotkey_id hotkey_id
Definition: obs-internal.h:173
obs_source_audio_capture_t callback
Definition: obs-internal.h:521
Definition: obs-internal.h:502
obs_hotkey_id push_to_talk_key
Definition: obs-internal.h:648
bool enabled
Definition: obs-internal.h:555
void(* obs_source_audio_capture_t)(void *param, obs_source_t *source, const struct audio_data *audio_data, bool muted)
Definition: obs.h:915
bool user_push_to_mute_pressed
Definition: obs-internal.h:651
__int64 int64_t
Definition: vc_stdint.h:32
EXPORT void bfree(void *ptr)
uint32_t base_height
Definition: obs-internal.h:266
Definition: obs-internal.h:125
Definition: obs-internal.h:781
EXPORT bool os_file_exists(const char *path)
pthread_mutex_t audio_sources_mutex
Definition: obs-internal.h:319
uint32_t async_convert_width
Definition: obs-internal.h:621
bool transitioning_video
Definition: obs-internal.h:667
bool obs_view_init(struct obs_view *view)
enum obs_obj_type type
Definition: obs-internal.h:415
void obs_transition_load(obs_source_t *source, obs_data_t *data)
bool used
Definition: obs-internal.h:496
void * router_func_data
Definition: obs-internal.h:347
const char * profile_encoder_encode_name
Definition: obs-internal.h:976
uint64_t video_time
Definition: obs-internal.h:247
uint64_t deinterlace_offset
Definition: obs-internal.h:625
#define bool
Definition: vc_stdbool.h:5
void obs_service_deactivate(struct obs_service *service, bool remove)
char * push_to_mute
Definition: obs-internal.h:359
bool transition_source_active[2]
Definition: obs-internal.h:669
void * registerer
Definition: obs-internal.h:135
pthread_t end_data_capture_thread
Definition: obs-internal.h:822
signal_handler_t * signals
Definition: obs-internal.h:379
int64_t offset_usec
Definition: obs-internal.h:961
pthread_mutex_t filter_mutex
Definition: obs-internal.h:640
signal_handler_t * signals
Definition: obs-internal.h:354
Definition: obs-internal.h:196
volatile bool reconnect_thread_active
Definition: obs-internal.h:835
uint64_t last_sys_timestamp
Definition: obs-internal.h:565
long unused_count
Definition: obs-internal.h:495
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)
audio_t * audio
Definition: obs-internal.h:845
void * param
Definition: obs-internal.h:918
void obs_display_free(struct obs_display *display)
void(* encoded_callback_t)(void *data, struct encoder_packet *packet)
Definition: obs-internal.h:792
bool name_store_owned
Definition: obs-internal.h:384
bool destroy
Definition: obs-internal.h:1015
volatile long activate_refs
Definition: obs-internal.h:544
struct gs_texture_render gs_texrender_t
Definition: graphics.h:265
struct audio_output audio_t
Definition: audio-io.h:38
uint32_t audio_mixers
Definition: obs-internal.h:590
uint32_t scaled_height
Definition: obs-internal.h:852
Definition: obs.h:191
void * param
Definition: obs-internal.h:49
float obs_source_get_target_volume(obs_source_t *source, obs_source_t *target)
const struct obs_output_info * find_output(const char *id)
void obs_transition_save(obs_source_t *source, obs_data_t *data)
const char * obs_get_hotkey_translation(obs_key_t key, const char *def)
Definition: obs-service.h:31
volatile long show_refs
Definition: obs-internal.h:541
char * locale
Definition: obs-internal.h:382
struct profiler_name_store profiler_name_store_t
Definition: profiler.h:39
struct gs_swap_chain gs_swapchain_t
Definition: graphics.h:264
pthread_t video_thread
Definition: obs-internal.h:251
bool push_to_talk_pressed
Definition: obs-internal.h:653
uint64_t active_delay_ns
Definition: obs-internal.h:866
uint64_t video_avg_frame_time_ns
Definition: obs-internal.h:248
bool async_unbuffered
Definition: obs-internal.h:612
uint64_t push_to_mute_delay
Definition: obs-internal.h:655
Definition: video-io.h:46
void(* obs_hotkey_callback_router_func)(void *data, obs_hotkey_id id, bool pressed)
Definition: obs-hotkey.h:251
int64_t last_sync_offset
Definition: obs-internal.h:594
bool video_conversion_set
Definition: obs-internal.h:854