Commit d99ae29b authored by Julien Moutte Moutte's avatar Julien Moutte Moutte

Complete rewrite/port of

Original commit message from CVS:
2005-11-02  Julien MOUTTE  <julien@moutte.net>

* configure.ac:
* ext/Makefile.am:
* ext/directfb/Makefile.am:
* ext/directfb/dfbvideosink.c:
(gst_dfbvideosink_get_format_name),
(gst_dfbvideosink_surface_create),
(gst_dfbvideosink_surface_destroy),
(gst_dfbvideosink_event_thread), (gst_dfbvideosink_enum_layers),
(gst_dfbvideosink_enum_vmodes), (gst_dfbvideosink_enum_devices),
(gst_dfbvideosink_setup), (gst_dfbvideosink_cleanup),
(gst_dfbvideosink_get_format_from_caps),
(gst_dfbvideosink_get_caps_from_format),
(gst_dfbvideosink_can_blit_from_format),
(gst_dfbvideosink_get_best_vmode), (gst_dfbvideosink_getcaps),
(gst_dfbvideosink_setcaps), (gst_dfbvideosink_change_state),
(gst_dfbvideosink_get_times), (gst_dfbvideosink_center_rect),
(gst_dfbvideosink_show_frame),
(gst_dfbvideosink_bufferpool_clear),
(gst_dfbvideosink_buffer_alloc), (gst_dfbsurface_finalize),
(gst_dfbsurface_init), (gst_dfbsurface_class_init),
(gst_dfbsurface_get_type),
(gst_dfbvideosink_interface_supported),
(gst_dfbvideosink_interface_init),
(gst_dfbvideosink_navigation_send_event),
(gst_dfbvideosink_navigation_init),
(gst_dfbvideosink_set_property),
(gst_dfbvideosink_get_property),
(gst_dfbvideosink_init), (gst_dfbvideosink_base_init),
(gst_dfbvideosink_class_init), (gst_dfbvideosink_get_type),
(plugin_init):
* ext/directfb/dfbvideosink.h:
* ext/directfb/directfbvideosink.c:
* ext/directfb/directfbvideosink.h: Complete rewrite/port of
DirectFB video sink to 0.9. Handles reverse negotiation,
hardware
scaling, navigation, buffer allocation from video memory etc...
parent 801be361
2005-11-02 Julien MOUTTE <julien@moutte.net>
* configure.ac:
* ext/Makefile.am:
* ext/directfb/Makefile.am:
* ext/directfb/dfbvideosink.c: (gst_dfbvideosink_get_format_name),
(gst_dfbvideosink_surface_create),
(gst_dfbvideosink_surface_destroy),
(gst_dfbvideosink_event_thread), (gst_dfbvideosink_enum_layers),
(gst_dfbvideosink_enum_vmodes), (gst_dfbvideosink_enum_devices),
(gst_dfbvideosink_setup), (gst_dfbvideosink_cleanup),
(gst_dfbvideosink_get_format_from_caps),
(gst_dfbvideosink_get_caps_from_format),
(gst_dfbvideosink_can_blit_from_format),
(gst_dfbvideosink_get_best_vmode), (gst_dfbvideosink_getcaps),
(gst_dfbvideosink_setcaps), (gst_dfbvideosink_change_state),
(gst_dfbvideosink_get_times), (gst_dfbvideosink_center_rect),
(gst_dfbvideosink_show_frame), (gst_dfbvideosink_bufferpool_clear),
(gst_dfbvideosink_buffer_alloc), (gst_dfbsurface_finalize),
(gst_dfbsurface_init), (gst_dfbsurface_class_init),
(gst_dfbsurface_get_type), (gst_dfbvideosink_interface_supported),
(gst_dfbvideosink_interface_init),
(gst_dfbvideosink_navigation_send_event),
(gst_dfbvideosink_navigation_init),
(gst_dfbvideosink_set_property), (gst_dfbvideosink_get_property),
(gst_dfbvideosink_init), (gst_dfbvideosink_base_init),
(gst_dfbvideosink_class_init), (gst_dfbvideosink_get_type),
(plugin_init):
* ext/directfb/dfbvideosink.h:
* ext/directfb/directfbvideosink.c:
* ext/directfb/directfbvideosink.h: Complete rewrite/port of
DirectFB video sink to 0.9. Handles reverse negotiation, hardware
scaling, navigation, buffer allocation from video memory etc...
2005-10-31 Edgard Lima <edgard.lima@indt.org.br>
* gst-plugins-bad/ext/sdl/sdlvideosink.c:
......
......@@ -324,6 +324,18 @@ dnl ###########################
dnl # Configure external libs #
dnl ###########################
dnl **** DirectFB ****
translit(dnm, m, l) AM_CONDITIONAL(USE_DIRECTFB, true)
GST_CHECK_FEATURE(DIRECTFB, [directfb], dfbvideosink , [
PKG_CHECK_MODULES(DIRECTFB, directfb, [
HAVE_DIRECTFB="yes"
AC_SUBST(DIRECTFB_CFLAGS)
AC_SUBST(DIRECTFB_LIBS)
], [
HAVE_DIRECTFB="no"
])
])
dnl **** Free AAC Encoder (FAAC) ****
translit(dnm, m, l) AM_CONDITIONAL(USE_FAAC, true)
GST_CHECK_FEATURE(FAAC, [AAC encoder plug-in], faac, [
......@@ -470,6 +482,7 @@ gst/qtdemux/Makefile
gst/tta/Makefile
sys/Makefile
ext/Makefile
ext/directfb/Makefile
ext/faac/Makefile
ext/faad/Makefile
ext/gsm/Makefile
......
......@@ -34,11 +34,11 @@ CDAUDIO_DIR=
DIRAC_DIR=
# endif
# if USE_DIRECTFB
# DIRECTFB_DIR=directfb
# else
if USE_DIRECTFB
DIRECTFB_DIR=directfb
else
DIRECTFB_DIR=
# endif
endif
# if USE_DIVX
# DIVX_DIR=divx
......
plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
plugin_LTLIBRARIES = libgstdirectfbvideosink.la
plugin_LTLIBRARIES = libgstdfbvideosink.la
libgstdirectfbvideosink_la_SOURCES = directfbvideosink.c
libgstdirectfbvideosink_la_CFLAGS = $(GST_CFLAGS) \
$(DIRECTFB_CFLAGS) \
$(GST_OPT_CFLAGS)
libgstdirectfbvideosink_la_LIBADD = $(DIRECTFB_LIBS) \
$(top_builddir)/gst-libs/gst/libgstinterfaces-$(GST_MAJORMINOR).la
libgstdirectfbvideosink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstdfbvideosink_la_SOURCES = dfbvideosink.c
libgstdfbvideosink_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) \
$(DIRECTFB_CFLAGS)
libgstdfbvideosink_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-$(GST_MAJORMINOR) \
-lgstinterfaces-$(GST_MAJORMINOR) \
$(DIRECTFB_LIBS)
libgstdfbvideosink_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
noinst_HEADERS = directfbvideosink.h
noinst_HEADERS = dfbvideosink.h
This diff is collapsed.
/* GStreamer DirectFB plugin
* Copyright (C) 2004 Julien MOUTTE <julien@moutte.net>
* Copyright (C) 2005 Julien MOUTTE <julien@moutte.net>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
......@@ -17,8 +17,8 @@
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_DIRECTFBVIDEOSINK_H__
#define __GST_DIRECTFBVIDEOSINK_H__
#ifndef __GST_DFBVIDEOSINK_H__
#define __GST_DFBVIDEOSINK_H__
#include <gst/video/videosink.h>
......@@ -26,41 +26,82 @@
G_BEGIN_DECLS
#define GST_TYPE_DIRECTFBVIDEOSINK (gst_directfbvideosink_get_type())
#define GST_DIRECTFBVIDEOSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DIRECTFBVIDEOSINK, GstDirectFBVideoSink))
#define GST_DIRECTFBVIDEOSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DIRECTFBVIDEOSINK, GstDirectFBVideoSink))
#define GST_IS_DIRECTFBVIDEOSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DIRECTFBVIDEOSINK))
#define GST_IS_DIRECTFBVIDEOSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DIRECTFBVIDEOSINK))
#define GST_TYPE_DFBVIDEOSINK (gst_dfbvideosink_get_type())
#define GST_DFBVIDEOSINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DFBVIDEOSINK, GstDfbVideoSink))
#define GST_DFBVIDEOSINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_DFBVIDEOSINK, GstDfbVideoSink))
#define GST_IS_DFBVIDEOSINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DFBVIDEOSINK))
#define GST_IS_DFBVIDEOSINK_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_DFBVIDEOSINK))
typedef struct _GstDirectFBVideoSink GstDirectFBVideoSink;
typedef struct _GstDirectFBVideoSinkClass GstDirectFBVideoSinkClass;
typedef struct _GstDfbVideoSink GstDfbVideoSink;
typedef struct _GstDfbVideoSinkClass GstDfbVideoSinkClass;
struct _GstDirectFBVideoSink {
#define GST_TYPE_DFBSURFACE (gst_dfbsurface_get_type())
#define GST_IS_DFBSURFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DFBSURFACE))
#define GST_DFBSURFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DFBSURFACE, GstDfbSurface))
typedef struct _GstDfbSurface GstDfbSurface;
struct _GstDfbSurface {
GstBuffer buffer; /* We extend GstBuffer */
IDirectFBSurface *surface;
gint width;
gint height;
DFBSurfacePixelFormat pixel_format;
GstDfbVideoSink *dfbvideosink;
};
typedef struct _GstDfbVMode GstDfbVMode;
struct _GstDfbVMode {
gint width;
gint height;
gint bpp;
};
struct _GstDfbVideoSink {
/* Our element stuff */
GstVideoSink videosink;
GSList *buffer_pool;
gdouble framerate;
guint video_width, video_height; /* size of incoming video */
gint video_width, video_height; /* size of incoming video */
gint out_width, out_height;
GstClockTime time;
/* Standalone */
IDirectFB *dfb;
IDirectFB *directfb;
GSList *vmodes; /* Video modes */
gint layer_id;
IDirectFBDisplayLayer *layer;
IDirectFBSurface *surface;
IDirectFBSurface *foreign_surface;
IDirectFBSurface *primary;
IDirectFBEventBuffer *event_buffer;
GThread *event_thread;
/* Embedded */
IDirectFBSurface *ext_surface;
DFBSurfacePixelFormat pixel_format;
gboolean surface_locked;
gboolean internal_surface;
gboolean hw_scaling;
gboolean backbuffer;
gboolean setup;
gboolean running;
};
struct _GstDirectFBVideoSinkClass {
struct _GstDfbVideoSinkClass {
GstVideoSinkClass parent_class;
};
GType gst_directfbvideosink_get_type (void);
GType gst_dfbvideosink_get_type (void);
GType gst_dfbsurface_get_type (void);
G_END_DECLS
#endif /* __GST_DIRECTFBVIDEOSINK_H__ */
#endif /* __GST_DFBVIDEOSINK_H__ */
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment