Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioMeta ¶
type AudioMeta struct { Codec string `json:"codec"` SampleRate int `json:"samplerate,omitempty"` SampleSize int `json:"samplesize,omitempty"` Channels int `json:"channels,omitempty"` DataRate float64 `json:"datarate,omitempty"` Sps []byte `json:"-"` // sps }
AudioMeta 音频元数据
type Frame ¶
type Frame struct { MediaType // 媒体类型 Dts int64 // DTS,单位为 ns Pts int64 // PTS,单位为 ns Payload []byte // 媒体数据载荷 }
Frame 音视频完整帧
type FrameWriter ¶
FrameWriter 包装 WriteFrame 方法的接口
type MediaType ¶
type MediaType int
MediaType 媒体类型
const ( MediaTypeUnknown MediaType = iota - 1 // Usually treated as MediaTypeData MediaTypeVideo MediaTypeAudio MediaTypeData // Opaque data information usually continuous MediaTypeSubtitle MediaTypeAttachment // Opaque data information usually sparse MediaTypeNB )
媒体类型常量
func (*MediaType) MarshalText ¶
MarshalText marshals the MediaType to text.
func (*MediaType) UnmarshalText ¶
UnmarshalText unmarshals text to a MediaType.
type VideoMeta ¶
type VideoMeta struct { Codec string `json:"codec"` Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` FixedFrameRate bool `json:"fixedframerate,omitempty"` FrameRate float64 `json:"framerate,omitempty"` DataRate float64 `json:"datarate,omitempty"` ClockRate int `json:"clockrate,omitempty"` Sps []byte `json:"-"` Pps []byte `json:"-"` Vps []byte `json:"-"` }
VideoMeta 视频元数据
Click to show internal directories.
Click to hide internal directories.