Added overlay and DGA capability for the videosink. Not really good but functional.
authorWim Taymans <wim.taymans@gmail.com>
Fri, 3 Mar 2000 22:13:00 +0000 (22:13 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Fri, 3 Mar 2000 22:13:00 +0000 (22:13 +0000)
Original commit message from CVS:
Added overlay and DGA capability for the videosink. Not really good but
functional.

gst/meta/videoraw.h
test/Makefile.am
test/videotest.c

index 4736039..ef4cedd 100644 (file)
 #ifndef __GST_META_VIDEORAW_H__
 #define __GST_META_VIDEORAW_H__
 
+#include <gst/gst.h>
+#include <gdk/gdk.h>
 #include <gst/gstmeta.h>
 
 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__ */
 
index 7c005b5..ca58fd4 100644 (file)
@@ -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)
index eaa7d77..0c97387 100644 (file)
@@ -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);