mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
sys/: Add debug categories, fix overlay disabling.
Original commit message from CVS: * sys/v4l/gstv4lxoverlay.c: (gst_v4l_xoverlay_interface_init), (gst_v4l_xoverlay_set_xwindow_id): * sys/v4l2/gstv4l2xoverlay.c: (gst_v4l2_xoverlay_interface_init), (gst_v4l2_xoverlay_set_xwindow_id): Add debug categories, fix overlay disabling.
This commit is contained in:
parent
94bd7dde98
commit
1b2a3e6984
2 changed files with 23 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
2005-01-10 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* sys/v4l/gstv4lxoverlay.c: (gst_v4l_xoverlay_interface_init),
|
||||
(gst_v4l_xoverlay_set_xwindow_id):
|
||||
* sys/v4l2/gstv4l2xoverlay.c: (gst_v4l2_xoverlay_interface_init),
|
||||
(gst_v4l2_xoverlay_set_xwindow_id):
|
||||
Add debug categories, fix overlay disabling.
|
||||
|
||||
2005-01-10 Stephane LOEUILLET <stephane.loeuillet@tiscali.fr>
|
||||
|
||||
* ext/alsa/gstalsa.c: (gst_alsa_class_init), (gst_alsa_get_caps):
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
#include "gstv4l2element.h"
|
||||
#include "v4l2_calls.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (v4l2xv_debug);
|
||||
#define GST_CAT_DEFAULT v4l2xv_debug
|
||||
|
||||
struct _GstV4l2Xv
|
||||
{
|
||||
Display *dpy;
|
||||
|
@ -51,6 +54,9 @@ gst_v4l2_xoverlay_interface_init (GstXOverlayClass * klass)
|
|||
{
|
||||
/* default virtual functions */
|
||||
klass->set_xwindow_id = gst_v4l2_xoverlay_set_xwindow_id;
|
||||
|
||||
GST_DEBUG_CATEGORY_INIT (v4l2xv_debug, "v4l2xv", 0,
|
||||
"V4L2 XOverlay interface debugging");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -168,13 +174,19 @@ gst_v4l2_xoverlay_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id)
|
|||
XWindowAttributes attr;
|
||||
gboolean change = (v4l2element->xwindow_id != xwindow_id);
|
||||
|
||||
GST_LOG_OBJECT (v4l2element, "Setting XID to %lx", (gulong) xwindow_id);
|
||||
|
||||
if (v4l2xv)
|
||||
g_mutex_lock (v4l2xv->mutex);
|
||||
|
||||
if (change) {
|
||||
if (v4l2element->xwindow_id) {
|
||||
if (v4l2element->xwindow_id && v4l2xv) {
|
||||
GST_DEBUG_OBJECT (v4l2element,
|
||||
"Deactivating old port %lx", v4l2element->xwindow_id);
|
||||
|
||||
XvSelectPortNotify (v4l2xv->dpy, v4l2xv->port, 0);
|
||||
XvSelectVideoNotify (v4l2xv->dpy, v4l2element->xwindow_id, 0);
|
||||
XvStopVideo (v4l2xv->dpy, v4l2xv->port, v4l2element->xwindow_id);
|
||||
}
|
||||
|
||||
v4l2element->xwindow_id = xwindow_id;
|
||||
|
@ -187,6 +199,8 @@ gst_v4l2_xoverlay_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id)
|
|||
}
|
||||
|
||||
if (change) {
|
||||
GST_DEBUG_OBJECT (v4l2element, "Activating new port %lx", xwindow_id);
|
||||
|
||||
/* draw */
|
||||
XvSelectPortNotify (v4l2xv->dpy, v4l2xv->port, 1);
|
||||
XvSelectVideoNotify (v4l2xv->dpy, v4l2element->xwindow_id, 1);
|
||||
|
|
Loading…
Reference in a new issue