From 7d4bdbf5cef6e1b941a9f600aeea5dd472db76a6 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 7 Sep 2010 08:22:27 -0300 Subject: [PATCH] tags: Add GST_TAG_IMAGE_HORIZONTAL/VERTICAL_PPI tags Adds new tags for representing the intended PPI of images/videos API: GST_TAG_IMAGE_HORIZONTAL_PPI API: GST_TAG_IMAGE_VERTICAL_PPI Fixes #626570 --- docs/libs/gst-plugins-base-libs-sections.txt | 2 ++ gst-libs/gst/tag/tag.h | 18 ++++++++++++++++++ gst-libs/gst/tag/tags.c | 8 ++++++++ 3 files changed, 28 insertions(+) diff --git a/docs/libs/gst-plugins-base-libs-sections.txt b/docs/libs/gst-plugins-base-libs-sections.txt index d3c1d66525..d55a43a153 100644 --- a/docs/libs/gst-plugins-base-libs-sections.txt +++ b/docs/libs/gst-plugins-base-libs-sections.txt @@ -1648,6 +1648,8 @@ GST_TAG_CAPTURING_CONTRAST GST_TAG_CAPTURING_SATURATION GST_TAG_CAPTURING_FLASH_FIRED GST_TAG_CAPTURING_FLASH_MODE +GST_TAG_IMAGE_HORIZONTAL_PPI +GST_TAG_IMAGE_VERTICAL_PPI gst_tag_register_musicbrainz_tags gst_tag_freeform_string_to_utf8 gst_tag_parse_extended_comment diff --git a/gst-libs/gst/tag/tag.h b/gst-libs/gst/tag/tag.h index 17fac20be6..5130ff6b4e 100644 --- a/gst-libs/gst/tag/tag.h +++ b/gst-libs/gst/tag/tag.h @@ -306,6 +306,24 @@ G_BEGIN_DECLS */ #define GST_TAG_CAPTURING_FLASH_MODE "capturing-flash-mode" +/** + * GST_TAG_IMAGE_HORIZONTAL_PPI: + * + * Media (image/video) intended horizontal pixel density in ppi. (double) + * + * Since: 0.10.31 + */ +#define GST_TAG_IMAGE_HORIZONTAL_PPI "image-horizontal-ppi" +/** + * GST_TAG_IMAGE_VERTICAL_PPI: + * + * Media (image/video) intended vertical pixel density in ppi. (double) + * + * Since: 0.10.31 + */ +#define GST_TAG_IMAGE_VERTICAL_PPI "image-vertical-ppi" + + /* additional information for image tags */ /** diff --git a/gst-libs/gst/tag/tags.c b/gst-libs/gst/tag/tags.c index 6b4c7da501..1a9abcd6f7 100644 --- a/gst-libs/gst/tag/tags.c +++ b/gst-libs/gst/tag/tags.c @@ -144,6 +144,14 @@ gst_tag_register_tags_internal (gpointer unused) G_TYPE_STRING, _("capturing flash mode"), _("The selected flash mode while capturing and image"), NULL); + gst_tag_register (GST_TAG_IMAGE_HORIZONTAL_PPI, GST_TAG_FLAG_META, + G_TYPE_DOUBLE, _("image horizontal ppi"), + _("Media (image/video) intended horizontal pixel density in ppi"), NULL); + + gst_tag_register (GST_TAG_IMAGE_VERTICAL_PPI, GST_TAG_FLAG_META, + G_TYPE_DOUBLE, _("image vertical ppi"), + _("Media (image/video) intended vertical pixel density in ppi"), NULL); + return NULL; }