mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-06 08:27:03 +08:00
deprecate old gst functions and types
This commit is contained in:
@@ -16,6 +16,8 @@ const (
|
||||
DomainStream Domain = "STREAM"
|
||||
)
|
||||
|
||||
//
|
||||
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
|
||||
func (d Domain) toQuark() C.GQuark {
|
||||
switch d {
|
||||
case DomainCore:
|
||||
@@ -100,6 +102,8 @@ const (
|
||||
|
||||
// GError is a Go wrapper for a C GError in the context of GStreamer. It implements the error interface
|
||||
// and provides additional functions for retrieving debug strings and details.
|
||||
//
|
||||
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
|
||||
type GError struct {
|
||||
errMsg, debugStr string
|
||||
structure *Structure
|
||||
@@ -110,21 +114,33 @@ type GError struct {
|
||||
|
||||
// Message is an alias to `Error()`. It's for clarity when this object
|
||||
// is parsed from a `GST_MESSAGE_INFO` or `GST_MESSAGE_WARNING`.
|
||||
//
|
||||
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
|
||||
func (e *GError) Message() string { return e.Error() }
|
||||
|
||||
// Error implements the error interface and returns the error message.
|
||||
//
|
||||
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
|
||||
func (e *GError) Error() string { return e.errMsg }
|
||||
|
||||
// DebugString returns any debug info alongside the error.
|
||||
//
|
||||
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
|
||||
func (e *GError) DebugString() string { return e.debugStr }
|
||||
|
||||
// Structure returns the structure of the error message which may contain additional metadata.
|
||||
//
|
||||
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
|
||||
func (e *GError) Structure() *Structure { return e.structure }
|
||||
|
||||
// Code returns the error code of the error message.
|
||||
//
|
||||
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
|
||||
func (e *GError) Code() ErrorCode { return e.code }
|
||||
|
||||
// NewGError wraps the given error inside a GError (to be used with message constructors).
|
||||
//
|
||||
// Deprecated: This is handwritten and will be removed in a future version. Please use the autogenerated bindings instead.
|
||||
func NewGError(code ErrorCode, err error) *GError {
|
||||
return &GError{
|
||||
errMsg: err.Error(),
|
||||
|
Reference in New Issue
Block a user