23 lines
951 B
Protocol Buffer
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 对讲数据
syntax = "proto3";
package main;
option go_package = "./spb/talk";
// 注意这个包不应该使用请求响应(Req/Resp),应该用单向发送类型(RealTimeData),不等待响应。
// 在未收到对方的Ping或者其他情况即停止发送。
message TalkData {
// 内容类型枚举: 一张图传一帧H264一段G711
enum ContentTypeE {
Image = 0;
H264 = 1;
G711 = 2;
};
ContentTypeE ContentType = 1;
// 音视频数据例如PCM的字节或者H264的字节或者图片的字节
bytes Content = 2;
// 时间 毫秒例如第一帧视频就是0ms第2秒的第一帧就是1000ms
// 该字段仅用于协调音视频同步,而不是用于影响音视频播放时机
// 对于对讲场景,应该根据网络延迟和设备性能自行决定缓冲时长,在满足播放条件时立即进行渲染。
uint32 DurationMs = 3;
}