1. 15 2月, 2014 1 次提交
    • J
      Remove majority of warnings · 966b943d
      jp9000 提交于
      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
  2. 14 2月, 2014 1 次提交
    • J
      Rename obs_viewport to obs_view · 4bc282f5
      jp9000 提交于
      I felt like the name could cause a bit of confusion with typical
      graphics viewports, so I just changed it to view instead.
      4bc282f5
  3. 13 2月, 2014 3 次提交
    • J
      Revamp rendering system to allow custom rendering · 515f44be
      jp9000 提交于
      Originally, the rendering system was designed to only display sources
      and such, but I realized there would be a flaw; if you wanted to render
      the main viewport in a custom way, or maybe even the entire application
      as a graphics-based front end, you wouldn't have been able to do that.
      
      Displays have now been separated in to viewports and displays.  A
      viewport is used to store and draw sources, a display is used to handle
      draw callbacks.  You can even use displays without using viewports to
      draw custom render displays containing graphics calls if you wish, but
      usually they would be used in combination with source viewports at
      least.
      
      This requires a tiny bit more work to create simple source displays, but
      in the end its worth it for the added flexibility and options it brings.
      515f44be
    • J
      Add a bit more documentation · 88519f08
      jp9000 提交于
      - Add bit more documentation to some of the main headers
      
      - Fix alignment for the size of the name string of a obs_data_item.
      88519f08
    • J
      Move enum obs_source_type to obs-source.h · 526f8d4b
      jp9000 提交于
      526f8d4b
  4. 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
  5. 10 2月, 2014 1 次提交
  6. 09 2月, 2014 1 次提交
    • J
      Implement output, improve video/audio subsystems · 6c92cf58
      jp9000 提交于
       - Fill in the rest of the FFmpeg test output code for testing so it
         actually properly outputs data.
      
       - Improve the main video subsystem to be a bit more optimal and
         automatically output I420 or NV12 if needed.
      
       - Fix audio subsystem insertation and byte calculation.  Now it will
         seamlessly insert new audio data in to the audio stream based upon
         its timestamp value.  (Be extremely cautious when using floating
         point calculations for important things like this, and always round
         your values and check your values)
      
       - Use 32 byte alignment in case of future optimizations and export a
         function to get the current alignment.
      
       - Make os_sleepto_ns return true if slept, false if the time has
         already been passed before the call.
      
       - Fix sinewave output so that it actually properly calculates a middle
         C sinewave.
      
       - Change the use of row_bytes to linesize (also makes it a bit more
         consistent with FFmpeg's naming as well)
      6c92cf58
  7. 07 2月, 2014 1 次提交
    • J
      Add planar audio support, improve test output · 3d6d4322
      jp9000 提交于
      - Add planar audio support.  FFmpeg and libav use planar audio for many
        encoders, so it was somewhat necessary to add support in libobs
        itself.
      
      - Improve/adjust FFmpeg test output plugin.  The exports were somewhat
        messed up (making me rethink how exports should be done).  Not yet
        functional; it handles video properly, but it still does not handle
        audio properly.
      
      - Improve planar video code.  The planar video code was not properly
        accounting for row sizes for each plane.  Specifying row sizes for
        each plane has now been added.  This will also make it more compatible
        with FFmpeg/libav.
      
      - Fixed a bug where callbacks wouldn't create properly in audio-io and
        video-io code.
      
      - Implement 'blogva' function to allow for va_list usage with libobs
        logging.
      3d6d4322
  8. 06 2月, 2014 1 次提交
    • J
      Implement output scaling/conversion/downloading · ab4ab957
      jp9000 提交于
      - Implement texture scaling/conversion/downloading for the main view so
        we can finally start getting data to output.
      
        Also, redesign how it works a bit, it will now properly wait one full
        frame for each step in the process:  rendering the main texture,
        scaling the main texture to an output texture, staging/downloading the
        ouput texture, and then outputting that staged data.  This way, the
        GPU will have more than enough time to fully complete each step.
      
      - Fix a bug with OpenGL plugin's texture staging function.  Was using
        glBindBuffer instead of what should have been used:  glBindTexture.
      
      - Change the naming scheme of the variables in default.effect.  It's now
        named with the idea of just "color matrix" in mind instead of "yuv
        matrix", and instead of DrawRGBToYUV, it's now just DrawMatrix.
      ab4ab957
  9. 03 2月, 2014 1 次提交
    • P
      Remove external ref count visibility · ac23df50
      Palana 提交于
      The returned ref count was never used and the returned value doesn't
      actually confer any meaning in a multithreaded environment
      ac23df50
  10. 02 2月, 2014 2 次提交
    • 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
    • J
      Implement properties definition interface · 0d17d131
      jp9000 提交于
      Implement a properties definition interface to allow modules to export
      general properties associated with objects of libobs.
      
      The properties definition interface allows the option for automatic
      settings UI generation (which will make simple plugins easier to develop
      without the need for user interface), as well as allow real-time
      property editing of values of things like sources/outputs/etc without
      having to open property dialogs.  More property types can be added in
      the future as needed as well.
      0d17d131
  11. 01 2月, 2014 1 次提交
    • J
      Add module UI export capability · a12656bd
      jp9000 提交于
      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
  12. 30 1月, 2014 3 次提交
    • J
      Improve thread safety for scene items · 103ef753
      jp9000 提交于
      Scene items previously were removed by calling obs_sceneitem_destroy,
      but this proved to be a potential race condition where two different
      threads could try to destroy the same scene item at the same time.
      
      Instead of doing that, reference counting is now used on scene items,
      and an explicit obs_sceneitem_remove function is used instead for item
      removal, which sets a 'removed' variable to ensure it can only be called
      exactly one time.
      103ef753
    • J
      Fix the design flaw with obs_sceneitem_destroy · 3243a9f8
      jp9000 提交于
      The previous commit used the scene as a  parameter to check to see if
      the scene item was still present within the scene before destroying, but
      this was actually unnecessary because the fault was because the destroy
      signal was being triggered *before* the scene's mutex locked, thus
      causing a race condition.  I changed the code so that it signals after
      the lock instead of before, so the scene parameter should no longer be
      necessary.
      3243a9f8
    • P
      Use recursive mutex for scene mutex · af03444c
      Palana 提交于
      Fixes a deadlock when trying to remove a source from the GUI. The scene
      item signal handlers would mark the source as removed which results in
      the video thread also trying to run obs_sceneitem_destroy thereby
      deadlocking the video thread (and the GUI thread)
      af03444c
  13. 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
  14. 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
  15. 17 1月, 2014 3 次提交
    • J
      Use macros to improve safety loading callbacks · 8d63845d
      jp9000 提交于
      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
    • 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
  16. 14 1月, 2014 1 次提交
    • J
      Simplify media i/o interfaces · 62c2b1d7
      jp9000 提交于
      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
  17. 08 1月, 2014 1 次提交
    • J
      Implement volumes for sources · 3838abe1
      jp9000 提交于
       - 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
  18. 05 1月, 2014 1 次提交
    • J
      Added add/remove signals to scenes · a2a8a5f1
      jp9000 提交于
        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
  19. 02 1月, 2014 1 次提交
  20. 31 12月, 2013 1 次提交
  21. 30 12月, 2013 1 次提交
  22. 29 12月, 2013 1 次提交
  23. 28 12月, 2013 1 次提交
  24. 27 12月, 2013 1 次提交
  25. 25 12月, 2013 1 次提交
  26. 22 12月, 2013 2 次提交
  27. 21 12月, 2013 2 次提交
  28. 18 12月, 2013 1 次提交
  29. 16 12月, 2013 1 次提交
  30. 06 12月, 2013 1 次提交
  31. 03 12月, 2013 1 次提交