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.
This commit is contained in:
Wim Taymans 2000-03-03 22:13:00 +00:00
parent ef63c32778
commit 58b4147fb2
3 changed files with 39 additions and 4 deletions

View file

@ -21,9 +21,14 @@
#ifndef __GST_META_VIDEORAW_H__ #ifndef __GST_META_VIDEORAW_H__
#define __GST_META_VIDEORAW_H__ #define __GST_META_VIDEORAW_H__
#include <gst/gst.h>
#include <gdk/gdk.h>
#include <gst/gstmeta.h> #include <gst/gstmeta.h>
typedef struct _MetaVideoRaw MetaVideoRaw; typedef struct _MetaVideoRaw MetaVideoRaw;
typedef struct _MetaDGA MetaDGA;
typedef struct _MetaOverlay MetaOverlay;
typedef struct _OverlayClip OverlayClip;
enum { enum {
GST_META_VIDEORAW_RGB555, GST_META_VIDEORAW_RGB555,
@ -36,15 +41,44 @@ enum {
GST_META_VIDEORAW_YUV422 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 { struct _MetaVideoRaw {
GstMeta meta; GstMeta meta;
/* formatting information */ /* formatting information */
gint format; gint format;
GdkVisual *visual;
// dimensions of the video buffer
gint width; gint width;
gint height; 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__ */

View file

@ -19,7 +19,8 @@ ac3play_SOURCES = ac3play.c mem.c
noinst_HEADERS = mem.h 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) \ INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) -I$(top_srcdir) \
$(shell gnome-config --cflags gnomeui) $(shell gnome-config --cflags gnomeui)

View file

@ -59,8 +59,8 @@ int main(int argc,char *argv[]) {
gst_util_get_widget_arg(GTK_OBJECT(videosink),"widget")); 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_grow",TRUE,NULL);
gtk_object_set(GTK_OBJECT(appwindow),"allow_shrink",TRUE,NULL); gtk_object_set(GTK_OBJECT(appwindow),"allow_shrink",TRUE,NULL);
gtk_signal_connect(GTK_OBJECT(appwindow),"size-request", // gtk_signal_connect(GTK_OBJECT(appwindow),"size-request",
GTK_SIGNAL_FUNC(resize),videosink); // GTK_SIGNAL_FUNC(resize),videosink);
gtk_widget_show_all(appwindow); gtk_widget_show_all(appwindow);