Skip to content
Snippets Groups Projects
  1. Jul 20, 2014
    • Jim's avatar
      (API Change) obs_reset_video: Use return codes · 778cc2b3
      Jim authored
      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
    • Jim's avatar
      Add gs_device_type function · 89a5bdbc
      Jim authored
      This allows a programatic way of determining the type of graphics module
      currently active.
      89a5bdbc
    • Jim's avatar
      Add gs_device_name function · a446dd74
      Jim authored
      This returns the name of the device, "Direct3D 11" or "OpenGL"
      respectively.
      a446dd74
  2. Jul 03, 2014
    • Jim's avatar
      Set default values for blend state structure · 9fc05e2a
      Jim authored
      9fc05e2a
    • Jim's avatar
      Implement function to reset blend state · 57cfd4f9
      Jim authored
      I was implementing a pushing/popping attributes function like with GL,
      but I realized that for our particular purposes (and actually for most
      purposes) its usage was somewhat..  niche.  I may still implement
      pushing/popping of attributes in the future, though right now I feel
      using a function to reset the state is sufficient for our purposes.
      57cfd4f9
  3. Jun 29, 2014
  4. Jun 28, 2014
  5. Jun 27, 2014
  6. Jun 25, 2014
    • Jim's avatar
      Remove 'shader' param from shader param functions · caf8ca9b
      Jim authored
      caf8ca9b
    • Jim's avatar
      Add a 'flush' command to graphics subsystem · 27010a2f
      Jim authored
      ...I'm actually concerned that I went a bit overkill trying to prevent
      backwards compatibility issues with this abstraction design, because
      this is a large number of files that have to be modified just to add a
      single graphics subsystem export.  Someone's going to strangle me, and
      when you know that someone might strangle you, that means that you did
      something wrong.  We'll have to look in to simplifying this in the
      future without killing backward compatibility safety.
      27010a2f
    • Jim's avatar
      Remove unused parameter for texture file loading · 77edf6f2
      Jim authored
      77edf6f2
    • Jim's avatar
      Remove unused texture file loading functions · 16f45e72
      Jim authored
      Getting cubemaps and volume textures from file is very unlikely to ever
      happen for our purposes.
      16f45e72
    • Jim's avatar
      Remove unused graphics subsystem functions · 8aa49cc9
      Jim authored
      These functions were mostly related to being able to set true fullscreen
      mode -- however, this has no place for our purposes, and these functions
      were just sitting empty and unused, so they should be removed.
      
      Besides, fullscreen mode only applies to the windows operating system.
      8aa49cc9
    • Jim's avatar
      Remove 'rebuild' variable from vertexbuffer_flush · f4e7a893
      Jim authored
      This variable is currently somewhat pointless, I was originally going to
      use it to tell the graphics subsystem to completely rebuild the internal
      vertex buffers, but it would be bad/inefficient to allow that
      functionality.
      f4e7a893
  7. Jun 15, 2014
    • Jim's avatar
      Fix bug with creating immediate vertex buffers · 9d66c962
      Jim authored
      Check to make sure graphics subsystem pointer isn't null before
      derefrencing, and fix bugs when creating vertex buffers from
      immediate-style helpers
      9d66c962
    • Jim's avatar
      Change graphics subsystem to 4x4 matrices · 1c2a0524
      Jim authored
      4x4 matrices aren't as optimal, but are much more sensible to handle
      when you want to do more advanced stuff like scaling, skewing, or
      inversion.
      1c2a0524
  8. Apr 27, 2014
  9. Apr 14, 2014
  10. Apr 12, 2014
  11. Mar 29, 2014
    • Jim's avatar
      Add dummy GL texture flag & direct object access · 0a86e8fb
      Jim authored
       - Add dummy GL texture support to allow libobs texture references to be
         created for GL without
      
       - Add a texture_getobj function to allow the retrieval of the
         context-specific object, such as the D3D texture pointer, or the
         OpenGL texture object handle.
      
       - Also cleaned up the export stuff.  I realized it was all totally
         superfluous.  Kind of a dumb moment, but nice to clean it up
         regardless.
      0a86e8fb
  12. 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
  13. Mar 16, 2014
    • Jim's avatar
      Use atomic functions where appropriate · 154e0c59
      Jim authored
      Also, rename atomic functions to be consistent with the rest of the
      platform/threading functions, and move atomic functions to threading*
      files rather than platform* files
      154e0c59
    • Jim's avatar
      Implement encoder interface (still preliminary) · fd37d9e9
      Jim authored
       - Implement OBS encoder interface.  It was previously incomplete, but
         now is reaching some level of completion, though probably should
         still be considered preliminary.
      
         I had originally implemented it so that encoders only have a 'reset'
         function to reset their parameters, but I felt that having both a
         'start' and 'stop' function would be useful.
      
         Encoders are now assigned to a specific video/audio media output each
         rather than implicitely assigned to the main obs video/audio
         contexts.  This allows separate encoder contexts that aren't
         necessarily assigned to the main video/audio context (which is useful
         for things such as recording specific sources).  Will probably have
         to do this for regular obs outputs as well.
      
         When creating an encoder, you must now explicitely state whether that
         encoder is an audio or video encoder.
      
         Audio and video can optionally be automatically converted depending
         on what the encoder specifies.
      
         When something 'attaches' to an encoder, the first attachment starts
         the encoder, and the encoder automatically attaches to the media
         output context associated with it.  Subsequent attachments won't have
         the same effect, they will just start receiving the same encoder data
         when the next keyframe plays (along with SEI if any).  When detaching
         from the encoder, the last detachment will fully stop the encoder and
         detach the encoder from the media output context associated with the
         encoder.
      
         SEI must actually be exported separately; because new encoder
         attachments may not always be at the beginning of the stream, the
         first keyframe they get must have that SEI data in it.  If the
         encoder has SEI data, it needs only add one small function to simply
         query that SEI data, and then that data will be handled automatically
         by libobs for all subsequent encoder attachments.
      
       - Implement x264 encoder plugin, move x264 files to separate plugin to
         separate necessary dependencies.
      
       - Change video/audio frame output structures to not use const
         qualifiers to prevent issues with non-const function usage elsewhere.
         This was an issue when writing the x264 encoder, as the x264 encoder
         expects non-const frame data.
      
         Change stagesurf_map to return a non-const data type to prevent this
         as well.
      
       - Change full range parameter of video scaler to be an enum rather than
         boolean
      fd37d9e9
  14. Mar 05, 2014
    • Jim's avatar
      Reimplement monitor capture · 4f7ab552
      Jim authored
       - Implement windows monitor capture (code is so much cleaner than in
         OBS1).  Will implement duplication capture later
      
       - Add GDI texture support to d3d11 graphics library
      
       - Fix precision issue with sleep timing, you have to call
         timeBeginPeriod otherwise windows sleep will be totally erratic.
      4f7ab552
  15. 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
  16. Feb 28, 2014
    • Jim's avatar
      Be just a bit more consistent. · 94a2d207
      Jim authored
      See, it can sometimes be a bit confusing.  These functions should
      definitely not fail under normal circumstances, and these errors may
      affect the user and/or application in some way.
      94a2d207
    • Jim's avatar
      Be more consistent about log levels · 771eac60
      Jim authored
      LOG_ERROR should be used in places where though recoverable (or at least
      something that can be handled safely), was unexpected, and may affect
      the user/application.
      
      LOG_WARNING should be used in places where it's not entirely unexpected,
      is recoverable, and doesn't really affect the user/application.
      771eac60
  17. Feb 24, 2014
  18. Feb 17, 2014
    • Jim's avatar
      Fix a NULL pointer deference · 105aafbc
      Jim authored
      Also, fixed an issue with the new conversion shader not compiling
      properly on some video devices
      105aafbc
  19. Feb 16, 2014
    • Jim's avatar
      Make a number of key optimizations · 2dbbffe4
      Jim authored
       - Changed glMapBuffer to glMapBufferRange to allow invalidation.  Using
         just glMapBuffer alone was causing some unacceptable stalls.
      
       - Changed dynamic buffers from GL_DYNAMIC_WRITE to GL_STREAM_WRITE
         because I had misunderstood the OpenGL specification
      
       - Added _OPENGL and _D3D11 builtin preprocessor macros to effects to
         allow special processing if needed
      
       - Added fmod support to shaders (NOTE: D3D and GL do not function
         identically with negative numbers when using this.  Positive numbers
         however function identically)
      
       - Created a planar conversion shader that converts from packed YUV to
         planar 420 right on the GPU without any CPU processing.  Reduces
         required GPU download size to approximately 37.5% of its normal rate
         as well.  GPU usage down by 10 entire percentage points despite the
         extra required pass.
      2dbbffe4
  20. 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
  21. Feb 09, 2014
    • Jim's avatar
      Use bzalloc instead of bmalloc then memset · b067440f
      Jim authored
      Reduces needless code repetition and still allows for proper memory
      alignment.  Cleans up the code a bit.
      b067440f
    • Jim's avatar
      Fix texture_setimage · e4921074
      Jim authored
      Was mapping the data without unmapping the data, causing the data to
      become locked
      e4921074
    • Jim's avatar
      Implement output, improve video/audio subsystems · 6c92cf58
      Jim authored
       - 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
  22. Jan 03, 2014
  23. Dec 23, 2013
  24. Dec 20, 2013
  25. Dec 03, 2013
  26. Nov 27, 2013
Loading