Commit graph

580 commits

Author SHA1 Message Date
jp9000 1abcdd7f50 WinHandle: Do not close handle on operator &
This is not a com pointer; it should not release/close the handle when
an & operator is used, it should only return the handle value.  Clearing
is only used on assignment.
2014-09-12 20:36:32 -07:00
jp9000 11b0fe122c Improve async source render timing
This helps ensure that an asynchronous video source is played as close
to its framerate as possible, reduces the risk of duplication as
much as possible, and helps to ensure that playback is as smooth as
possible.
2014-09-12 20:36:31 -07:00
jp9000 52e08249f1 Only render async frames to texture once per frame
This prevents multiple needless calls to obs_source_get_frame and other
functions.  If the texture has already been processed, then just render
it as-is in any subsequent calls to obs_source_video_render.
2014-09-12 20:36:31 -07:00
BtbN 895ad80759 Add api to get module data and binary paths 2014-09-04 14:03:47 -07:00
BtbN de4e4f7b42 Don't require an existing datadir for modules to load 2014-09-04 14:03:46 -07:00
jp9000 5defc67991 Remove audio/video sync reference counter
This is actually unnecessary now that there's a hard limit on the
maximum offset in which audio can be inserted.

This also assumes too much about the audio; it assumes audio is always
on, where as with some devices (such as the elgato) audio is not on
until the stream starts, and when the video has already incremented the
counter.
2014-09-04 14:01:46 -07:00
jp9000 dc43438057 Prevent audio too far from expected timing
Audio that goes below the minimum expecting timing (current time -
buffering time) is automatically removed.  However, delayed audio is not
removed regardless of its delay.  This puts a hard cap of 6 seconds from
current time that the maximum delay audio can have.  This will also
prevent the circular buffer from dynamically growing too large.
2014-09-04 14:01:40 -07:00
jp9000 45eae599ce Add -> operator to CoTaskMemPtr
This adds the ability to get members via the -> operator.
2014-09-01 13:00:22 -07:00
jp9000 5ac364ff9a Perform timestamp smoothing in media-io as well
Doing timestamp smoothing in obs-source.c is good because timestamps can
typically operate on a different timebase, however, obs-source.c can
also change that time base dynamically (such as with async video and
unexpected timestamp jumps), so in order to ensure that audio is
seamless in the output as well, perform timestamp smoothing in
audio-io.c as well just as an extra precautionary measure.
2014-08-30 11:52:08 -07:00
jp9000 355d5dab6e Move timestamp smooth threshold to media-io 2014-08-30 11:51:37 -07:00
jp9000 e610fd77ce Use C externs for obs-module.h
This allows inter-sharing of functions such as obs_module_text among
both C and C++ files
2014-08-29 11:20:28 -07:00
jp9000 47570f4153 Fix bug with source audio
If the audio didn't start at the 0 timestamp, it would misinterpret it
as a timestamp jump because obs_source::next_audio_ts_min is set to 0 on
creation.  Timestamp starting values should be allowed to start at any
arbitrary value.
2014-08-28 18:34:36 -07:00
jp9000 b9c9ec3356 Update version to 0.5.1 2014-08-26 13:31:12 -07:00
jp9000 6e7f2e1c98 Update to 0.5.0 2014-08-25 16:51:06 -07:00
jp9000 b4311a0de1 Log total/skipped frames on output stop
This makes it easier to do two things:
  1.) Get the skipped frames count relative to each specific output
  2.) Make it so that getting the 'current' log will always contain
      information about skipped frames.  Before, you'd have to force the
      user to restart the program and get the last log, which was really
      annoying when you just wanted to see how the encoders were
      performing.
