1. 09 8月, 2014 10 次提交
    • J
      (API Change) Remove obs_graphics() · 41176eef
      jp9000 提交于
      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.
      41176eef
    • J
      (API Change) Un-squish obs_sceneitem_* · b007c6b1
      jp9000 提交于
      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
      b007c6b1
    • J
      (API Change) Split obs_source_gettype · e42af671
      jp9000 提交于
      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.
      e42af671
    • J
      (API Change) Rename source_audio structure · 0961af6e
      jp9000 提交于
      Rename source_audio to obs_source_audio to make it more consistent with
      the rest of the API
      0961af6e
    • J
      (API Change) Rename filtered_audio structure · 45eec068
      jp9000 提交于
      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
    • J
      (API Change) Rename allow_direct_render enum · 4d1272e6
      jp9000 提交于
      For the sake of consistency, changed allow_direct_render to
      obs_allow_direct_render
      4d1272e6
    • J
      (API Change) Rename order_movement · d2b4f826
      jp9000 提交于
      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
      d2b4f826
    • J
      (API Change) Rename 'source_frame' + related · 4122a5b9
      jp9000 提交于
      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
    • J
      (API Change) Rename obs_source_get(/release)frame · 7b402245
      jp9000 提交于
      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
      7b402245
    • J
      (API Change) Rename obs_sceneitem_info structure · 24bd82a0
      jp9000 提交于
      Change obs_sceneitem_info structure to obs_transform_info - this
      structure will not just be used with scene items in the future.
      24bd82a0
  2. 28 7月, 2014 3 次提交
    • J
      Add API functions to get information about modules · e87ed914
      jp9000 提交于
      e87ed914
    • J
      (API Change) Refactor module handling · 59ea3bec
      jp9000 提交于
      Changed API:
      - char *obs_find_plugin_file(const char *sub_path);
      
        Changed to: char *obs_module_file(const char *file);
      
        Cahnge it so you no longer need to specify a sub-path such as:
        obs_find_plugin_file("module_name/file.ext")
      
        Instead, now automatically handle the module data path so all you need
        to do is:
        obs_module_file("file.ext")
      
      - int obs_load_module(const char *name);
      
        Changed to: int obs_open_module(obs_module_t *module,
                                        const char *path,
                                        const char *data_path);
                    bool obs_init_module(obs_module_t module);
      
        Change the module loading API so that if the front-end chooses, it can
        load modules directly from a specified path, and associate a data
        directory with it on the spot.
      
        The module will not be initialized immediately; obs_init_module must
        be called on the module pointer in order to fully initialize the
        module.  This is done so a module can be disabled by the front-end if
        the it so chooses.
      
      New API:
      - void obs_add_module_path(const char *bin, const char *data);
      
        These functions allow you to specify new module search paths to add,
        and allow you to search through them, or optionally just load all
        modules from them.  If the string %module% is included, it will
        replace it with the module's name when that string is used as a
        lookup.  Data paths are now directly added to the module's internal
        storage structure, and when obs_find_module_file is used, it will look
        up the pointer to the obs_module structure and get its data directory
        that way.
      
        Example:
        obs_add_module_path("/opt/obs/my-modules/%module%/bin",
                            "/opt/obs/my-modules/%module%/data");
      
        This would cause it to additionally look for the binary of a
        hypthetical module named "foo" at /opt/obs/my-modules/foo/bin/foo.so
        (or libfoo.so), and then look for the data in
        /opt/obs/my-modules/foo/data.
      
        This gives the front-end more flexibility for handling third-party
        plugin modules, or handling all plugin modules in a custom way.
      
      - void obs_find_modules(obs_find_module_callback_t callback, void
                              *param);
      
        This searches the existing paths for modules and calls the callback
        function when any are found.  Useful for plugin management and custom
        handling of the paths by the front-end if desired.
      
      - void obs_load_all_modules(void);
      
        Search through the paths and both loads and initializes all modules
        automatically without custom handling.
      
      - void obs_enum_modules(obs_enum_module_callback_t callback,
                              void *param);
      
        Enumerates currently opened modules.
      59ea3bec
    • J
      Add function to get current core version · ee4a93b4
      jp9000 提交于
      The version macro that modules use to compile versus the actual core
      version that may be in use may be different, so this is a way to compare
      them to check for compatibility issues later on.
      ee4a93b4
  3. 21 7月, 2014 1 次提交
    • J
      (API Change) obs_reset_video: Use return codes · 778cc2b3
      jp9000 提交于
      Changed API functions:
      libobs: obs_reset_video
      
      Before, video initialization returned a boolean, but "failed" is too
      little information, if it fails due to lack of device capabilities or
      bad video device parameters, the front-end needs to know that.
      
      The OBS Basic UI has also been updated to reflect this API change.
      778cc2b3
  4. 13 7月, 2014 1 次提交
  5. 12 7月, 2014 1 次提交
    • J
      libobs: Add function for default module locale · ac760efb
      jp9000 提交于
      This function is used to simplify the process when using the default
      locale handling for modules.  It will automatically search in the plugin
      data directory associated with the specific module specified, load the
      default locale text (for example english if its default language is
      english), and then it will load the set locale on top of the default
      locale, which will cause text to use the default locale if the desired
      locale text is not found.
      ac760efb
  6. 07 7月, 2014 1 次提交
    • J
      Add statistics functions to outputs · 3d1c1329
      jp9000 提交于
      Total bytes, total frames, and frames dropped.  Total frames is
      generated automatically, but total bytes and total dropped frames are
      returned via callbacks.
      3d1c1329
  7. 03 7月, 2014 1 次提交
    • J
      Implement reconnecting · 4f2a731a
      jp9000 提交于
      The core itself now provides reconnection options (enabled by default, 2
      second timeout between reconnects, 20 retries max until actual
      disconnection occurs).  This will make things easier for both module
      developers and UI developers.
      
      Reconnecting treats the stream as though it were still active, and
      signals are sent when reconnecting and upon successful reconnection.
      
      Need to implement user interface information for reconnections.
      4f2a731a
  8. 02 7月, 2014 1 次提交
  9. 26 6月, 2014 2 次提交
    • J
      Remove 'locale' parameter from all callbacks · 0b4a259e
      jp9000 提交于
      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
    • J
      Add API for setting/getting current locale · 899f0530
      jp9000 提交于
      This API is used to set the current locale for libobs, which it will set
      for all modules when a module is loaded or specifically when the locale
      is manually changed.
      899f0530
  10. 17 6月, 2014 2 次提交
  11. 16 6月, 2014 2 次提交
    • J
      UI: Add scene editing · 452e0695
      jp9000 提交于
      So, scene editing was interesting (and by interesting I mean
      excruciating).  I almost implemented 'manipulator' visuals (ala 3dsmax
      for example), and used 3 modes for controlling position/rotation/size,
      but in a 2D editing, it felt clunky, so I defaulted back to simply
      click-and-drag for movement, and then took a similar though slightly
      different looking approach for handling scaling and reszing.
      
      I also added a number of menu item helpers related to positioning,
      scaling, rotating, flipping, and resetting the transform back to
      default.
      
      There is also a new 'transform' dialog (accessible via menu) which will
      allow you to manually edit every single transform variable of a scene
      item directly if desired.
      
      If a scene item does not have bounds active, pulling on the sides of a
      source will cause it to resize it via base scale rather than by the
      bounding box system (if the source resizes that scale will apply).  If
      bounds are active, it will modify the bounding box only instead.
      
      How a source scales when a bounding box is active depends on the type of
      bounds being used.  You can set it to scale to the inner bounds, the
      outer bounds, scale to bounds width only, scale to bounds height only,
      and a setting to stretch to bounds (which forces a source to always draw
      at the bounding box size rather than be affected by its internal size).
      You can also set it to be used as a 'maximum' size, so that the source
      doesn't necessarily get scaled unless it extends beyond the bounds.
      
      Like in OBS1, objects will snap to the edges unless the control key is
      pressed.  However, this will now happen even if the object is rotated or
      oriented in any strange way.  Snapping will also occur when stretching
      or changing the bounding box size.
      452e0695
    • J
      Scenes: Implement more item positioning features · b23f8cc6
      jp9000 提交于
      There are a ridiculous number of features related to scaling and
      positioning due to requests by a number of people who complained that
      they hated the way that OBS1 would always resize their sources when the
      source's base size changed.  There were also people who wanted more
      control for how the resizing was handled, or the ability to completely
      prevent resizing entirely if desired.  So I made it so that you can
      optionally use a 'bounds' system, which allows you to specify different
      styles of controlling resizing.
      
      If disabled, the source will always automatically resize and only the
      base scale is applied.  If enabled, you have a variety of different ways
      to limit/control how it can resize within the bounds, or make it so it
      can't resize at all.  You can also control alignment within that
      bounding box, so you can make it so that a source always aligns to a
      side or corner of the box.
      
      I also added an alignment value which changes how the source is oriented
      relative to the position of the scene item.  For example, setting
      bottom-right alignment will make it so that the position of the item is
      the bottom right corner of the source.  When the source resizies, it
      will resize leftward and upward in that case, which solves the problem
      of how a source resizes relative to a desired position.
      b23f8cc6
  12. 15 6月, 2014 1 次提交
  13. 21 5月, 2014 2 次提交
  14. 20 5月, 2014 1 次提交
  15. 19 5月, 2014 1 次提交
    • J
      Add help menu with log file uploading · 5ba8b09c
      jp9000 提交于
      Added github gist API uploading to the help menu to help make problems a
      bit easier to debug in the future.  It's somewhat vital that this
      functionality be implemented before any release in order to analyze any
      given problem a user may be experiencing.
      5ba8b09c
  16. 16 5月, 2014 2 次提交
  17. 05 5月, 2014 1 次提交
  18. 04 5月, 2014 1 次提交
    • J
      Add (temporary terrible) volume controls · 52746c25
      jp9000 提交于
       - Add volume control
      
         These volume controls are basically nothing more than sliders.  They
         look terrible and hopefully will be as temporary as they are
         terrible.
      
       - Allow saving of specific non-user sources via obs_load_source and
         obs_save_source functions.
      
       - Save data of desktop/mic audio sources (sync data, volume data, etc),
         and load the data on startup.
      
       - Make it so that a scene is created by default if first time using the
         application.  On certain operating systems where supported, a default
         capture will be created.  Desktop capture on mac, particularly.  Not
         sure what to do about windows because monitor capture on windows 7 is
         completely terrible and is bad to start users off with.
      52746c25
  19. 27 4月, 2014 1 次提交
    • J
      Add preliminary saving/loading of scene/sources · 65455c27
      jp9000 提交于
      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
  20. 25 4月, 2014 1 次提交
  21. 24 4月, 2014 1 次提交
    • J
      obs-studio UI: Implement stream settings UI · 8830c410
      jp9000 提交于
       - Updated the services API so that it links up with an output and
         the output gets data from that service rather than via settings.
         This allows the service context to have control over how an output is
         used, and makes it so that the URL/key/etc isn't necessarily some
         static setting.
      
         Also, if the service is attached to an output, it will stick around
         until the output is destroyed.
      
       - The settings interface has been updated so that it can allow the
         usage of service plugins.  What this means is that now you can create
         a service plugin that can control aspects of the stream, and it
         allows each service to create their own user interface if they create
         a service plugin module.
      
       - Testing out saving of current service information.  Saves/loads from
         JSON in to obs_data_t, seems to be working quite nicely, and the
         service object information is saved/preserved on exit, and loaded
         again on startup.
      
       - I agonized over the settings user interface for days, and eventually
         I just decided that the only way that users weren't going to be
         fumbling over options was to split up the settings in to simple/basic
         output, pre-configured, and then advanced for advanced use (such as
         multiple outputs or services, which I'll implement later).
      
         This was particularly painful to really design right, I wanted more
         features and wanted to include everything in one interface but
         ultimately just realized from experience that users are just not
         technically knowledgable about it and will end up fumbling with the
         settings rather than getting things done.
      
         Basically, what this means is that casual users only have to enter in
         about 3 things to configure their stream:  Stream key, audio bitrate,
         and video bitrate.  I am really happy with this interface for those
         types of users, but it definitely won't be sufficient for advanced
         usage or for custom outputs, so that stuff will have to be separated.
      
       - Improved the JSON usage for the 'common streaming services' context,
         I realized that JSON arrays are there to ensure sorting, while
         forgetting that general items are optimized for hashing.  So
         basically I'm just using arrays now to sort items in it.
      8830c410
  22. 20 4月, 2014 1 次提交
    • J
      libobs: Add services API, reduce repeated code · 4a6d19f2
      jp9000 提交于
      Add API for streaming services.  The services API simplifies the
      creation of custom service features and user interface.
      
      Custom streaming services later on will be able to do things such as:
      
       - Be able to use service-specific APIs via modules, allowing a more
         direct means of communicating with the service and requesting or
         setting service-specific information
      
       - Get URL/stream key via other means of authentication such as OAuth,
         or be able to build custom URLs for services that require that sort
         of thing.
      
       - Query information (such as viewer count, chat, follower
         notifications, and other information)
      
       - Set channel information (such as current game, current channel title,
         activating commercials)
      
      Also, I reduce some repeated code that was used for all libobs objects.
      This includes the name of the object, the private data, settings, as
      well as the signal and procedure handlers.
      
      I also switched to using linked lists for the global object lists,
      rather than using an array of pointers (you could say it was..
      pointless.)  ..Anyway, the linked list info is also stored in the shared
      context data structure.
      4a6d19f2
  23. 08 4月, 2014 1 次提交
    • J
      Implement RTMP module (still needs drop code) · 92522d18
      jp9000 提交于
       - Implement the RTMP output module.  This time around, we just use a
         simple FLV muxer, then just write to the stream with RTMP_Write.
         Easy and effective.
      
       - Fix the FLV muxer, the muxer now outputs proper FLV packets.
      
       - Output API:
         * When using encoders, automatically interleave encoded packets
           before sending it to the output.
      
         * Pair encoders and have them automatically wait for the other to
           start to ensure sync.
      
         * Change 'obs_output_signal_start_fail' to 'obs_output_signal_stop'
           because it was a bit confusing, and doing this makes a lot more
           sense for outputs that need to stop suddenly (disconnections/etc).
      
       - Encoder API:
         * Remove some unnecessary encoder functions from the actual API and
           make them internal.  Most of the encoder functions are handled
           automatically by outputs anyway, so there's no real need to expose
           them and end up inadvertently confusing plugin writers.
      
         * Have audio encoders wait for the video encoder to get a frame, then
           start at the exact data point that the first video frame starts to
           ensure the most accrate sync of video/audio possible.
      
         * Add a required 'frame_size' callback for audio encoders that
           returns the expected number of frames desired to encode with.  This
           way, the libobs encoder API can handle the circular buffering
           internally automatically for the encoder modules, so encoder
           writers don't have to do it themselves.
      
       - Fix a few bugs in the serializer interface.  It was passing the wrong
         variable for the data in a few cases.
      
       - If a source has video, make obs_source_update defer the actual update
         callback until the tick function is called to prevent threading
         issues.
      92522d18
  24. 02 4月, 2014 1 次提交
    • J
      Add preliminary FLV/RTMP output (incomplete) · 0cf9e0cf
      jp9000 提交于
       - obs-outputs module:  Add preliminary code to send out data, and add
         an FLV muxer.  This time we don't really need to build the packets
         ourselves, we can just use the FLV muxer and send it directly to
         RTMP_Write and it should automatically parse the entire stream for us
         without us having to do much manual code at all.  We'll see how it
         goes.
      
       - libobs:  Add AVC NAL packet parsing code
      
       - libobs/media-io:  Add quick helper functions for audio/video to get
         the width/height/fps/samplerate/etc rather than having to query the
         info structures each time.
      
       - libobs (obs-output.c):  Change 'connect' signal to 'start' and 'stop'
         signals.  'start' now specifies an error code rather than whether it
         simply failed, that way the client can actually know *why* a failure
         occurred.  Added those error codes to obs-defs.h.
      
       - libobs:  Add a few functions to duplicate/free encoder packets
      0cf9e0cf