Documentation
¶
Index ¶
- func GetMusicFilterTypeString(tp MusicFilterType) string
- func ImageFormatGetExtString(f ImageFormat) string
- func MediaStateString(state MediaState) (st string)
- func RegisterGob()
- type Astats
- type AudioParams
- type AudioStatus
- type BtnImage
- type CSSSet
- type Config
- type CoverArt
- type EndFileReason
- type EntryBox
- type EntryText
- type FilterMusic
- type Format
- type GeneralPage
- type IGeneralPage
- type IMediaLibrary
- type IPlayerModule
- type ImageFormat
- type Language
- type LibraryContextMenu
- type ListBox
- type ListBoxChild
- type ListBoxListener
- type MediaBufferState
- type MediaBufferStateSeekableRanges
- type MediaLibraryHelper
- type MediaLibraryPlugins
- type MediaState
- type MediaStats
- type MusicData
- type MusicFilterIDs
- type MusicFilterOption
- type MusicFilterType
- type MusicLibrary
- type PlayerCallback
- type PlayerMessage
- type PlayerModule
- type PlaylistTracks
- type ScaleImage
- type SendMessage
- type SetTimeout
- type Track
- type TrackType
- type VideoParams
- type VideoSource
- type Youtube
- type YoutubeFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMusicFilterTypeString ¶
func GetMusicFilterTypeString(tp MusicFilterType) string
GetMusicFilterTypeString -
func ImageFormatGetExtString ¶
func ImageFormatGetExtString(f ImageFormat) string
Types ¶
type Astats ¶
type Astats struct {
Frame int `json:"frame"`
Pts int64 `json:"pts"`
PtsTime float64 `json:"pts_time"`
RMSLevel float64 `json:"RMS_level"`
}
Astats -
type AudioParams ¶
type AudioParams struct {
SampleRate int `json:"samplerate,omitempty"`
ChannelCount int `json:"channel-count,omitempty"`
Channels string `json:"channels,omitempty"`
HrChannels string `json:"hr-channels,omitempty"`
Format string `json:"format,omitempty"`
}
AudioParams -
type BtnImage ¶
type BtnImage struct {
Icons []string
Button *gtk.Button
Image *gtk.Image
OnClick func()
RemoveAllListener func()
SetImageList func(string)
}
BtnImage -
type Config ¶
type Config struct {
Volume float64
SubtitleFontSize int
Random bool
Repeat bool
RepeatOne bool
EnableAudiVis bool
}
Config -
type EndFileReason ¶
type EndFileReason int
EndFileReason -
const ( //EndFileReasonEOF - EndFileReasonEOF EndFileReason = iota //EndFileReasonStop - EndFileReasonStop //EndFileReasonQuit - EndFileReasonQuit //EndFileReasonError - EndFileReasonError //EndFileReasonRedirect - EndFileReasonRedirect )
type EntryBox ¶
type EntryBox struct {
MainBox *gtk.Box
Overlay *gtk.Overlay
Box *gtk.Box
Placeholder *gtk.Label
Input *gtk.Entry
}
EntryBox -
type EntryText ¶
type EntryText struct {
Box *gtk.Entry
Placeholder *gtk.Label
OnChanged func(*EntryText, string)
Overlay *gtk.Overlay
HaveIcon bool
HaveSwitch bool
MarginEnd int
LabelText string
}
EntryText -
type FilterMusic ¶
type FilterMusic struct {
Filtertype MusicFilterType
Playlist []string
Artists []string
Albums []string
Ids []string
Sources []string
Search bool
SearchText string
}
FilterMusic -
type Format ¶
type Format struct {
URL string `json:"url,omitempty"`
LyricsURL string `json:"lyricsURL,omitempty"`
BackgroundURL string `json:"backgroundURL,omitempty"`
Duration time.Duration `json:"duration,omitempty"`
Tracks []Track `json:"track,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
UseInternalProxy bool `json:"-"`
sync.RWMutex `json:"-"`
}
Format -
type IGeneralPage ¶
type IGeneralPage interface {
Create(interface{})
Mount()
UnMount()
Action(string)
}
IGeneralPage -
type IMediaLibrary ¶
type IMediaLibrary interface {
ID() string
Name() string
GetHeader() *gtk.Widget
GetContextMenu() []LibraryContextMenu
GetMusic(MusicFilterOption, func(MusicLibrary, error))
GetMusicURL(ctx context.Context, trackID string) Format
OnRequestCoverArt(id string, c context.Context, cf context.CancelFunc) CoverArt
GetTitle(tp MusicFilterType, trackID string, base bool) string
RemoveMusicPlaylist(id []string, callback func(error))
InsetMusicTrackToPlaylist(id string, tracks []string, new bool, callback func(error))
RemoveMusicTrackToPlaylist(id string, tracks []string, callback func(error))
OnLibraryUpdated(func(string))
}
IMediaLibrary -
type IPlayerModule ¶
type IPlayerModule interface {
Init(interface{}, *logging.Logger, *PlayerCallback)
Play(PlayerMessage)
Pause(PlayerMessage)
Stop(PlayerMessage)
SeekMedia(PlayerMessage)
AudioOnly(PlayerMessage)
GetActiveTrack(PlayerMessage) int
SetActiveTrack(PlayerMessage) error
SetVolume(PlayerMessage) error
AddSubMarginY(PlayerMessage) error
GetSubtitleFontSize(PlayerMessage) int
SetSubtitleFontSize(PlayerMessage) error
Format(PlayerMessage)
SetDelayRender(bool)
}
IPlayerModule -
type ImageFormat ¶
type ImageFormat int
const ( ImageFormatJPEG ImageFormat = iota + 1 ImageFormatPNG )
type Language ¶
type Language struct {
English string `json:"English"`
Alpha2 string `json:"alpha2"`
Alpha3B string `json:"alpha3-b"`
}
Language -
type LibraryContextMenu ¶
LibraryContextMenu -
type ListBox ¶
type ListBox struct {
Container *gtk.ScrolledWindow
ContainerList *gtk.Box
Child map[string]*ListBoxChild
Listener *ListBoxListener
sync.RWMutex
}
ListBox -
type ListBoxChild ¶
ListBoxChild -
type ListBoxListener ¶
type ListBoxListener struct {
OnLeftClick func(*ListBoxChild, *gdk.Event)
OnRightClick func(*ListBoxChild, *gdk.Event)
}
ListBoxListener -
type MediaBufferState ¶
type MediaBufferState struct {
CacheEnd float64 `json:"cache-end"`
ReaderPts float64 `json:"reader-pts"`
CacheDuration float64 `json:"cache-duration"`
EOF bool `json:"eof"`
Underrun bool `json:"underrun"`
Idle bool `json:"idle"`
TotalBytes int64 `json:"total-bytes"`
FwBytes int64 `json:"fw-bytes"`
RawInputRate int64 `json:"raw-input-rate"`
SeekableRanges []MediaBufferStateSeekableRanges `json:"seekable-ranges"`
}
MediaBufferState -
type MediaBufferStateSeekableRanges ¶
type MediaBufferStateSeekableRanges struct {
Start float64 `json:"start"`
End float64 `json:"end"`
}
MediaBufferStateSeekableRanges -
type MediaLibraryHelper ¶
type MediaLibraryHelper struct {
Logger *logging.Logger
DatabaseLocation func(string) string
Asset func(string) ([]byte, error)
SetClass func(widget interface{}, mode CSSSet, class string)
NewEntryBox func(placeholder, id string) *EntryBox
CrateEntryText func(*EntryText)
NewIdleAdd func(func()) glib.SourceHandle
CreateBtnImage func(interface{})
GetLeftMenuBox func(id string) *gtk.Box
GetMainWindow func() *gtk.Window
AttachWindow func(wi *gtk.Widget, w, h int, title string, onClose func())
DeAttachWindow func(wi *gtk.Widget)
AttachCustomNotification func(wi *gtk.Widget)
DeAttachCustomNotification func(wi *gtk.Widget)
NewListBox func(*gtk.Box) *ListBox
CreateHashByte func([]byte) string
CreateHash func(string) string
}
MediaLibraryHelper -
type MediaState ¶
type MediaState int
MediaState -
const ( //MediaStatePlaying - MediaStatePlaying MediaState = iota //MediaStatePaused - MediaStatePaused )
type MediaStats ¶
type MediaStats struct {
VideoFormat string
VideoResolution string
ViewPort string
AudioFormat string
StateString string
State MediaState
Buffering bool
Seekable bool
Duration time.Duration
Position time.Duration
PositionPercent float64
Remaining time.Duration
CacheSpeed int64
CacheBufferingState int
BufferState MediaBufferState
FrameCount int
CurrentFrame int
DropFrame int
}
MediaStats -
type MusicData ¶
type MusicData struct {
Hash string
Title string
ID string
ArtistID string
AlbumID string
Artist string
AlbumArtist string
Album string
Playlist string
Type string
Path string
SourceID string
Duration int
Container string
AudioChannels int
AudioCodec string
Size int64
Bitrate int
Items []string
Others interface{}
}
MusicData -
type MusicFilterIDs ¶
type MusicFilterIDs struct {
Playlist []string
Artists []string
Albums []string
Tracks []string
Count struct {
AllTracks int
Artists int
Albums int
Tracks int
}
}
MusicFilterIDs -
type MusicFilterType ¶
type MusicFilterType int
MusicFilterType -
const ( //MusicFilterTypeArtist - MusicFilterTypeArtist MusicFilterType = iota + 1 //MusicFilterTypeAlbum - MusicFilterTypeAlbum //MusicFilterTypeTracks - MusicFilterTypeTracks //MusicFilterTypePlaylist - MusicFilterTypePlaylist )
func GetMusicFilterFromString ¶
func GetMusicFilterFromString(tp string) MusicFilterType
GetMusicFilterFromString -
type MusicLibrary ¶
type MusicLibrary struct {
Hash string
LastUpdated time.Time
Tracks []MusicData
Albums []MusicData
Artists []MusicData
Playlist []MusicData
}
MusicLibrary -
type PlayerCallback ¶
type PlayerCallback struct {
IsReady func()
FileLoaded func()
MetadataUpdate func()
TracksChanged func()
Seek func()
PlaybackRestart func()
Ended func(error, EndFileReason)
Stats func(MediaStats)
OnAstatsNormalise func([]float64, []float64)
AudioStatus func(AudioStatus)
OnSingleLeftPress func(event *gdk.Event)
OnSingleRightPress func(event *gdk.Event)
OnDoubleLeftPress func(event *gdk.Event)
OnMotion func(event *gdk.Event)
OnEnter func(event *gdk.Event)
OnLeave func(event *gdk.Event)
OnMprisBtnAction func(string)
SetCover func(string)
OnRequestCoverArt func(context.Context, context.CancelFunc) CoverArt
}
PlayerCallback -
type PlayerMessage ¶
type PlayerMessage struct {
ID string
File string
Scale float64
SeekMedia float64
Volume float64
AudioOnly bool
Pause bool
TrackType TrackType
Video string
Audio string
Subtitle string
SubtitleFontSize int
ExternalSubtitle bool
SubMarginY int
Format *Format
Track PlaylistTracks
}
PlayerMessage -
type PlaylistTracks ¶
type PlaylistTracks struct {
SourceType string
SourceID string
ID string
GetTitle func(PlaylistTracks) string
GetFormat func(PlaylistTracks) *Format
OnTitlePress func(PlaylistTracks)
OnRequestCoverArt func(src PlaylistTracks, c context.Context, cf context.CancelFunc) CoverArt
}
type ScaleImage ¶
type ScaleImage struct {
OutputName string
Format ImageFormat
Options [][]string `json:"options"`
}
ScaleImage -
type SendMessage ¶
type SendMessage struct {
Origin string `json:"origin"`
Destination []string `json:"destination"`
Channel string `json:"channel"`
SubChannel string `json:"subChannel"`
Msg interface{} `json:"msg"`
Time time.Time `json:"time"`
GatewayTime time.Time `json:"gatewayTime"`
RequestID string `json:"requestID"`
Error []string `json:"error"`
}
SendMessage -
type SetTimeout ¶
SetTimeout -
type Track ¶
type Track struct {
ID int `json:"id"`
Type string `json:"type,omitempty"`
SrcID int `json:"src-id,omitempty"`
Lang string `json:"lang,omitempty"`
Title string `json:"title,omitempty"`
Albumart bool `json:"albumart,omitempty"`
Default bool `json:"default,omitempty"`
Forced bool `json:"forced,omitempty"`
Dependent bool `json:"dependent,omitempty"`
VisualImpaired bool `json:"visual-impaired,omitempty"`
HearingImpaired bool `json:"hearing-impaired,omitempty"`
External bool `json:"external,omitempty"`
ExternalFilename string `json:"external-filename,omitempty"`
Selected bool `json:"selected,omitempty"`
MainSelection int `json:"main-selection,omitempty"`
FFindex int `json:"ff-index"`
AudioChannel int `json:"audio-channels,omitempty"`
Decoderdesc string `json:"decoder-desc,omitempty"`
Codec string `json:"codec,omitempty"`
DemuxW int `json:"demux-w,omitempty"`
DemuxH int `json:"demux-h,omitempty"`
DemuxFPS float64 `json:"demux-fps,omitempty"`
DemuxPar float64 `json:"demux-par,omitempty"`
DemuxChannelCount int `json:"demux-channel-count,omitempty"`
DemuxChannels string `json:"demux-channels,omitempty"`
DemuxSamplerate int `json:"demux-samplerate,omitempty"`
DemuxBitrate int `json:"demux-bitrate,omitempty"`
AudioParams AudioParams `json:"audio-params,omitempty"`
VideoParams VideoParams `json:"video-params,omitempty"`
}
Track -
type VideoParams ¶
type VideoParams struct {
PixelFormat string `json:"pixelformat,omitempty"`
AverageBpp int `json:"average-bpp,omitempty"`
W int `json:"w,omitempty"`
H int `json:"h,omitempty"`
DW int `json:"dw,omitempty"`
DH int `json:"dh,omitempty"`
Aspect float64 `json:"aspect,omitempty"`
Par int `json:"par,omitempty"`
ColorMatrix string `json:"colormatrix,omitempty"`
ColorLevels string `json:"colorlevels,omitempty"`
Primaries string `json:"primaries,omitempty"`
Gamma string `json:"gamma,omitempty"`
SigPeak float64 `json:"sig-peak,omitempty"`
Light string `json:"light,omitempty"`
ChromaLocation string `json:"chroma-location,omitempty"`
StereoIn string `json:"stereo-in,omitempty"`
Rotate int `json:"rotate,omitempty"`
}
VideoParams -
type VideoSource ¶
type VideoSource struct {
Border struct {
Left int
Top int
Right int
Bottom int
}
Scale struct {
X float64
Y float64
}
}
VideoSource -
type Youtube ¶
type Youtube struct {
Title string `json:"title"`
Track string `json:"track"`
Artist string `json:"artist"`
Formats []YoutubeFormat `json:"formats"`
}
Youtube -
type YoutubeFormat ¶
type YoutubeFormat struct {
URL string `json:"url"`
Ext string `json:"ext"`
Acodec string `json:"acodec"`
Vcodec string `json:"vcodec"`
FormatNote string `json:"format_note"`
Format string `json:"format"`
Width int `json:"width"`
Height int `json:"height"`
Fps float64 `json:"fps"`
Tbr float64 `json:"tbr"`
}
YoutubeFormat -
Source Files
¶
- database.go
- format.go
- interfaces.go
- player.go
- ui.go
Click to show internal directories.
Click to hide internal directories.