示例#1
0
文件: media.go 项目: henrym/go-vlc
// Duplicate duplicates the media object.
func (this *Media) Duplicate() (*Media, error) {
	if this.ptr == nil {
		return nil, &VLCError{"Media is nil"}
	}

	if c := C.libvlc_media_duplicate(this.ptr); c != nil {
		return &Media{c}, nil
	}

	return nil, checkError()
}
示例#2
0
文件: media.go 项目: egelmex/go-vlc
// Duplicate duplicates the media object.
func (this *Media) Duplicate() (*Media, error) {
	if this.ptr == nil {
		return nil, os.EINVAL
	}

	if c := C.libvlc_media_duplicate(this.ptr); c != nil {
		return &Media{c}, nil
	}

	return nil, checkError()
}