Open Broadcaster Software
Free, open source software for live streaming and recording
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
obs-internal.h File Reference

Go to the source code of this file.

Data Structures

struct  draw_callback
 
struct  obs_module
 
struct  obs_module_path
 
struct  obs_hotkey
 
struct  obs_hotkey_pair
 
struct  obs_hotkey_binding
 
struct  obs_view
 
struct  obs_display
 
struct  obs_vframe_info
 
struct  obs_core_video
 
struct  obs_core_audio
 
struct  obs_core_data
 
struct  obs_core_hotkeys
 
struct  obs_core
 
struct  obs_context_data
 
struct  obs_weak_ref
 
struct  async_frame
 
struct  audio_action
 
struct  obs_weak_source
 
struct  audio_cb_info
 
struct  obs_source
 
struct  delay_data
 
struct  obs_weak_output
 
struct  caption_text
 
struct  obs_output
 
struct  obs_weak_encoder
 
struct  encoder_callback
 
struct  obs_encoder
 
struct  obs_weak_service
 
struct  obs_service
 

Macros

#define NUM_TEXTURES   2
 
#define MICROSECOND_DEN   1000000
 
#define obs_ptr_valid(ptr, func)   obs_object_valid(ptr, func, #ptr)
 
#define obs_source_valid   obs_ptr_valid
 
#define obs_output_valid   obs_ptr_valid
 
#define obs_encoder_valid   obs_ptr_valid
 
#define obs_service_valid   obs_ptr_valid
 
#define MAX_TS_VAR   2000000000ULL
 
#define CAPTION_LINE_CHARS   (32)
 
#define CAPTION_LINE_BYTES   (4*CAPTION_LINE_CHARS)
 

Typedefs

typedef struct obs_hotkey_pair obs_hotkey_pair_t
 
typedef struct obs_hotkeys_platform obs_hotkeys_platform_t
 
typedef void(* encoded_callback_t )(void *data, struct encoder_packet *packet)
 

Enumerations

enum  audio_action_type { AUDIO_ACTION_VOL, AUDIO_ACTION_MUTE, AUDIO_ACTION_PTT, AUDIO_ACTION_PTM }
 
enum  view_type { MAIN_VIEW, AUX_VIEW }
 
enum  delay_msg { DELAY_MSG_PACKET, DELAY_MSG_START, DELAY_MSG_STOP }
 

Functions

void free_module (struct obs_module *mod)
 
void * obs_hotkey_thread (void *param)
 
bool obs_hotkeys_platform_init (struct obs_core_hotkeys *hotkeys)
 
void obs_hotkeys_platform_free (struct obs_core_hotkeys *hotkeys)
 
bool obs_hotkeys_platform_is_pressed (obs_hotkeys_platform_t *context, obs_key_t key)
 
const char * obs_get_hotkey_translation (obs_key_t key, const char *def)
 
void obs_hotkeys_context_release (struct obs_context_data *context)
 
void obs_hotkeys_free (void)
 
void obs_hotkey_name_map_free (void)
 
bool obs_view_init (struct obs_view *view)
 
void obs_view_free (struct obs_view *view)
 
bool obs_display_init (struct obs_display *display, const struct gs_init_data *graphics_data)
 
void obs_display_free (struct obs_display *display)
 
void * obs_video_thread (void *param)
 
gs_effect_tobs_load_effect (gs_effect_t **effect, const char *file)
 
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)
 
bool obs_context_data_init (struct obs_context_data *context, enum obs_obj_type type, obs_data_t *settings, const char *name, obs_data_t *hotkey_data, bool private)
 
void obs_context_data_free (struct obs_context_data *context)
 
void obs_context_data_insert (struct obs_context_data *context, pthread_mutex_t *mutex, void *first)
 
void obs_context_data_remove (struct obs_context_data *context)
 
void obs_context_data_setname (struct obs_context_data *context, const char *name)
 
struct obs_source_infoget_source_info (const char *id)
 
bool obs_source_init_context (struct obs_source *source, obs_data_t *settings, const char *name, obs_data_t *hotkey_data, bool private)
 
void obs_source_save (obs_source_t *source)
 
void obs_source_load (obs_source_t *source)
 
bool obs_transition_init (obs_source_t *transition)
 
void obs_transition_free (obs_source_t *transition)
 
void obs_transition_tick (obs_source_t *transition)
 
void obs_transition_enum_sources (obs_source_t *transition, obs_source_enum_proc_t enum_callback, void *param)
 
void obs_transition_save (obs_source_t *source, obs_data_t *data)
 
void obs_transition_load (obs_source_t *source, obs_data_t *data)
 
struct audio_monitor * audio_monitor_create (obs_source_t *source)
 
void audio_monitor_reset (struct audio_monitor *monitor)
 
void audio_monitor_destroy (struct audio_monitor *monitor)
 
void obs_source_destroy (struct obs_source *source)
 
