From 58b4147fb296bdc5d05d4233344fef790676aa8e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 3 Mar 2000 22:13:00 +0000 Subject: [PATCH] Added overlay and DGA capability for the videosink. Not really good but functional. Original commit message from CVS: Added overlay and DGA capability for the videosink. Not really good but functional. --- gst/meta/videoraw.h | 36 +++++++++++++++++++++++++++++++++++- test/Makefile.am | 3 ++- test/videotest.c | 4 ++-- 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/gst/meta/videoraw.h b/gst/meta/videoraw.h index 4736039054..ef4cedd1ab 100644 --- a/gst/meta/videoraw.h +++ b/gst/meta/videoraw.h @@ -21,9 +21,14 @@ #ifndef __GST_META_VIDEORAW_H__ #define __GST_META_VIDEORAW_H__ +#include +#include #include typedef struct _MetaVideoRaw MetaVideoRaw; +typedef struct _MetaDGA MetaDGA; +typedef struct _MetaOverlay MetaOverlay; +typedef struct _OverlayClip OverlayClip; enum { GST_META_VIDEORAW_RGB555, @@ -36,15 +41,44 @@ enum { GST_META_VIDEORAW_YUV422 }; +struct _OverlayClip { + int x1, x2, y1, y2; +}; + +struct _MetaDGA { + // the base address of the screen + void *base; + // the dimensions of the screen + int swidth, sheight; +}; + +struct _MetaOverlay { + // the position of the window + int wx, wy; + // a reference to the object sending overlay change events + GstObject *overlay_element; + // the number of overlay regions + int clip_count; + // the overlay regions of the display window + struct _OverlayClip overlay_clip[32]; + + gboolean did_overlay; +}; struct _MetaVideoRaw { GstMeta meta; /* formatting information */ gint format; + GdkVisual *visual; + // dimensions of the video buffer gint width; gint height; + // a pointer to the overlay info if the sink supports this + MetaOverlay *overlay_info; + // a pointer to the DGA info if the sink supports this + MetaDGA *dga_info; }; -#endif /* __GST_META_AUDIORAW_H__ */ +#endif /* __GST_META_VIDEORAW_H__ */ diff --git a/test/Makefile.am b/test/Makefile.am index 7c005b5ef0..ca58fd40e7 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -19,7 +19,8 @@ ac3play_SOURCES = ac3play.c mem.c noinst_HEADERS = mem.h -LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la +LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la \ + $(top_builddir)/plugins/videosink/libvideosink.la INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) \ $(shell gnome-config --cflags gnomeui) diff --git a/test/videotest.c b/test/videotest.c index eaa7d77620..0c973873bb 100644 --- a/test/videotest.c +++ b/test/videotest.c @@ -59,8 +59,8 @@ int main(int argc,char *argv[]) { gst_util_get_widget_arg(GTK_OBJECT(videosink),"widget")); gtk_object_set(GTK_OBJECT(appwindow),"allow_grow",TRUE,NULL); gtk_object_set(GTK_OBJECT(appwindow),"allow_shrink",TRUE,NULL); - gtk_signal_connect(GTK_OBJECT(appwindow),"size-request", - GTK_SIGNAL_FUNC(resize),videosink); +// gtk_signal_connect(GTK_OBJECT(appwindow),"size-request", +// GTK_SIGNAL_FUNC(resize),videosink); gtk_widget_show_all(appwindow);