mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
video/audio: #define metadata strings.
For instance "orientation" becomes GST_VIDEO_ORIENTATION_METADATA.
This commit is contained in:
parent
9613f79c1e
commit
d1cb9c994b
5 changed files with 71 additions and 5 deletions
|
@ -157,6 +157,8 @@ GST_AUDIO_INFO_LAYOUT
|
|||
|
||||
GST_FRAMES_TO_CLOCK_TIME
|
||||
GST_CLOCK_TIME_TO_FRAMES
|
||||
GST_META_TAG_AUDIO_STR
|
||||
GST_META_TAG_AUDIO_CHANNELS_STR
|
||||
GST_AUDIO_NE
|
||||
GST_AUDIO_OE
|
||||
GST_AUDIO_RATE_RANGE
|
||||
|
@ -2119,6 +2121,11 @@ gst_video_convert_sample_async
|
|||
GstVideoAlignment
|
||||
gst_video_alignment_reset
|
||||
|
||||
GST_META_TAG_VIDEO_STR
|
||||
GST_META_TAG_VIDEO_ORIENTATION_STR
|
||||
GST_META_TAG_VIDEO_SIZE_STR
|
||||
GST_META_TAG_VIDEO_COLORSPACE_STR
|
||||
|
||||
#video-event.h
|
||||
<SUBSECTION>
|
||||
gst_video_event_new_still_frame
|
||||
|
|
|
@ -51,6 +51,23 @@ G_BEGIN_DECLS
|
|||
#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
|
||||
|
|
|
@ -157,7 +157,8 @@ GType
|
|||
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);
|
||||
|
|
|
@ -67,7 +67,11 @@ GType
|
|||
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);
|
||||
|
@ -346,7 +350,10 @@ GType
|
|||
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);
|
||||
|
@ -393,7 +400,8 @@ GType
|
|||
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 =
|
||||
|
@ -535,7 +543,10 @@ GType
|
|||
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 =
|
||||
|
|
|
@ -53,6 +53,36 @@ struct _GstVideoAlignment
|
|||
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);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue