Skip to content
Snippets Groups Projects
  1. Jul 01, 2020
    • George Joseph's avatar
      Streams: Add features for Advanced Codec Negotiation · 8d1064ea
      George Joseph authored
      The Streams API becomes the home for the core ACN capabilities.
      These include...
      
       * Parsing and formatting of codec negotation preferences.
       * Resolving pending streams and topologies with those configured
         using configured preferences.
       * Utility functions for creating string representations of
         streams, topologies, and negotiation preferences.
      
      For codec negotiation preferences:
       * Added ast_stream_codec_prefs_parse() which takes a string
         representation of codec negotiation preferences, which
         may come from a pjsip endpoint for example, and populates
         a ast_stream_codec_negotiation_prefs structure.
       * Added ast_stream_codec_prefs_to_str() which does the reverse.
       * Added many functions to parse individual parameter name
         and value strings to their respectrive enum values, and the
         reverse.
      
      For streams:
       * Added ast_stream_create_resolved() which takes a "live" stream
         and resolves it with a configured stream and the negotiation
         preferences to create a new stream.
       * Added ast_stream_to_str() which create a string representation
         of a stream suitable for debug or display purposes.
      
      For topology:
       * Added ast_stream_topology_create_resolved() which takes a "live"
         topology and resolves it, stream by stream, with a configured
         topology stream and the negotiation preferences to create a new
         topology.
       * Added ast_stream_topology_to_str() which create a string
         representation of a topology suitable for debug or display
         purposes.
       * Renamed ast_format_caps_from_topology() to
         ast_stream_topology_get_formats() to be more consistent with
         the existing ast_stream_get_formats().
      
      Additional changes:
       * A new function ast_format_cap_append_names() appends the results
         to the ast_str buffer instead of replacing buffer contents.
      
      Change-Id: I2df77dedd0c72c52deb6e329effe057a8e06cd56
      8d1064ea
  2. Apr 17, 2018
    • George Joseph's avatar
      streams: Add string metadata capability · f79a3729
      George Joseph authored
      Replaces the never used opaque data array.
      
      Updated stream tests to include get/set metadata and
      stream clone with metadata.
      
      Added stream metadata dump to "core show channel"
      
      Change-Id: Id7473aa4b374d7ab53046c20e321037ba9a56863
      f79a3729
  3. Aug 22, 2017
    • Richard Mudgett's avatar
      channel: Fix topology API locking. · 9c70c883
      Richard Mudgett authored
      * ast_channel_request_stream_topology_change() must not be called with any
      channel locks held.
      
      * ast_channel_stream_topology_changed() must be called with only the
      passed channel lock held.
      
      ASTERISK-27212
      
      Change-Id: I843de7956d9f1cc7cc02025aea3463d8fe19c691
      9c70c883
  4. Aug 04, 2017
    • Corey Farrell's avatar
      Correct some leaks in unit tests. · 7f8f3ca4
      Corey Farrell authored
      * chan_sip: channel in test_sip_rtpqos_1.
      * test_config: config hook, config info and global config holder.
      * test_core_format: format in format_attribute_set_without_interface.
      * test_stream: unneeded frame duplication.
      * test_taskprocessor: task_data.
      
      Change-Id: I94d364d195cf3b3b5de2bf3ad565343275c7ad31
      7f8f3ca4
  5. Jun 15, 2017
  6. May 03, 2017
    • Kevin Harwell's avatar
      bridge_simple: Added support for streams · 7b0e3b92
      Kevin Harwell authored
      This patch is the first cut at adding stream support to the bridging framework.
      Changes were made to the framework that allows mapping of stream topologies to
      a bridge's supported media types.
      
      The first channel to enter a bridge initially defines the media types for a
      bridge (i.e. a one to one mapping is created between the bridge and the first
      channel). Subsequently added channels merge their media types into the bridge's
      adding to it when necessary. This allows channels with different sized
      topologies to map correctly to each other according to media type. The bridge
      drops any frame that does not have a matching index into a given write stream.
      
      For now though, bridge_simple will align its two channels according to size or
      first to join. Once both channels join the bridge the one with the most streams
      will indicate to the other channel to update its streams to be the same as that
      of the other. If both channels have the same number of streams then the first
      channel to join is chosen as the stream base.
      
      A topology change source was also added to a channel when a stream toplogy
      change request is made. This allows subsystems to know whether or not they
      initiated a change request. Thus avoiding potential recursive situations.
      
      ASTERISK-26966 #close
      
      Change-Id: I1eb5987921dd80c3cdcf52accc136393ca2d4163
      7b0e3b92
  7. Apr 27, 2017
    • Joshua Colp's avatar
      channel: Add ability to request an outgoing channel with stream topology. · 2b22c3c8
      Joshua Colp authored
      This change extends the ast_request functionality by adding another
      function and callback to create an outgoing channel with a requested
      stream topology. Fallback is provided by either converting the
      requested stream topology into a format capabilities structure if
      the channel driver does not support streams or by converting the
      requested format capabilities into a stream topology if the channel
      driver does support streams.
      
      The Dial application has also been updated to request an outgoing
      channel with the stream topology of the calling channel.
      
      ASTERISK-26959
      
      Change-Id: Ifa9037a672ac21d42dd7125aa09816dc879a70e6
      2b22c3c8
  8. Mar 07, 2017
    • Joshua Colp's avatar
      core: Add stream topology changing primitives with tests. · 3ed05bad
      Joshua Colp authored
      This change adds a few things to facilitate stream topology changing:
      
      1. Control frame types have been added for use by the channel driver
      to notify the application that the channel wants to change the stream
      topology or that a stream topology change has been accepted. They are
      also used by the indicate interface to the channel that the application
      uses to indicate it wants to do the same.
      
      2. Legacy behavior has been adopted in ast_read() such that if a
      channel requests a stream topology change it is denied automatically
      and the current stream topology is preserved if the application is
      not capable of handling streams.
      
      Tests have also been written which confirm the multistream and
      non-multistream behavior.
      
      ASTERISK-26839
      
      Change-Id: Ia68ef22bca8e8457265ca4f0f9de600cbcc10bc9
      3ed05bad
  9. Mar 01, 2017
    • George Joseph's avatar
      stream: Unit tests for stream read and tweaks framework · 0560c323
      George Joseph authored
      * Removed the AST_CHAN_TP_MULTISTREAM tech property.  We now rely
        on read_stream being set to indicate a multi stream channel.
      * Added ast_channel_is_multistream convenience function.
      * Fixed issue where stream and default_stream weren't being set on
        a frame retrieved from the queue.
      * Now testing for NULL being returned from the driver's read or
        read_stream callback.
      * Fixed issue where the dropnondefault code was crashing on a
        NULL f.
      * Now enforcing that if either read_stream or write_stream are
        set when ast_channel_tech_set is called that BOTH are set.
      * Added the unit tests.
      
      ASTERISK-26816
      
      Change-Id: If7792b20d782e71e823dabd3124572cf0a4caab2
      0560c323
  10. Feb 23, 2017
    • Joshua Colp's avatar
      channel: Add support for writing to a specific stream. · 6cc890b8
      Joshua Colp authored
      This change adds an ast_write_stream function which allows
      writing a frame to a specific media stream. It also moves
      ast_write() to using this underneath by writing media
      frames provided to it to the default streams of the channel.
      Existing functionality (such as audiohooks, framehooks, etc)
      are limited to being applied to the default stream only.
      
      Unit tests have also been added which test the behavior of
      both non-multistream and multistream channels to confirm that
      the write() and write_stream() callbacks are invoked
      appropriately.
      
      ASTERISK-26793
      
      Change-Id: I4df20d1b65bd4d787fce0b4b478e19d2dfea245c
      6cc890b8
  11. Feb 16, 2017
  12. Feb 15, 2017
    • Joshua Colp's avatar
      stream: Add unit tests for channel stream usage. · a9c15a0e
      Joshua Colp authored
      This change adds unit tests cover the following:
      
      1. That retrieving the first media stream of a specific media
      type from a stream topology retrieves the expected media
      stream.
      
      2. That setting the native formats of a channel which does
      not support streams results in the creation of streams on
      its behalf according to the formats of the channel.
      
      3. That setting a stream topology on a channel which supports
      streams sets the topology to the provided one.
      
      ASTERISK-26790
      
      Change-Id: Ic53176dd3e4532e8c3e97d9e22f8a4b66a2bb755
      a9c15a0e
  13. Feb 13, 2017
    • Joshua Colp's avatar
      stream: Add stream topology unit tests and fix uncovered bugs. · 6c4657e2
      Joshua Colp authored
      This change adds unit tests for the various API calls relating
      to stream topologies. This includes creation, destruction,
      inspection, and manipulation.
      
      Through this a few bugs were uncovered in the implementation:
      
      1. Creating a topology using a format capabilities would fail as
      the code considered a return value of 0 from the append stream
      function to indicate an error which is incorrect.
      
      2. Not all functions which placed a stream into a topology
      set the position on the stream itself.
      
      3. Appending a stream would cause a frack if the position
      provided was the last one. This occurred because the existing
      stream was queried but the index was outside of what the
      vector was currently at for size.
      
      ASTERISK-26786
      
      Change-Id: Id5590e87c8a605deea1a89e53169a9c011d66fa0
      6c4657e2
  14. Feb 10, 2017
Loading