2014-08-24 17:32:44 -07:00
Palana 571dd0f166 Add platform functions to request high performance modes
Specifically, this disables App Nap and related features
on OSX 10.9+
2014-08-24 20:32:44 +02:00
jp9000 1bbdcc10d7 Fix obs_data_item_setdata
It would try to move data from the old pointer even if the pointer was
changed via realloc, which would cause it to copy data from freed
memory.  Instead, just get the position of the data and call memmove to
move it up.
2014-08-22 15:39:29 -07:00
jp9000 fe13f59e3d obs_data: Fix wrong data queried for release
On release of obs_data, if the default/autoselect values pointed toward
a sub-object or a sub-array, it would look up the data for the regular
user value.  (Palana must have forgot to change these functions around
when adding the default/autoselect functionality)
2014-08-22 15:34:25 -07:00
jp9000 5291760cf8 Fix gs_matrix_* issues
Multiplication of the matricies was being done in the wrong direction.
This caused source transformations to come out looking incorrect, for
example the linux-xshm source's cursor would not be drawn correctly or
in the right position if the source was moved/scaled/rotated.  The
problem just turned out to be that the gs_matrix_* functions were
multiplying in the wrong direction.  Reverse the direction of
multiplication, and the problem is solved.
2014-08-20 13:04:13 -07:00
jp9000 8d1d1ddd14 Add reverse matrix multiply functions
The *_i functions multiply the value by the matrix instead of the other
way around, then store the result.
2014-08-20 12:34:44 -07:00
jp9000 0bf9736ddd Add font property
Adds the following function:
------------------------------
obs_properties_add_font

This function creates a 'font' property to allow selection of a system
font.  Implementation by the UI should treat the setting as an obs_data
sub-object with four sub-items:
 - face:   face name (string)
 - style:  style name (string)
 - size:   size (integer)
 - flags:  font flags (integer)

'flags' can be any combination of the following values:
 - OBS_FONT_BOLD
 - OBS_FONT_ITALIC
 - OBS_FONT_UNDERLINE
 - OBS_FONT_STRIKEOUT
2014-08-18 00:14:02 -07:00
jp9000 a0f679bc40 Add API functions for output/encoder scaling
API functions added:
-----------------------------------------------
obs_output_set_preferred_size
obs_output_get_width
obs_output_get_height
obs_encoder_set_scaled_size
obs_encoder_get_width
obs_encoder_get_height

These functions allow for easier means of setting a custom resolution on
an output or encoder.

If an output uses an encoder and you set the preferred width/height
using the output, then the output will attempt to set the scaled
width/height for the encoder it's currently using.

Outputs and encoders now should use these functions to determine the
width/height of the raw frame data instead of using the video-io
functions.
2014-08-10 16:50:44 -07:00
jp9000 f36f82b036 video-io: Add function to just get video format 2014-08-10 16:39:36 -07:00
jp9000 72fbdc7eaa Fix bug with automatic video scaling
This is sort of hard to explain:  the scale_video_output function was
overwriting the current frame.  If scaling was disabled, it would do
nothing, and return success, and all would be well.  If it was enabled,
it would then call the scaler, and then replace the contents of the
'data' function parameter with the scaled frame data.  The problem with
this is that I was passing video_output::cur_frame directly, which
overwrites its previous value with the scaled frame data.  Then if
cur_frame was not updated on time, it would end up trying to scale the
previously scaled image, if that makes sense.  it would call the video
scaler with the same from for both the source and destination.

So the simple fix was to simply use a local variable and pass that in as
a parameter to prevent this bug from occurring.
2014-08-10 12:49:44 -07:00
jp9000 7608f77e8b (API Change) Rename autoselect/default functions
For the sake of consistency, renamed these two functions to include
_value at the end so they are consistent.

