summaryrefslogtreecommitdiffstats
path: root/ext/snapshot
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-07-06 20:49:52 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-07-06 20:49:52 +0000
commit95011fd7e8eb3a2ec3a87ff9dad523d18005db42 (patch)
tree6e75f9139c6520126f9344e15e1dea2a49f70f9c /ext/snapshot
parent85a8dd7ecb04d043be8192e27e3c89ef8ccebe55 (diff)
downloadgst-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 'ext/snapshot')
-rw-r--r--ext/snapshot/gstsnapshot.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/ext/snapshot/gstsnapshot.c b/ext/snapshot/gstsnapshot.c
index 6af87f2c..859d5600 100644
--- a/ext/snapshot/gstsnapshot.c
+++ b/ext/snapshot/gstsnapshot.c
@@ -24,6 +24,7 @@
#include <inttypes.h>
#include "gstsnapshot.h"
+#include <gst/video/video.h>
#define MAX_HEIGHT 2048
@@ -42,15 +43,14 @@ GST_PAD_TEMPLATE_FACTORY (snapshot_src_factory,
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- GST_CAPS_NEW (
+ gst_caps_new (
"snapshot_src",
- "video/raw",
- "format", GST_PROPS_LIST (
+ "video/x-raw-yuv",
+ GST_VIDEO_YUV_PAD_TEMPLATE_PROPS (
+ GST_PROPS_LIST (
GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2"))
- ),
- "width", GST_PROPS_INT_RANGE(0, G_MAXINT),
- "height", GST_PROPS_INT_RANGE(0, G_MAXINT)
+ ))
)
)
@@ -58,15 +58,14 @@ GST_PAD_TEMPLATE_FACTORY (snapshot_sink_factory,
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
- GST_CAPS_NEW (
+ gst_caps_new (
"snapshot_src",
- "video/raw",
- "format", GST_PROPS_LIST (
- GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
- GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2"))
- ),
- "width", GST_PROPS_INT_RANGE(0, G_MAXINT),
- "height", GST_PROPS_INT_RANGE(0, G_MAXINT)
+ "video/x-raw-yuv",
+ GST_VIDEO_YUV_PAD_TEMPLATE_PROPS (
+ GST_PROPS_LIST (
+ GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
+ GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2"))
+ ))
)
)
@@ -172,6 +171,7 @@ gst_snapshot_sinkconnect (GstPad *pad, GstCaps *caps)
{
GstSnapshot *filter;
GstCaps *from_caps, *to_caps;
+ gfloat fps;
filter = GST_SNAPSHOT (gst_pad_get_parent (pad));
@@ -180,20 +180,21 @@ gst_snapshot_sinkconnect (GstPad *pad, GstCaps *caps)
gst_caps_get_int (caps, "width", &filter->width);
gst_caps_get_int (caps, "height", &filter->height);
+ gst_caps_get_float (caps, "framerate", &fps);
gst_caps_get_fourcc_int (caps, "format", &filter->format);
filter->to_bpp = 24;
to_caps = GST_CAPS_NEW (
"snapshot_conversion",
- "video/raw",
- "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("RGB ")),
- "width", GST_PROPS_INT( filter->width ),
- "height", GST_PROPS_INT( filter->height ),
+ "video/x-raw-rgb",
+ "width", GST_PROPS_INT( filter->width ),
+ "height", GST_PROPS_INT( filter->height ),
"red_mask", GST_PROPS_INT (0x0000FF),
"green_mask", GST_PROPS_INT (0x00FF00),
"blue_mask", GST_PROPS_INT (0xFF0000),
- "bpp", GST_PROPS_INT( 24 )
+ "bpp", GST_PROPS_INT( 24 ),
+ "framerate", GST_PROPS_FLOAT (fps)
);
switch ( filter->format )
@@ -202,10 +203,11 @@ gst_snapshot_sinkconnect (GstPad *pad, GstCaps *caps)
case GST_MAKE_FOURCC('I','4','2','0'):
from_caps = GST_CAPS_NEW (
"snapshot_from",
- "video/raw",
- "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
- "width", GST_PROPS_INT( filter->width ),
- "height", GST_PROPS_INT( filter->height )
+ "video/x-raw-yuv",
+ "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
+ "width", GST_PROPS_INT( filter->width ),
+ "height", GST_PROPS_INT( filter->height ),
+ "framerate", GST_PROPS_FLOAT (fps)
);
filter->converter = gst_colorspace_yuv2rgb_get_converter ( from_caps, to_caps );