Documentation ¶
Index ¶
- Variables
- type BinaryFrame
- type CmdPullRequest
- func (*CmdPullRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CmdPullRequest) GetClientId() string
- func (x *CmdPullRequest) GetId() string
- func (x *CmdPullRequest) GetParams() string
- func (*CmdPullRequest) ProtoMessage()
- func (x *CmdPullRequest) ProtoReflect() protoreflect.Message
- func (x *CmdPullRequest) Reset()
- func (x *CmdPullRequest) String() string
- type CmdPullResponse
- func (*CmdPullResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CmdPullResponse) GetCodec() *Codec
- func (x *CmdPullResponse) GetMessage() string
- func (x *CmdPullResponse) GetSuccess() bool
- func (*CmdPullResponse) ProtoMessage()
- func (x *CmdPullResponse) ProtoReflect() protoreflect.Message
- func (x *CmdPullResponse) Reset()
- func (x *CmdPullResponse) String() string
- type Codec
- type DataHeartbeat
- func (*DataHeartbeat) Descriptor() ([]byte, []int)deprecated
- func (x *DataHeartbeat) GetId() string
- func (x *DataHeartbeat) GetTimestamp() int64
- func (x *DataHeartbeat) GetVersion() string
- func (*DataHeartbeat) ProtoMessage()
- func (x *DataHeartbeat) ProtoReflect() protoreflect.Message
- func (x *DataHeartbeat) Reset()
- func (x *DataHeartbeat) String() string
- type MediaFrame
- type Packet
- type PacketType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PacketType_name = map[int32]string{ 0: "PacketType_PullCmd", 1: "PacketType_CodecFrame", 2: "PacketType_MediaFrame", 3: "PacketType_BinaryFrame", 255: "PacketType_Heartbeat", } PacketType_value = map[string]int32{ "PacketType_PullCmd": 0, "PacketType_CodecFrame": 1, "PacketType_MediaFrame": 2, "PacketType_BinaryFrame": 3, "PacketType_Heartbeat": 255, } )
Enum value maps for PacketType.
View Source
var File_pb_message_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BinaryFrame ¶
type BinaryFrame struct { Src string `protobuf:"bytes,1,opt,name=src,proto3" json:"src,omitempty"` // 数据源标识 Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // 数据内容 // contains filtered or unexported fields }
二进制数据帧
func (*BinaryFrame) Descriptor
deprecated
func (*BinaryFrame) Descriptor() ([]byte, []int)
Deprecated: Use BinaryFrame.ProtoReflect.Descriptor instead.
func (*BinaryFrame) GetContent ¶
func (x *BinaryFrame) GetContent() []byte
func (*BinaryFrame) GetSrc ¶
func (x *BinaryFrame) GetSrc() string
func (*BinaryFrame) ProtoMessage ¶
func (*BinaryFrame) ProtoMessage()
func (*BinaryFrame) ProtoReflect ¶
func (x *BinaryFrame) ProtoReflect() protoreflect.Message
func (*BinaryFrame) Reset ¶
func (x *BinaryFrame) Reset()
func (*BinaryFrame) String ¶
func (x *BinaryFrame) String() string
type CmdPullRequest ¶
type CmdPullRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 流ID ClientId string `protobuf:"bytes,2,opt,name=clientId,proto3" json:"clientId,omitempty"` // 客户端ID Params string `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` // 额外参数 // contains filtered or unexported fields }
拉流请求
func (*CmdPullRequest) Descriptor
deprecated
func (*CmdPullRequest) Descriptor() ([]byte, []int)
Deprecated: Use CmdPullRequest.ProtoReflect.Descriptor instead.
func (*CmdPullRequest) GetClientId ¶
func (x *CmdPullRequest) GetClientId() string
func (*CmdPullRequest) GetId ¶
func (x *CmdPullRequest) GetId() string
func (*CmdPullRequest) GetParams ¶
func (x *CmdPullRequest) GetParams() string
func (*CmdPullRequest) ProtoMessage ¶
func (*CmdPullRequest) ProtoMessage()
func (*CmdPullRequest) ProtoReflect ¶
func (x *CmdPullRequest) ProtoReflect() protoreflect.Message
func (*CmdPullRequest) Reset ¶
func (x *CmdPullRequest) Reset()
func (*CmdPullRequest) String ¶
func (x *CmdPullRequest) String() string
type CmdPullResponse ¶
type CmdPullResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Codec *Codec `protobuf:"bytes,3,opt,name=codec,proto3" json:"codec,omitempty"` //编码信息 // contains filtered or unexported fields }
拉流响应
func (*CmdPullResponse) Descriptor
deprecated
func (*CmdPullResponse) Descriptor() ([]byte, []int)
Deprecated: Use CmdPullResponse.ProtoReflect.Descriptor instead.
func (*CmdPullResponse) GetCodec ¶
func (x *CmdPullResponse) GetCodec() *Codec
func (*CmdPullResponse) GetMessage ¶
func (x *CmdPullResponse) GetMessage() string
func (*CmdPullResponse) GetSuccess ¶
func (x *CmdPullResponse) GetSuccess() bool
func (*CmdPullResponse) ProtoMessage ¶
func (*CmdPullResponse) ProtoMessage()
func (*CmdPullResponse) ProtoReflect ¶
func (x *CmdPullResponse) ProtoReflect() protoreflect.Message
func (*CmdPullResponse) Reset ¶
func (x *CmdPullResponse) Reset()
func (*CmdPullResponse) String ¶
func (x *CmdPullResponse) String() string
type Codec ¶
type Codec struct { SPS []byte `protobuf:"bytes,1,opt,name=SPS,proto3" json:"SPS,omitempty"` PPS []byte `protobuf:"bytes,2,opt,name=PPS,proto3" json:"PPS,omitempty"` // contains filtered or unexported fields }
func (*Codec) Descriptor
deprecated
func (*Codec) ProtoMessage ¶
func (*Codec) ProtoMessage()
func (*Codec) ProtoReflect ¶
func (x *Codec) ProtoReflect() protoreflect.Message
type DataHeartbeat ¶
type DataHeartbeat struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 流标识 Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // 时间截 Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // 版本号 // contains filtered or unexported fields }
心跳数据结构
func (*DataHeartbeat) Descriptor
deprecated
func (*DataHeartbeat) Descriptor() ([]byte, []int)
Deprecated: Use DataHeartbeat.ProtoReflect.Descriptor instead.
func (*DataHeartbeat) GetId ¶
func (x *DataHeartbeat) GetId() string
func (*DataHeartbeat) GetTimestamp ¶
func (x *DataHeartbeat) GetTimestamp() int64
func (*DataHeartbeat) GetVersion ¶
func (x *DataHeartbeat) GetVersion() string
func (*DataHeartbeat) ProtoMessage ¶
func (*DataHeartbeat) ProtoMessage()
func (*DataHeartbeat) ProtoReflect ¶
func (x *DataHeartbeat) ProtoReflect() protoreflect.Message
func (*DataHeartbeat) Reset ¶
func (x *DataHeartbeat) Reset()
func (*DataHeartbeat) String ¶
func (x *DataHeartbeat) String() string
type MediaFrame ¶
type MediaFrame struct { IsKeyFrame bool `protobuf:"varint,1,opt,name=isKeyFrame,proto3" json:"isKeyFrame,omitempty"` // 是否为关键帧 Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // 帧内容 // contains filtered or unexported fields }
媒体帧
func (*MediaFrame) Descriptor
deprecated
func (*MediaFrame) Descriptor() ([]byte, []int)
Deprecated: Use MediaFrame.ProtoReflect.Descriptor instead.
func (*MediaFrame) GetContent ¶
func (x *MediaFrame) GetContent() []byte
func (*MediaFrame) GetIsKeyFrame ¶
func (x *MediaFrame) GetIsKeyFrame() bool
func (*MediaFrame) ProtoMessage ¶
func (*MediaFrame) ProtoMessage()
func (*MediaFrame) ProtoReflect ¶
func (x *MediaFrame) ProtoReflect() protoreflect.Message
func (*MediaFrame) Reset ¶
func (x *MediaFrame) Reset()
func (*MediaFrame) String ¶
func (x *MediaFrame) String() string
type Packet ¶
type Packet struct { Type PacketType `protobuf:"varint,1,opt,name=type,proto3,enum=PacketType" json:"type,omitempty"` // 消息类型 Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*Packet) Descriptor
deprecated
func (*Packet) GetType ¶
func (x *Packet) GetType() PacketType
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
func (*Packet) ProtoReflect ¶
func (x *Packet) ProtoReflect() protoreflect.Message
type PacketType ¶
type PacketType int32
数据包类型
const ( PacketType_PacketType_PullCmd PacketType = 0 // 拉流 PacketType_PacketType_CodecFrame PacketType = 1 // 流媒体信息帧,SPS PPS PacketType_PacketType_MediaFrame PacketType = 2 // 视频数据帧 PacketType_PacketType_BinaryFrame PacketType = 3 // 二进制数据帧 PacketType_PacketType_Heartbeat PacketType = 255 // 心跳 )
func (PacketType) Descriptor ¶
func (PacketType) Descriptor() protoreflect.EnumDescriptor
func (PacketType) Enum ¶
func (x PacketType) Enum() *PacketType
func (PacketType) EnumDescriptor
deprecated
func (PacketType) EnumDescriptor() ([]byte, []int)
Deprecated: Use PacketType.Descriptor instead.
func (PacketType) Number ¶
func (x PacketType) Number() protoreflect.EnumNumber
func (PacketType) String ¶
func (x PacketType) String() string
func (PacketType) Type ¶
func (PacketType) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.