void obs_source_activate (obs_source_t *source, enum view_type type)
 
void obs_source_deactivate (obs_source_t *source, enum view_type type)
 
void obs_source_video_tick (obs_source_t *source, float seconds)
 
float obs_source_get_target_volume (obs_source_t *source, obs_source_t *target)
 
void obs_source_audio_render (obs_source_t *source, uint32_t mixers, size_t channels, size_t sample_rate, size_t size)
 
void add_alignment (struct vec2 *v, uint32_t align, int cx, int cy)
 
struct obs_source_framefilter_async_video (obs_source_t *source, struct obs_source_frame *in)
 
bool update_async_texture (struct obs_source *source, const struct obs_source_frame *frame, gs_texture_t *tex, gs_texrender_t *texrender)
 
bool set_async_texture_size (struct obs_source *source, const struct obs_source_frame *frame)
 
void remove_async_frame (obs_source_t *source, struct obs_source_frame *frame)
 
void set_deinterlace_texture_size (obs_source_t *source)
 
void deinterlace_process_last_frame (obs_source_t *source, uint64_t sys_time)
 
void deinterlace_update_async_video (obs_source_t *source)
 
void deinterlace_render (obs_source_t *s)
 
void process_delay (void *data, struct encoder_packet *packet)
 
void obs_output_cleanup_delay (obs_output_t *output)
 
bool obs_output_delay_start (obs_output_t *output)
 
void obs_output_delay_stop (obs_output_t *output)
 
bool obs_output_actual_start (obs_output_t *output)
 
void obs_output_actual_stop (obs_output_t *output, bool force, uint64_t ts)
 
struct obs_output_infofind_output (const char *id)
 
void obs_output_remove_encoder (struct obs_output *output, struct obs_encoder *encoder)
 
void obs_encoder_packet_create_instance (struct encoder_packet *dst, const struct encoder_packet *src)
 
void obs_output_destroy (obs_output_t *output)
 
struct obs_encoder_infofind_encoder (const char *id)
 
bool obs_encoder_initialize (obs_encoder_t *encoder)
 
void obs_encoder_shutdown (obs_encoder_t *encoder)
 
void obs_encoder_start (obs_encoder_t *encoder, void(*new_packet)(void *param, struct encoder_packet *packet), void *param)
 
void obs_encoder_stop (obs_encoder_t *encoder, void(*new_packet)(void *param, struct encoder_packet *packet), void *param)
 
void obs_encoder_add_output (struct obs_encoder *encoder, struct obs_output *output)
 
void obs_encoder_remove_output (struct obs_encoder *encoder, struct obs_output *output)
 
void obs_encoder_destroy (obs_encoder_t *encoder)
 
struct obs_service_infofind_service (const char *id)
 
void obs_service_activate (struct obs_service *service)
 
void obs_service_deactivate (struct obs_service *service, bool remove)
 
bool obs_service_initialize (struct obs_service *service, struct obs_output *output)
 
void obs_service_destroy (obs_service_t *service)
 

Variables

struct obs_coreobs
 

Macro Definition Documentation

