Skip to content
Snippets Groups Projects
  1. Sep 26, 2014
    • GoaLitiuM's avatar
      10f5d7f3
    • Jim's avatar
      (API Change) Remove pointers from all typedefs · c9df41c1
      Jim authored
      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
  2. Sep 04, 2014
    • Jim's avatar
      Prevent audio too far from expected timing · dc434380
      Jim authored
      Audio that goes below the minimum expecting timing (current time -
      buffering time) is automatically removed.  However, delayed audio is not
      removed regardless of its delay.  This puts a hard cap of 6 seconds from
      current time that the maximum delay audio can have.  This will also
      prevent the circular buffer from dynamically growing too large.
      dc434380
  3. Aug 30, 2014
    • Jim's avatar
      Perform timestamp smoothing in media-io as well · 5ac364ff
      Jim authored
      Doing timestamp smoothing in obs-source.c is good because timestamps can
      typically operate on a different timebase, however, obs-source.c can
      also change that time base dynamically (such as with async video and
      unexpected timestamp jumps), so in order to ensure that audio is
      seamless in the output as well, perform timestamp smoothing in
      audio-io.c as well just as an extra precautionary measure.
      5ac364ff
  4. Aug 09, 2014
    • Jim's avatar
      (API Change) media-io: Improve naming consistency · 42a0925c
      Jim authored
      Renamed:                        To:
      -----------------------------------------------------------
      audio_output_blocksize          audio_output_get_block_size
      audio_output_planes             audio_output_get_planes
      audio_output_channels           audio_output_get_channels
      audio_output_samplerate         audio_output_get_sample_rate
      audio_output_getinfo            audio_output_get_info
      audio_output_createline         audio_output_create_line
      video_output_getinfo            video_output_get_info
      video_gettime                   video_output_get_time
      video_getframetime              video_output_get_frame_time
      video_output_width              video_output_get_width
      video_output_height             video_output_get_height
      video_output_framerate          video_output_get_frame_rate
      video_output_num_skipped_frames video_output_get_skipped_frames
      video_output_total_frames       video_output_get_total_frames
      42a0925c
  5. Jun 08, 2014
  6. Jun 07, 2014
  7. Jun 03, 2014
  8. May 24, 2014
  9. May 20, 2014
  10. Apr 14, 2014
  11. Apr 01, 2014
    • Jim's avatar
      Add preliminary FLV/RTMP output (incomplete) · 0cf9e0cf
      Jim authored
       - 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
  12. Mar 16, 2014
    • 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
  13. Mar 10, 2014
    • Jim's avatar
      Fix audio streaming and mac semaphores · 585fd8f9
      Jim authored
      ...The reason why audio didn't work was because I overwrote the bitrate
      values.
      
      As for semaphores, mac doesn't support unnamed semaphores without using
      mach semaphores.  So, I just implemented a semaphore wrapper for each
      OS.
      585fd8f9
  14. Mar 08, 2014
    • Jim's avatar
      UI: Swap audio slots · b2202c48
      Jim authored
      Had the audio restart slot connected to things that didn't require a
      restart
      b2202c48
  15. Mar 07, 2014
    • Jim's avatar
      Activate user-selected audio devices · f2ee9507
      Jim authored
       - Fix a bug where the initial audio data insertion would cause all
         audio data to unintentionally clear (mixed up < and > operators, damn
         human error)
      
       - Fixed a potential interdependant lock scenario with channel mutex
         locks and graphics mutex locks.  The main video thread could lock the
         graphics mutex and then while in the graphics mutex could lock the
         channels mutex.  Meanwhile in another thread, the channel mutex could
         get locked, and then the graphics mutex would get locked, causing a
         deadlock.
      
         The best way to deal with this is to not let mutexes lock within
         other mutexes, but sometimes it's difficult to avoid such as in the
         main video thread.
      
       - Audio devices should now be functional, and the devices in the audio
         settings can now be changed as desired.
      f2ee9507
  16. Feb 28, 2014
    • 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
    • Jim's avatar
      Use MP4s when not on windows · f9809847
      Jim authored
      Also, make it use 'veryfast' preset.  Still testing this, might have to
      revise this later.
      f9809847
  17. Feb 27, 2014
    • Jim's avatar
      Add mac audio capture · 33dc028c
      Jim authored
       - Add CoreAudio device input capture for mac audio capturing.  The code
         should cover just about everything for capturing mac input device
         audio.  Because of the way mac audio is designed, users may have no
         choice but to obtain the open source soundflower software to capture
         their mac's desktop audio.  It may be necessary for us to distribute
         it with the program as well.
      
       - Hide event backend
      
       - Use win32 events for windows
      
       - Allow timed waits for events
      
       - Fix a few warnings
      33dc028c
  18. Feb 24, 2014
  19. Feb 23, 2014
    • Jim's avatar
      Implement a few more audio options/functions · c232ebde
      Jim authored
      Implement a few audio options in to the user interface as well as a few
      inline audio functions in audio-io.h.
      
      Make it so ffmpeg plugin automatically converts to the desired format.
      
      Use regular interleaved float internally for audio instead of planar
      float.
      c232ebde
  20. Feb 22, 2014
    • Jim's avatar
      Fix video reset and apply new video settings · 0ff0d327
      Jim authored
      This allows the changing of bideo settings without having to completely
      reset all graphics data.  Will recreate internal output/conversion
      buffers and such and reset the main preview.
      0ff0d327
  21. Feb 21, 2014
    • Jim's avatar
      For *_update, apply settings instead of replacing · 7fcec773
      Jim authored
      Make it so obs_data settings input in to *_update are applied to the
      existing settings rather than fully replace the existing settings.  That
      way you can update with only certain specific settings, leaving other
      settings untouched.  Of course if you're already using the original
      settings pointer in the first place then you've already done that, so
      it'll just ignore it because you've already applied them.
      7fcec773
    • Jim's avatar
      Clamp audio data after applying volume · 4f465204
      Jim authored
      Make sure audio multiplication is clamped, and also make sure that
      larger volume values can be safely used.
      4f465204
  22. Feb 18, 2014
    • Jim's avatar
      Implement automatic video scaling (if requested) · f2d4de3c
      Jim authored
      Add a scaler interface (defaults to swscale), and if a separate output
      wants to use a different scale or format than the default output format,
      allow a scaler instance to be created automatically for that output,
      which will then receive the new scaled output.
      f2d4de3c
  23. Feb 17, 2014
  24. Feb 14, 2014
  25. 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 a couple of warnings · 9879eead
      Jim authored
      9879eead
    • 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
  26. Feb 07, 2014
    • Jim's avatar
      Add planar audio support, improve test output · 3d6d4322
      Jim authored
      - 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
  27. Jan 19, 2014
    • Jim's avatar
      Add preliminary ffmpeg plugin (still testing) · fc8851e9
      Jim authored
      - 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
  28. 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
  29. 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
  30. Jan 10, 2014
    • Jim's avatar
      Clean up code in audio-io.c · 3f0b352d
      Jim authored
      Clean up a little bit of code that was unnecessarily nested.  Still a
      little squishy but better than it was.
      3f0b352d
    • Jim's avatar
      Account for thread pauses for audio data · 4aa4858a
      Jim authored
       - In the audio I/O code, if there's a pause in the program or its
         threads (especially the audio thread), it'll cause it to sample too
         much data, and increase line->base_timestamp to a potentially higher
         value than the next audio timestamp that may be added to the line.
         This would cause it to crash originally, because it expects audio
         data that is within the designated buffering limit.
      
         Because that audio data cannot be filled by that data anyway, just
         ignore the audio data until it goes back to the right timing (which
         it will as long as the code that is using the line accounts for its
         current system time)
      4aa4858a
Loading