The default on from GstVideoFilter handles this already.
return ret;
}
-static gboolean
-gst_agingtv_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
- guint * size)
-{
- GstAgingTV *filter = GST_AGINGTV (btrans);
- GstStructure *structure;
- gboolean ret = FALSE;
- gint width, height;
-
- structure = gst_caps_get_structure (caps, 0);
-
- if (gst_structure_get_int (structure, "width", &width) &&
- gst_structure_get_int (structure, "height", &height)) {
- *size = width * height * 32 / 8;
- ret = TRUE;
- GST_DEBUG_OBJECT (filter, "our frame size is %d bytes (%dx%d)", *size,
- width, height);
- }
-
- return ret;
-}
-
static inline guint
fastrand (void)
{
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_agingtv_set_caps);
- trans_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_agingtv_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_agingtv_transform);
trans_class->start = GST_DEBUG_FUNCPTR (gst_agingtv_start);
}
return ret;
}
-static gboolean
-gst_dicetv_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
- guint * size)
-{
- GstDiceTV *filter = GST_DICETV (btrans);
- GstStructure *structure;
- gboolean ret = FALSE;
- gint width, height;
-
- structure = gst_caps_get_structure (caps, 0);
-
- if (gst_structure_get_int (structure, "width", &width) &&
- gst_structure_get_int (structure, "height", &height)) {
- *size = width * height * 32 / 8;
- ret = TRUE;
- GST_DEBUG_OBJECT (filter, "our frame size is %d bytes (%dx%d)", *size,
- width, height);
- }
-
- return ret;
-}
-
static inline guint
fastrand (void)
{
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | GST_PARAM_CONTROLLABLE));
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_dicetv_set_caps);
- trans_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_dicetv_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_dicetv_transform);
}
return ret;
}
-static gboolean
-gst_edgetv_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
- guint * size)
-{
- GstEdgeTV *filter = GST_EDGETV (btrans);
- GstStructure *structure;
- gboolean ret = FALSE;
- gint width, height;
-
- structure = gst_caps_get_structure (caps, 0);
-
- if (gst_structure_get_int (structure, "width", &width) &&
- gst_structure_get_int (structure, "height", &height)) {
- *size = width * height * 32 / 8;
- ret = TRUE;
- GST_DEBUG_OBJECT (filter, "our frame size is %d bytes (%dx%d)", *size,
- width, height);
- }
-
- return ret;
-}
-
static GstFlowReturn
gst_edgetv_transform (GstBaseTransform * trans, GstBuffer * in, GstBuffer * out)
{
gobject_class->finalize = gst_edgetv_finalize;
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_edgetv_set_caps);
- trans_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_edgetv_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_edgetv_transform);
trans_class->start = GST_DEBUG_FUNCPTR (gst_edgetv_start);
}
return ret;
}
-static gboolean
-gst_quarktv_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
- guint * size)
-{
- GstQuarkTV *filter = GST_QUARKTV (btrans);
- GstStructure *structure;
- gboolean ret = FALSE;
- gint width, height;
-
- structure = gst_caps_get_structure (caps, 0);
-
- if (gst_structure_get_int (structure, "width", &width) &&
- gst_structure_get_int (structure, "height", &height)) {
- *size = width * height * 32 / 8;
- ret = TRUE;
- GST_DEBUG_OBJECT (filter, "our frame size is %d bytes (%dx%d)", *size,
- width, height);
- }
-
- return ret;
-}
-
static inline guint
fastrand (void)
{
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_quarktv_set_caps);
- trans_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_quarktv_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_quarktv_transform);
trans_class->start = GST_DEBUG_FUNCPTR (gst_quarktv_start);
}
return ret;
}
-static gboolean
-gst_revtv_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
- guint * size)
-{
- GstRevTV *filter = GST_REVTV (btrans);
- GstStructure *structure;
- gboolean ret = FALSE;
- gint width, height;
-
- structure = gst_caps_get_structure (caps, 0);
-
- if (gst_structure_get_int (structure, "width", &width) &&
- gst_structure_get_int (structure, "height", &height)) {
- *size = width * height * 32 / 8;
- ret = TRUE;
- GST_DEBUG_OBJECT (filter, "our frame size is %d bytes (%dx%d)", *size,
- width, height);
- }
-
- return ret;
-}
-
static GstFlowReturn
gst_revtv_transform (GstBaseTransform * trans, GstBuffer * in, GstBuffer * out)
{
1, 200, 50, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_revtv_set_caps);
- trans_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_revtv_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_revtv_transform);
}
return ret;
}
-static gboolean
-gst_shagadelictv_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
- guint * size)
-{
- GstShagadelicTV *filter = GST_SHAGADELICTV (btrans);
- GstStructure *structure;
- gboolean ret = FALSE;
- gint width, height;
-
- structure = gst_caps_get_structure (caps, 0);
-
- if (gst_structure_get_int (structure, "width", &width) &&
- gst_structure_get_int (structure, "height", &height)) {
- *size = width * height * 32 / 8;
- ret = TRUE;
- GST_DEBUG_OBJECT (filter, "our frame size is %d bytes (%dx%d)", *size,
- width, height);
- }
-
- return ret;
-}
-
static inline guint
fastrand (void)
{
gobject_class->finalize = gst_shagadelictv_finalize;
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_shagadelictv_set_caps);
- trans_class->get_unit_size =
- GST_DEBUG_FUNCPTR (gst_shagadelictv_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_shagadelictv_transform);
}
return ret;
}
-static gboolean
-gst_vertigotv_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
- guint * size)
-{
- GstVertigoTV *filter = GST_VERTIGOTV (btrans);
- GstStructure *structure;
- gboolean ret = FALSE;
- gint width, height;
-
- structure = gst_caps_get_structure (caps, 0);
-
- if (gst_structure_get_int (structure, "width", &width) &&
- gst_structure_get_int (structure, "height", &height)) {
- *size = width * height * 32 / 8;
- ret = TRUE;
- GST_DEBUG_OBJECT (filter, "our frame size is %d bytes (%dx%d)", *size,
- width, height);
- }
-
- return ret;
-}
-
static void
gst_vertigotv_set_parms (GstVertigoTV * filter)
{
trans_class->start = GST_DEBUG_FUNCPTR (gst_vertigotv_start);
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_vertigotv_set_caps);
- trans_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_vertigotv_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_vertigotv_transform);
}
return ret;
}
-static gboolean
-gst_warptv_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
- guint * size)
-{
- GstWarpTV *filter = GST_WARPTV (btrans);
- GstStructure *structure;
- gboolean ret = FALSE;
- gint width, height;
-
- structure = gst_caps_get_structure (caps, 0);
-
- if (gst_structure_get_int (structure, "width", &width) &&
- gst_structure_get_int (structure, "height", &height)) {
- *size = width * height * 32 / 8;
- ret = TRUE;
- GST_DEBUG_OBJECT (filter, "our frame size is %d bytes (%dx%d)", *size,
- width, height);
- }
-
- return ret;
-}
-
static void
initSinTable (GstWarpTV * filter)
{
trans_class->start = GST_DEBUG_FUNCPTR (gst_warptv_start);
trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_warptv_set_caps);
- trans_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_warptv_get_unit_size);
trans_class->transform = GST_DEBUG_FUNCPTR (gst_warptv_transform);
}