Renamed:                         To:
-------------------------------------------------------
obs_data_has_default             obs_data_has_default_value
obs_data_has_autoselect          obs_data_has_autoselect_value
obs_data_item_has_default        obs_data_item_has_default_value
obs_data_item_has_autoselect     obs_data_item_has_autoselect_value
2014-08-09 14:36:38 -07:00
jp9000 5780f3f177 (API Change) Improve graphics API consistency
Summary:
- Prefix all graphics subsystem names with gs_ or GS_
- Unsquish funciton names (for example _setfloat to _set_float)
- Changed create functions to be more consistent with the rest of the
  API elsewhere.  For exmaple, instead of
  gs_create_texture/gs_texture_destroy, it's now
  gs_texture_create/gs_texture_destroy
- Renamed gs_stencil_op enum to gs_stencil_op_type

From:                            To:
-----------------------------------------------------------
tvertarray                       gs_tvertarray
vb_data                          gs_vb_data
vbdata_create                    gs_vbdata_create
vbdata_destroy                   gs_vbdata_destroy
shader_param                     gs_shader_param
gs_effect                        gs_effect
effect_technique                 gs_effect_technique
effect_pass                      gs_effect_pass
effect_param                     gs_effect_param
texture_t                        gs_texture_t
stagesurf_t                      gs_stagesurf_t
zstencil_t                       gs_zstencil_t
vertbuffer_t                     gs_vertbuffer_t
indexbuffer_t                    gs_indexbuffer_t
samplerstate_t                   gs_samplerstate_t
swapchain_t                      gs_swapchain_t
texrender_t                      gs_texrender_t
shader_t                         gs_shader_t
sparam_t                         gs_sparam_t
effect_t                         gs_effect_t
technique_t                      gs_technique_t
eparam_t                         gs_eparam_t
device_t                         gs_device_t
graphics_t                       graphics_t
shader_param_type                gs_shader_param_type
SHADER_PARAM_UNKNOWN             GS_SHADER_PARAM_UNKNOWN
SHADER_PARAM_BOOL                GS_SHADER_PARAM_BOOL
SHADER_PARAM_FLOAT               GS_SHADER_PARAM_FLOAT
SHADER_PARAM_INT                 GS_SHADER_PARAM_INT
SHADER_PARAM_STRING              GS_SHADER_PARAM_STRING
SHADER_PARAM_VEC2                GS_SHADER_PARAM_VEC2
SHADER_PARAM_VEC3                GS_SHADER_PARAM_VEC3
SHADER_PARAM_VEC4                GS_SHADER_PARAM_VEC4
SHADER_PARAM_MATRIX4X4           GS_SHADER_PARAM_MATRIX4X4
SHADER_PARAM_TEXTURE             GS_SHADER_PARAM_TEXTURE
shader_param_info                gs_shader_param_info
shader_type                      gs_shader_type
SHADER_VERTEX                    GS_SHADER_VERTEX
SHADER_PIXEL                     GS_SHADER_PIXEL
shader_destroy                   gs_shader_destroy
shader_numparams                 gs_shader_get_num_params
shader_getparambyidx             gs_shader_get_param_by_idx
shader_getparambyname            gs_shader_get_param_by_name
shader_getviewprojmatrix         gs_shader_get_viewproj_matrix
shader_getworldmatrix            gs_shader_get_world_matrix
shader_getparaminfo              gs_shader_get_param_info
shader_setbool                   gs_shader_set_bool
shader_setfloat                  gs_shader_set_float
shader_setint                    gs_shader_set_int
shader_setmatrix3                gs_shader_setmatrix3
shader_setmatrix4                gs_shader_set_matrix4
shader_setvec2                   gs_shader_set_vec2
shader_setvec3                   gs_shader_set_vec3
shader_setvec4                   gs_shader_set_vec4
shader_settexture                gs_shader_set_texture
shader_setval                    gs_shader_set_val
shader_setdefault                gs_shader_set_default
effect_property_type             gs_effect_property_type
EFFECT_NONE                      GS_EFFECT_NONE
EFFECT_BOOL                      GS_EFFECT_BOOL
EFFECT_FLOAT                     GS_EFFECT_FLOAT
EFFECT_COLOR                     GS_EFFECT_COLOR
EFFECT_TEXTURE                   GS_EFFECT_TEXTURE
effect_param_info                gs_effect_param_info
effect_destroy                   gs_effect_destroy
effect_gettechnique              gs_effect_get_technique
technique_begin                  gs_technique_begin
technique_end                    gs_technique_end
technique_beginpass              gs_technique_begin_pass
technique_beginpassbyname        gs_technique_begin_pass_by_name
technique_endpass                gs_technique_end_pass
effect_numparams                 gs_effect_get_num_params
effect_getparambyidx             gs_effect_get_param_by_idx
effect_getparambyname            gs_effect_get_param_by_name
effect_updateparams              gs_effect_update_params
effect_getviewprojmatrix         gs_effect_get_viewproj_matrix
effect_getworldmatrix            gs_effect_get_world_matrix
effect_getparaminfo              gs_effect_get_param_info
effect_setbool                   gs_effect_set_bool
effect_setfloat                  gs_effect_set_float
effect_setint                    gs_effect_set_int
effect_setmatrix4                gs_effect_set_matrix4
effect_setvec2                   gs_effect_set_vec2
effect_setvec3                   gs_effect_set_vec3
effect_setvec4                   gs_effect_set_vec4
effect_settexture                gs_effect_set_texture
effect_setval                    gs_effect_set_val
effect_setdefault                gs_effect_set_default
texrender_create                 gs_texrender_create
texrender_destroy                gs_texrender_destroy
texrender_begin                  gs_texrender_begin
texrender_end                    gs_texrender_end
texrender_reset                  gs_texrender_reset
texrender_gettexture             gs_texrender_get_texture
GS_BUILDMIPMAPS                  GS_BUILD_MIPMAPS
GS_RENDERTARGET                  GS_RENDER_TARGET
gs_device_name                   gs_get_device_name
gs_device_type                   gs_get_device_type
gs_entercontext                  gs_enter_context
gs_leavecontext                  gs_leave_context
gs_getcontext                    gs_get_context
gs_renderstart                   gs_render_start
gs_renderstop                    gs_render_stop
gs_rendersave                    gs_render_save
gs_getinput                      gs_get_input
gs_geteffect                     gs_get_effect
gs_create_effect_from_file       gs_effect_create_from_file
gs_create_effect                 gs_effect_create
gs_create_vertexshader_from_file gs_vertexshader_create_from_file
gs_create_pixelshader_from_file  gs_pixelshader_create_from_file
gs_create_texture_from_file      gs_texture_create_from_file
gs_resetviewport                 gs_reset_viewport
gs_set2dmode                     gs_set_2d_mode
gs_set3dmode                     gs_set_3d_mode
gs_create_swapchain              gs_swapchain_create
gs_getsize                       gs_get_size
gs_getwidth                      gs_get_width
gs_getheight                     gs_get_height
gs_create_texture                gs_texture_create
gs_create_cubetexture            gs_cubetexture_create
gs_create_volumetexture          gs_voltexture_create
gs_create_zstencil               gs_zstencil_create
gs_create_stagesurface           gs_stagesurface_create
gs_create_samplerstate           gs_samplerstate_create
gs_create_vertexshader           gs_vertexshader_create
gs_create_pixelshader            gs_pixelshader_create
gs_create_vertexbuffer           gs_vertexbuffer_create
gs_create_indexbuffer            gs_indexbuffer_create
gs_gettexturetype                gs_get_texture_type
gs_load_defaultsamplerstate      gs_load_default_samplerstate
gs_getvertexshader               gs_get_vertex_shader
gs_getpixelshader                gs_get_pixel_shader
gs_getrendertarget               gs_get_render_target
gs_getzstenciltarget             gs_get_zstencil_target
gs_setrendertarget               gs_set_render_target
gs_setcuberendertarget           gs_set_cube_render_target
gs_beginscene                    gs_begin_scene
gs_draw                          gs_draw
gs_endscene                      gs_end_scene
gs_setcullmode                   gs_set_cull_mode
gs_getcullmode                   gs_get_cull_mode
gs_enable_depthtest              gs_enable_depth_test
gs_enable_stenciltest            gs_enable_stencil_test
gs_enable_stencilwrite           gs_enable_stencil_write
gs_blendfunction                 gs_blend_function
gs_depthfunction                 gs_depth_function
gs_stencilfunction               gs_stencil_function
gs_stencilop                     gs_stencil_op
gs_setviewport                   gs_set_viewport
gs_getviewport                   gs_get_viewport
gs_setscissorrect                gs_set_scissor_rect
gs_create_texture_from_iosurface gs_texture_create_from_iosurface
gs_create_gdi_texture            gs_texture_create_gdi
gs_is_compressed_format          gs_is_compressed_format
gs_num_total_levels              gs_get_total_levels
texture_setimage                 gs_texture_set_image
cubetexture_setimage             gs_cubetexture_set_image
swapchain_destroy                gs_swapchain_destroy
texture_destroy                  gs_texture_destroy
texture_getwidth                 gs_texture_get_width
texture_getheight                gs_texture_get_height
texture_getcolorformat           gs_texture_get_color_format
texture_map                      gs_texture_map
texture_unmap                    gs_texture_unmap
texture_isrect                   gs_texture_is_rect
texture_getobj                   gs_texture_get_obj
cubetexture_destroy              gs_cubetexture_destroy
cubetexture_getsize              gs_cubetexture_get_size
cubetexture_getcolorformat       gs_cubetexture_get_color_format
volumetexture_destroy            gs_voltexture_destroy
volumetexture_getwidth           gs_voltexture_get_width
volumetexture_getheight          gs_voltexture_get_height
volumetexture_getdepth           gs_voltexture_getdepth
volumetexture_getcolorformat     gs_voltexture_get_color_format
stagesurface_destroy             gs_stagesurface_destroy
stagesurface_getwidth            gs_stagesurface_get_width
stagesurface_getheight           gs_stagesurface_get_height
stagesurface_getcolorformat      gs_stagesurface_get_color_format
stagesurface_map                 gs_stagesurface_map
stagesurface_unmap               gs_stagesurface_unmap
zstencil_destroy                 gs_zstencil_destroy
samplerstate_destroy             gs_samplerstate_destroy
vertexbuffer_destroy             gs_vertexbuffer_destroy
vertexbuffer_flush               gs_vertexbuffer_flush
vertexbuffer_getdata             gs_vertexbuffer_get_data
indexbuffer_destroy              gs_indexbuffer_destroy
indexbuffer_flush                gs_indexbuffer_flush
indexbuffer_getdata              gs_indexbuffer_get_data
indexbuffer_numindices           gs_indexbuffer_get_num_indices
indexbuffer_gettype              gs_indexbuffer_get_type
texture_rebind_iosurface         gs_texture_rebind_iosurface
texture_get_dc                   gs_texture_get_dc
texture_release_dc               gs_texture_release_dc
2014-08-09 11:57:38 -07:00
jp9000 50ec8b0d55 (API Change) libobs/callback: Unsquish names
Renamed:                  To:
-------------------------------------------------
calldata_getdata          calldata_get_data
calldata_getint           calldata_get_int
calldata_getfloat         calldata_get_float
calldata_getbool          calldata_get_bool
calldata_getptr           calldata_get_ptr
calldata_getstring        calldata_get_string
calldata_setdata          calldata_set_data
calldata_setint           calldata_set_int
calldata_setfloat         calldata_set_float
calldata_setbool          calldata_set_bool
calldata_setptr           calldata_set_ptr
calldata_setstring        calldata_set_string
2014-08-09 11:57:38 -07:00
jp9000 42a0925ce1 (API Change) media-io: Improve naming consistency
Renamed:                        To:
-----------------------------------------------------------
audio_output_blocksize          audio_output_get_block_size
audio_output_planes             audio_output_get_planes
audio_output_channels           audio_output_get_channels
audio_output_samplerate         audio_output_get_sample_rate
audio_output_getinfo            audio_output_get_info
audio_output_createline         audio_output_create_line
video_output_getinfo            video_output_get_info
video_gettime                   video_output_get_time
video_getframetime              video_output_get_frame_time
video_output_width              video_output_get_width
video_output_height             video_output_get_height
video_output_framerate          video_output_get_frame_rate
video_output_num_skipped_frames video_output_get_skipped_frames
video_output_total_frames       video_output_get_total_frames
2014-08-09 11:57:37 -07:00
jp9000 9d300685ca (API Change) Unsquish libobs/util
Changed:                      To:
-----------------------------------------------------------
dstr_isempty                  dstr_is_empty
cf_lexer_gettokens            cf_lexer_get_tokens
cf_preprocessor_gettokens     cf_preprocessor_get_tokens
2014-08-09 11:57:37 -07:00
jp9000 04712b5fe9 (API Change) Unsquish obs_data_* names
Changed:                 To:
-----------------------------------------------
obs_data_getjson         obs_data_get_json
obs_data_getstring       obs_data_get_string
obs_data_getint          obs_data_get_int
obs_data_getdouble       obs_data_get_double
obs_data_getbool         obs_data_get_bool
obs_data_getobj          obs_data_get_obj
obs_data_getarray        obs_data_get_array
obs_data_setstring       obs_data_set_string
obs_data_setint          obs_data_set_int
obs_data_setdouble       obs_data_set_double
obs_data_setbool         obs_data_set_bool
obs_data_setobj          obs_data_set_obj
obs_data_setarray        obs_data_set_array
obs_data_item_getstring  obs_data_item_get_string
obs_data_item_getint     obs_data_item_get_int
obs_data_item_getdouble  obs_data_item_get_double
obs_data_item_getbool    obs_data_item_get_bool
obs_data_item_getobj     obs_data_item_get_obj
obs_data_item_getarray   obs_data_item_get_array
obs_data_item_setstring  obs_data_item_set_string
obs_data_item_setint     obs_data_item_set_int
obs_data_item_setdouble  obs_data_item_set_double
obs_data_item_setbool    obs_data_item_set_bool
obs_data_item_setobj     obs_data_item_set_obj
obs_data_item_setarray   obs_data_item_set_array
2014-08-09 11:57:36 -07:00
jp9000 2d606dd8d8 (API Change) Use 'get' convention: API callbacks
Renamed:                       To:
-------------------------------------------------------
obs_source_info::defaults       obs_source_info::get_defaults
obs_source_info::properties     obs_source_info::get_properties
obs_output_info::defaults       obs_output_info::get_defaults
obs_output_info::properties     obs_output_info::get_properties
obs_output_info::total_bytes    obs_output_info::get_total_bytes
obs_output_info::dropped_frames obs_output_info::get_dropped_frames
obs_encoder_info::defaults      obs_encoder_info::get_defaults
obs_encoder_info::properties    obs_encoder_info::get_properties
obs_encoder_info::extra_data    obs_encoder_info::get_extra_data
obs_encoder_info::sei_data      obs_encoder_info::get_sei_data
obs_encoder_info::audio_info    obs_encoder_info::get_audio_info
obs_encoder_info::video_info    obs_encoder_info::get_video_fino
obs_service_info::defaults      obs_service_info::get_defaults
obs_service_info::properties    obs_service_info::get_properties
2014-08-09 11:57:30 -07:00
jp9000 c83d05117f (API Change) Unsquish libobs API callback names
Renamed:                    To:
-------------------------------------------------------
obs_source_info::getname    obs_source_info::get_name
obs_source_info::getwidth   obs_source_info::get_width
obs_source_info::getheight  obs_source_info::get_height
obs_output_info::getname    obs_output_info::get_name
obs_encoder_info::getname   obs_encoder_info::get_name
obs_service_info::getname   obs_service_info::get_name
2014-08-08 11:04:46 -07:00
jp9000 a3682fc8fb (API Change) Use 'get' convention in libobs (base)
Instead of having functions like obs_signal_handler() that can fail to
properly specify their actual intent in the name (does it signal a
handler, or does it return a signal handler?), always prefix functions
that are meant to get information with 'get' to make its functionality
more explicit.

Previous names:             New names:
-----------------------------------------------------------
obs_audio                   obs_get_audio
obs_video                   obs_get_video
obs_signalhandler           obs_get_signal_handler
obs_prochandler             obs_get_proc_handler
obs_source_signalhandler    obs_source_get_signal_handler
obs_source_prochandler      obs_source_get_proc_handler
obs_output_signalhandler    obs_output_get_signal_handler
obs_output_prochandler      obs_output_get_proc_handler
obs_service_signalhandler   obs_service_get_signal_handler
obs_service_prochandler     obs_service_get_proc_handler
2014-08-08 11:04:46 -07:00
jp9000 73baaa59e9 (API Change) Unsquish libobs (base) names
Previous names:             New names:
-----------------------------------------------------------
obs_view_setsource          obs_view_set_source
obs_view_getsource          obs_view_get_source
obs_source_getdisplayname   obs_source_get_display_name
obs_source_getwidth         obs_source_get_width
obs_source_getheight        obs_source_get_height
obs_filter_getparent        obs_filter_get_parent
obs_filter_gettarget        obs_filter_get_target
obs_source_filter_setorder  obs_source_filter_set_order
obs_source_getsettings      obs_source_get_settings
obs_source_getname          obs_source_get_name
obs_source_setname          obs_source_set_name
obs_source_setvolume        obs_source_set_volume
obs_source_getvolume        obs_source_get_volume
obs_scene_getsource         obs_scene_get_source
obs_scene_fromsource        obs_scene_from_source
obs_scene_findsource        obs_scene_find_source
obs_output_getdisplayname   obs_output_get_display_name
obs_output_getname          obs_output_get_name
obs_encoder_getname         obs_encoder_get_name
obs_service_getdisplayname  obs_service_get_display_name
obs_service_getname         obs_service_get_name
2014-08-08 11:04:46 -07:00
jp9000 41176eef27 (API Change) Remove obs_graphics()
API Removed:
- graphics_t obs_graphics();
Replaced With:
- void obs_enter_graphics();
- void obs_leave_graphics();

