1. 07 Jul, 2019 1 commit
    • Haihao Xiang's avatar
      msdkenc: allow encode element requires extra frames · 12218984
      Haihao Xiang authored
      The call of MFXVideoENCODE_EncodeFrameAsync may not generate output and
      the function returns MFX_ERR_MORE_DATA with NULL sync point, the input
      frame is cached in this case, so it is possible that all allocated
      frames go into the surfaces_used list after calling
      MFXVideoENCODE_EncodeFrameAsync a few times, then the encoder will fail
      to get an available surface before releasing used frames
      
      This patch adds a new field of num_extra_frames to GstMsdkEnc and allows
      encode element requires extra frames, the default value is 0.
      
      This patch is the preparation for msdkvp9enc element.
      12218984
  2. 05 Jul, 2019 5 commits
  3. 04 Jul, 2019 13 commits
  4. 03 Jul, 2019 19 commits
    • Matthew Waters's avatar
      webrtcbin: use the latest self-generated SDP as the basis for renegotiations · cef83953
      Matthew Waters authored
      Fixes multiple errors when a webrtcbin renegotiation can switch between the
      offerer and the answerer.
      cef83953
    • Ederson de Souza's avatar
      avtp: Update documentation · f18fab0e
      Ederson de Souza authored
      f18fab0e
    • Ederson de Souza's avatar
      tests: Add AVTP CVF depayloader tests · a6fc6558
      Ederson de Souza authored
      In these tests, some specially crafted buffers are sent to the
      depayloader, simulating some scenarios and checking what comes out from
      it.
      a6fc6558
    • Ederson de Souza's avatar
      tests: Add AVTP CVF payloader tests · b34acc0c
      Ederson de Souza authored
      In these tests, some specially crafted buffers are sent to the
      payloader, simulating some scenarios and checking what comes out from
      it.
      b34acc0c
    • Andre Guedes's avatar
      tests: Add AVTP source tests · c427fd1a
      Andre Guedes authored
      This patch adds test cases for the AVTP source element. For now, only
      properties get() and set() are covered.
      c427fd1a
    • Andre Guedes's avatar
      tests: Add AVTP sink tests · e0deddbc
      Andre Guedes authored
      This patch adds test cases for the AVTP sink element. For now, only
      properties get() and set() are covered.
      e0deddbc
    • Andre Guedes's avatar
      tests: Add AAF depayloader tests · 82b6b0fa
      Andre Guedes authored
      This patch adds test cases for the AAF depayloader element covering the
      basic functionalities.
      82b6b0fa
    • Andre Guedes's avatar
      tests: Add AAF payloader tests · e09470fa
      Andre Guedes authored
      This patch adds the infrastructure to test AVTP plugin elements. It also
      adds a test case to check avtpaafpay element basic functionality. The
      test consists in setting the element sink caps and properties, and
      verifying if the output buffer is set as expected.
      e09470fa
    • Ederson de Souza's avatar
      docs: Add AVTP elements documentation · 5592ab17
      Ederson de Souza authored
      5592ab17
    • Ederson de Souza's avatar
      avtp: Add fragmented packets handling to CVF depayloader · 45624661
      Ederson de Souza authored
      This patch adds to the CVF depayloader the capability to regroup H.264
      fragmented FU-A packets.
      
      After all packets are regrouped, they are added to the "stash" of H.264
      NAL units that will be sent as soon as an AVTP packet with M bit set is
      found (usually, the last fragment).
      
      Unrecognized fragments (such as first fragment seen, but with no Start
      bit set) are discarded - and any NAL units on the "stash" are sent
      downstream, as if a SEQNUM discontinuty happened.
      45624661
    • Ederson de Souza's avatar
      avtp: Introduce AVTP CVF depayloader element · 45d2f5a7
      Ederson de Souza authored
      This patch introduces the AVTP Compressed Video Format (CVF) depayloader
      specified in IEEE 1722-2016 section 8. Currently, this depayloader only
      supports H.264 encapsulation described in section 8.5.
      
      Is also worth noting that only single NAL units are handled: aggregated
      and fragmented payloads are not handled.
      
      As stated in AVTP CVF payloader patch, AVTP timestamp is used to define
      outgoing buffer DTS, while the H264_TIMESTAMP defines outgoing buffer
      PTS.
      
      When an AVTP packet is received, the extracted H.264 NAL unit is added to
      a "stash" (the out_buffer) of H.264 NAL units. This "stash" is pushed
      downstream as single buffer (with NAL units aggregated according to format
      used on GStreamer, based on ISO/IEC 14496-15) as soon as we get the AVTP
      packet with M bit set.
      
      This patch groups NAL units using a fixed NAL size lenght, sent downstream
      on the `codec_data` capability.
      
      The "stash" of NAL units can be prematurely sent downstream if a
      discontinuity (a missing SEQNUM) happens.
      
      This patch reuses the infra provided by gstavtpbasedepayload.c.
      45d2f5a7
    • Ederson de Souza's avatar
      avtp: Add fragmentation feature to CVF payloader · b056297e
      Ederson de Souza authored
      Based on `mtu` property, the CVF payloader is now capable of properly
      fragmenting H.264 NAL units that are bigger than MTU in several AVTP
      packets.
      
      AVTP spec defines two methods for fragmenting H.264 packets, but this
      patch only generates non-interleaved FU-A fragments.
      
      Usually, only the last NAL unit from a group of NAL units in a single
      buffer will be big enough to be fragmented. Nevertheless, only the last
      AVTP packet sent for a group of NAL units will have the M bit set (this
      means that the AVTP packet for the last fragment will only have the M
      bit set if there's no more NAL units in the group).
      b056297e
    • Ederson de Souza's avatar
      avtp: Introduce AVTP CVF payloader element · 3b4f3a0b
      Ederson de Souza authored
      This patch introduces the AVTP Compressed Video Format (CVF) payloader
      specified in IEEE 1722-2016 section 8. Currently, this payload only
      supports H.264 encapsulation described in section 8.5.
      
      Is also worth noting that only single NAL units are encapsulated: no
      aggregation or fragmentation is performed by the payloader.
      
      An interesting characteristic of CVF H.264 spec is that it defines an
      H264_TIMESTAMP, in addition to the AVTP timestamp. The later is
      translated to the GST_BUFFER_DTS while the former is translated to the
      GST_BUFFER_PTS. From AVTP CVF H.264 spec, it is clear that the AVTP
      timestamp is related to the decoding order, while the H264_TIMESTAMP is
      an ancillary information to the H.264 decoder.
      
      Upon receiving a buffer containing a group of NAL units, the avtpcvfpay
      element will extract each NAL unit and payload them into individual AVTP
      packets. The last AVTP packet generated for a group of NAL units will
      have the M bit set, so the depayloader is able to properly regroup them.
      
      The exact format of the buffer of NAL units is described on the
      'codec_data' capability, which is parsed by the avtpcvfpay, in the same
      way done in rtph264pay.
      
      This patch reuses the infra provided by gstavtpbasepayload.c.
      3b4f3a0b
    • Andre Guedes's avatar
      avtp: Introduce AVTP source element · 5abe516c
      Andre Guedes authored
      This patch introduces the avtpsrc element which implements a typical
      network source. The avtpsrc element receives AVTPDUs encapsulated into
      Ethernet frames and push them downstream in the GStreamer pipeline.
      Implementation if pretty straightforward since the burden is implemented
      by GstPushSrc class.
      
      Likewise the avtpsink element, applications that utilize this element
      must have CAP_NET_RAW capability since it is required by Linux to open
      sockets from AF_PACKET domain.
      5abe516c
    • Andre Guedes's avatar
      avtp: Introduce AVTP sink element · 37550226
      Andre Guedes authored
      This patch introduces the avtpsink elements which implements a typical
      network sink. Implementation is pretty straightforward since the burden
      is implemented by GstBaseSink class.
      
      The avtpsink element defines three new properties: 1) network interface
      from where AVTPDU should be transmitted, 2) destination MAC address
      (usually a multicast address), and 3) socket priority (SO_PRIORITY).
      
      Socket setup and teardown are done in start/stop virtual methods while
      AVTPDU transmission is carried out by render(). AVTPDUs are encapsulated
      into Ethernet frames and transmitted to the network via AF_PACKET socket
      domain.  Linux requires CAP_NET_RAW capability in order to open an
      AF_PACKET socket so the application that utilize this element must have
      it. For further info about AF_PACKET socket domain see packet(7).
      
      Finally, AVTPDUs are expected to be transmitted at specific times -
      according to the GstBuffer presentation timestamp - so the 'sync'
      property from GstBaseSink is set to TRUE by default.
      37550226
    • Andre Guedes's avatar
      avtp: Introduce AAF depayloader element · 6477884a
      Andre Guedes authored
      This patch introduces the AAF depayloader element, the counterpart from
      the AAF payloader. As expected, this element inputs AVTPDUs and outputs
      audio raw data and supports AAF PCM encapsulation only.
      
      The AAF depayloader srcpad produces a fixed format that is encoded
      within the AVTPDU. Once the first AVTPDU is received by the element, the
      audio features e.g. sample format, rate, number of channels, are decoded
      and the srcpad caps are set accordingly. Also, at this point, the
      element pushes a SEGMENT event downstream defining the segment according
      to the AVTP presentation time.
      
      All AVTP depayloaders will share some common code. For that reason, this
      patch introduces the GstAvtpBaseDepayload abstract class that implements
      common depayloader functionalities. AAF-specific functionalities are
      implemented in the derived class GstAvtpAafDepay.
      6477884a
    • Andre Guedes's avatar
      avtp: Introduce AAF payloader element · 1e985f02
      Andre Guedes authored
      This patch introduces the AVTP Audio Format (AAF) payloader element from
      the AVTP plugin. The element inputs audio raw data and outputs AVTP
      packets (aka AVTPDUs), implementing a typical protocol payloader element
      from GStreamer.
      
      AAF is one of the available formats to transport audio data in an AVTP
      system. AAF is specified in IEEE 1722-2016 section 7 and provides two
      encapsulation mode: PCM and AES3. This patch implements PCM
      encapsulation mode only.
      
      The AAF payloader working mechanism consists of building the AAF header,
      prepending it to the GstBuffer received on the sink pad, and pushing the
      buffer downstream. Payloader parameters such as stream ID, maximum
      transit time, time uncertainty, and timestamping mode are passed via
      element properties. AAF doesn't support all possible sample format and
      sampling rate values so the sink pad caps template from the payloader is
      a subset of audio/x-raw. Additionally, this patch implements only
      "normal" timestamping mode from AAF. "Sparse" mode should be implemented
      in future.
      
      Upcoming patches will introduce other AVTP payloader elements that will
      have some common code. For that reason, this patch introduces the
      GstAvtpBasePayload abstract class that implements common payloader
      functionalities, and the GstAvtpAafPay class that extends the
      GstAvtpBasePayload class, implementing AAF-specific functionalities.
      
      The AAF payloader element is most likely to be used with the AVTP sink
      element (to be introduced by a later patch) but it could also be used
      with UDP sink element to implement AVTP over UDP as described in IEEE
      1722-2016 Annex J.
      
      This element was inspired by RTP payloader elements.
      1e985f02
    • Andre Guedes's avatar
      avtp: AVTP plugin bootstrap code · eaeab383
      Andre Guedes authored
      This patch introduces the bootstrap code from the AVTP plugin (plugin
      definition and init) as well as the build system files. Upcoming patches
      will introduce payloaders, source and sink elements provided by the AVTP
      plugin. These elements can be utilized by a GStreamer pipeline to
      implement TSN audio/video applications.
      
      Regarding the plugin build system files, both autotools and meson files
      are introduced. The AVTP plugin is landed in ext/ since it has an
      external dependency on libavtp, an opensource AVTP packetization
      library. For further information about libavtp check [1].
      
      [1] https://github.com/AVnu/libavtp
      eaeab383
    • Jan Schmidt's avatar
      h265parse: Don't segfault when SPS hasn't been seen yet. · bd46630b
      Jan Schmidt authored
      Fix a recently introduced segfault. Don't de-reference a NULL
      SPS pointer when attempting to update source caps before SPS
      has been seen in the stream.
      bd46630b
  5. 02 Jul, 2019 1 commit
    • OleksandrKvl's avatar
      irtspparse: handle multiple and incomplete frames · 9a39ba6a
      OleksandrKvl authored
      Interleaved frames can be fragmented between
      incoming frames. Thus, we can have multiple
      frames within the single input frame, as well as
      incomplete frame. Now it preserves parsing
      state and handle both situations.
      
      Fixes #991
      9a39ba6a
  6. 30 Jun, 2019 1 commit
    • Haihao Xiang's avatar
      msdk: don't share context between msdkvpp and msdkenc · 98e49673
      Haihao Xiang authored
      msdkenc supports CSC implicitly, so it is possible that two VPP
      processes are required when a pipeline contains msdkvpp and msdkenc.
      Before this fix, msdkvpp and msdkenc may share the same context, hence
      the same mfx session, which results in MFX_ERR_UNDEFINED_BEHAVIOR
      in MSDK because a mfx session has at most one VPP process only
      
      This fixes the broken pipelines below:
      
      gst-launch-1.0 videotestsrc ! video/x-raw,format=I420 ! msdkh264enc ! \
      msdkh264dec ! msdkvpp ! video/x-raw,format=YUY2 ! fakesink
      
      gst-launch-1.0 videotestsrc ! msdkvpp ! video/x-raw,format=YUY2 ! \
      msdkh264enc ! fakesink
      98e49673