示例#1
0
// Seek() is a wrapper around gst_element_seek().
func (v *Element) Seek(rate float64, format Format, flags SeekFlags, startType SeekType, start int64, stopType SeekType, stop int64) bool {
	c := C.gst_element_seek(v.native(),
		C.gdouble(rate),
		C.GstFormat(format),
		C.GstSeekFlags(flags),
		C.GstSeekType(startType),
		C.gint64(start),
		C.GstSeekType(stopType),
		C.gint64(stop))
	return gobool(c)
}
示例#2
0
// QueryPosition() is a wrapper around gst_element_query_position().
func (v *Element) QueryPosition(format Format) (cur int64, success bool) {
	var ccur C.gint64
	c := C.gst_element_query_position(v.native(), C.GstFormat(format), &ccur)
	return int64(ccur), gobool(c)
}
示例#3
0
// SeekSimple() is a wrapper around gst_element_seek_simple().
func (v *Element) SeekSimple(format Format, flags SeekFlags, pos int64) bool {
	c := C.gst_element_seek_simple(v.native(), C.GstFormat(format), C.GstSeekFlags(flags), C.gint64(pos))
	return gobool(c)
}