mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-08 23:42:28 +00:00
docs: fix docuemntation warnings (and reindent)
This commit is contained in:
parent
30ce2680dc
commit
270dd376bc
3 changed files with 17 additions and 21 deletions
|
@ -42,7 +42,6 @@ typedef struct _GstV4l2RadioClass GstV4l2RadioClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstV4l2Radio:
|
* GstV4l2Radio:
|
||||||
* @v4l2object: private #GstV4l2Object
|
|
||||||
*
|
*
|
||||||
* Opaque video4linux2 radio tuner element
|
* Opaque video4linux2 radio tuner element
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -49,7 +49,6 @@ typedef GstFlowReturn (*GstV4l2SrcGetFunc)(GstV4l2Src * v4l2src, GstBuffer ** bu
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstV4l2Src:
|
* GstV4l2Src:
|
||||||
* @pushsrc: parent #GstPushSrc.
|
|
||||||
*
|
*
|
||||||
* Opaque object.
|
* Opaque object.
|
||||||
*/
|
*/
|
||||||
|
@ -83,7 +82,7 @@ struct _GstV4l2Src
|
||||||
|
|
||||||
gint fps_d, fps_n; /* framerate if device is open */
|
gint fps_d, fps_n; /* framerate if device is open */
|
||||||
GstClockTime duration; /* duration of one frame */
|
GstClockTime duration; /* duration of one frame */
|
||||||
|
|
||||||
GstClockTime ctrl_time;
|
GstClockTime ctrl_time;
|
||||||
|
|
||||||
GstV4l2SrcGetFunc get_frame;
|
GstV4l2SrcGetFunc get_frame;
|
||||||
|
@ -92,7 +91,7 @@ struct _GstV4l2Src
|
||||||
struct _GstV4l2SrcClass
|
struct _GstV4l2SrcClass
|
||||||
{
|
{
|
||||||
GstPushSrcClass parent_class;
|
GstPushSrcClass parent_class;
|
||||||
|
|
||||||
GList *v4l2_class_devices;
|
GList *v4l2_class_devices;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct _GstV4l2Xv
|
||||||
{
|
{
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
gint port, idle_id, event_id;
|
gint port, idle_id, event_id;
|
||||||
GMutex *mutex; /* to serialize calls to X11 */
|
GMutex *mutex; /* to serialize calls to X11 */
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (v4l2xv_debug);
|
GST_DEBUG_CATEGORY_STATIC (v4l2xv_debug);
|
||||||
|
@ -179,7 +179,7 @@ gst_v4l2_xoverlay_stop (GstV4l2Object * v4l2object)
|
||||||
|
|
||||||
/* should be called with mutex held */
|
/* should be called with mutex held */
|
||||||
static gboolean
|
static gboolean
|
||||||
get_render_rect (GstV4l2Object * v4l2object, GstVideoRectangle *rect)
|
get_render_rect (GstV4l2Object * v4l2object, GstVideoRectangle * rect)
|
||||||
{
|
{
|
||||||
GstV4l2Xv *v4l2xv = v4l2object->xv;
|
GstV4l2Xv *v4l2xv = v4l2object->xv;
|
||||||
if (v4l2xv && v4l2xv->dpy && v4l2object->xwindow_id) {
|
if (v4l2xv && v4l2xv->dpy && v4l2object->xwindow_id) {
|
||||||
|
@ -197,8 +197,8 @@ get_render_rect (GstV4l2Object * v4l2object, GstVideoRectangle *rect)
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
gst_v4l2_xoverlay_get_render_rect (GstV4l2Object *v4l2object,
|
gst_v4l2_xoverlay_get_render_rect (GstV4l2Object * v4l2object,
|
||||||
GstVideoRectangle *rect)
|
GstVideoRectangle * rect)
|
||||||
{
|
{
|
||||||
GstV4l2Xv *v4l2xv = v4l2object->xv;
|
GstV4l2Xv *v4l2xv = v4l2object->xv;
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
@ -272,7 +272,7 @@ event_refresh (gpointer data)
|
||||||
* interesting.
|
* interesting.
|
||||||
*/
|
*/
|
||||||
while (XCheckWindowEvent (v4l2xv->dpy, v4l2object->xwindow_id,
|
while (XCheckWindowEvent (v4l2xv->dpy, v4l2object->xwindow_id,
|
||||||
PointerMotionMask, &e)) {
|
PointerMotionMask, &e)) {
|
||||||
switch (e.type) {
|
switch (e.type) {
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
pointer_x = e.xmotion.x;
|
pointer_x = e.xmotion.x;
|
||||||
|
@ -307,18 +307,16 @@ event_refresh (gpointer data)
|
||||||
GST_DEBUG_OBJECT (v4l2object->element,
|
GST_DEBUG_OBJECT (v4l2object->element,
|
||||||
"button %d pressed over window at %d,%d",
|
"button %d pressed over window at %d,%d",
|
||||||
e.xbutton.button, e.xbutton.x, e.xbutton.y);
|
e.xbutton.button, e.xbutton.x, e.xbutton.y);
|
||||||
gst_navigation_send_mouse_event (
|
gst_navigation_send_mouse_event (GST_NAVIGATION
|
||||||
GST_NAVIGATION (v4l2object->element),
|
(v4l2object->element), "mouse-button-press", e.xbutton.button,
|
||||||
"mouse-button-press", e.xbutton.button,
|
|
||||||
e.xbutton.x, e.xbutton.y);
|
e.xbutton.x, e.xbutton.y);
|
||||||
break;
|
break;
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
GST_DEBUG_OBJECT (v4l2object->element,
|
GST_DEBUG_OBJECT (v4l2object->element,
|
||||||
"button %d released over window at %d,%d",
|
"button %d released over window at %d,%d",
|
||||||
e.xbutton.button, e.xbutton.x, e.xbutton.y);
|
e.xbutton.button, e.xbutton.x, e.xbutton.y);
|
||||||
gst_navigation_send_mouse_event (
|
gst_navigation_send_mouse_event (GST_NAVIGATION
|
||||||
GST_NAVIGATION (v4l2object->element),
|
(v4l2object->element), "mouse-button-release", e.xbutton.button,
|
||||||
"mouse-button-release", e.xbutton.button,
|
|
||||||
e.xbutton.x, e.xbutton.y);
|
e.xbutton.x, e.xbutton.y);
|
||||||
break;
|
break;
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
|
@ -334,8 +332,7 @@ event_refresh (gpointer data)
|
||||||
GST_DEBUG_OBJECT (v4l2object->element,
|
GST_DEBUG_OBJECT (v4l2object->element,
|
||||||
"key %d pressed over window at %d,%d (%s)",
|
"key %d pressed over window at %d,%d (%s)",
|
||||||
e.xkey.keycode, e.xkey.x, e.xkey.y, key_str);
|
e.xkey.keycode, e.xkey.x, e.xkey.y, key_str);
|
||||||
gst_navigation_send_key_event (
|
gst_navigation_send_key_event (GST_NAVIGATION (v4l2object->element),
|
||||||
GST_NAVIGATION (v4l2object->element),
|
|
||||||
e.type == KeyPress ? "key-press" : "key-release", key_str);
|
e.type == KeyPress ? "key-press" : "key-release", key_str);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -421,9 +418,11 @@ gst_v4l2_xoverlay_set_window_handle (GstV4l2Object * v4l2object, guintptr id)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_v4l2_xoverlay_prepare_xwindow_id:
|
* gst_v4l2_xoverlay_prepare_xwindow_id:
|
||||||
* @param v4l2object
|
* @v4l2object: the v4l2object
|
||||||
* @param required TRUE if display is required (ie. TRUE for v4l2sink, but
|
* @required: %TRUE if display is required (ie. TRUE for v4l2sink, but
|
||||||
* FALSE for any other element with optional overlay capabilities)
|
* FALSE for any other element with optional overlay capabilities)
|
||||||
|
*
|
||||||
|
* Helper function to create a windo if none is set from the application.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_v4l2_xoverlay_prepare_xwindow_id (GstV4l2Object * v4l2object,
|
gst_v4l2_xoverlay_prepare_xwindow_id (GstV4l2Object * v4l2object,
|
||||||
|
@ -468,8 +467,7 @@ gst_v4l2_xoverlay_prepare_xwindow_id (GstV4l2Object * v4l2object,
|
||||||
event_mask = ExposureMask | StructureNotifyMask;
|
event_mask = ExposureMask | StructureNotifyMask;
|
||||||
if (GST_IS_NAVIGATION (v4l2object->element)) {
|
if (GST_IS_NAVIGATION (v4l2object->element)) {
|
||||||
event_mask |= PointerMotionMask |
|
event_mask |= PointerMotionMask |
|
||||||
KeyPressMask | KeyReleaseMask |
|
KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask;
|
||||||
ButtonPressMask | ButtonReleaseMask;
|
|
||||||
}
|
}
|
||||||
XSelectInput (v4l2xv->dpy, win, event_mask);
|
XSelectInput (v4l2xv->dpy, win, event_mask);
|
||||||
v4l2xv->event_id = g_timeout_add (45, event_refresh, v4l2object);
|
v4l2xv->event_id = g_timeout_add (45, event_refresh, v4l2object);
|
||||||
|
|
Loading…
Reference in a new issue