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