chromium/chrome/browser/media/webrtc/webrtc_rtp_dump_writer.h

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_RTP_DUMP_WRITER_H_
#define CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_RTP_DUMP_WRITER_H_

#include <stddef.h>
#include <stdint.h>

#include <memory>

#include "base/files/file_path.h"
#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
#include "chrome/browser/media/webrtc/rtp_dump_type.h"

// This class is responsible for creating the compressed RTP header dump file:
// - Adds the RTP headers to an in-memory buffer.
// - When the in-memory buffer is full, compresses it, and writes it to the
//   disk.
// - Notifies the caller when the on-disk file size reaches the max limit.
// - The uncompressed dump follows the standard RTPPlay format
//   (http://www.cs.columbia.edu/irt/software/rtptools/).
// - The caller is always responsible for cleaning up the dump file in all
//   cases.
// - WebRtcRtpDumpWriter does not stop writing to the dump after the max size
//   limit is reached. The caller must stop calling WriteRtpPacket instead.
//
// This object must run on the IO thread.
class WebRtcRtpDumpWriter {};

#endif  // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_RTP_DUMP_WRITER_H_