Insertable streams

150 views
Skip to first unread message

Christophe Chaillon

unread,
Jul 7, 2021, 12:28:46 PM7/7/21
to discuss-webrtc
Hi,

I already have a working webrtc application (C++, M89) which can send and receive streams.

I would like to add some information to each video frames.
I made a class which inherit of webrtc::FrameEncryptorInterface
and gave it to the RtpStreamSender using the method SetFrameEncryptor
Now the problem is that the method Encrypt of my class is never called.

I found that the call of Encrypt is cancelled in RTPSenderVideo::SendVideo by this condition :
  bool has_generic_descriptor =
      first_packet->HasExtension<RtpGenericFrameDescriptorExtension00>() ||
      first_packet->HasExtension<RtpDependencyDescriptorExtension>();

  if (frame_encryptor_ != nullptr) {
    if (!has_generic_descriptor) {
      return false;
    }

How can I add one of these extensions to pass the condition ?
Is there a better or a more simple way to add information to a frame ?

Regards,
Christophe Chaillon

Ivan Hutomo

unread,
Jul 31, 2022, 3:44:30 AMJul 31
to discuss-webrtc
Have you found any solution yet?

Artiom Khachaturian

unread,
Aug 16, 2022, 1:51:15 AMAug 16
to discuss-webrtc
check that webrtc::CryptoOptions::require_frame_encryption (which is a part of webrtc::PeerConnectionInterface::RTCConfiguration) is true

Ivan Hutomo

unread,
Aug 16, 2022, 1:54:21 AMAug 16
to discuss-webrtc
Hi, I already can implement simple XOR encryption using FrameEncryptor interface, it works really well until I try to use AES_GCM. When I used AES it cause a force close in my android application after a few seconds. Do you know any solution for this? What encryption method did you all use?
Reply all
Reply to author
Forward
0 new messages