mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +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
6686d9e7ee
commit
9b2f2510e2
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>
|
2005-01-10 Stephane LOEUILLET <stephane.loeuillet@tiscali.fr>
|
||||||
|
|
||||||
* ext/alsa/gstalsa.c: (gst_alsa_class_init), (gst_alsa_get_caps):
|
* ext/alsa/gstalsa.c: (gst_alsa_class_init), (gst_alsa_get_caps):
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
#include "gstv4lelement.h"
|
#include "gstv4lelement.h"
|
||||||
#include "v4l_calls.h"
|
#include "v4l_calls.h"
|
||||||
|
|
||||||
|
GST_DEBUG_CATEGORY_STATIC (v4lxv_debug);
|
||||||
|
#define GST_CAT_DEFAULT v4lxv_debug
|
||||||
|
|
||||||
struct _GstV4lXv
|
struct _GstV4lXv
|
||||||
{
|
{
|
||||||
Display *dpy;
|
Display *dpy;
|
||||||
|
@ -52,6 +55,9 @@ gst_v4l_xoverlay_interface_init (GstXOverlayClass * klass)
|
||||||
{
|
{
|
||||||
/* default virtual functions */
|
/* default virtual functions */
|
||||||
klass->set_xwindow_id = gst_v4l_xoverlay_set_xwindow_id;
|
klass->set_xwindow_id = gst_v4l_xoverlay_set_xwindow_id;
|
||||||
|
|
||||||
|
GST_DEBUG_CATEGORY_INIT (v4lxv_debug, "v4lxv", 0,
|
||||||
|
"V4L XOverlay interface debugging");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -169,13 +175,19 @@ gst_v4l_xoverlay_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id)
|
||||||
XWindowAttributes attr;
|
XWindowAttributes attr;
|
||||||
gboolean change = (v4lelement->xwindow_id != xwindow_id);
|
gboolean change = (v4lelement->xwindow_id != xwindow_id);
|
||||||
|
|
||||||
|
GST_LOG_OBJECT (v4lelement, "Changing port to %lx", xwindow_id);
|
||||||
|
|
||||||
if (v4lxv)
|
if (v4lxv)
|
||||||
g_mutex_lock (v4lxv->mutex);
|
g_mutex_lock (v4lxv->mutex);
|
||||||
|
|
||||||
if (change) {
|
if (change) {
|
||||||
if (v4lelement->xwindow_id) {
|
if (v4lelement->xwindow_id && v4lxv) {
|
||||||
|
GST_DEBUG_OBJECT (v4lelement,
|
||||||
|
"Disabling port %lx", v4lelement->xwindow_id);
|
||||||
|
|
||||||
XvSelectPortNotify (v4lxv->dpy, v4lxv->port, 0);
|
XvSelectPortNotify (v4lxv->dpy, v4lxv->port, 0);
|
||||||
XvSelectVideoNotify (v4lxv->dpy, v4lelement->xwindow_id, 0);
|
XvSelectVideoNotify (v4lxv->dpy, v4lelement->xwindow_id, 0);
|
||||||
|
XvStopVideo (v4lxv->dpy, v4lxv->port, v4lelement->xwindow_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
v4lelement->xwindow_id = xwindow_id;
|
v4lelement->xwindow_id = xwindow_id;
|
||||||
|
@ -188,6 +200,8 @@ gst_v4l_xoverlay_set_xwindow_id (GstXOverlay * overlay, XID xwindow_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (change) {
|
if (change) {
|
||||||
|
GST_DEBUG_OBJECT (v4lelement, "Enabling port %lx", xwindow_id);
|
||||||
|
|
||||||
/* draw */
|
/* draw */
|
||||||
XvSelectPortNotify (v4lxv->dpy, v4lxv->port, 1);
|
XvSelectPortNotify (v4lxv->dpy, v4lxv->port, 1);
|
||||||
XvSelectVideoNotify (v4lxv->dpy, v4lelement->xwindow_id, 1);
|
XvSelectVideoNotify (v4lxv->dpy, v4lelement->xwindow_id, 1);
|
||||||
|
|
Loading…
Reference in a new issue