Documentation ¶
Index ¶
- Constants
- func ErrorName(ev Error) (rs string)
- func EventName(ev Event) (rs string)
- func New() bridge.PlayerModule
- type Callback
- type Encode
- func (cc *Encode) Command(cm []string) (err error)
- func (cc *Encode) ConvertAudio(input string, resultcallback func(string, error))
- func (cc *Encode) ExtractCover(input, options string, resultcallback func(string, error))
- func (cc *Encode) GetPropertyString(key string) (data string)
- func (cc *Encode) Init()
- func (cc *Encode) JoinFiles(output string, v, a, s []MuxRequest, resultcallback func(error))
- func (cc *Encode) SetLogLevel(level string) (err error)
- func (cc *Encode) SetOptionString(k, v string) (err error)
- func (cc *Encode) SetProperty(key, value string) (err error)
- type EndFileData
- type EndFileReason
- type Error
- type EvenLogs
- type Event
- type EventUserData
- type Mpv
- func (cc *Mpv) Command(cm []string) (err error)
- func (cc *Mpv) GetPropertyString(key string) (data string)
- func (cc *Mpv) Init(container interface{}) (err error)
- func (cc *Mpv) InitOpenGL()
- func (cc *Mpv) LoadFile(option bridge.PlayerMessage) (err error)
- func (cc *Mpv) ParsingURL(ctx context.Context, u string, f *bridge.Format, ...)
- func (cc *Mpv) SetLogLevel(level string) (err error)
- func (cc *Mpv) SetOptionString(k, v string) (err error)
- func (cc *Mpv) SetProperty(key, value string) (err error)
- type MuxRequest
- type Playerlib
- func (cc *Playerlib) AddSubMarginY(option bridge.PlayerMessage) (err error)
- func (cc *Playerlib) AudioOnly(option bridge.PlayerMessage)
- func (cc *Playerlib) Format(option bridge.PlayerMessage)
- func (cc *Playerlib) GetActiveTrack(option bridge.PlayerMessage) int
- func (cc *Playerlib) GetSubtitleFontSize(option bridge.PlayerMessage) int
- func (cc *Playerlib) Init(parent interface{}, logger *logging.Logger, callback *bridge.PlayerCallback)
- func (cc *Playerlib) Pause(option bridge.PlayerMessage)
- func (cc *Playerlib) Play(option bridge.PlayerMessage)
- func (cc *Playerlib) SeekMedia(option bridge.PlayerMessage)
- func (cc *Playerlib) SetActiveTrack(option bridge.PlayerMessage) (err error)
- func (cc *Playerlib) SetDelayRender(delay bool)
- func (cc *Playerlib) SetSubtitleFontSize(option bridge.PlayerMessage) (err error)
- func (cc *Playerlib) SetVolume(option bridge.PlayerMessage) (err error)
- func (cc *Playerlib) Stop(option bridge.PlayerMessage)
- type Probe
- func (cc *Probe) AddFile(file string, callback func(*bridge.Format)) (err error)
- func (cc *Probe) Command(cm []string) (err error)
- func (cc *Probe) Destroy() (err error)
- func (cc *Probe) GetPropertyString(key string) (data string)
- func (cc *Probe) Init()
- func (cc *Probe) SetOptionString(k, v string) (err error)
- func (cc *Probe) SetProperty(key, value string) (err error)
- type Proxy
- type RenderFrameInfoFlag
- type RenderFrameUpdateFlag
Constants ¶
View Source
const ( //ErrorSuccess - ErrorSuccess Error = iota //ErrorEventQueueFull - ErrorEventQueueFull = 0 - iota //ErrorNomem - ErrorNomem //ErrorUninitialized - ErrorUninitialized //ErrorInvalidParameter - ErrorInvalidParameter //ErrorOptionNotFound - ErrorOptionNotFound //ErrorOptionFormat - ErrorOptionFormat //ErrorOptionError - ErrorOptionError //ErrorPropertyNotFound - ErrorPropertyNotFound //ErrorPropertyFormat - ErrorPropertyFormat ErrorPropertyUnavailable //ErrorPropertyError - ErrorPropertyError //ErrorCommand - ErrorCommand //ErrorLoadingFailed - ErrorLoadingFailed //ErrorAoInitFailed - ErrorAoInitFailed //ErrorVoInitFailed - ErrorVoInitFailed //ErrorNothingToPlay - ErrorNothingToPlay //ErrorUnknownFormat - ErrorUnknownFormat //ErrorUnsupported - ErrorUnsupported //ErrorNotImplemented - ErrorNotImplemented //ErrorGeneric - ErrorGeneric )
View Source
const ( ErrorNoTracks = "NO TRACKS AVAILABLE" ErrorAudioStremsNotAvailable = "AUDIO STREAMS NOT AVAILABLE" ErrorAttachImageNotAvailable = "ATTACH IMAGE NOT AVAILABLE" ErrorAnotherThreadRunning = "ANOTHER THREAD IS RUNNING" ErrorModuleNotInit = "MPV MODULE NOT INIT" ErrorFailedToCreateWidget = "FAILED TO CREATE WIDGET" ErrorLibraryNotReady = "LIBRARY NOT READY, TRY AGAIN" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Callback ¶
type Callback struct { OnEvent func(EventUserData) OnAudioStatus func(bridge.AudioStatus) }
Callback -
type Encode ¶
type Encode struct {
// contains filtered or unexported fields
}
Encode -
func (*Encode) ConvertAudio ¶
ConvertAudio -
func (*Encode) ExtractCover ¶
ExtractCover -
func (*Encode) GetPropertyString ¶
GetPropertyString -
func (*Encode) JoinFiles ¶
func (cc *Encode) JoinFiles(output string, v, a, s []MuxRequest, resultcallback func(error))
JoinFiles -
func (*Encode) SetOptionString ¶
SetOptionString -
type EndFileReason ¶
type EndFileReason int
EndFileReason -
const ( //EndFileReasonEOF - EndFileReasonEOF EndFileReason = 0 //EndFileReasonStop - EndFileReasonStop EndFileReason = iota + 1 //EndFileReasonQuit - EndFileReasonQuit //EndFileReasonError - EndFileReasonError //EndFileReasonRedirect - EndFileReasonRedirect )
type Event ¶
type Event int
Event -
const ( //EventNone - EventNone Event = iota //EventShutdown - EventShutdown //EventLogMessage - EventLogMessage //EventGetPropertyReply - EventGetPropertyReply //EventSetPropertyReply - EventSetPropertyReply //EventCommandReply - EventCommandReply //EventStartFile - EventStartFile //EventEndFile - EventEndFile //EventFileLoaded - EventFileLoaded //EventTracksChanged - EventTracksChanged //EventTrackSwitched - EventTrackSwitched //EventIdle - EventIdle //EventPause - EventPause //EventUnpause - EventUnpause //EventTick - EventTick //EventScriptInputDispatch - EventScriptInputDispatch //EventClientMessage - EventClientMessage //EventVideoReconfig - EventVideoReconfig //EventAudioReconfig - EventAudioReconfig //EventMetadataUpdate - EventMetadataUpdate //EventSeek - EventSeek //EventPlaybackRestart - EventPlaybackRestart //EventPropertyChange - EventPropertyChange //EventChapterChange - EventChapterChange //EventQueueOverflow - EventQueueOverflow //EventHook - EventHook )
type EventUserData ¶
type EventUserData struct { Event Event EndFile EndFileData LogMessage EvenLogs }
EventUserData -
type Mpv ¶
type Mpv struct { AudioStatus *bridge.AudioStatus Proxy *Proxy Probe *Probe InitVolume float64 CurrentPlay bridge.PlayerMessage // contains filtered or unexported fields }
Mpv -
func NewMPV ¶
NewMPV -
func (*Mpv) GetPropertyString ¶
GetPropertyString -
func (*Mpv) ParsingURL ¶
func (cc *Mpv) ParsingURL(ctx context.Context, u string, f *bridge.Format, callback func(err error, primary, video, audio, subs bool, ur, cmd string, done func()))
ParsingURL -
func (*Mpv) SetLogLevel ¶
SetLogLevel - (no, fatal, error, warn, info, v, debug, trace)
func (*Mpv) SetOptionString ¶
SetOptionString -
type Playerlib ¶
type Playerlib struct {
// contains filtered or unexported fields
}
Playerlib -
func (*Playerlib) AddSubMarginY ¶
func (cc *Playerlib) AddSubMarginY(option bridge.PlayerMessage) (err error)
AddSubMarginY -
func (*Playerlib) AudioOnly ¶
func (cc *Playerlib) AudioOnly(option bridge.PlayerMessage)
AudioOnly -
func (*Playerlib) GetActiveTrack ¶
func (cc *Playerlib) GetActiveTrack(option bridge.PlayerMessage) int
GetActiveTrack -
func (*Playerlib) GetSubtitleFontSize ¶
func (cc *Playerlib) GetSubtitleFontSize(option bridge.PlayerMessage) int
GetSubtitleFontSize -
func (*Playerlib) Init ¶
func (cc *Playerlib) Init(parent interface{}, logger *logging.Logger, callback *bridge.PlayerCallback)
Init -
func (*Playerlib) SeekMedia ¶
func (cc *Playerlib) SeekMedia(option bridge.PlayerMessage)
SeekMedia -
func (*Playerlib) SetActiveTrack ¶
func (cc *Playerlib) SetActiveTrack(option bridge.PlayerMessage) (err error)
SetActiveTrack -
func (*Playerlib) SetSubtitleFontSize ¶
func (cc *Playerlib) SetSubtitleFontSize(option bridge.PlayerMessage) (err error)
SetSubtitleFontSize -
func (*Playerlib) SetVolume ¶
func (cc *Playerlib) SetVolume(option bridge.PlayerMessage) (err error)
SetVolume -
type Probe ¶
type Probe struct {
// contains filtered or unexported fields
}
Probe -
func (*Probe) AddFile ¶
AddFile -
func (*Probe) GetPropertyString ¶
GetPropertyString -
func (*Probe) SetOptionString ¶
SetOptionString -
type Proxy ¶
Proxy -
type RenderFrameInfoFlag ¶
type RenderFrameInfoFlag uint32
RenderFrameInfoFlag -
const ( //RenderFrameInfoFlagPresent - RenderFrameInfoFlagPresent RenderFrameInfoFlag = 1 << iota //RenderFrameInfoFlagRedraw - RenderFrameInfoFlagRedraw //RenderFrameInfoFlagRepeat - RenderFrameInfoFlagRepeat //RenderFrameInfoFlagBlockVsync - RenderFrameInfoFlagBlockVsync )
type RenderFrameUpdateFlag ¶
type RenderFrameUpdateFlag uint32
RenderFrameUpdateFlag -
const ( //RenderFrameInfoUpdateFlagFrame - RenderFrameInfoUpdateFlagFrame RenderFrameUpdateFlag = 1 << iota )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.