1. 03 1月, 2015 22 次提交
    • J
      UI: Add crash report dialog · 824c7b02
      jp9000 提交于
      This crash report dialog is mostly just for the windows crash handling
      code.  If a crash occurs, the user will be able to view the crash report
      and post it on the forums or give it to a developer for debugging
      purposes.
      824c7b02
    • J
      libobs: Add win32 crash handler · e3068ed9
      jp9000 提交于
      A slightly refactored version of R1CH's crash handler, allows crash
      handling for windows which provides stack traces of all threads and a
      list of all loaded modules.  Also shows the processor, windows version,
      and current libobs version.
      e3068ed9
    • J
      Set various thread names · f93b2fe7
      jp9000 提交于
      Helps identify which threads are which when debugging
      f93b2fe7
    • J
      libobs: Add ability to set thread names · 144fb925
      jp9000 提交于
      144fb925
    • J
      obs-x264: Fix color space/range not being set · 3259a683
      jp9000 提交于
      I originally had it set the color space and color range in the video
      info callback, but I forgot that it's a function that's called after the
      encoder is initialized.  You can change the color space and color range,
      but you have to reconfigure the encoder, and there's no real reason to
      do that.
      3259a683
    • J
      libobs: Use def. colorspace when scaling encoder · 92c15401
      jp9000 提交于
      When the encoder is set to scale to a different resolution than the obs
      output resolution, make sure it uses the current video colorspace and
      range by default.
      92c15401
    • J
      win-capture: Add win8+ monitor capture · f466e9ec
      jp9000 提交于
      Uses the output duplicator API in order to get a high performance
      monitor capture on windows 8+.  This is actually designed to be
      interchangeable with regular GDI-based monitor capture (uses the same
      source id).
      f466e9ec
    • J
      win-capture: Don't draw cursor if outside area · d3abdf39
      jp9000 提交于
      d3abdf39
    • J
      win-dshow: Add buffering options · d6e98829
      jp9000 提交于
      Allow the user to select whether to buffer the source or not.  The
      settings are auto-detect, on, and off.  Auto-Detect turns it off for
      non-encoded devices, and on for encoded devices.
      
      Webcams, internal devices, and other such things on windows do not
      really need to be buffered, and buffering incurs a tiny bit of delay, so
      turning off buffering is actually a little better for non-encoded
      devices.
      d6e98829
    • J
      libobs: Add wstrstri function · a87fe6d7
      jp9000 提交于
      Performs a case-insensitive search for a wide-character string within
      another wide-character string.
      a87fe6d7
    • J
      libobs: Make astrstri a bit more C-compliant · 9a91bbc1
      jp9000 提交于
      I actually kind of hate how strstr returns a non-const even though it
      takes a const parameter, but I can understand why they made it that way.
      They really should have split it in to two functions though, one const
      and one non-const or something.  But alas, ultimately for a C programmer
      who knows what they're doing it isn't a huge deal.
      9a91bbc1
    • J
      libobs: Add obs_source_set_default_flags · f2287c8a
      jp9000 提交于
      This allows sources to set default flags on creation without interfering
      with user set flags
      f2287c8a
    • J
      libobs: Add obs_source_showing function · eac55edc
      jp9000 提交于
      This allows the ability to see whether the source is being displayed
      somewhere (though not necessarily active in the main output)
      eac55edc
    • J
      libobs: Fix potential null pointer dereference · fd8f8cfd
      jp9000 提交于
      fd8f8cfd
    • J
      libobs: Fix crash if missing plugin for a source · e14050bb
      jp9000 提交于
      I forgot that the info variable may be intentionally NULL if a source's
      plugin in missing.
      e14050bb
    • J
      libobs: Add output duplicator support · 44b8c24f
      jp9000 提交于
      This adds support for the windows 8+ output duplicator feature which
      allows the efficient capturing of a specific monitor connected to the
      currently used device.
      44b8c24f
    • J
      libobs-d3d11: Move DXGI -> GS format conversion · a5447b5f
      jp9000 提交于
      Move the DXGI -> GS format conversion function to d3d11-subsystem.hpp
      instead of being exclusively in the d3d11-texture2d.cpp function.
      a5447b5f
    • J
      Merge pull request #321 from fryshorts/volume-handling-fixes · 92659ba6
      Jim 提交于
      Volume change signal fixes
      92659ba6
    • J
      Merge pull request #320 from 2mac/master · 39034edd
      Jim 提交于
      Update INSTALL
      39034edd
    • F
      obs: Fix signal in advanced volume controls · 10a0b08e
      fryshorts 提交于
      Suppress signals of the volume input when setting a value. This stops
      the volume control from setting the source volume when it receives the
      volume changed event from the source.
      10a0b08e
    • F
      obs: Fix signal in volume control · 89792865
      fryshorts 提交于
      Suppress signals of the volume slider when setting a value. This stops
      the volume control from setting the source volume when it receives the
      volume changed event from the source.
      89792865
    • F
      obs: Fix label in volume control · 0f8b2fae
      fryshorts 提交于
      Use a dedicated method for setting the dB label in the volume control
      and make sure to call it regardless if the volume was changed through
      the slider or from somewhere else.
      0f8b2fae
  2. 31 12月, 2014 6 次提交
    • J
      libobs: Redesign/optimize frame encoding handling · 11106c2f
      jp9000 提交于
      Previously, the design for the interaction between the encoder thread
      and the graphics thread was that the encoder thread would signal to the
      graphics thread when to start drawing each frame.  The original idea
      behind this was to prevent mutually cascading stalls of encoding or
      graphics rendering (i.e., if rendering took too long, then encoding
      would have to catch up, then rendering would have to catch up again, and
      so on, cascading upon each other).  The ultimate goal was to prevent
      encoding from impacting graphics and vise versa.
      
      However, eventually it was realized that there were some fundamental
      flaws with this design.
      
      1. Stray frame duplication.  You could not guarantee that a frame would
         render on time, so sometimes frames would unintentionally be lost if
         there was any sort of minor hiccup or if the thread took too long to
         be scheduled I'm guessing.
      
      2. Frame timing in the rendering thread was less accurate.  The only
         place where frame timing was accurate was in the encoder thread, and
         the graphics thread was at the whim of thread scheduling.  On higher
         end computers it was typically fine, but it was just generally not
         guaranteed that a frame would be rendered when it was supposed to be
         rendered.
      
      So the solution (originally proposed by r1ch and paibox) is to instead
      keep the encoding and graphics threads separate as usual, but instead of
      the encoder thread controlling the graphics thread, the graphics thread
      now controls the encoder thread.  The encoder thread keeps a limited
      cache of frames, then the graphics thread copies frames in to the cache
      and increments a semaphore to schedule the encoder thread to encode that
      data.
      
      In the cache, each frame has an encode counter.  If the frame cache is
      full (e.g., the encoder taking too long to return frames), it will not
      cache a new frame, but instead will just increment the counter on the
      last frame in the cache to schedule that frame to encode again, ensuring
      that frames are on time and reducing CPU usage by lowering video
      complexity.  If the graphics thread takes too long to render a frame,
      then it will add that frame with the count value set to the total amount
      of frames that were missed (actual legitimately duplicated frames).
      
      Because the cache gives many frames of breathing room for the encoder to
      encode frames, this design helps improve results especially when using
      encoding presets that have higher complexity and CPU usage, minimizing
      the risk of needlessly skipped or duplicated frames.
      
      I also managed to sneak in what should be a bit of an optimization to
      reduce copying of frame data, though how much of an optimization it
      ultimately ends up being is debatable.
      
      So to sum it up, this commit increases accuracy of frame timing,
      completely removes stray frame duplication, gives better results for
      higher complexity encoding presets, and potentially optimizes the frame
      pipeline a tiny bit.
      11106c2f
    • J
      libobs: Fix bug with frame output handling · 11dd7912
      jp9000 提交于
      The boolean variables which stored whether frames have been
      rendered/downloaded/converted/etc were not being reset when video
      restarted, causing frames to not be sent in the correct order whenever
      video was reset.  This could lead to minor desync of video/audio.
      11dd7912
    • J
      obs-outputs: Fix FLV corruption bug · a7d2450d
      jp9000 提交于
      The 'sent_headers' member variable of the FLV output would not be reset
      when the output was restarted, causing important data to not be written,
      thus creating an invalid FLV file.
      a7d2450d
    • J
      libobs: Fix potential crash on output stop · 24428033
      jp9000 提交于
      In certain circumstances where the output was stopping, and where data
      took a long enough time to send (such as when using an encoding preset
      that causes high CPU usage), the output would sometimes still send data
      even after it was stopped, typically causing the output to crash.
      24428033
    • J
      libobs/media-io: Add frame copying function · 8e154982
      jp9000 提交于
      8e154982
    • J
      libobs/media-io: Add #pragma once to video-frame.h · 5d0551eb
      jp9000 提交于
      5d0551eb
  3. 30 12月, 2014 1 次提交
  4. 29 12月, 2014 1 次提交
  5. 28 12月, 2014 10 次提交
    • J
      libobs: Fix force mono channel count · caa62510
      jp9000 提交于
      I unintentionally made it use obs_source::sample_info instead of using
      the actual target channel count, which is designated by the OBS output
      sampler info.  obs_source::sample_info is actually used to indicate the
      currently set sampler information for incoming samples.  So if a source
      is outputting 5.1 channel 48khz audio, and OBS is running at stereo
      44.1khz, then the obs_source::sample_info value would be set to
      5.1/48khz, not the other way around.  It indicates what the source
      itself is running at, not what OBS is running at.
      
      I suppose the variable needs a better name because even I used it
      incorrectly despite actually having been the one who wrote it.
      caa62510
    • J
      UI: Add advanced audio properties dialog · 6fc52dfb
      jp9000 提交于
      This dialog gives options such as increasing audio past 100%, forcing
      the audio of a source to mono, and setting the audio sync offset of a
      source (which was an oft-requested feature)
      6fc52dfb
    • J
      libobs: Remove inline on a function · ce6a1146
      jp9000 提交于
      The copy_audio_data function really shouldn't be inlined because it's
      being called twice.  It's somewhat unnecessary, I think I left it inline
      by accident.
      ce6a1146
    • J
      libobs: Add flag to force source audio to mono · 63c43b64
      jp9000 提交于
      This flag is actually useful under a number of circumstances, and has
      been requested a number of times.
      63c43b64
    • J
      libobs: Refactor source volume transition design · c431ac6a
      jp9000 提交于
      This changes the way source volume handles transitioning between being
      active and inactive states.
      
      The previous way that transitioning handled volume was that it set the
      presentation volume of the source and all of its sub-sources to 0.0 if
      the source was inactive, and 1.0 if active.  Transition sources would
      then also set the presentation volume for sub-sources to whatever their
      transitioning volume was.  However, the problem with this is that the
      design didn't take in to account if the source or its sub-sources were
      active anywhere else, so because of that it would break if that ever
      happened, and I didn't realize that when I was designing it.
      
      So instead, this completely overhauls the design of handling
      transitioning volume.  Each frame, it'll go through all sources and
      check whether they're active or inactive and set the base volume
      accordingly.  If transitions are currently active, it will actually walk
      the active source tree and check whether the source is in a
      transitioning state somewhere.
      
       - If the source is a sub-source of a transition, and it's not active
         outside of the transition, then the transition will control the
         volume of the source.
      
       - If the source is a sub-source of a transition, but it's also active
         outside of the transition, it'll defer to whichever is louder.
      
      This also adds a new callback to the obs_source_info structure for
      transition sources, get_transition_volume, which is called to get the
      transitioning volume of a sub-source.
      c431ac6a
    • J
      libobs: Keep transition reference counter · 10f89886
      jp9000 提交于
      The reason to keep a reference counter for transitions is due to an
      optimization I'm planning on when calculating transition volumes.  I'm
      planning on walking the source tree to be able to calculate the current
      base volume of a source, but *only* if there are transitions active,
      because the only time that the volume can be anything other than 1.0
      or 0.0 is when there are active transitions, which may change the base
      volume of a source.
      10f89886
    • J
      (API Change) libobs: Add _FLAG to source flags · 6eab6cef
      jp9000 提交于
      Changes OBS_SOURCE_UNBUFFERED to OBS_SOURCE_FLAG_UNBUFFERED to make
      naming a bit better for source flags.
      6eab6cef
    • J
      libobs: Save/load source audio sync and flags · fb09db43
      jp9000 提交于
      When a source is being saved, include the audio sync as well as the
      flags.
      fb09db43
    • J
      libobs: Do not set presentation volume on children · 48210d41
      jp9000 提交于
      When the presentation volume is set for a source, it's set for all of
      its children and their children.  The original intention for doing this
      was to be able to use it for transitioning, but honestly it's just bad
      design, and I feel there are better ways to handle transitioning volume.
      48210d41
    • J
      libobs: Add 'audio_sync' source signal · fb6f8721
      jp9000 提交于
      Adds a signal is called when the sync offset has changed for a source.
      fb6f8721