func NewPlayer() (*Player, error) { if instance == nil { return nil, errors.New("Module must be first initialized") } if player := C.libvlc_media_player_new(instance); player != nil { return &Player{player: player}, nil } return nil, getError() }
// NewPlayer creates an empty media player object. func (this *Instance) NewPlayer() (*Player, error) { if this.ptr == nil { return nil, os.EINVAL } if c := C.libvlc_media_player_new(this.ptr); c != nil { return &Player{c}, nil } return nil, checkError() }
func (vlc *VLC) NewPlayer() (*Player, error) { p := &Player{} p.instance = C.libvlc_media_player_new(vlc.instance) return p, LastError() }