Skip to content

v0.4.0

Compare
Choose a tag to compare
@sgfn sgfn released this 09 Aug 14:56
· 28 commits to master since this release
dc1ec48

Breaking changes

  • Packets sent in the {:rtcp, ...} message now come wrapped in a 2-element tuple. A new field denotes the ID of the corresponding track (the one to which the feedback is related), i.e.
  {:ex_webrtc, input_pc, {:rtcp, packets}} = msg

  for packet <- packets do
    case packet do
-     %ExRTCP.Packet.PayloadFeedback.PLI{} ->
+     {track_id, %ExRTCP.Packet.PayloadFeedback.PLI{}} ->
         # do something
  ...

In the case of PLI and NACK, this is the ID of an outgoing (sender's) track; in the case of Sender and Receiver Reports, it's the ID of an incoming (receiver's) track.

If matching to a track was not possible (like in the case of TWCC packets), track_id is set to nil, i.e.

  ...
-     %ExRTCP.Packet.TransportFeedback.CC{} ->
+     {nil, %ExRTCP.Packet.TransportFeedback.CC{}} ->
         # do something else
    end
  end
  • Supported payloaders (VP8, Opus) are now created and accessed using the same module: ExWebRTC.RTP.Payloader. The same applies to depayloaders (ExWebRTC.RTP.Depayloader):
  video_codec = %ExWebRTC.RTPCodecParameters{
    payload_type: 96,
    mime_type: "video/VP8",
    clock_rate: 90_000
  }

  audio_codec = %ExWebRTC.RTPCodecParameters{
    payload_type: 111,
    mime_type: "audio/opus",
    clock_rate: 48_000,
    channels: 2
  }

  # Creating (de)payloaders
- video_payloader = ExWebRTC.RTP.VP8.Payloader.new()
+ {:ok, video_payloader} = ExWebRTC.RTP.Payloader.new(video_codec)

+ {:ok, audio_depayloader} = ExWebRTC.RTP.Depayloader.new(audio_codec)

  # Using (de)payloaders
- {packets, video_payloader} = ExWebRTC.RTP.VP8.Payloader.payload(video_payloader, frame)
+ {packets, video_payloader} = ExWebRTC.RTP.Payloader.payload(video_payloader, frame)

- frame = ExWebRTC.RTP.Opus.Depayloader.depayload(packet)
+ {frame, audio_depayloader} = ExWebRTC.RTP.Depayloader.depayload(audio_depayloader, packet)

Refer to Payloader and Depayloader docs for more info.

What's Changed

  • Remove redundant FMTP specification from default codecs by @mickel8 in #125
  • Add RTP.Munger and H264 codec utilities by @LVala in #126
  • Update examples. Update ex_webrtc deps. by @mickel8 in #131
  • Fix examples sometimes not loading in Chromium by @mickel8 in #133
  • Improve inbound/outbound RTP stats by @LVala in #134
  • Fix: always include remote fingerprint in stats by @LVala in #135
  • Expose ICE port range by @mickel8 in #139
  • Add Introduction to Elixir WebRTC tutorial by @LVala in #136
  • Add track_id to packets sent in {:rtcp, ...} message by @LVala in #140
  • Further improvements to Introduction to Elixir WebRTC tutorial by @LVala in #141
  • Fix set_remote_description failing on description with rejected m-lines by @LVala in #145
  • Handle other retransmit case in DTLSTransport by @sgfn in #148
  • Add tutorial about debugging by @LVala in #146
  • Ignore lack of rtcp_mux in rejected m-lines by @LVala in #150
  • Add format parameters to default video codecs by @LVala in #153
  • Add simulcast tutorial by @mickel8 in #151
  • Add behaviour and dynamic dispatch for (de)payloaders by @sgfn in #147
  • Bump deps, release 0.4.0 by @sgfn in #155

Full Changelog: v0.3.0...v0.4.0