/
gstvideometa_1_10.go
146 lines (126 loc) · 4.4 KB
/
gstvideometa_1_10.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// Code generated by girgen. DO NOT EDIT.
package gstvideo
import (
"runtime"
"unsafe"
"github.com/OmegaRogue/gotk4-gstreamer/pkg/gst"
"github.com/diamondburned/gotk4/pkg/core/gextras"
"github.com/diamondburned/gotk4/pkg/glib/v2"
)
// #include <stdlib.h>
// #include <gst/video/video.h>
import "C"
// BufferAddVideoTimeCodeMeta attaches VideoTimeCodeMeta metadata to buffer with
// the given parameters.
//
// The function takes the following parameters:
//
// - buffer: Buffer.
// - tc: VideoTimeCode.
//
// The function returns the following values:
//
// - videoTimeCodeMeta (optional) on buffer, or (since 1.16) NULL if the
// timecode was invalid.
//
func BufferAddVideoTimeCodeMeta(buffer *gst.Buffer, tc *VideoTimeCode) *VideoTimeCodeMeta {
var _arg1 *C.GstBuffer // out
var _arg2 *C.GstVideoTimeCode // out
var _cret *C.GstVideoTimeCodeMeta // in
_arg1 = (*C.GstBuffer)(gextras.StructNative(unsafe.Pointer(buffer)))
_arg2 = (*C.GstVideoTimeCode)(gextras.StructNative(unsafe.Pointer(tc)))
_cret = C.gst_buffer_add_video_time_code_meta(_arg1, _arg2)
runtime.KeepAlive(buffer)
runtime.KeepAlive(tc)
var _videoTimeCodeMeta *VideoTimeCodeMeta // out
if _cret != nil {
_videoTimeCodeMeta = (*VideoTimeCodeMeta)(gextras.NewStructNative(unsafe.Pointer(_cret)))
}
return _videoTimeCodeMeta
}
// BufferAddVideoTimeCodeMetaFull attaches VideoTimeCodeMeta metadata to buffer
// with the given parameters.
//
// The function takes the following parameters:
//
// - buffer: Buffer.
// - fpsN: framerate numerator.
// - fpsD: framerate denominator.
// - latestDailyJam for the latest daily jam.
// - flags: VideoTimeCodeFlags.
// - hours since the daily jam.
// - minutes since the daily jam.
// - seconds since the daily jam.
// - frames since the daily jam.
// - fieldCount fields since the daily jam.
//
// The function returns the following values:
//
// - videoTimeCodeMeta on buffer, or (since 1.16) NULL if the timecode was
// invalid.
//
func BufferAddVideoTimeCodeMetaFull(buffer *gst.Buffer, fpsN, fpsD uint, latestDailyJam *glib.DateTime, flags VideoTimeCodeFlags, hours, minutes, seconds, frames, fieldCount uint) *VideoTimeCodeMeta {
var _arg1 *C.GstBuffer // out
var _arg2 C.guint // out
var _arg3 C.guint // out
var _arg4 *C.GDateTime // out
var _arg5 C.GstVideoTimeCodeFlags // out
var _arg6 C.guint // out
var _arg7 C.guint // out
var _arg8 C.guint // out
var _arg9 C.guint // out
var _arg10 C.guint // out
var _cret *C.GstVideoTimeCodeMeta // in
_arg1 = (*C.GstBuffer)(gextras.StructNative(unsafe.Pointer(buffer)))
_arg2 = C.guint(fpsN)
_arg3 = C.guint(fpsD)
_arg4 = (*C.GDateTime)(gextras.StructNative(unsafe.Pointer(latestDailyJam)))
_arg5 = C.GstVideoTimeCodeFlags(flags)
_arg6 = C.guint(hours)
_arg7 = C.guint(minutes)
_arg8 = C.guint(seconds)
_arg9 = C.guint(frames)
_arg10 = C.guint(fieldCount)
_cret = C.gst_buffer_add_video_time_code_meta_full(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10)
runtime.KeepAlive(buffer)
runtime.KeepAlive(fpsN)
runtime.KeepAlive(fpsD)
runtime.KeepAlive(latestDailyJam)
runtime.KeepAlive(flags)
runtime.KeepAlive(hours)
runtime.KeepAlive(minutes)
runtime.KeepAlive(seconds)
runtime.KeepAlive(frames)
runtime.KeepAlive(fieldCount)
var _videoTimeCodeMeta *VideoTimeCodeMeta // out
_videoTimeCodeMeta = (*VideoTimeCodeMeta)(gextras.NewStructNative(unsafe.Pointer(_cret)))
return _videoTimeCodeMeta
}
// VideoTimeCodeMeta: extra buffer metadata describing the GstVideoTimeCode of
// the frame.
//
// Each frame is assumed to have its own timecode, i.e. they are not
// automatically incremented/interpolated.
//
// An instance of this type is always passed by reference.
type VideoTimeCodeMeta struct {
*videoTimeCodeMeta
}
// videoTimeCodeMeta is the struct that's finalized.
type videoTimeCodeMeta struct {
native *C.GstVideoTimeCodeMeta
}
// Meta: parent Meta.
func (v *VideoTimeCodeMeta) Meta() *gst.Meta {
valptr := &v.native.meta
var _v *gst.Meta // out
_v = (*gst.Meta)(gextras.NewStructNative(unsafe.Pointer(valptr)))
return _v
}
// Tc: gstVideoTimeCode to attach.
func (v *VideoTimeCodeMeta) Tc() *VideoTimeCode {
valptr := &v.native.tc
var _v *VideoTimeCode // out
_v = (*VideoTimeCode)(gextras.NewStructNative(unsafe.Pointer(valptr)))
return _v
}