mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 01:31:03 +00:00
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:
parent
ef63c32778
commit
58b4147fb2
3 changed files with 39 additions and 4 deletions
|
@ -21,9 +21,14 @@
|
|||
#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__ */
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue