Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAudioProbeUnsupported = errors.New("audio probing not implemented")
View Source
var ErrVideoProbeUnsupported = errors.New("video probing not implemented")
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
Type string `json:"type"`
URL string `json:"url,omitempty"`
Path string `json:"path,omitempty"`
ContentType string `json:"content_type,omitempty"`
Name string `json:"name,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
Attachment 表示外部媒体资源。
func Normalize ¶
func Normalize(input interface{}) ([]Attachment, error)
Normalize 将多种输入形态规范化为 Attachment 列表。 支持以下形式:
- nil 或空值(返回 nil)
- []Attachment
- []*Attachment
- []map[string]interface{}
- map[string]interface{},包含 `media` 列表或本身代表单个媒体
type AudioInfo ¶
type AudioInfo struct {
Format string `json:"format"`
DurationSec float64 `json:"duration_sec"`
SampleRate int `json:"sample_rate"`
Channels int `json:"channels"`
}
AudioInfo contains basic audio metadata
func ProbeAudio ¶
ProbeAudio is a placeholder for audio metadata extraction. Minimal stub to satisfy media processing requirement; extend with formats as needed.
type ImageInfo ¶
type ImageInfo struct {
Format string `json:"format"`
Width int `json:"width"`
Height int `json:"height"`
}
ImageInfo contains basic image metadata
Click to show internal directories.
Click to hide internal directories.