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