Documentation ¶
Index ¶
- Constants
- Variables
- func GetAllAttr(desc *MetaDesc) (attr interface{})
- func InputAdapter(input []byte, ei *LoaderInput) (code int, err error)
- func OutputAdapter(eo *LoaderOutput) (output []byte, code int, err error)
- type AudioAttr
- type BaseAttr
- type ImageAttr
- type LoaderInput
- func (*LoaderInput) Descriptor() ([]byte, []int)
- func (m *LoaderInput) GetExpect() []*MetaDesc
- func (m *LoaderInput) GetHeaders() map[string]string
- func (m *LoaderInput) GetParams() map[string]string
- func (m *LoaderInput) GetPl() []*Payload
- func (m *LoaderInput) GetServiceId() string
- func (m *LoaderInput) GetServiceName() string
- func (m *LoaderInput) GetState() LoaderInput_SessState
- func (m *LoaderInput) GetSyncId() int32
- func (m *LoaderInput) Marshal() (dAtA []byte, err error)
- func (m *LoaderInput) MarshalTo(dAtA []byte) (int, error)
- func (*LoaderInput) ProtoMessage()
- func (m *LoaderInput) Reset()
- func (m *LoaderInput) Size() (n int)
- func (m *LoaderInput) String() string
- func (m *LoaderInput) Unmarshal(dAtA []byte) error
- func (m *LoaderInput) XXX_DiscardUnknown()
- func (m *LoaderInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoaderInput) XXX_Merge(src proto.Message)
- func (m *LoaderInput) XXX_Size() int
- func (m *LoaderInput) XXX_Unmarshal(b []byte) error
- type LoaderInput_SessState
- type LoaderOutput
- func (*LoaderOutput) Descriptor() ([]byte, []int)
- func (m *LoaderOutput) GetCode() int32
- func (m *LoaderOutput) GetErr() string
- func (m *LoaderOutput) GetPl() []*Payload
- func (m *LoaderOutput) GetServiceId() string
- func (m *LoaderOutput) GetStatus() LoaderOutput_RespStatus
- func (m *LoaderOutput) Marshal() (dAtA []byte, err error)
- func (m *LoaderOutput) MarshalTo(dAtA []byte) (int, error)
- func (*LoaderOutput) ProtoMessage()
- func (m *LoaderOutput) Reset()
- func (m *LoaderOutput) Size() (n int)
- func (m *LoaderOutput) String() string
- func (m *LoaderOutput) Unmarshal(dAtA []byte) error
- func (m *LoaderOutput) XXX_DiscardUnknown()
- func (m *LoaderOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LoaderOutput) XXX_Merge(src proto.Message)
- func (m *LoaderOutput) XXX_Size() int
- func (m *LoaderOutput) XXX_Unmarshal(b []byte) error
- type LoaderOutput_RespStatus
- type MetaDesc
- func (*MetaDesc) Descriptor() ([]byte, []int)
- func (m *MetaDesc) GetAttribute() map[string]string
- func (m *MetaDesc) GetDataType() MetaDesc_DataType
- func (m *MetaDesc) GetName() string
- func (m *MetaDesc) Marshal() (dAtA []byte, err error)
- func (m *MetaDesc) MarshalTo(dAtA []byte) (int, error)
- func (*MetaDesc) ProtoMessage()
- func (m *MetaDesc) Reset()
- func (m *MetaDesc) Size() (n int)
- func (m *MetaDesc) String() string
- func (m *MetaDesc) Unmarshal(dAtA []byte) error
- func (m *MetaDesc) XXX_DiscardUnknown()
- func (m *MetaDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MetaDesc) XXX_Merge(src proto.Message)
- func (m *MetaDesc) XXX_Size() int
- func (m *MetaDesc) XXX_Unmarshal(b []byte) error
- type MetaDesc_DataType
- type Payload
- func (*Payload) Descriptor() ([]byte, []int)
- func (m *Payload) GetData() []byte
- func (m *Payload) GetMeta() *MetaDesc
- func (m *Payload) Marshal() (dAtA []byte, err error)
- func (m *Payload) MarshalTo(dAtA []byte) (int, error)
- func (*Payload) ProtoMessage()
- func (m *Payload) Reset()
- func (m *Payload) Size() (n int)
- func (m *Payload) String() string
- func (m *Payload) Unmarshal(dAtA []byte) error
- func (m *Payload) XXX_DiscardUnknown()
- func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Payload) XXX_Merge(src proto.Message)
- func (m *Payload) XXX_Size() int
- func (m *Payload) XXX_Unmarshal(b []byte) error
- type TextAttr
- type VideoAttr
Constants ¶
View Source
const ( ReqSrc = "source" SrcV2 = "aipaas" )
View Source
const ( Uid = "uid" AppId = "appid" CloudId = "cloud_id" ComposeId = "compose_id" Sub = "sub" MeterPara = "meter_param" DeviceId = "did" Imei = "device.imei" SessionId = "sid" DataCleanTTL = "data_cleaner_ttl" )
common headers
View Source
const ( Encoding = "encoding" Compress = "compress" SampleRate = "sample_rate" FrameRate = "frame_rate" FrameSize = "frame_size" Channels = "channels" BitDepth = "bit_depth" Height = "height" Width = "width" Sequence = "seq" Status = "status" AudioUrl = "audio_url" )
payload attribute
Variables ¶
View Source
var ( ErrInvalidLengthV2 = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowV2 = fmt.Errorf("proto: integer overflow") )
View Source
var LoaderInput_SessState_name = map[int32]string{
0: "STREAM",
1: "ONCE",
}
View Source
var LoaderInput_SessState_value = map[string]int32{
"STREAM": 0,
"ONCE": 1,
}
View Source
var LoaderOutput_RespStatus_name = map[int32]string{
0: "BEGIN",
1: "CONTINUE",
2: "END",
3: "ONCE",
}
View Source
var LoaderOutput_RespStatus_value = map[string]int32{
"BEGIN": 0,
"CONTINUE": 1,
"END": 2,
"ONCE": 3,
}
View Source
var MetaDesc_DataType_name = map[int32]string{
0: "TEXT",
1: "AUDIO",
2: "IMAGE",
3: "VIDEO",
4: "OTHER",
}
View Source
var MetaDesc_DataType_value = map[string]int32{
"TEXT": 0,
"AUDIO": 1,
"IMAGE": 2,
"VIDEO": 3,
"OTHER": 4,
}
Functions ¶
func GetAllAttr ¶
func GetAllAttr(desc *MetaDesc) (attr interface{})
func InputAdapter ¶
func InputAdapter(input []byte, ei *LoaderInput) (code int, err error)
func OutputAdapter ¶
func OutputAdapter(eo *LoaderOutput) (output []byte, code int, err error)
Types ¶
type AudioAttr ¶
type AudioAttr struct { Encoding string // 编解码 SampleRate string // 采样率 FrameSize string // 帧大小(开源speex) Channels int // 通道数 BitDepth int // 位深 Seq int // 序号 Status int // 状态 }
音频数据属性
type LoaderInput ¶
type LoaderInput struct { ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` ServiceName string `protobuf:"bytes,2,opt,name=serviceName,proto3" json:"serviceName,omitempty"` State LoaderInput_SessState `protobuf:"varint,3,opt,name=state,proto3,enum=protocol.LoaderInput_SessState" json:"state,omitempty"` Headers map[string]string `` /* 155-byte string literal not displayed */ Params map[string]string `` /* 153-byte string literal not displayed */ Expect []*MetaDesc `protobuf:"bytes,6,rep,name=expect,proto3" json:"expect,omitempty"` Pl []*Payload `protobuf:"bytes,7,rep,name=pl,proto3" json:"pl,omitempty"` SyncId int32 `protobuf:"varint,8,opt,name=sync_id,json=syncId,proto3" json:"sync_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoaderInput) Descriptor ¶
func (*LoaderInput) Descriptor() ([]byte, []int)
func (*LoaderInput) GetExpect ¶
func (m *LoaderInput) GetExpect() []*MetaDesc
func (*LoaderInput) GetHeaders ¶
func (m *LoaderInput) GetHeaders() map[string]string
func (*LoaderInput) GetParams ¶
func (m *LoaderInput) GetParams() map[string]string
func (*LoaderInput) GetPl ¶
func (m *LoaderInput) GetPl() []*Payload
func (*LoaderInput) GetServiceId ¶
func (m *LoaderInput) GetServiceId() string
func (*LoaderInput) GetServiceName ¶
func (m *LoaderInput) GetServiceName() string
func (*LoaderInput) GetState ¶
func (m *LoaderInput) GetState() LoaderInput_SessState
func (*LoaderInput) GetSyncId ¶
func (m *LoaderInput) GetSyncId() int32
func (*LoaderInput) Marshal ¶
func (m *LoaderInput) Marshal() (dAtA []byte, err error)
func (*LoaderInput) ProtoMessage ¶
func (*LoaderInput) ProtoMessage()
func (*LoaderInput) Reset ¶
func (m *LoaderInput) Reset()
func (*LoaderInput) Size ¶
func (m *LoaderInput) Size() (n int)
func (*LoaderInput) String ¶
func (m *LoaderInput) String() string
func (*LoaderInput) Unmarshal ¶
func (m *LoaderInput) Unmarshal(dAtA []byte) error
func (*LoaderInput) XXX_DiscardUnknown ¶
func (m *LoaderInput) XXX_DiscardUnknown()
func (*LoaderInput) XXX_Marshal ¶
func (m *LoaderInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoaderInput) XXX_Merge ¶
func (m *LoaderInput) XXX_Merge(src proto.Message)
func (*LoaderInput) XXX_Size ¶
func (m *LoaderInput) XXX_Size() int
func (*LoaderInput) XXX_Unmarshal ¶
func (m *LoaderInput) XXX_Unmarshal(b []byte) error
type LoaderInput_SessState ¶
type LoaderInput_SessState int32
const ( LoaderInput_STREAM LoaderInput_SessState = 0 LoaderInput_ONCE LoaderInput_SessState = 1 )
func (LoaderInput_SessState) EnumDescriptor ¶
func (LoaderInput_SessState) EnumDescriptor() ([]byte, []int)
func (LoaderInput_SessState) String ¶
func (x LoaderInput_SessState) String() string
type LoaderOutput ¶
type LoaderOutput struct { ServiceId string `protobuf:"bytes,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"` Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` Status LoaderOutput_RespStatus `protobuf:"varint,4,opt,name=status,proto3,enum=protocol.LoaderOutput_RespStatus" json:"status,omitempty"` Pl []*Payload `protobuf:"bytes,5,rep,name=pl,proto3" json:"pl,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoaderOutput) Descriptor ¶
func (*LoaderOutput) Descriptor() ([]byte, []int)
func (*LoaderOutput) GetCode ¶
func (m *LoaderOutput) GetCode() int32
func (*LoaderOutput) GetErr ¶
func (m *LoaderOutput) GetErr() string
func (*LoaderOutput) GetPl ¶
func (m *LoaderOutput) GetPl() []*Payload
func (*LoaderOutput) GetServiceId ¶
func (m *LoaderOutput) GetServiceId() string
func (*LoaderOutput) GetStatus ¶
func (m *LoaderOutput) GetStatus() LoaderOutput_RespStatus
func (*LoaderOutput) Marshal ¶
func (m *LoaderOutput) Marshal() (dAtA []byte, err error)
func (*LoaderOutput) ProtoMessage ¶
func (*LoaderOutput) ProtoMessage()
func (*LoaderOutput) Reset ¶
func (m *LoaderOutput) Reset()
func (*LoaderOutput) Size ¶
func (m *LoaderOutput) Size() (n int)
func (*LoaderOutput) String ¶
func (m *LoaderOutput) String() string
func (*LoaderOutput) Unmarshal ¶
func (m *LoaderOutput) Unmarshal(dAtA []byte) error
func (*LoaderOutput) XXX_DiscardUnknown ¶
func (m *LoaderOutput) XXX_DiscardUnknown()
func (*LoaderOutput) XXX_Marshal ¶
func (m *LoaderOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LoaderOutput) XXX_Merge ¶
func (m *LoaderOutput) XXX_Merge(src proto.Message)
func (*LoaderOutput) XXX_Size ¶
func (m *LoaderOutput) XXX_Size() int
func (*LoaderOutput) XXX_Unmarshal ¶
func (m *LoaderOutput) XXX_Unmarshal(b []byte) error
type LoaderOutput_RespStatus ¶
type LoaderOutput_RespStatus int32
const ( LoaderOutput_BEGIN LoaderOutput_RespStatus = 0 LoaderOutput_CONTINUE LoaderOutput_RespStatus = 1 LoaderOutput_END LoaderOutput_RespStatus = 2 LoaderOutput_ONCE LoaderOutput_RespStatus = 3 )
func (LoaderOutput_RespStatus) EnumDescriptor ¶
func (LoaderOutput_RespStatus) EnumDescriptor() ([]byte, []int)
func (LoaderOutput_RespStatus) String ¶
func (x LoaderOutput_RespStatus) String() string
type MetaDesc ¶
type MetaDesc struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` DataType MetaDesc_DataType `protobuf:"varint,2,opt,name=dataType,proto3,enum=protocol.MetaDesc_DataType" json:"dataType,omitempty"` Attribute map[string]string `` /* 159-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*MetaDesc) Descriptor ¶
func (*MetaDesc) GetAttribute ¶
func (*MetaDesc) GetDataType ¶
func (m *MetaDesc) GetDataType() MetaDesc_DataType
func (*MetaDesc) ProtoMessage ¶
func (*MetaDesc) ProtoMessage()
func (*MetaDesc) XXX_DiscardUnknown ¶
func (m *MetaDesc) XXX_DiscardUnknown()
func (*MetaDesc) XXX_Marshal ¶
func (*MetaDesc) XXX_Unmarshal ¶
type MetaDesc_DataType ¶
type MetaDesc_DataType int32
const ( MetaDesc_TEXT MetaDesc_DataType = 0 MetaDesc_AUDIO MetaDesc_DataType = 1 MetaDesc_IMAGE MetaDesc_DataType = 2 MetaDesc_VIDEO MetaDesc_DataType = 3 MetaDesc_OTHER MetaDesc_DataType = 4 )
func (MetaDesc_DataType) EnumDescriptor ¶
func (MetaDesc_DataType) EnumDescriptor() ([]byte, []int)
func (MetaDesc_DataType) String ¶
func (x MetaDesc_DataType) String() string
type Payload ¶
type Payload struct { Meta *MetaDesc `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Payload) Descriptor ¶
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
func (*Payload) XXX_DiscardUnknown ¶
func (m *Payload) XXX_DiscardUnknown()
func (*Payload) XXX_Marshal ¶
func (*Payload) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.