mirror of
https://github.com/go-gst/go-gst.git
synced 2025-10-05 16:06:55 +08:00
make feature rank use a proper rank type
This commit is contained in:
@@ -496,6 +496,9 @@ const (
|
|||||||
PadProbeTypeScheduling PadProbeType = C.GST_PAD_PROBE_TYPE_SCHEDULING // (12288) – probe push and pull
|
PadProbeTypeScheduling PadProbeType = C.GST_PAD_PROBE_TYPE_SCHEDULING // (12288) – probe push and pull
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Rank casts GstRank
|
||||||
|
type Rank uint
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RankNone Rank = C.GST_RANK_NONE // (0) - will be chosen last or not at all
|
RankNone Rank = C.GST_RANK_NONE // (0) - will be chosen last or not at all
|
||||||
RankMarginal Rank = C.GST_RANK_MARGINAL // (64) – unlikely to be chosen
|
RankMarginal Rank = C.GST_RANK_MARGINAL // (64) – unlikely to be chosen
|
||||||
@@ -503,9 +506,6 @@ const (
|
|||||||
RankPrimary Rank = C.GST_RANK_PRIMARY // (256) – will be chosen first
|
RankPrimary Rank = C.GST_RANK_PRIMARY // (256) – will be chosen first
|
||||||
)
|
)
|
||||||
|
|
||||||
// Rank casts GstRank
|
|
||||||
type Rank uint
|
|
||||||
|
|
||||||
// SchedulingFlags casts GstSchedulingFlags
|
// SchedulingFlags casts GstSchedulingFlags
|
||||||
type SchedulingFlags int
|
type SchedulingFlags int
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@ func (p *PluginFeature) GetPluginName() string {
|
|||||||
return C.GoString(pluginName)
|
return C.GoString(pluginName)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PluginFeature) SetPluginRank(rank int) {
|
func (p *PluginFeature) SetPluginRank(rank Rank) {
|
||||||
C.gst_plugin_feature_set_rank((*C.GstPluginFeature)(p.Instance()), C.guint(rank))
|
C.gst_plugin_feature_set_rank((*C.GstPluginFeature)(p.Instance()), C.guint(rank))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user