Description:
  obs_graphics() was somewhat of a pointless function.  The only time
that it was ever necessary was to pass it as a parameter to
gs_entercontext() followed by a subsequent gs_leavecontext() call after
that.  So, I felt that it made a bit more sense just to implement
obs_enter_graphics() and obs_leave_graphics() functions to do the exact
same thing without having to repeat that code.  There's really no need
to ever "hold" the graphics pointer, though I suppose that could change
in the future so having a similar function come back isn't out of the
question.

Still, this at least reduces the amount of unnecessary repeated code for
the time being.
2014-08-08 11:04:45 -07:00
jp9000 b007c6b139 (API Change) Un-squish obs_sceneitem_*
Renamed:                         To:
-----------------------------------------------------------
obs_sceneitem_getscene           obs_sceneitem_get_scene
obs_sceneitem_getsource          obs_sceneitem_get_source
obs_sceneitem_setpos             obs_sceneitem_set_pos
obs_sceneitem_setrot             obs_sceneitem_set_rot
obs_sceneitem_setscale           obs_sceneitem_set_scale
obs_sceneitem_setalignment       obs_sceneitem_set_alignment
obs_sceneitem_setorder           obs_sceneitem_set_order
obs_sceneitem_getpos             obs_sceneitem_get_pos
obs_sceneitem_getrot             obs_sceneitem_get_rot
obs_sceneitem_getscale           obs_sceneitem_get_scale
obs_sceneitem_getalignment       obs_sceneitem_get_alignment
2014-08-08 11:04:45 -07:00
jp9000 e42af67128 (API Change) Split obs_source_gettype
Changed:
- obs_source_gettype
To:
- enum obs_source_type obs_source_get_type(obs_source_t source);
- const char *obs_source_get_id(obs_source_t source);