#define CAPTION_LINE_BYTES   (4*CAPTION_LINE_CHARS)
#define CAPTION_LINE_CHARS   (32)
#define MAX_TS_VAR   2000000000ULL
#define MICROSECOND_DEN   1000000
#define NUM_TEXTURES   2
#define obs_encoder_valid   obs_ptr_valid
#define obs_output_valid   obs_ptr_valid
#define obs_ptr_valid (   ptr,
  func 
)    obs_object_valid(ptr, func, #ptr)
#define obs_service_valid   obs_ptr_valid
#define obs_source_valid   obs_ptr_valid

Typedef Documentation

typedef void(* encoded_callback_t)(void *data, struct encoder_packet *packet)
typedef struct obs_hotkeys_platform obs_hotkeys_platform_t

Enumeration Type Documentation

Enumerator
AUDIO_ACTION_VOL 
AUDIO_ACTION_MUTE 
AUDIO_ACTION_PTT 
AUDIO_ACTION_PTM 
enum delay_msg
Enumerator
DELAY_MSG_PACKET 
DELAY_MSG_START 
DELAY_MSG_STOP 
enum view_type
Enumerator
MAIN_VIEW 
AUX_VIEW 

Function Documentation

void add_alignment ( struct vec2 v,
uint32_t  align,
int  cx,
int  cy 
)
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 
)
struct audio_monitor* audio_monitor_create ( obs_source_t source)
void audio_monitor_destroy ( struct audio_monitor *  monitor)
void audio_monitor_reset ( struct audio_monitor *  monitor)
void deinterlace_process_last_frame ( obs_source_t source,
uint64_t  sys_time 
)
void deinterlace_render ( obs_source_t s)
void deinterlace_update_async_video ( obs_source_t source)
struct obs_source_frame* filter_async_video ( obs_source_t source,
struct obs_source_frame in 
)
struct obs_encoder_info* find_encoder ( const char *  id)
struct obs_output_info* find_output ( const char *  id)
struct obs_service_info* find_service ( const char *  id)
void free_module ( struct obs_module mod)
struct obs_source_info* get_source_info ( const char *  id)
void obs_context_data_free ( struct obs_context_data context)
bool obs_context_data_init ( struct obs_context_data context,
enum obs_obj_type  type,
obs_data_t settings,
const char *  name,
obs_data_t hotkey_data,
bool  private 
)
void obs_context_data_insert ( struct obs_context_data context,
pthread_mutex_t *  mutex,
void *  first 
)
void obs_context_data_remove ( struct obs_context_data context)
void obs_context_data_setname ( struct obs_context_data context,
const char *  name 
)
void obs_display_free ( struct obs_display display)
bool obs_display_init ( struct obs_display display,
const struct gs_init_data graphics_data 
)
void obs_encoder_add_output ( struct obs_encoder encoder,
struct obs_output output 
)
void obs_encoder_destroy ( obs_encoder_t encoder)
bool obs_encoder_initialize ( obs_encoder_t encoder)
void obs_encoder_packet_create_instance ( struct encoder_packet dst,
const struct encoder_packet src 
)
void obs_encoder_remove_output ( struct obs_encoder encoder,
struct obs_output output 
)
void obs_encoder_shutdown ( obs_encoder_t encoder)
void obs_encoder_start ( obs_encoder_t encoder,
void(*)(void *param, struct encoder_packet *packet)  new_packet,
void *  param 
)
void obs_encoder_stop ( obs_encoder_t encoder,
void(*)(void *param, struct encoder_packet *packet)  new_packet,
void *  param 
)
const char* obs_get_hotkey_translation ( obs_key_t  key,
const char *  def 
)
void obs_hotkey_name_map_free ( void  )
void* obs_hotkey_thread ( void *  param)
void obs_hotkeys_context_release ( struct obs_context_data context)
void obs_hotkeys_free ( void  )
void obs_hotkeys_platform_free ( struct obs_core_hotkeys hotkeys)
bool obs_hotkeys_platform_init ( struct obs_core_hotkeys hotkeys)
bool obs_hotkeys_platform_is_pressed ( obs_hotkeys_platform_t context,
obs_key_t  key 
)
gs_effect_t* obs_load_effect ( gs_effect_t **  effect,
const char *  file 
)
bool obs_output_actual_start ( obs_output_t output)
void obs_output_actual_stop ( obs_output_t output,
bool  force,
uint64_t  ts 
)
void obs_output_cleanup_delay ( obs_output_t output)
bool obs_output_delay_start ( obs_output_t output)
void obs_output_delay_stop ( obs_output_t output)
void obs_output_destroy ( obs_output_t output)
void obs_output_remove_encoder ( struct obs_output output,
struct obs_encoder encoder 
)
void obs_service_activate ( struct obs_service service)
void obs_service_deactivate ( struct obs_service service,
bool  remove 
)
void obs_service_destroy ( obs_service_t service)
bool obs_service_initialize ( struct obs_service service,
struct obs_output output 
)
void obs_source_activate ( obs_source_t source,
enum view_type  type 
)
void obs_source_audio_render ( obs_source_t source,
uint32_t  mixers,
size_t  channels,
size_t  sample_rate,
size_t  size 
)
void obs_source_deactivate ( obs_source_t source,
enum view_type  type 
)
void obs_source_destroy ( struct obs_source source)
float obs_source_get_target_volume ( obs_source_t source,
obs_source_t target 
)
bool obs_source_init_context ( struct obs_source source,
obs_data_t settings,
const char *  name,
obs_data_t hotkey_data,
bool  private 
)
void obs_source_load ( obs_source_t source)
void obs_source_save ( obs_source_t source)
void obs_source_video_tick ( obs_source_t source,
float  seconds 
)
void obs_transition_enum_sources ( obs_source_t transition,
obs_source_enum_proc_t  enum_callback,
void *  param 
)
void obs_transition_free ( obs_source_t transition)
bool obs_transition_init ( obs_source_t transition)
void obs_transition_load ( obs_source_t source,
obs_data_t data 
)
void obs_transition_save ( obs_source_t source,
obs_data_t data 
)
void obs_transition_tick ( obs_source_t transition)
void* obs_video_thread ( void *  param)
void obs_view_free ( struct obs_view view)
bool obs_view_init ( struct obs_view view)
void process_delay ( void *  data,
struct encoder_packet packet 
)
void remove_async_frame ( obs_source_t source,
struct obs_source_frame frame 
)
bool set_async_texture_size ( struct obs_source source,
const struct obs_source_frame frame 
)
void set_deinterlace_texture_size ( obs_source_t source)
bool update_async_texture ( struct obs_source source,
const struct obs_source_frame frame,
gs_texture_t tex,
gs_texrender_t texrender 
)

Variable Documentation

struct obs_core* obs