1. 07 5月, 2015 1 次提交
  2. 18 4月, 2015 1 次提交
    • J
      libobs: Add preferred video format encoder funcs · 1ee277ed
      jp9000 提交于
      Allows the ability to hint at encoders what format should be used.
      
      This is particularly useful if libobs is currently operating in planar
      4:4:4, but you want to force an encoder used for streaming to convert to
      NV12 to prevent streaming issues.
      1ee277ed
  3. 10 4月, 2015 4 次提交
  4. 26 3月, 2015 9 次提交
    • J
      libobs: Simplify comment · a7381666
      jp9000 提交于
      These are basically just capabilities of a source, that and too much
      text on one line.
      a7381666
    • J
      libobs: Add obs_get_source_output_flags function · c16f1a74
      jp9000 提交于
      Gets the output flags by its source type.
      c16f1a74
    • J
      libobs: Add API to hide/show scene items · 0d8ae565
      jp9000 提交于
      0d8ae565
    • J
      libobs: Add API to mute/unmute sources · e31fea66
      jp9000 提交于
      e31fea66
    • J
      libobs: Add ability to disable sources/filters · f04ef236
      jp9000 提交于
      f04ef236
    • J
      (API Change) Fix filter rendering design flaw · 44e484ad
      jp9000 提交于
      obs_source_process_filter tried to do everything in a single function,
      but the problem is that effect parameters would not properly be
      accounted for due to the way it internally draws, therefore it was
      necessary to split the functions in to two, you first call
      obs_source_process_filter_begin, then you set your effect parameters,
      then you finally call obs_source_process_filter_end.  This ensures that
      when the filter is drawn, that the effect parameters are set.
      44e484ad
    • J
      libobs: Add obs_source_skip_video_filter function · c2775eaa
      jp9000 提交于
      This allows a filter to skip its step and move on to the next target in
      the chain without affecting performance.
      c2775eaa
    • J
      libobs: Add API to get base source dimensions · b9eef3c4
      jp9000 提交于
      These functions are primarily for use with filters, filters need to be
      able to get the width/height of a target source without it necessarily
      getting the post-filtered dimensions.
      b9eef3c4
    • J
      libobs: Use reference counting with source frames · 26206f6a
      jp9000 提交于
      When a frame is processed by a filter, it comes directly from the
      source's video frame cache.  However, if a filter is using or processing
      those frames for whatever reason, there would be no guarantee that the
      frames would persist during processing, and frames could eventually be
      deallocated unexpected, for example when the resolution or format
      changes.
      
      So the solution is to implement simple reference counting for the frames
      so that the frames will exist until they have been released by any
      source or filter that's using them.
      26206f6a
  5. 23 3月, 2015 2 次提交
  6. 13 3月, 2015 1 次提交
    • J
      (API Change) Always use planar float audio output · 9832a760
      jp9000 提交于
      Core API functions changed:
      -----------------------------
      EXPORT bool obs_reset_audio(struct audio_output_info *aoi);
      EXPORT bool obs_get_audio_info(struct audio_output_info *aoi);
      
      To:
      -----------------------------
      EXPORT bool obs_reset_audio(const struct obs_audio_info *oai);
      EXPORT bool obs_get_audio_info(struct obs_audio_info *oai);
      
      Core structure added:
      -----------------------------
      struct obs_audio_info {
      	uint32_t            samples_per_sec;
      	enum speaker_layout speakers;
      	uint64_t            buffer_ms;
      };
      
      Non-interleaved (planar) floating point output is standard with audio
      filtering, so to prevent audio filters from having to worry about
      different audio format implementations and for the sake consistency
      between user interfaces, make it so that audio is always set to
      non-interleaved floating point output.
      9832a760
  7. 08 3月, 2015 1 次提交
    • J
      (API Change) Fix "apply service settings" functions · b03eae57
      jp9000 提交于
      API changed from:
      ------------------------
      EXPORT void obs_service_apply_encoder_settings(obs_service_t *service,
      		obs_encoder_t *video_encoder,
      		obs_encoder_t *audio_encoder);
      
      void obs_service_info::apply_encoder_settings(void *data
      			obs_encoder_t *video_encoder,
      			obs_encoder_t *audio_encoder);
      
      To:
      ------------------------
      EXPORT void obs_service_apply_encoder_settings(obs_service_t *service,
      		obs_data_t *video_encoder_settings,
      		obs_data_t *audio_encoder_settings);
      
      void obs_service_info::apply_encoder_settings(void *data
      			obs_data_t *video_encoder_settings,
      			obs_data_t *audio_encoder_settings);
      
      These changes make it so that instead of an encoder potentially being
      updated more than once with different settings, that these functions
      will be called for the specific settings being used, and the settings
      will be updated according to what's required by the service.
      
      This fixes that design flaw and ensures that there's no case where
      obs_encoder_update is called where the settings might not have
      service-specific settings applied.
      b03eae57
  8. 07 3月, 2015 3 次提交
  9. 05 3月, 2015 1 次提交
  10. 03 3月, 2015 1 次提交
    • J
      libobs: Add functions to show/hide sources · 7055775c
      jp9000 提交于
      obs_source_inc_showing and obs_source_dec_showing are used to indicate
      that a source is showing or no longer being shown in a particular area
      of the program outside from the main render view.
      
      One could use an obs_view, but I felt like it was unnecessary because
      using an obs_view just to display a single source feels somewhat
      superfluous.
      7055775c
  11. 11 2月, 2015 1 次提交
    • J
      libobs: Add API to apply service encoder settings · 4eacb5f3
      jp9000 提交于
      Instead of having services automatically apply encoder settings on
      initialization (whether the output wants to or not), instead make it
      something that must be explicitly called by the developer.  There are
      cases where the developer may not wish to apply the service-specific
      settings, or may wish to override them for whatever reason.
      4eacb5f3
  12. 08 2月, 2015 1 次提交
    • J
      (API Change) Fix obs_service_gettype func name · b72e68af
      jp9000 提交于
      Before:                After:
      obs_service_gettype    obs_service_get_type
      
      It seems there was an API function that was missed when we were doing
      our big API consistency update.  Unsquishes obs_service_gettype to
      obs_service_get_type.
      b72e68af
  13. 05 2月, 2015 5 次提交
    • J
      libobs: Add functions to get an encoder's type · bd76f165
      jp9000 提交于
      'obs_encoder_get_type' to get the type of an existing encoder, and
      'obs_get_encoder_type' to get the type via its identifier
      bd76f165
    • J
      libobs: Add obs_get_encoder_codec function · 0e398c89
      jp9000 提交于
      This allows the ability to get the codec of an encoder via its
      identifier string
      0e398c89
    • J
      libobs: Add obs_encoder_set_name function · c0c24ab2
      jp9000 提交于
      c0c24ab2
    • 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
    • J
      libobs: Clarify comment on obs_source_set_flags · e4fdd61c
      jp9000 提交于
      The comment says "these are different", but doesn't state why.
      Actually, I should really rename the output flags so they're not flags,
      but instead just "caps", because that's really all that they are.
      e4fdd61c
  14. 04 1月, 2015 1 次提交
    • J
      libobs: Allow disabling of async video texture · 8b065fd0
      jp9000 提交于
      If an async video source stops video for whatever reason, it would get
      stuck on the last frame that was played.  This was particularly awkward
      when I wanted to give the user the ability to deactivate a source such
      as a webcam because it would get stuck on the last frame.
      8b065fd0
  15. 03 1月, 2015 2 次提交
  16. 28 12月, 2014 4 次提交
    • 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
      (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: Prevent infinite source recursion · e29a1fd3
      jp9000 提交于
      Changed the design from using obs_source::enum_refs to just simply
      preventing infinite source recursion in general, rather than allowing it
      through the enum_refs variable.  obs_source_add_child has been changed
      so that it now returns a boolean, and if the function fails, it means
      that the child cannot be added due to that potential recursion.
      e29a1fd3
  17. 25 12月, 2014 1 次提交
    • J
      libobs: Fix export declaration name · 78c2129f
      jp9000 提交于
      obs_encoder_getdisplayname declaration was not changed to match the
      definition (obs_encoder_get_display_name) when the API consistency
      update occurred.
      78c2129f
  18. 15 12月, 2014 1 次提交
    • J
      (API Change) libobs: Add bicubic/lanczos scaling · c8822055
      jp9000 提交于
      This adds bicubic and lanczos scaling capability to libobs to improve
      scaling quality and sharpness when the output resolution has to be
      scaled relative to the base resolution.  Bilinear is also available,
      although bilinear has rather poor quality and causes scaling to appear
      blurry.
      
      If the output resolution is close to the base resolution, then bilinear
      is used instead as an optimization, as there's no need to use these
      shaders if scaling is not in use.
      
      The Bicubic and Lanczos effects are also exposed via exported function
      to allow the ability to use those shaders in plugin modules if desired.
      
      The API change adds a variable 'scale_type' to the obs_video_info
      structure that allows the user interface to choose what type of scaling
      filter should be used.
      c8822055