#define GST_CLOCK_TIME_TO_FRAMES(clocktime, rate) \
gst_util_uint64_scale_round (clocktime, rate, GST_SECOND)
+/* metadata macros */
+
+/**
+ * GST_META_TAG_AUDIO_STR:
+ * This metadata is relevant for audio streams.
+ *
+ * Since: 1.2
+ */
+#define GST_META_TAG_AUDIO_STR "audio"
+/**
+ * GST_META_TAG_AUDIO_CHANNELS_STR:
+ * This metadata stays relevant as long as channels are unchanged.
+ *
+ * Since: 1.2
+ */
+#define GST_META_TAG_AUDIO_CHANNELS_STR "channels"
+
/*
* this library defines and implements some helper functions for audio
* handling
gst_audio_downmix_meta_api_get_type (void)
{
static volatile GType type;
- static const gchar *tags[] = { NULL };
+ static const gchar *tags[] =
+ { GST_META_TAG_AUDIO_STR, GST_META_TAG_AUDIO_CHANNELS_STR, NULL };
if (g_once_init_enter (&type)) {
GType _type = gst_meta_api_type_register ("GstAudioDownmixMetaAPI", tags);
gst_video_meta_api_get_type (void)
{
static volatile GType type = 0;
- static const gchar *tags[] = { "memory", "colorspace", "size", NULL };
+ static const gchar *tags[] =
+ { GST_META_TAG_VIDEO_STR, GST_META_TAG_MEMORY_STR,
+ GST_META_TAG_VIDEO_COLORSPACE_STR,
+ GST_META_TAG_VIDEO_SIZE_STR, NULL
+ };
if (g_once_init_enter (&type)) {
GType _type = gst_meta_api_type_register ("GstVideoMetaAPI", tags);
gst_video_crop_meta_api_get_type (void)
{
static volatile GType type = 0;
- static const gchar *tags[] = { "size", "orientation", NULL };
+ static const gchar *tags[] =
+ { GST_META_TAG_VIDEO_STR, GST_META_TAG_VIDEO_SIZE_STR,
+ GST_META_TAG_VIDEO_ORIENTATION_STR, NULL
+ };
if (g_once_init_enter (&type)) {
GType _type = gst_meta_api_type_register ("GstVideoCropMetaAPI", tags);
gst_video_gl_texture_upload_meta_api_get_type (void)
{
static volatile GType type = 0;
- static const gchar *tags[] = { "memory", NULL };
+ static const gchar *tags[] =
+ { GST_META_TAG_VIDEO_STR, GST_META_TAG_MEMORY_STR, NULL };
if (g_once_init_enter (&type)) {
GType _type =
gst_video_region_of_interest_meta_api_get_type (void)
{
static volatile GType type;
- static const gchar *tags[] = { "orientation", " size", NULL };
+ static const gchar *tags[] =
+ { GST_META_TAG_VIDEO_STR, GST_META_TAG_VIDEO_ORIENTATION_STR,
+ GST_META_TAG_VIDEO_SIZE_STR, NULL
+ };
if (g_once_init_enter (&type)) {
GType _type =
guint stride_align[GST_VIDEO_MAX_PLANES];
};
+/* metadata macros */
+/**
+ * GST_META_TAG_VIDEO_STR:
+ * This metadata is relevant for video streams.
+ *
+ * Since: 1.2
+ */
+#define GST_META_TAG_VIDEO_STR "video"
+/**
+ * GST_META_TAG_VIDEO_ORIENTATION_STR:
+ * This metadata stays relevant as long as video orientation is unchanged.
+ *
+ * Since: 1.2
+ */
+#define GST_META_TAG_VIDEO_ORIENTATION_STR "orientation"
+/**
+ * GST_META_TAG_VIDEO_SIZE_STR:
+ * This metadata stays relevant as long as video size is unchanged.
+ *
+ * Since: 1.2
+ */
+#define GST_META_TAG_VIDEO_SIZE_STR "size"
+/**
+ * GST_META_TAG_VIDEO_COLORSPACE_STR:
+ * This metadata stays relevant as long as video colorspace is unchanged.
+ *
+ * Since: 1.2
+ */
+#define GST_META_TAG_VIDEO_COLORSPACE_STR "colorspace"
+
void gst_video_alignment_reset (GstVideoAlignment *align);