tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

RtpLogger.h (825B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 // Original author: nohlmeier@mozilla.com
      6 
      7 #ifndef rtplogger_h__
      8 #define rtplogger_h__
      9 
     10 #include "transport/mediapacket.h"
     11 
     12 namespace mozilla {
     13 
     14 /* This class logs RTP and RTCP packets in hex in a format compatible to
     15 * text2pcap.
     16 * Example to convert the MOZ log file into a PCAP file:
     17 *   egrep '(RTP_PACKET|RTCP_PACKET)' moz.log | \
     18 *     text2pcap -D -n -l 1 -i 17 -u 1234,1235 -t '%H:%M:%S.' - rtp.pcap
     19 */
     20 class RtpLogger {
     21 public:
     22  static bool IsPacketLoggingOn();
     23  static void LogPacket(const MediaPacket& packet, bool input,
     24                        std::string desc);
     25 };
     26 
     27 }  // namespace mozilla
     28 #endif