1. 17 9月, 2015 1 次提交
    • J
      libobs: Add private data to definition structures · 7920668e
      jp9000 提交于
      This is useful for allowing the ability to have private data associated
      with the object type definition structures.  This private data can be
      useful for things like plugin wrappers for other languages, or providing
      dynamically generated object types.
      7920668e
  2. 05 2月, 2015 1 次提交
    • J
      (API Change) Add support for multiple audio mixers · 84e1f47c
      jp9000 提交于
      API changed:
      --------------------------
      
      void obs_output_set_audio_encoder(
      		obs_output_t *output,
      		obs_encoder_t *encoder);
      
      obs_encoder_t *obs_output_get_audio_encoder(
      		const obs_output_t *output);
      
      obs_encoder_t *obs_audio_encoder_create(
      		const char *id,
      		const char *name,
      		obs_data_t *settings);
      
      Changed to:
      --------------------------
      
      /* 'idx' specifies the track index of the output */
      void obs_output_set_audio_encoder(
      		obs_output_t *output,
      		obs_encoder_t *encoder,
      		size_t idx);
      
      /* 'idx' specifies the track index of the output */
      obs_encoder_t *obs_output_get_audio_encoder(
      		const obs_output_t *output,
      		size_t idx);
      
      /* 'mixer_idx' specifies the mixer index to capture audio from */
      obs_encoder_t *obs_audio_encoder_create(
      		const char *id,
      		const char *name,
      		obs_data_t *settings,
      		size_t mixer_idx);
      
      Overview
      --------------------------
      This feature allows multiple audio mixers to be used at a time.  This
      capability was able to be added with surprisingly very little extra
      overhead.  Audio will not be mixed unless it's assigned to a specific
      mixer, and mixers will not mix unless they have an active mix
      connection.
      
      Mostly this will be useful for being able to separate out specific audio
      for recording versus streaming, but will also be useful for certain
      streaming services that support multiple audio streams via RTMP.
      
      I didn't want to use a variable amount of mixers due to the desire to
      reduce heap allocations, so currently I set the limit to 4 simultaneous
      mixers; this number can be increased later if needed, but honestly I
      feel like it's just the right number to use.
      
      Sources:
      
      Sources can now specify which audio mixers their audio is mixed to; this
      can be a single mixer or multiple mixers at a time.  The
      obs_source_set_audio_mixers function sets the audio mixer which an audio
      source applies to.  For example, 0xF would mean that the source applies
      to all four mixers.
      
      Audio Encoders:
      
      Audio encoders now must specify which specific audio mixer they use when
      they encode audio data.
      
      Outputs:
      
      Outputs that use encoders can now support multiple audio tracks at once
      if they have the OBS_OUTPUT_MULTI_TRACK capability flag set.  This is
      mostly only useful for certain types of RTMP transmissions, though may
      be useful for file formats that support multiple audio tracks as well
      later on.
      84e1f47c
  3. 22 12月, 2014 1 次提交
    • J
      libobs: Use extern "C" on export headers if C++ · 923916ec
      jp9000 提交于
      I neglected to surround some files with extern "C", so if something
      written with C++ used the files it would cause function exports to not
      be mangled by it correctly.
      923916ec
  4. 01 10月, 2014 1 次提交
  5. 26 9月, 2014 1 次提交
    • J
      (API Change) Remove pointers from all typedefs · c9df41c1
      jp9000 提交于
      Typedef pointers are unsafe.  If you do:
      typedef struct bla *bla_t;
      then you cannot use it as a constant, such as: const bla_t, because
      that constant will be to the pointer itself rather than to the
      underlying data.  I admit this was a fundamental mistake that must
      be corrected.
      
      All typedefs that were pointer types will now have their pointers
      removed from the type itself, and the pointers will be used when they
      are actually used as variables/parameters/returns instead.
      
      This does not break ABI though, which is pretty nice.
      c9df41c1
  6. 10 8月, 2014 1 次提交
    • J
      (API Change) Use 'get' convention: API callbacks · 2d606dd8
      jp9000 提交于
      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
  7. 09 8月, 2014 1 次提交
    • J
      (API Change) Unsquish libobs API callback names · c83d0511
      jp9000 提交于
      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
  8. 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
  9. 26 6月, 2014 1 次提交
    • 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
  10. 05 4月, 2014 1 次提交
  11. 04 4月, 2014 1 次提交
    • J
      Improve properties API · 1bca7e0a
      jp9000 提交于
      Improve the properties API so that it can actually respond somewhat to
      user input.  Maybe later this might be further improved or replaced with
      something script-based.
      
      When creating a property, you can now add a callback to that property
      that notifies when the property has been changed in the user interface.
      Return true if you want the properties to be refreshed, or false if not.
      Though now that I think about it I doubt there would ever be a case
      where you would have this callback and *not* refresh the properties.
      
      Regardless, this allows functions to change the values of properties or
      settings, or enable/disable/hide other property controls from view
      dynamically.
      1bca7e0a
  12. 02 4月, 2014 2 次提交
    • J
      obs-output module: Fill out more functions · 4a652ec8
      jp9000 提交于
       - Add start/stop code to obs-output module
      
       - Use a circular buffer for the buffered encoder packets instead of a
         dynamic array
      
       - Add pthreads.lib as a dependency to obs-output module on windows in
         visual studio project files
      
       - Fix an windows export bug for avc parsing functions on windows.
         Also, rename those functions to be more consistent with each other.
      
       - Make outputs use a single function for encoded data rather than
         multiple functions
      
       - Add the ability to make 'text' properties be passworded
      4a652ec8
    • 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
  13. 28 3月, 2014 1 次提交
    • J
      Implement encoder usage with outputs · 6da26a3a
      jp9000 提交于
       - Make it so that encoders can be assigned to outputs.  If an encoder
         is destroyed, it will automatically remove itself from that output.
         I specifically didn't want to do reference counting because it leaves
         too much potential for unchecked references and it just felt like it
         would be more trouble than it's worth.
      
       - Add a 'flags' value to the output definition structure.  This lets
         the output specify if it uses video/audio, and whether the output is
         meant to be used with OBS encoders or not.
      
       - Remove boilerplate code for outputs.  This makes it easier to program
         outputs.  The boilerplate code involved before was mostly just
         involving connecting to the audio/video data streams directly in each
         output plugin.
      
         Instead of doing that, simply add plugin callback functions for
         receiving video/audio (either encoded or non-encoded, whichever it's
         set to use), and then call obs_output_begin_data_capture and
         obs_output_end_data_capture to automatically handle setting up
         connections to raw or encoded video/audio streams for the plugin.
      
       - Remove 'active' function from output callbacks, as it's no longer
         really needed now that the libobs output context automatically knows
         when the output is active or not.
      
       - Make it so that an encoder cannot be destroyed until all data
         connections to the encoder have been removed.
      
       - Change the 'start' and 'stop' functions in the encoder interface to
         just an 'initialize' callback, which initializes the encoder.
      
       - Make it so that the encoder must be initialized first before the data
         stream can be started.  The reason why initialization was separated
         from starting the encoder stream was because we need to be able to
         check that the settings used with the encoder *can* be used first.
      
         This problem was especially annoying if you had both video/audio
         encoding.  Before, you'd have to check the return value from
         obs_encoder_start, and if that second encoder fails, then you
         basically had to stop the first encoder again, making for
         unnecessary boilerplate code whenever starting up two encoders.
      6da26a3a
  14. 07 3月, 2014 1 次提交
    • J
      Add a way to get default settings · 7d48dbb1
      jp9000 提交于
       - 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
  15. 12 2月, 2014 1 次提交
    • J
      Revamp API and start using doxygen · 8e81d8be
      jp9000 提交于
      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. 02 2月, 2014 1 次提交
    • J
      Add property list callbacks · 458325fc
      jp9000 提交于
      - 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. 28 1月, 2014 1 次提交
    • J
      Implement settings interface for plugins · 6c442916
      jp9000 提交于
      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
  18. 19 1月, 2014 1 次提交
    • J
      Add preliminary ffmpeg plugin (still testing) · fc8851e9
      jp9000 提交于
      - Added some code for FFmpeg output that I'm still playing around with.
        Right now I'm just trying to get it to output to file and try to
        understand the FFmpeg/libav APIs.  Hopefully in the future this plugin
        can be used for any sort of output to FFmpeg.
      
      - Fixed a cast warning in audio-io.c with size_t -> uint32_t
      
      - Renamed the 'video_info' and 'audio_info' structures to
        'video_conver_info' and 'audio_convert_info' to better represent their
        actual purpose, and to avoid confusion with 'audio_output_info' and
        'video_output_info' structures.
      
      - Removed a few macros from obs-def.h that were at one point going to be
        used but no longer going to be used (at least for now)
      fc8851e9
  19. 17 1月, 2014 2 次提交
    • J
      Updated comments for outputs/encoders · ff1afac5
      jp9000 提交于
      Changed the comments to properly reflect the new callbacks, as I had
      forgotten to update the comments for them both.
      
      Also, changed "setbitrate" and "request_keyframe" return values to be
      boolean.
      ff1afac5
    • J
      Add preliminary output/encoder interface · 29b7d362
      jp9000 提交于
      - 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. 30 12月, 2013 1 次提交
  21. 21 12月, 2013 1 次提交
  22. 03 12月, 2013 1 次提交
  23. 13 11月, 2013 1 次提交
  24. 14 10月, 2013 1 次提交
  25. 01 10月, 2013 1 次提交