webrtc_m130/webrtc/test/rtp_file_reader.h
pbos@webrtc.org 4b5625e5ac RTP video playback tool using Call APIs.
Plays back rtpdump files from Wireshark in realtime as well as save the
resulting raw video to file. Unlike the RTP playback tool it doesn't
support faster-than-realtime playback/rendering, but it instead utilizes
the same path as production code and also contains support for playing
back FEC.

BUG=
R=stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/16969004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6838 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-08-06 16:26:56 +00:00

43 lines
1.1 KiB
C++

/*
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_TEST_RTP_FILE_READER_H_
#define WEBRTC_TEST_RTP_FILE_READER_H_
#include <string>
#include "webrtc/common_types.h"
namespace webrtc {
namespace test {
class RtpFileReader {
public:
enum FileFormat {
kPcap,
kRtpDump,
};
struct Packet {
static const size_t kMaxPacketBufferSize = 1500;
uint8_t data[kMaxPacketBufferSize];
size_t length;
uint32_t time_ms;
};
virtual ~RtpFileReader() {}
static RtpFileReader* Create(FileFormat format,
const std::string& filename);
virtual bool NextPacket(Packet* packet) = 0;
};
} // namespace test
} // namespace webrtc
#endif // WEBRTC_TEST_RTP_FILE_READER_H_