mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 13:32:29 +00:00
borgify naming
Original commit message from CVS: borgify naming
This commit is contained in:
parent
4f4665ccfd
commit
b0ba6af066
2 changed files with 71 additions and 72 deletions
|
@ -54,8 +54,8 @@
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/gst-i18n-plugin.h>
|
#include <gst/gst-i18n-plugin.h>
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_debug_ximagesrc);
|
GST_DEBUG_CATEGORY_STATIC (gst_debug_ximage_src);
|
||||||
#define GST_CAT_DEFAULT gst_debug_ximagesrc
|
#define GST_CAT_DEFAULT gst_debug_ximage_src
|
||||||
|
|
||||||
/* elementfactory information */
|
/* elementfactory information */
|
||||||
static const GstElementDetails ximagesrc_details =
|
static const GstElementDetails ximagesrc_details =
|
||||||
|
@ -81,14 +81,15 @@ enum
|
||||||
PROP_SHOW_POINTER
|
PROP_SHOW_POINTER
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_BOILERPLATE (GstXImageSrc, gst_ximagesrc, GstPushSrc, GST_TYPE_PUSH_SRC);
|
GST_BOILERPLATE (GstXImageSrc, gst_ximage_src, GstPushSrc, GST_TYPE_PUSH_SRC);
|
||||||
|
|
||||||
static void gst_ximagesrc_fixate (GstPad * pad, GstCaps * caps);
|
static void gst_ximage_src_fixate (GstPad * pad, GstCaps * caps);
|
||||||
static void gst_ximagesrc_clear_bufpool (GstXImageSrc * ximagesrc);
|
static void gst_ximage_src_clear_bufpool (GstXImageSrc * ximagesrc);
|
||||||
|
|
||||||
/* Called when a buffer is returned from the pipeline */
|
/* Called when a buffer is returned from the pipeline */
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_return_buf (GstXImageSrc * ximagesrc, GstXImageSrcBuffer * ximage)
|
gst_ximage_src_return_buf (GstXImageSrc * ximagesrc,
|
||||||
|
GstXImageSrcBuffer * ximage)
|
||||||
{
|
{
|
||||||
/* If our geometry changed we can't reuse that image. */
|
/* If our geometry changed we can't reuse that image. */
|
||||||
if ((ximage->width != ximagesrc->width) ||
|
if ((ximage->width != ximagesrc->width) ||
|
||||||
|
@ -112,9 +113,9 @@ gst_ximagesrc_return_buf (GstXImageSrc * ximagesrc, GstXImageSrcBuffer * ximage)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_ximagesrc_open_display (GstXImageSrc * s, const gchar * name)
|
gst_ximage_src_open_display (GstXImageSrc * s, const gchar * name)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (GST_IS_XIMAGESRC (s), FALSE);
|
g_return_val_if_fail (GST_IS_XIMAGE_SRC (s), FALSE);
|
||||||
|
|
||||||
if (s->xcontext != NULL)
|
if (s->xcontext != NULL)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -187,21 +188,21 @@ gst_ximagesrc_open_display (GstXImageSrc * s, const gchar * name)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_ximagesrc_start (GstBaseSrc * basesrc)
|
gst_ximage_src_start (GstBaseSrc * basesrc)
|
||||||
{
|
{
|
||||||
GstXImageSrc *s = GST_XIMAGESRC (basesrc);
|
GstXImageSrc *s = GST_XIMAGE_SRC (basesrc);
|
||||||
|
|
||||||
s->last_frame_no = -1;
|
s->last_frame_no = -1;
|
||||||
|
|
||||||
return gst_ximagesrc_open_display (s, NULL);
|
return gst_ximage_src_open_display (s, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_ximagesrc_stop (GstBaseSrc * basesrc)
|
gst_ximage_src_stop (GstBaseSrc * basesrc)
|
||||||
{
|
{
|
||||||
GstXImageSrc *src = GST_XIMAGESRC (basesrc);
|
GstXImageSrc *src = GST_XIMAGE_SRC (basesrc);
|
||||||
|
|
||||||
gst_ximagesrc_clear_bufpool (src);
|
gst_ximage_src_clear_bufpool (src);
|
||||||
|
|
||||||
if (src->xcontext) {
|
if (src->xcontext) {
|
||||||
g_mutex_lock (src->x_lock);
|
g_mutex_lock (src->x_lock);
|
||||||
|
@ -214,9 +215,9 @@ gst_ximagesrc_stop (GstBaseSrc * basesrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_ximagesrc_unlock (GstBaseSrc * basesrc)
|
gst_ximage_src_unlock (GstBaseSrc * basesrc)
|
||||||
{
|
{
|
||||||
GstXImageSrc *src = GST_XIMAGESRC (basesrc);
|
GstXImageSrc *src = GST_XIMAGE_SRC (basesrc);
|
||||||
|
|
||||||
/* Awaken the create() func if it's waiting on the clock */
|
/* Awaken the create() func if it's waiting on the clock */
|
||||||
GST_OBJECT_LOCK (src);
|
GST_OBJECT_LOCK (src);
|
||||||
|
@ -230,7 +231,7 @@ gst_ximagesrc_unlock (GstBaseSrc * basesrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_ximagesrc_recalc (GstXImageSrc * src)
|
gst_ximage_src_recalc (GstXImageSrc * src)
|
||||||
{
|
{
|
||||||
if (!src->xcontext)
|
if (!src->xcontext)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -323,7 +324,7 @@ composite_pixel (GstXContext * xcontext, guchar * dest, guchar * src)
|
||||||
/* Retrieve an XImageSrcBuffer, preferably from our
|
/* Retrieve an XImageSrcBuffer, preferably from our
|
||||||
* pool of existing images and populate it from the window */
|
* pool of existing images and populate it from the window */
|
||||||
static GstXImageSrcBuffer *
|
static GstXImageSrcBuffer *
|
||||||
gst_ximagesrc_ximage_get (GstXImageSrc * ximagesrc)
|
gst_ximage_src_ximage_get (GstXImageSrc * ximagesrc)
|
||||||
{
|
{
|
||||||
GstXImageSrcBuffer *ximage = NULL;
|
GstXImageSrcBuffer *ximage = NULL;
|
||||||
GstCaps *caps = NULL;
|
GstCaps *caps = NULL;
|
||||||
|
@ -351,7 +352,7 @@ gst_ximagesrc_ximage_get (GstXImageSrc * ximagesrc)
|
||||||
g_mutex_lock (ximagesrc->x_lock);
|
g_mutex_lock (ximagesrc->x_lock);
|
||||||
ximage = gst_ximageutil_ximage_new (ximagesrc->xcontext,
|
ximage = gst_ximageutil_ximage_new (ximagesrc->xcontext,
|
||||||
GST_ELEMENT (ximagesrc), ximagesrc->width, ximagesrc->height,
|
GST_ELEMENT (ximagesrc), ximagesrc->width, ximagesrc->height,
|
||||||
(BufferReturnFunc) (gst_ximagesrc_return_buf));
|
(BufferReturnFunc) (gst_ximage_src_return_buf));
|
||||||
if (ximage == NULL) {
|
if (ximage == NULL) {
|
||||||
GST_ELEMENT_ERROR (ximagesrc, RESOURCE, WRITE, (NULL),
|
GST_ELEMENT_ERROR (ximagesrc, RESOURCE, WRITE, (NULL),
|
||||||
("could not create a %dx%d ximage", ximage->width, ximage->height));
|
("could not create a %dx%d ximage", ximage->width, ximage->height));
|
||||||
|
@ -379,7 +380,7 @@ gst_ximagesrc_ximage_get (GstXImageSrc * ximagesrc)
|
||||||
g_mutex_unlock (ximagesrc->x_lock);
|
g_mutex_unlock (ximagesrc->x_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_XIMAGESRC (ximagesrc), NULL);
|
g_return_val_if_fail (GST_IS_XIMAGE_SRC (ximagesrc), NULL);
|
||||||
|
|
||||||
#ifdef HAVE_XDAMAGE
|
#ifdef HAVE_XDAMAGE
|
||||||
if (ximagesrc->have_xdamage) {
|
if (ximagesrc->have_xdamage) {
|
||||||
|
@ -512,16 +513,16 @@ gst_ximagesrc_ximage_get (GstXImageSrc * ximagesrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_ximagesrc_create (GstPushSrc * bs, GstBuffer ** buf)
|
gst_ximage_src_create (GstPushSrc * bs, GstBuffer ** buf)
|
||||||
{
|
{
|
||||||
GstXImageSrc *s = GST_XIMAGESRC (bs);
|
GstXImageSrc *s = GST_XIMAGE_SRC (bs);
|
||||||
GstXImageSrcBuffer *image;
|
GstXImageSrcBuffer *image;
|
||||||
GstClockTime base_time;
|
GstClockTime base_time;
|
||||||
GstClockTime next_capture_ts;
|
GstClockTime next_capture_ts;
|
||||||
GstClockTime dur;
|
GstClockTime dur;
|
||||||
gint64 next_frame_no;
|
gint64 next_frame_no;
|
||||||
|
|
||||||
if (!gst_ximagesrc_recalc (s)) {
|
if (!gst_ximage_src_recalc (s)) {
|
||||||
GST_ELEMENT_ERROR (s, RESOURCE, FAILED,
|
GST_ELEMENT_ERROR (s, RESOURCE, FAILED,
|
||||||
(_("Changing resolution at runtime is not yet supported.")), (NULL));
|
(_("Changing resolution at runtime is not yet supported.")), (NULL));
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
|
@ -588,7 +589,7 @@ gst_ximagesrc_create (GstPushSrc * bs, GstBuffer ** buf)
|
||||||
s->last_frame_no = next_frame_no;
|
s->last_frame_no = next_frame_no;
|
||||||
GST_OBJECT_UNLOCK (s);
|
GST_OBJECT_UNLOCK (s);
|
||||||
|
|
||||||
image = gst_ximagesrc_ximage_get (s);
|
image = gst_ximage_src_ximage_get (s);
|
||||||
if (!image)
|
if (!image)
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
|
|
||||||
|
@ -600,10 +601,10 @@ gst_ximagesrc_create (GstPushSrc * bs, GstBuffer ** buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_set_property (GObject * object, guint prop_id,
|
gst_ximage_src_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstXImageSrc *src = GST_XIMAGESRC (object);
|
GstXImageSrc *src = GST_XIMAGE_SRC (object);
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_DISPLAY_NAME:
|
case PROP_DISPLAY_NAME:
|
||||||
|
@ -623,10 +624,10 @@ gst_ximagesrc_set_property (GObject * object, guint prop_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_get_property (GObject * object, guint prop_id, GValue * value,
|
gst_ximage_src_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
GParamSpec * pspec)
|
GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstXImageSrc *src = GST_XIMAGESRC (object);
|
GstXImageSrc *src = GST_XIMAGE_SRC (object);
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_DISPLAY_NAME:
|
case PROP_DISPLAY_NAME:
|
||||||
|
@ -649,7 +650,7 @@ gst_ximagesrc_get_property (GObject * object, guint prop_id, GValue * value,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_clear_bufpool (GstXImageSrc * ximagesrc)
|
gst_ximage_src_clear_bufpool (GstXImageSrc * ximagesrc)
|
||||||
{
|
{
|
||||||
g_mutex_lock (ximagesrc->pool_lock);
|
g_mutex_lock (ximagesrc->pool_lock);
|
||||||
while (ximagesrc->buffer_pool != NULL) {
|
while (ximagesrc->buffer_pool != NULL) {
|
||||||
|
@ -664,7 +665,7 @@ gst_ximagesrc_clear_bufpool (GstXImageSrc * ximagesrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_base_init (gpointer g_class)
|
gst_ximage_src_base_init (gpointer g_class)
|
||||||
{
|
{
|
||||||
GstElementClass *ec = GST_ELEMENT_CLASS (g_class);
|
GstElementClass *ec = GST_ELEMENT_CLASS (g_class);
|
||||||
|
|
||||||
|
@ -673,16 +674,16 @@ gst_ximagesrc_base_init (gpointer g_class)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_dispose (GObject * object)
|
gst_ximage_src_dispose (GObject * object)
|
||||||
{
|
{
|
||||||
/* Drop references in the buffer_pool */
|
/* Drop references in the buffer_pool */
|
||||||
gst_ximagesrc_clear_bufpool (GST_XIMAGESRC (object));
|
gst_ximage_src_clear_bufpool (GST_XIMAGE_SRC (object));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_finalize (GObject * object)
|
gst_ximage_src_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
GstXImageSrc *src = GST_XIMAGESRC (object);
|
GstXImageSrc *src = GST_XIMAGE_SRC (object);
|
||||||
|
|
||||||
if (src->xcontext)
|
if (src->xcontext)
|
||||||
ximageutil_xcontext_clear (src->xcontext);
|
ximageutil_xcontext_clear (src->xcontext);
|
||||||
|
@ -694,16 +695,16 @@ gst_ximagesrc_finalize (GObject * object)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstCaps *
|
static GstCaps *
|
||||||
gst_ximagesrc_get_caps (GstBaseSrc * bs)
|
gst_ximage_src_get_caps (GstBaseSrc * bs)
|
||||||
{
|
{
|
||||||
GstXImageSrc *s = GST_XIMAGESRC (bs);
|
GstXImageSrc *s = GST_XIMAGE_SRC (bs);
|
||||||
GstXContext *xcontext;
|
GstXContext *xcontext;
|
||||||
|
|
||||||
if ((!s->xcontext) && (!gst_ximagesrc_open_display (s, NULL)))
|
if ((!s->xcontext) && (!gst_ximage_src_open_display (s, NULL)))
|
||||||
return gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC (s)->
|
return gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC (s)->
|
||||||
srcpad));
|
srcpad));
|
||||||
|
|
||||||
if (!gst_ximagesrc_recalc (s))
|
if (!gst_ximage_src_recalc (s))
|
||||||
return gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC (s)->
|
return gst_caps_copy (gst_pad_get_pad_template_caps (GST_BASE_SRC (s)->
|
||||||
srcpad));
|
srcpad));
|
||||||
|
|
||||||
|
@ -724,9 +725,9 @@ gst_ximagesrc_get_caps (GstBaseSrc * bs)
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_ximagesrc_set_caps (GstBaseSrc * bs, GstCaps * caps)
|
gst_ximage_src_set_caps (GstBaseSrc * bs, GstCaps * caps)
|
||||||
{
|
{
|
||||||
GstXImageSrc *s = GST_XIMAGESRC (bs);
|
GstXImageSrc *s = GST_XIMAGE_SRC (bs);
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
const GValue *new_fps;
|
const GValue *new_fps;
|
||||||
|
|
||||||
|
@ -750,7 +751,7 @@ gst_ximagesrc_set_caps (GstBaseSrc * bs, GstCaps * caps)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_fixate (GstPad * pad, GstCaps * caps)
|
gst_ximage_src_fixate (GstPad * pad, GstCaps * caps)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
|
@ -763,16 +764,16 @@ gst_ximagesrc_fixate (GstPad * pad, GstCaps * caps)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_class_init (GstXImageSrcClass * klass)
|
gst_ximage_src_class_init (GstXImageSrcClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gc = G_OBJECT_CLASS (klass);
|
GObjectClass *gc = G_OBJECT_CLASS (klass);
|
||||||
GstBaseSrcClass *bc = GST_BASE_SRC_CLASS (klass);
|
GstBaseSrcClass *bc = GST_BASE_SRC_CLASS (klass);
|
||||||
GstPushSrcClass *push_class = GST_PUSH_SRC_CLASS (klass);
|
GstPushSrcClass *push_class = GST_PUSH_SRC_CLASS (klass);
|
||||||
|
|
||||||
gc->set_property = gst_ximagesrc_set_property;
|
gc->set_property = gst_ximage_src_set_property;
|
||||||
gc->get_property = gst_ximagesrc_get_property;
|
gc->get_property = gst_ximage_src_get_property;
|
||||||
gc->dispose = gst_ximagesrc_dispose;
|
gc->dispose = gst_ximage_src_dispose;
|
||||||
gc->finalize = gst_ximagesrc_finalize;
|
gc->finalize = gst_ximage_src_finalize;
|
||||||
|
|
||||||
g_object_class_install_property (gc, PROP_DISPLAY_NAME,
|
g_object_class_install_property (gc, PROP_DISPLAY_NAME,
|
||||||
g_param_spec_string ("display_name", "Display", "X Display Name", NULL,
|
g_param_spec_string ("display_name", "Display", "X Display Name", NULL,
|
||||||
|
@ -787,20 +788,20 @@ gst_ximagesrc_class_init (GstXImageSrcClass * klass)
|
||||||
|
|
||||||
parent_class = g_type_class_peek_parent (klass);
|
parent_class = g_type_class_peek_parent (klass);
|
||||||
|
|
||||||
push_class->create = gst_ximagesrc_create;
|
push_class->create = gst_ximage_src_create;
|
||||||
bc->get_caps = gst_ximagesrc_get_caps;
|
bc->get_caps = gst_ximage_src_get_caps;
|
||||||
bc->set_caps = gst_ximagesrc_set_caps;
|
bc->set_caps = gst_ximage_src_set_caps;
|
||||||
bc->start = gst_ximagesrc_start;
|
bc->start = gst_ximage_src_start;
|
||||||
bc->stop = gst_ximagesrc_stop;
|
bc->stop = gst_ximage_src_stop;
|
||||||
bc->unlock = gst_ximagesrc_unlock;
|
bc->unlock = gst_ximage_src_unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_ximagesrc_init (GstXImageSrc * ximagesrc, GstXImageSrcClass * klass)
|
gst_ximage_src_init (GstXImageSrc * ximagesrc, GstXImageSrcClass * klass)
|
||||||
{
|
{
|
||||||
gst_base_src_set_live (GST_BASE_SRC (ximagesrc), TRUE);
|
gst_base_src_set_live (GST_BASE_SRC (ximagesrc), TRUE);
|
||||||
gst_pad_set_fixatecaps_function (GST_BASE_SRC_PAD (ximagesrc),
|
gst_pad_set_fixatecaps_function (GST_BASE_SRC_PAD (ximagesrc),
|
||||||
gst_ximagesrc_fixate);
|
gst_ximage_src_fixate);
|
||||||
|
|
||||||
ximagesrc->pool_lock = g_mutex_new ();
|
ximagesrc->pool_lock = g_mutex_new ();
|
||||||
ximagesrc->x_lock = g_mutex_new ();
|
ximagesrc->x_lock = g_mutex_new ();
|
||||||
|
@ -812,11 +813,11 @@ plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_debug_ximagesrc, "ximagesrc", 0,
|
GST_DEBUG_CATEGORY_INIT (gst_debug_ximage_src, "ximagesrc", 0,
|
||||||
"ximagesrc element debug");
|
"ximagesrc element debug");
|
||||||
|
|
||||||
ret = gst_element_register (plugin, "ximagesrc", GST_RANK_NONE,
|
ret = gst_element_register (plugin, "ximagesrc", GST_RANK_NONE,
|
||||||
GST_TYPE_XIMAGESRC);
|
GST_TYPE_XIMAGE_SRC);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GST_XIMAGESRC_H__
|
#ifndef __GST_XIMAGE_SRC_H__
|
||||||
#define __GST_XIMAGESRC_H__
|
#define __GST_XIMAGE_SRC_H__
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstpushsrc.h>
|
#include <gst/base/gstpushsrc.h>
|
||||||
|
@ -32,16 +32,16 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GST_TYPE_XIMAGESRC (gst_ximagesrc_get_type())
|
#define GST_TYPE_XIMAGE_SRC (gst_ximage_src_get_type())
|
||||||
#define GST_XIMAGESRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_XIMAGESRC,GstXImageSrc))
|
#define GST_XIMAGE_SRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_XIMAGE_SRC,GstXImageSrc))
|
||||||
#define GST_XIMAGESRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_XIMAGESRC,GstXImageSrc))
|
#define GST_XIMAGE_SRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_XIMAGE_SRC,GstXImageSrc))
|
||||||
#define GST_IS_XIMAGESRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XIMAGESRC))
|
#define GST_IS_XIMAGE_SRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_XIMAGE_SRC))
|
||||||
#define GST_IS_XIMAGESRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_XIMAGESRC))
|
#define GST_IS_XIMAGE_SRC_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_XIMAGE_SRC))
|
||||||
|
|
||||||
typedef struct _GstXImageSrc GstXImageSrc;
|
typedef struct _GstXImageSrc GstXImageSrc;
|
||||||
typedef struct _GstXImageSrcClass GstXImageSrcClass;
|
typedef struct _GstXImageSrcClass GstXImageSrcClass;
|
||||||
|
|
||||||
GType gst_ximagesrc_get_type (void) G_GNUC_CONST;
|
GType gst_ximage_src_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
struct _GstXImageSrc
|
struct _GstXImageSrc
|
||||||
{
|
{
|
||||||
|
@ -51,19 +51,19 @@ struct _GstXImageSrc
|
||||||
GstXContext *xcontext;
|
GstXContext *xcontext;
|
||||||
gint width;
|
gint width;
|
||||||
gint height;
|
gint height;
|
||||||
|
|
||||||
Window xwindow;
|
Window xwindow;
|
||||||
gchar *display_name;
|
gchar *display_name;
|
||||||
guint screen_num;
|
guint screen_num;
|
||||||
|
|
||||||
/* Desired output framerate */
|
/* Desired output framerate */
|
||||||
gint fps_n;
|
gint fps_n;
|
||||||
gint fps_d;
|
gint fps_d;
|
||||||
|
|
||||||
/* for framerate sync */
|
/* for framerate sync */
|
||||||
GstClockID clock_id;
|
GstClockID clock_id;
|
||||||
gint64 last_frame_no;
|
gint64 last_frame_no;
|
||||||
|
|
||||||
/* Protect X Windows calls */
|
/* Protect X Windows calls */
|
||||||
GMutex *x_lock;
|
GMutex *x_lock;
|
||||||
|
|
||||||
|
@ -78,7 +78,6 @@ struct _GstXImageSrc
|
||||||
#ifdef HAVE_XFIXES
|
#ifdef HAVE_XFIXES
|
||||||
int fixes_event_base;
|
int fixes_event_base;
|
||||||
XFixesCursorImage *cursor_image;
|
XFixesCursorImage *cursor_image;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_XDAMAGE
|
#ifdef HAVE_XDAMAGE
|
||||||
Damage damage;
|
Damage damage;
|
||||||
|
@ -86,7 +85,6 @@ struct _GstXImageSrc
|
||||||
XserverRegion damage_region;
|
XserverRegion damage_region;
|
||||||
GC damage_copy_gc;
|
GC damage_copy_gc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstXImageSrcClass
|
struct _GstXImageSrcClass
|
||||||
|
@ -96,4 +94,4 @@ struct _GstXImageSrcClass
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __GST_XIMAGESRC_H__ */
|
#endif /* __GST_XIMAGE_SRC_H__ */
|
||||||
|
|
Loading…
Reference in a new issue