
This adds a class to read and write ACM_dump protobuf files. In this CL it is not hooked up to actually store any packets or debug events. The unittest writes two dummy RTP packets to disk and reads them to see if they contain the expected data. BUG=webrtc:4741 R=andrew@webrtc.org, henrik.lundin@webrtc.org, kjellander@webrtc.org, kwiberg@webrtc.org, tina.legrand@webrtc.org Review URL: https://webrtc-codereview.appspot.com/52059005 Cr-Commit-Position: refs/heads/master@{#9460}
78 lines
2.1 KiB
Protocol Buffer
78 lines
2.1 KiB
Protocol Buffer
syntax = "proto2";
|
|
option optimize_for = LITE_RUNTIME;
|
|
package webrtc;
|
|
|
|
// This is the main message to dump to a file, it can contain multiple event
|
|
// messages, but it is possible to append multiple EventStreams (each with a
|
|
// single event) to a file.
|
|
// This has the benefit that there's no need to keep all data in memory.
|
|
message ACMDumpEventStream {
|
|
repeated ACMDumpEvent stream = 1;
|
|
}
|
|
|
|
message ACMDumpEvent {
|
|
// required - Elapsed wallclock time in us since the start of the log.
|
|
optional int64 timestamp_us = 1;
|
|
|
|
// The different types of events that can occur, the UNKNOWN_EVENT entry
|
|
// is added in case future EventTypes are added, in that case old code will
|
|
// receive the new events as UNKNOWN_EVENT.
|
|
enum EventType {
|
|
UNKNOWN_EVENT = 0;
|
|
RTP_EVENT = 1;
|
|
DEBUG_EVENT = 2;
|
|
}
|
|
|
|
// required - Indicates the type of this event
|
|
optional EventType type = 2;
|
|
|
|
// optional - but required if type == RTP_EVENT
|
|
optional ACMDumpRTPPacket packet = 3;
|
|
|
|
// optional - but required if type == DEBUG_EVENT
|
|
optional ACMDumpDebugEvent debug_event = 4;
|
|
}
|
|
|
|
message ACMDumpRTPPacket {
|
|
// Indicates if the packet is incoming or outgoing with respect to the user
|
|
// that is logging the data.
|
|
enum Direction {
|
|
UNKNOWN_DIRECTION = 0;
|
|
OUTGOING = 1;
|
|
INCOMING = 2;
|
|
}
|
|
enum PayloadType {
|
|
UNKNOWN_TYPE = 0;
|
|
AUDIO = 1;
|
|
VIDEO = 2;
|
|
RTX = 3;
|
|
}
|
|
|
|
// required
|
|
optional Direction direction = 1;
|
|
|
|
// required
|
|
optional PayloadType type = 2;
|
|
|
|
// required - Contains the whole RTP packet (header+payload).
|
|
optional bytes RTP_data = 3;
|
|
}
|
|
|
|
message ACMDumpDebugEvent {
|
|
// Indicates the type of the debug event.
|
|
// LOG_START and LOG_END indicate the start and end of the log respectively.
|
|
// AUDIO_PLAYOUT indicates a call to the PlayoutData10Ms() function in ACM.
|
|
enum EventType {
|
|
UNKNOWN_EVENT = 0;
|
|
LOG_START = 1;
|
|
LOG_END = 2;
|
|
AUDIO_PLAYOUT = 3;
|
|
}
|
|
|
|
// required
|
|
optional EventType type = 1;
|
|
|
|
// An optional message that can be used to store additional information about
|
|
// the debug event.
|
|
optional string message = 2;
|
|
} |