mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-05 07:56:51 +08:00
27 lines
544 B
Go
27 lines
544 B
Go
package gst
|
||
|
||
// #include "gst.go.h"
|
||
import "C"
|
||
|
||
// URIType casts C GstURIType to a go type
|
||
type URIType C.GstURIType
|
||
|
||
// Type cast URI types
|
||
const (
|
||
URIUnknown URIType = C.GST_URI_UNKNOWN // (0) – The URI direction is unknown
|
||
URISink = C.GST_URI_SINK // (1) – The URI is a consumer.
|
||
URISource = C.GST_URI_SRC // (2) - The URI is a producer.
|
||
)
|
||
|
||
func (u URIType) String() string {
|
||
switch u {
|
||
case URIUnknown:
|
||
return "Unknown"
|
||
case URISink:
|
||
return "Sink"
|
||
case URISource:
|
||
return "Source"
|
||
}
|
||
return ""
|
||
}
|