Skip to content
Snippets Groups Projects
  1. Sep 15, 2014
  2. Aug 09, 2014
    • Jim's avatar
      (API Change) Improve graphics API consistency · 5780f3f1
      Jim authored
      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
      5780f3f1
    • Jim's avatar
      (API Change) Use 'get' convention: API callbacks · 2d606dd8
      Jim authored
      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
      2d606dd8
  3. Aug 08, 2014
    • Jim's avatar
      (API Change) Unsquish libobs API callback names · c83d0511
      Jim authored
      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
      c83d0511
    • Jim's avatar
      (API Change) Rename filtered_audio structure · 45eec068
      Jim authored
      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
      45eec068
    • Jim's avatar
      (API Change) Rename 'source_frame' + related · 4122a5b9
      Jim authored
      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
      4122a5b9
  4. Jun 25, 2014
    • Jim's avatar
      Remove 'locale' parameter from all callbacks · 0b4a259e
      Jim authored
      The locale parameter was a mistake, because it puts extra needless
      burden upon the module developer to have to handle this variable for
      each and every single callback function.  The parameter is being removed
      in favor of a single centralized module callback function that
      specifically updates locale information for a module only when needed.
      0b4a259e
  5. May 04, 2014
    • Palana's avatar
      Fix an issue with async (video) source destruction · 4682cfb6
      Palana authored
      obs_source_output_video can cause cached frames to be freed twice if
      called with a partially destroyed source, among other undesirable
      effects; freeing the source private data right after the destroy signal
      has been processed ensures proper behavior
      4682cfb6
  6. Apr 27, 2014
    • Jim's avatar
      Add preliminary saving/loading of scene/sources · 65455c27
      Jim authored
      This saves scenes/sources from json on exit, and properly loads it back
      up when starting up the program again, as well as the currently active
      scene.
      
      I had to add a 'load' and 'save' callback to the source interface
      structure because I realizes that certain sources (such as scenes)
      operate different with their saved data; scenes for example would have
      to keep track of their settings information constantly, and that was
      somewhat unacceptable to make it functional.
      
      The optional 'load' callback will be called only after having loaded
      setttings specifically from file/imported data, and the 'save' function
      will be called only specifically when data actually needs to be saved.
      
      I also had to adjust the obs_scene code so that it's a regular input
      source type now, and I also modified it so that it doesn't have some
      strange custom creation code anymore.  The obs_scene_create function is
      now simply just a wrapper for obs_source_create.  You could even create
      a scene with obs_source_create manually as well.
      65455c27
  7. Apr 13, 2014
    • Jim's avatar
      Fix drawing bug with async video sources · 2451b80e
      Jim authored
      Before, async video sources would flicker because they were only being
      drawn when they were updated.  So when updated, they'd draw that frame,
      then it would stop drawing it until it updated again.  This fixes that
      issue and they should now draw properly.
      
      Also, fix a few other minor bugs and issues relating to async video,
      and make it so that non-async video filters can be properly applied to
      them.
      
      For the purposes of testing, change the 'test-random' source to an async
      video source that updates every quarter of a second with a new random
      face.
      
      Also fix a bug where non-async video sources wouldn't have filter
      effects applied properly.
      2451b80e
  8. Apr 05, 2014
  9. Mar 23, 2014
    • Jim's avatar
      Add source properties window (very preliminary) · d9251f9e
      Jim authored
       - Add a properties window for sources so that you can now actually edit
         the settings for sources.  Also, display the source by itself in the
         window (Note: not working on mac, and possibly not working on linux).
      
         When changing the settings for a source, it will call
         obs_source_update on that source when you have modified any values
         automatically.
      
       - Add a properties 'widget', eventually I want to turn this in to a
         regular nice properties view like you'd see in the designer, but
         right now it just uses a form layout in a QScrollArea with regular
         controls to display the properties.  It's clunky but works for the
         time being.
      
       - Make it so that swap chains and the main graphics subsystem will
         automatically use at least one backbuffer if none was specified
      
       - Fix bug where displays weren't added to the main display array
      
       - Make it so that you can get the properties of a source via the actual
         pointer of a source/encoder/output in addition to being able to look
         up properties via identifier.
      
       - When registering source types, check for required functions (wasn't
         doing it before).  getheight/getwidth should not be optional if it's
         a video source as well.
      
       - Add an RAII OBSObj wrapper to obs.hpp for non-reference-counted
         libobs pointers
      
       - Add an RAII OBSSignal wrapper to obs.hpp for libobs signals to
         automatically disconnect them on destruction
      
       - Move the "scale and center" calculation in window-basic-main.cpp to
         its own function and in its own source file
      
       - Add an 'update' callback to WASAPI audio sources
      d9251f9e
  10. Mar 07, 2014
    • Jim's avatar
      Add a way to get default settings · 7d48dbb1
      Jim authored
       - Implement a means of obtaining default settings for an
         input/output/encoder.  obs_source_defaults for example will return
         the default settings for a particular source type.
      
       - Because C++ doesn't have designated initializers, use functions in
         the WASAPI plugin to register the sources instead.
      7d48dbb1
  11. Mar 03, 2014
    • Jim's avatar
      Split output/input audio capture sources · 9c6da6f5
      Jim authored
       - Split input and output audio captures so that they're different
         sources.  This allows easier handling and enumeration of audio
         devices without having to do some sort of string processing.
      
         This way the user interface code can handle this a bit more easily,
         and so that it doesn't confuse users either.  This should be done for
         all audio capture sources for all operating systems.  You don't have
         to duplicate any code, you just need to create input/output wrapper
         functions to designate the audio as input or output before creation.
      
       - Make it detect soundflower and wavtap devices as mac "output" devices
         (even though they're actually input) for the mac output capture, and
         make it so that users can select a default output capture and
         automatically use soundflower or wavtap.
      
         I'm not entirely happy about having to do this, but because mac is
         designed this way, this is really the only way to handle it that
         makes it easier for users and UI code to deal with.
      
         Note that soundflower and wavtap are still also designated as input
         devices, so will still show up in input device enumeration.
      
       - Remove pragma messages because they were kind polluting the other
         compiler messages and just getting in the way.  In the future we can
         just do a grep for TODO to find them.
      
       - Redo list property again, this time using a safer internal array,
         rather than requiring sketchy array inputs.  Having functions handle
         everything behind the scenes is much safer.
      
       - Remove the reference counter debug log code, as it was included
         unintentionally in a commit.
      9c6da6f5
  12. Feb 23, 2014
    • Jim's avatar
      Separate source activation for main/aux views · 60e6316a
      Jim authored
      Split off activate to activate and show callbacks, and split off
      deactivate to deactivate and hide callbacks.  Sources didn't previously
      have a means to know whether it was actually being displayed in the main
      view or just happened to be visible somewhere.  Now, for things like
      transition sources, they have a means of knowing when they have actually
      been "activated" so they can initiate their sequence.
      
      A source is now only considered "active" when it's being displayed by
      the main view.  When a source is shown in the main view, the activate
      callback/signal is triggered.  When it's no longer being displayed by
      the main view, deactivate callback/signal is triggered.
      
      When a source is just generally visible to see by any view, the show
      callback/signal is triggered.  If it's no longer visible by any views,
      then the hide callback/signal is triggered.
      
      Presentation volume will now only be active when a source is active in
      the main view rather than also in auxilary views.
      
      Also fix a potential bug where parents wouldn't properly increment or
      decrement all the activation references of a child source when a child
      was added or removed.
      60e6316a
  13. Feb 20, 2014
  14. Feb 14, 2014
    • Jim's avatar
      Remove majority of warnings · 966b943d
      Jim authored
      There were a *lot* of warnings, managed to remove most of them.
      
      Also, put warning flags before C_FLAGS and CXX_FLAGS, rather than after,
      as -Wall -Wextra was overwriting flags that came before it.
      966b943d
  15. Feb 12, 2014
    • Jim's avatar
      Move enum obs_source_type to obs-source.h · 526f8d4b
      Jim authored
      526f8d4b
    • Jim's avatar
      Make some admends to obs-source.h documentation · 05b936e5
      Jim authored
      05b936e5
    • Jim's avatar
      Revamp API and start using doxygen · 8e81d8be
      Jim authored
      The API used to be designed in such a way to where it would expect
      exports for each individual source/output/encoder/etc.  You would export
      functions for each and it would automatically load those functions based
      on a specific naming scheme from the module.
      
      The idea behind this was that I wanted to limit the usage of structures
      in the API so only functions could be used.  It was an interesting idea
      in theory, but this idea turned out to be flawed in a number of ways:
      
       1.) Requiring exports to create sources/outputs/encoders/etc meant that
           you could not create them by any other means, which meant that
           things like faruton's .net plugin would become difficult.
      
       2.) Export function declarations could not be checked, therefore if you
           created a function with the wrong parameters and parameter types,
           the compiler wouldn't know how to check for that.
      
       3.) Required overly complex load functions in libobs just to handle it.
           It makes much more sense to just have a load function that you call
           manually.  Complexity is the bane of all good programs.
      
       4.) It required that you have functions of specific names, which looked
           and felt somewhat unsightly.
      
      So, to fix these issues, I replaced it with a more commonly used API
      scheme, seen commonly in places like kernels and typical C libraries
      with abstraction.  You simply create a structure that contains the
      callback definitions, and you pass it to a function to register that
      definition (such as obs_register_source), which you call in the
      obs_module_load of the module.
      
      It will also automatically check the structure size and ensure that it
      only loads the required values if the structure happened to add new
      values in an API change.
      
      The "main" source file for each module must include obs-module.h, and
      must use OBS_DECLARE_MODULE() within that source file.
      
      Also, started writing some doxygen documentation in to the main library
      headers.  Will add more detailed documentation as I go.
      8e81d8be
  16. Feb 02, 2014
    • Jim's avatar
      Add property list callbacks · 458325fc
      Jim authored
      - Add property list callbacks to sources/outputs/encoders so that if
        necessary user interface can be automatically generated or perhaps a
        property list widget can be used for them.
      
      - Change some of the property API names.  obs_property_list_t felt a bit
        awkward when actually using it, so I just renamed it to
        obs_properties_t.
      
      - Removed the getdata/setdata nad getparam/setparam functions from
        sources/services, they will be superseded by the dynamic procedure
        call API.
      458325fc
  17. Feb 01, 2014
    • Jim's avatar
      Add module UI export capability · a12656bd
      Jim authored
      Add the ability to be able to call and use toolkit-specific or
      program-specific user interface in modules.
      
      User interface code can be either bundled with the module, or 'split'
      out in to separate libraries (recommended).
      
      There are three reasons why splitting is recommended:
      
        1.) It allows plugins to be able to create custom user interface for
            each toolkit if desired.
      
        2.) Often, UI will be programmed in one language (the language of the
            toolkit), and core logic may be programmed in another.  This
            allows plugins to keep the languages separated if necessary.
      
        3.) It prevents direct linkage of UI toolkits libraries with core
            module logic.
      
      Splitting is not required, though is recommended if you want your plugin
      to be more flexible with other user interface toolkits or programs.
      
      Will implement a generic properties lookup next, which will be used for
      automatic UI handling so that plugin UI isn't necessarily required.
      a12656bd
  18. Jan 28, 2014
    • Jim's avatar
      Improve safety for settings usage · 9116be8d
      Jim authored
      - Add 'set_default' functions to obs-data.*.  These functions ensure
        that a paramter exists and that the parameter is of a specific type.
        If not, it will create or overwrite the value with the default setting
        instead.
      
        These functions are meant to be explicitly called before using any of
        the 'get' functions.  The reason why it was designed this way is to
        encourage defaults to be set in a single place/function.
      
        For example, ideal usage is to create one function for your data,
        "set_my_defaults(obs_data_t data)", set all the default values within
        that function, and then call that function on create/update, that way
        all defaults are centralized to a single place.
      
      - Ensure that data passed to sources/encoders/outputs/etc is always
        valid, and not a null value.
      
      - While I'm remembering, fix a few defaults of the main program config
        file data.
      9116be8d
    • Jim's avatar
      Implement settings interface for plugins · 6c442916
      Jim authored
      Add a fairly easy to use settings interface that can be passed to
      plugins, and replaced the old character string system that was being
      used before.  The new data interface allows for an easier method of
      getting/altering settings for plugins, and is built to be serializable
      to/from JSON.
      
      Also, removed another wxFormBuilder file that was no longer in use.
      6c442916
  19. Jan 17, 2014
    • Jim's avatar
      Use macros to improve safety loading callbacks · 8d63845d
      Jim authored
      Just a minor fix mostly because I noticed that I kept accidentally
      forgetting to add checks to the code properly.  This is one of those
      cases where macros come in useful, as macros can automate the process
      and help prevent these mistakes from happening by accident.
      8d63845d
    • Jim's avatar
      Add preliminary output/encoder interface · 29b7d362
      Jim authored
      - First, I redid the output interface for libobs.  I feel like it's
        going in a pretty good direction in terms of design.
      
        Right now, the design is so that outputs and encoders are separate.
        One or more outputs can connect to a specific encoder to receive its
        data, or the output can connect directly to raw data from libobs
        output itself, if the output doesn't want to use a designated encoder.
        Data is received via callbacks set when you connect to the encoder or
        raw output.  Multiple outputs can receive the data from a single
        encoder context if need be (such as for streaming to multiple channels
        at once, and/or recording with the same data).
      
        When an encoder is first connected to, it will connect to raw output,
        and start encoding.  Additional connections will receive that same
        data being encoded as well after that.  When the last encoder has
        disconnected, it will stop encoding.  If for some reason the encoder
        needs to stop, it will use the callback with NULL to signal that
        encoding has stopped.  Some of these things may be subject to change
        in the future, though it feels pretty good with this design so far.
        Will have to see how well it works out in practice versus theory.
      
      - Second, Started adding preliminary RTMP/x264 output plugin code.
      
        To speed things up, I might just make a direct raw->FFmpeg output to
        create a quick output plugin that we can start using for testing all
        the subsystems.
      29b7d362
  20. Jan 14, 2014
    • Jim's avatar
      Simplify media i/o interfaces · 62c2b1d7
      Jim authored
      Completely revamped the entire media i/o data and handlers.  The
      original idea was to have a system that would have connecting media
      inputs and outputs, but at a certain point I realized that this was an
      unnecessary complexity for what we wanted to do.  (Also, it reminded me
      of directshow filters, and I HATE directshow with a passion, and
      wouldn't wish it upon my greatest enemy)
      
      Now, audio/video outputs are connected to directly, with better callback
      handlers, and will eventually have the ability to automatically handle
      conversions such as 4:4:4 to 4:2:0 when connecting to an input that uses
      them.  Doing this will allow the video/audio i/o handlers to also
      prevent duplicate conversion, as well as make it easier/simple to use.
      
      My true goal for this is to make output and encoder plugins as simple to
      create as possible.  I want to be able to be able to create an output
      plugin with almost no real hassle of having to worry about image
      conversions, media inputs/outputs, etc.  A plugin developer shouldn't
      have to handle that sort of stuff when he/she doesn't really need to.
      
      Plugins will be able to simply create a callback via obs_video() and/or
      obs_audio(), and they will automatically receive the audio/video data in
      the formats requested via a simple callback, without needing to do
      almost anything else at all.
      62c2b1d7
  21. Jan 12, 2014
    • Jim's avatar
      Add preliminary handling of timestamp invalidation · 9f1a3c31
      Jim authored
      - Add preliminary (yet to be tested) handling of timestamp invalidation
        issues that can happen with specific devices, where timestamps can
        reset or go backward/forward in time with no rhyme or reason.  Spent
        the entire day just trying to figure out the best way to handle this.
      
        If both audio and video are present, it will increment a reference
        counter if video timestamps invalidate, and decrement the reference
        counter when the audio timestamps invalidate.  When the reference
        counter is not 0, it will not send audio as the audio will have
        invalid timing.  What this does is it ensures audio data will never go
        out of bounds in relation to the video, and waits for both audio and
        video timestamps to "jump" together before resuming audio.
      
      - Moved async video frame timing adjustment code into
        obs_source_getframe instead so it's automatically handled whenever
        called.
      
      - Removed the 'audio wait buffer' as it was an unnecessary complexity
        that could have had problems in the future.  Instead, audio will not
        be added until video starts for sources that have both async
        audio/video.  Audio could have buffered for too long of a time anyway,
        who knows what devices are going to do.
      
      - Fixed a minor conversion warning in audio-io.c
      9f1a3c31
  22. Jan 10, 2014
    • Jim's avatar
      Detect audio timestamp jumps and reset timing · 2a893064
      Jim authored
       - Often, timestamps will go "back" in time with certain..  terrible
         devices that no one should use.  When this occurs, timing is now
         reset so that the new audio comes in directly after the old audio
         seamlessly.
      2a893064
  23. Jan 07, 2014
    • Jim's avatar
      Implement volumes for sources · 3838abe1
      Jim authored
       - Added a volume variable to the obs_source structure and implemented
         functions for manipulating source volume.
      
       - Added a volume variable to the audio_data structure so that the
         volume will be applied when mixing.
      3838abe1
  24. Jan 04, 2014
    • Jim's avatar
      Added add/remove signals to scenes · a2a8a5f1
      Jim authored
        Scenes will now signal via their source when an item has been added
      or removed from them.
      
        "add" - Item added to the scene.
        Parameters:  "scene": Scene that the item was added to.
                     "item":  Item that was added.
      
        "remove" - Item removed from the scene.
        Parameters:  "scene": Scene that the item was removed from.
                     "item":  Item that was removed.
      a2a8a5f1
  25. Dec 30, 2013
  26. Dec 27, 2013
  27. Dec 20, 2013
  28. Dec 03, 2013
  29. Nov 20, 2013
  30. Nov 13, 2013
Loading