func NewMediaFromPath(path string) (*Media, error) {
	return newMedia(path, true)
}
NewMediaFromPath creates a new media instance based on the media
located at the specified path.
package vlc
import "C"
import (
	"fmt"
	"io"
	"math"
	"os"
	"time"
	"unsafe"
)
type MediaType uint
const (
	MediaTypeUnknown MediaType = iota
	MediaTypeFile
	MediaTypeDirectory
	MediaTypeDisc
	MediaTypeStream
	MediaTypePlaylist
)
type MediaState uint
const (
	MediaNothingSpecial MediaState = iota
	MediaOpening
	MediaBuffering
	MediaPlaying
	MediaPaused
	MediaStopped
	MediaEnded
	MediaError
)
type MediaMetaKey uint
const (
	MediaTitle MediaMetaKey = iota
	MediaArtist
	MediaGenre
	MediaCopyright
	MediaAlbum
	MediaTrackNumber
	MediaDescription
	MediaRating
	MediaDate
	MediaSetting
	MediaURL
	MediaLanguage
	MediaNowPlaying
	MediaPublisher
	MediaEncodedBy
	MediaArtworkURL
	MediaTrackID
	MediaTrackTotal
	MediaDirector
	MediaSeason
	MediaEpisode
	MediaShowName
	MediaActors
	MediaAlbumArtist
	MediaDiscNumber
	MediaDiscTotal
)
func (mt MediaMetaKey) Validate() error {
	if mt > MediaDiscTotal {
		return fmt.Errorf("invalid media meta key: %d", mt)
	}
	return nil
}
type MediaParseOption uint
const (
	MediaParseLocal MediaParseOption = 0x00
	MediaParseNetwork MediaParseOption = 0x01
	MediaFetchLocal MediaParseOption = 0x02
	MediaFetchNetwork MediaParseOption = 0x04
	MediaParseInteract MediaParseOption = 0x08
)
type MediaParseStatus uint
const (
	MediaParseUnstarted MediaParseStatus = iota
	MediaParseSkipped
	MediaParseFailed
	MediaParseTimeout
	MediaParseDone
)
type MediaStats struct {
	ReadBytes    int      
	InputBitRate float64  
	DemuxReadBytes     int      
	DemuxBitRate       float64  
	DemuxCorrupted     int      
	DemuxDiscontinuity int      
	DecodedVideo      int  
	DisplayedPictures int  
	LostPictures      int  
	DecodedAudio       int  
	PlayedAudioBuffers int  
	LostAudioBuffers   int  
}
func newMediaStats(st *C.libvlc_media_stats_t) (*MediaStats, error) {
	if st == nil {
		return nil, ErrInvalidMediaStats
	}
	return &MediaStats{
		ReadBytes:    int(st.i_read_bytes),
		InputBitRate: float64(st.f_input_bitrate),
		DemuxReadBytes:     int(st.i_demux_read_bytes),
		DemuxBitRate:       float64(st.f_demux_bitrate),
		DemuxCorrupted:     int(st.i_demux_corrupted),
		DemuxDiscontinuity: int(st.i_demux_discontinuity),
		DecodedVideo:      int(st.i_decoded_video),
		DisplayedPictures: int(st.i_displayed_pictures),
		LostPictures:      int(st.i_lost_pictures),
		DecodedAudio:       int(st.i_decoded_audio),
		PlayedAudioBuffers: int(st.i_played_abuffers),
		LostAudioBuffers:   int(st.i_lost_abuffers),
	}, nil
}
type MediaScreenOptions struct {
	X      int  
	Y      int  
	Width  int  
	Height int  
	FPS float64
	FollowMouse bool
	CursorImage string
	FragmentSize int
}
type mediaData struct {
	readerID objectID
	userData interface{}
}
type Media struct {
	media *C.libvlc_media_t
}