gst-plugins-base: theoradec: Set some more information on the output caps

Sebastian Dröge slomo at kemper.freedesktop.org
Tue Apr 24 13:45:23 PDT 2012


Module: gst-plugins-base
Branch: master
Commit: 8571293311288d87639b78bb9946be3bbb83cbe7
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=8571293311288d87639b78bb9946be3bbb83cbe7

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Tue Apr 24 22:05:53 2012 +0200

theoradec: Set some more information on the output caps

---

 ext/theora/gsttheoradec.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c
index 8fdf40e..6ce2406 100644
--- a/ext/theora/gsttheoradec.c
+++ b/ext/theora/gsttheoradec.c
@@ -466,9 +466,23 @@ theora_handle_type_packet (GstTheoraDec * dec, ogg_packet * packet)
   state->info.par_n = par_num;
   state->info.par_d = par_den;
 
+  /* these values are for all versions of the colorspace specified in the
+   * theora info */
   state->info.chroma_site = GST_VIDEO_CHROMA_SITE_JPEG;
-  /* FIXME : Need to specify SDTV color-matrix ... once it's handled
-   * with the backported GstVideoInfo */
+  state->info.colorimetry.range = GST_VIDEO_COLOR_RANGE_16_235;
+  state->info.colorimetry.matrix = GST_VIDEO_COLOR_MATRIX_BT601;
+  state->info.colorimetry.transfer = GST_VIDEO_TRANSFER_BT709;
+  switch (dec->info.colorspace) {
+    case TH_CS_ITU_REC_470M:
+      state->info.colorimetry.primaries = GST_VIDEO_COLOR_PRIMARIES_BT470M;
+      break;
+    case TH_CS_ITU_REC_470BG:
+      state->info.colorimetry.primaries = GST_VIDEO_COLOR_PRIMARIES_BT470BG;
+      break;
+    default:
+      state->info.colorimetry.primaries = GST_VIDEO_COLOR_PRIMARIES_UNKNOWN;
+      break;
+  }
 
   dec->have_header = TRUE;
 



More information about the gstreamer-commits mailing list