Documentation ¶
Index ¶
- Constants
- Variables
- type InfoKind
- type MediaInfo
- func (mi *MediaInfo) Close()
- func (mi *MediaInfo) Count(streamKind StreamKind) int
- func (mi *MediaInfo) Get(streamKind StreamKind, streamNumber int, parameter string) string
- func (mi *MediaInfo) GetI(streamKind StreamKind, streamNumber int, parameter int, kindOfInfo InfoKind) string
- func (mi *MediaInfo) GetKind(streamKind StreamKind, streamNumber int, parameter string, kindOfInfo InfoKind) string
- func (mi *MediaInfo) Inform() string
- func (mi *MediaInfo) Open(path string) error
- func (mi *MediaInfo) Option(option string) string
- func (mi *MediaInfo) SetOption(option, value string) string
- type StreamKind
Constants ¶
const ( // StreamGeneral is a for general container stream. StreamGeneral StreamKind = 0 // StreamVideo is a video stream. StreamVideo = 1 // StreamAudio is an audio stream. StreamAudio = 2 // StreamText is embedded text (subtitles) stream. StreamText = 3 // StreamOther is for chapters. StreamOther = 4 // StreamImage is for embedded images. StreamImage = 5 // StreamMenu is for dynamic menus. StreamMenu = 6 )
const ( // InfoName is the unique name of parameter. InfoName InfoKind = 0 // InfoText is value of parameter. InfoText = 1 // InfoMeasure is the unique name of measure unit of parameter. InfoMeasure = 2 InfoOptions = 3 // InfoNameText is translated name of parameter. InfoNameText = 4 // InfoMeasureText is translated name of measure unit. InfoMeasureText = 5 // InfoInfo is more information about the parameter. InfoInfo = 6 // InfoHowTo is how this parameter is supported, could be N (No), B (Beta), R (Read only), W (Read/write). InfoHowTo = 7 )
Variables ¶
var ErrOpenFailed = errors.New("file open failed")
ErrOpenFailed is returned by Open when mediainfo cannot open the file.
Functions ¶
This section is empty.
Types ¶
type InfoKind ¶
type InfoKind int
InfoKind is used to specify the aspect of information (name, value, unit of measure) when retrieving information.
type MediaInfo ¶
type MediaInfo struct {
// contains filtered or unexported fields
}
MediaInfo is an instance of a mediainfo accessor.
func (*MediaInfo) Close ¶
func (mi *MediaInfo) Close()
Close closes the handle, releasing internal resources.
func (*MediaInfo) Count ¶
func (mi *MediaInfo) Count(streamKind StreamKind) int
Count gets the number of a particular kind of stream in the file.
func (*MediaInfo) Get ¶
func (mi *MediaInfo) Get(streamKind StreamKind, streamNumber int, parameter string) string
Get gets a textual file metadata item according to the parameters.
func (*MediaInfo) GetI ¶
func (mi *MediaInfo) GetI(streamKind StreamKind, streamNumber int, parameter int, kindOfInfo InfoKind) string
GetI gets the file info at a particular parameter index.
func (*MediaInfo) GetKind ¶
func (mi *MediaInfo) GetKind(streamKind StreamKind, streamNumber int, parameter string, kindOfInfo InfoKind) string
GetKind gets file metadata according to the parameters.
func (*MediaInfo) Inform ¶
Inform gets the file info (if available) according to previous options set by Option
type StreamKind ¶
type StreamKind int
StreamKind is used to specify the type of stream (audio, video, chapters, etc) when getting information.