author Sebastian Hengst <>
Tue, 26 Mar 2019 21:38:23 +0100
changeset 466339 07595d5c98d2137f0a7dd4334b0c315988b8642e
parent 448947 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Backed out changeset f9c865b93ecd (bug 1533777) because it landed with the wrong patch author. a=backout

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at */

#ifndef transportlayersrtp_h__
#define transportlayersrtp_h__

#include <string>

#include "transportlayer.h"
#include "mozilla/RefPtr.h"
#include "SrtpFlow.h"

namespace mozilla {

class TransportLayerDtls;

class TransportLayerSrtp final : public TransportLayer {
  explicit TransportLayerSrtp(TransportLayerDtls& dtls);
  virtual ~TransportLayerSrtp(){};

  // Transport layer overrides.
  void WasInserted() override;
  TransportResult SendPacket(MediaPacket& packet) override;

  // Signals
  void StateChange(TransportLayer* layer, State state);
  void PacketReceived(TransportLayer* layer, MediaPacket& packet);


  bool Setup();
  RefPtr<SrtpFlow> mSendSrtp;
  RefPtr<SrtpFlow> mRecvSrtp;

}  // namespace mozilla