This function was inconsistent for a number of reasons.  First, it
returns both the ID and the type of source (input/transition/filter),
which is inconsistent with the name of "get type".  Secondly, the
'squishy' naming convention which has just turned out to be bad
practice and causes inconsistencies.  So it's now replaced with two
functions that just return the type and the ID.
2014-08-08 11:04:44 -07:00
jp9000 0961af6e66 (API Change) Rename source_audio structure
Rename source_audio to obs_source_audio to make it more consistent with
the rest of the API
2014-08-08 11:04:44 -07:00
jp9000 45eec06891 (API Change) Rename filtered_audio structure
Reanmed filtered_audio to obs_audio_data, to improve the naming and
prefix with obs_ for the sake with consistency with the rest of the API
2014-08-08 11:04:44 -07:00
jp9000 4d1272e6e2 (API Change) Rename allow_direct_render enum
For the sake of consistency, changed allow_direct_render to
obs_allow_direct_render
2014-08-08 11:04:43 -07:00
jp9000 d2b4f82637 (API Change) Rename order_movement
Prefix with obs_ for the sake of consistency

Renamed enums:
- order_movement (now obs_order_movement)

Affected functions:
- obs_source_filter_setorder
- obs_sceneitem_setorder
2014-08-08 11:04:43 -07:00
jp9000 4122a5b9b5 (API Change) Rename 'source_frame' + related
For the sake of naming consistency with the rest of obs.h, prefix this
structure and associated functions with obs_.

