diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-07-06 20:49:52 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-07-06 20:49:52 +0000 |
commit | 95011fd7e8eb3a2ec3a87ff9dad523d18005db42 (patch) | |
tree | 6e75f9139c6520126f9344e15e1dea2a49f70f9c /gst/smpte | |
parent | 85a8dd7ecb04d043be8192e27e3c89ef8ccebe55 (diff) | |
download | gst-plugins-bad-95011fd7e8eb3a2ec3a87ff9dad523d18005db42.tar.gz gst-plugins-bad-95011fd7e8eb3a2ec3a87ff9dad523d18005db42.tar.bz2 gst-plugins-bad-95011fd7e8eb3a2ec3a87ff9dad523d18005db42.zip |
New mimetypes gone into effect today - this commit changes all old mimetypes over to the new mimetypes spec as descri...
Original commit message from CVS:
New mimetypes gone into effect today - this commit changes all old mimetypes over to the new mimetypes spec as described in the previous commit's document. Note: some plugins will break, some pipelines will break, expect HEAD to be broken or at least not 100% working for a few days, but don't forget to report bugs
Diffstat (limited to 'gst/smpte')
-rw-r--r-- | gst/smpte/gstsmpte.c | 44 | ||||
-rw-r--r-- | gst/smpte/gstsmpte.h | 2 |
2 files changed, 24 insertions, 22 deletions
diff --git a/gst/smpte/gstsmpte.c b/gst/smpte/gstsmpte.c index b6761427..bf042e4c 100644 --- a/gst/smpte/gstsmpte.c +++ b/gst/smpte/gstsmpte.c @@ -22,6 +22,7 @@ #endif #include <string.h> #include <gstsmpte.h> +#include <gst/video/video.h> #include "paint.h" /* elementfactory information */ @@ -39,10 +40,11 @@ GST_PAD_TEMPLATE_FACTORY (smpte_src_factory, "src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_CAPS_NEW ( + gst_caps_new ( "smpte_src", - "video/raw", - "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")) + "video/x-raw-yuv", + GST_VIDEO_YUV_PAD_TEMPLATE_PROPS( + GST_PROPS_FOURCC (GST_STR_FOURCC ("I420"))) ) ) @@ -50,12 +52,11 @@ GST_PAD_TEMPLATE_FACTORY (smpte_sink1_factory, "sink1", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_CAPS_NEW ( + gst_caps_new ( "smpte_sink1", - "video/raw", - "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")), - "width", GST_PROPS_INT_RANGE (0, 4096), - "height", GST_PROPS_INT_RANGE (0, 4096) + "video/x-raw-yuv", + GST_VIDEO_YUV_PAD_TEMPLATE_PROPS( + GST_PROPS_FOURCC (GST_STR_FOURCC ("I420"))) ) ) @@ -63,12 +64,11 @@ GST_PAD_TEMPLATE_FACTORY (smpte_sink2_factory, "sink2", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_CAPS_NEW ( + gst_caps_new ( "smpte_sink2", - "video/raw", - "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")), - "width", GST_PROPS_INT_RANGE (0, 4096), - "height", GST_PROPS_INT_RANGE (0, 4096) + "video/x-raw-yuv", + GST_VIDEO_YUV_PAD_TEMPLATE_PROPS( + GST_PROPS_FOURCC (GST_STR_FOURCC ("I420"))) ) ) @@ -174,8 +174,8 @@ gst_smpte_class_init (GstSMPTEClass *klass) g_param_spec_enum ("type", "Type", "The type of transition to use", GST_TYPE_SMPTE_TRANSITION_TYPE, 1, G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FPS, - g_param_spec_int ("fps", "FPS", "Frames per second if no input files are given", - 1, 255, 1, G_PARAM_READWRITE)); + g_param_spec_float ("fps", "FPS", "Frames per second if no input files are given", + 0., G_MAXFLOAT, 25., G_PARAM_READWRITE)); g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_BORDER, g_param_spec_int ("border", "Border", "The border width of the transition", 0, G_MAXINT, 0, G_PARAM_READWRITE)); @@ -235,6 +235,7 @@ gst_smpte_sinkconnect (GstPad *pad, GstCaps *caps) gst_caps_get_int (caps, "width", &smpte->width); gst_caps_get_int (caps, "height", &smpte->height); + gst_caps_get_float (caps, "framerate", &smpte->fps); gst_smpte_update_mask (smpte, smpte->type, smpte->depth, smpte->width, smpte->height); @@ -263,10 +264,10 @@ gst_smpte_init (GstSMPTE *smpte) smpte->width = 320; smpte->height = 200; + smpte->fps = 25.; smpte->duration = 64; smpte->position = 0; smpte->type = 1; - smpte->fps = 1; smpte->border = 0; smpte->depth = 16; gst_smpte_update_mask (smpte, smpte->type, smpte->depth, smpte->width, smpte->height); @@ -359,7 +360,8 @@ gst_smpte_loop (GstElement *element) "video/raw", "format", GST_PROPS_FOURCC (GST_MAKE_FOURCC ('I','4','2','0')), "width", GST_PROPS_INT (smpte->width), - "height", GST_PROPS_INT (smpte->height) + "height", GST_PROPS_INT (smpte->height), + "framerate", GST_PROPS_FLOAT (smpte->fps) ))) { gst_element_error (element, "cannot set caps"); @@ -408,12 +410,12 @@ gst_smpte_set_property (GObject *object, guint prop_id, smpte->width, smpte->height); break; } - case ARG_FPS: - smpte->fps = g_value_get_int (value); - break; case ARG_BORDER: smpte->border = g_value_get_int (value); break; + case ARG_FPS: + smpte->fps = g_value_get_float (value); + break; case ARG_DEPTH: { gint depth = g_value_get_int (value); @@ -443,7 +445,7 @@ gst_smpte_get_property (GObject *object, guint prop_id, } break; case ARG_FPS: - g_value_set_int (value, smpte->fps); + g_value_set_float (value, smpte->fps); break; case ARG_BORDER: g_value_set_int (value, smpte->border); diff --git a/gst/smpte/gstsmpte.h b/gst/smpte/gstsmpte.h index 5c863890..c51d4fbe 100644 --- a/gst/smpte/gstsmpte.h +++ b/gst/smpte/gstsmpte.h @@ -44,6 +44,7 @@ struct _GstSMPTE { gint format; gint width; gint height; + gfloat fps; gint duration; gint position; @@ -53,7 +54,6 @@ struct _GstSMPTE { *sinkpad2; gint type; - gint fps; gint border; gint depth; GstMask *mask; |