Renamed structures:
- struct source_frame (now obs_source_frame)

Renamed functions:
- source_frame_init (now obs_source_frame_init)
- source_frame_free (now obs_source_frame_free)
- source_frame_create (now obs_source_frame_create)
- source_frame_destroy (now obs_source_frame_destroy)

Affected functions:
- obs_source_output_video
- obs_source_get_frame
- obs_source_release_frame
2014-08-08 11:04:42 -07:00
jp9000 7b402245dc (API Change) Rename obs_source_get(/release)frame
Renamed functions:
- obs_source_getframe (rename to obs_source_get_frame)
- obs_source_releaseframe (rename to obs_source_release_frame)

For the sake of consistency and helping to get rid of the "squishy
function name" issue
2014-08-08 11:04:42 -07:00
jp9000 24bd82a09c (API Change) Rename obs_sceneitem_info structure
Change obs_sceneitem_info structure to obs_transform_info - this
structure will not just be used with scene items in the future.
2014-08-08 11:04:42 -07:00
jp9000 2f21e2a450 Remove duplicate 'strref_isempty' 2014-08-08 10:50:37 -07:00
jp9000 84c7e665bd Fix function typo (obs_data_get_autoselect_bool) 2014-08-05 11:01:45 -07:00
jp9000 b203f36130 Fix automatic scaling bug
The bug here is that when conversion is active, the source video frame
is initialized with the destination height/width/format instead of the
source height/width/format.
2014-08-01 09:37:44 -07:00
Palana 1abde3d476 Preserve source data for sources with unknown source ids 2014-07-29 20:06:36 +02:00
Palana e123c9c062 Clarify source creation error message 2014-07-29 17:11:49 +02:00
jp9000 53aa0a60d5 Check for duplicate sources/outputs/encoders/etc
With the recent change to module handling by BtbN, I felt that having
this information might be useful in case someone is actually using make
install to set up their libraries.
2014-07-28 16:15:09 -07:00