diff options
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | examples/gstplay/Makefile.am | 3 | ||||
-rw-r--r-- | gst-libs/gst/play/Makefile.am | 5 | ||||
-rw-r--r-- | gst-libs/gst/play/gstplay.c | 7 | ||||
-rw-r--r-- | gst-libs/gst/play/gstplay.h | 1 | ||||
-rw-r--r-- | gst-libs/gst/play/play.c | 7 | ||||
-rw-r--r-- | gst-libs/gst/play/play.h | 1 | ||||
-rw-r--r-- | gst-libs/gst/video/gstvideosink.c | 37 | ||||
-rw-r--r-- | gst-libs/gst/video/gstvideosink.h | 9 | ||||
-rw-r--r-- | gst-libs/gst/video/videosink.h | 9 | ||||
-rw-r--r-- | sys/ximage/ximagesink.c | 5 | ||||
-rw-r--r-- | sys/xvimage/xvimagesink.c | 3 | ||||
-rw-r--r-- | tests/old/examples/gstplay/Makefile.am | 3 |
13 files changed, 43 insertions, 67 deletions
@@ -1,3 +1,23 @@ +2004-01-07 Julien MOUTTE <julien@moutte.net> + + * examples/gstplay/Makefile.am: Adding the interface library. + * gst-libs/gst/play/Makefile.am: Adding the interface library. + * gst-libs/gst/play/gstplay.c: (gst_play_set_video_sink): Connecting to the XOverlay size signal instead of GstVideoSink. + * gst-libs/gst/play/gstplay.h: Including the XOverlay interface to check + GST_IS_X_OVERLAY before signal connect. + * gst-libs/gst/video/gstvideosink.c: (gst_videosink_class_init): + Removing the have_video_size signal. + * gst-libs/gst/video/gstvideosink.h: Removing the have_video_size signal + and associated public method. + * sys/ximage/ximagesink.c: (gst_ximagesink_handle_xevents), + (gst_ximagesink_sinkconnect): Using XOverlay public method to fire size + signal. + * sys/xvideo/xvideosink.c: (gst_xvideosink_sinkconnect), + (gst_xvideosink_xwindow_new): Using XOverlay public method to fire size + signal. + * sys/xvimage/xvimagesink.c: (gst_xvimagesink_sinkconnect): + Using XOverlay public method to fire size signal. + 2004-01-07 David Schleef <ds@schleef.org> * gst/videofilter/Makefile.am: diff --git a/examples/gstplay/Makefile.am b/examples/gstplay/Makefile.am index f80a8bfab..795fc3620 100644 --- a/examples/gstplay/Makefile.am +++ b/examples/gstplay/Makefile.am @@ -5,5 +5,6 @@ player_SOURCES = player.c player_CFLAGS = $(GST_CFLAGS) player_LDFLAGS = \ $(GST_LIBS) \ - $(top_builddir)/gst-libs/gst/play/libgstplay-@GST_MAJORMINOR@.la + $(top_builddir)/gst-libs/gst/play/libgstplay-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/libgstinterfaces-$(GST_MAJORMINOR).la diff --git a/gst-libs/gst/play/Makefile.am b/gst-libs/gst/play/Makefile.am index db444521f..82a6d672c 100644 --- a/gst-libs/gst/play/Makefile.am +++ b/gst-libs/gst/play/Makefile.am @@ -8,7 +8,10 @@ libgstplay_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@ libgstplay_@GST_MAJORMINOR@include_HEADERS = gstplay.h libgstplay_@GST_MAJORMINOR@_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_CFLAGS) -libgstplay_@GST_MAJORMINOR@_la_LIBADD = $(GST_LIBS) $(GST_PLUGINS_LIBS) $(GST_CONTROL_LIBS) +libgstplay_@GST_MAJORMINOR@_la_LIBADD = + $(GST_LIBS) $(GST_PLUGINS_LIBS) \ + $(GST_CONTROL_LIBS) \ + $(top_builddir)/gst-libs/gst/libgstinterfaces-$(GST_MAJORMINOR).la libgstplay_@GST_MAJORMINOR@_la_LDFLAGS = \ -version-info @GST_PLUGINS_LIBVERSION@ diff --git a/gst-libs/gst/play/gstplay.c b/gst-libs/gst/play/gstplay.c index d79e06f37..7c7ef8494 100644 --- a/gst-libs/gst/play/gstplay.c +++ b/gst-libs/gst/play/gstplay.c @@ -685,8 +685,11 @@ gst_play_set_video_sink (GstPlay *play, GstElement *video_sink) if (GST_IS_ELEMENT (video_sink_element)) { g_hash_table_replace (play->priv->elements, "video_sink_element", video_sink_element); - g_signal_connect (G_OBJECT (video_sink_element), "have_video_size", - G_CALLBACK (gst_play_have_video_size), play); + if (GST_IS_X_OVERLAY (video_sink_element)) { + g_signal_connect (G_OBJECT (video_sink_element), + "desired_size_changed", + G_CALLBACK (gst_play_have_video_size), play); + } } gst_element_set_state (video_sink, GST_STATE (GST_ELEMENT(play))); diff --git a/gst-libs/gst/play/gstplay.h b/gst-libs/gst/play/gstplay.h index 0c45d9431..484b7bc0f 100644 --- a/gst-libs/gst/play/gstplay.h +++ b/gst-libs/gst/play/gstplay.h @@ -21,6 +21,7 @@ #define __GST_PLAY_H__ #include <gst/gst.h> +#include <gst/xoverlay/xoverlay.h> #define GST_TYPE_PLAY (gst_play_get_type()) #define GST_PLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLAY, GstPlay)) diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c index d79e06f37..7c7ef8494 100644 --- a/gst-libs/gst/play/play.c +++ b/gst-libs/gst/play/play.c @@ -685,8 +685,11 @@ gst_play_set_video_sink (GstPlay *play, GstElement *video_sink) if (GST_IS_ELEMENT (video_sink_element)) { g_hash_table_replace (play->priv->elements, "video_sink_element", video_sink_element); - g_signal_connect (G_OBJECT (video_sink_element), "have_video_size", - G_CALLBACK (gst_play_have_video_size), play); + if (GST_IS_X_OVERLAY (video_sink_element)) { + g_signal_connect (G_OBJECT (video_sink_element), + "desired_size_changed", + G_CALLBACK (gst_play_have_video_size), play); + } } gst_element_set_state (video_sink, GST_STATE (GST_ELEMENT(play))); diff --git a/gst-libs/gst/play/play.h b/gst-libs/gst/play/play.h index 0c45d9431..484b7bc0f 100644 --- a/gst-libs/gst/play/play.h +++ b/gst-libs/gst/play/play.h @@ -21,6 +21,7 @@ #define __GST_PLAY_H__ #include <gst/gst.h> +#include <gst/xoverlay/xoverlay.h> #define GST_TYPE_PLAY (gst_play_get_type()) #define GST_PLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLAY, GstPlay)) diff --git a/gst-libs/gst/video/gstvideosink.c b/gst-libs/gst/video/gstvideosink.c index 4a3db86b4..ca7cc51ad 100644 --- a/gst-libs/gst/video/gstvideosink.c +++ b/gst-libs/gst/video/gstvideosink.c @@ -24,15 +24,7 @@ #include "gstvideosink.h" -/* VideoSink signals and args */ - -enum { - HAVE_VIDEO_SIZE, - LAST_SIGNAL -}; - static GstElementClass *parent_class = NULL; -static guint gst_videosink_signals[LAST_SIGNAL] = { 0 }; /* Private methods */ @@ -66,41 +58,12 @@ gst_videosink_class_init (GstVideoSinkClass *klass) gstelement_class = (GstElementClass*)klass; parent_class = g_type_class_ref (GST_TYPE_ELEMENT); - - gst_videosink_signals[HAVE_VIDEO_SIZE] = - g_signal_new ("have_video_size", - G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GstVideoSinkClass, have_video_size), - NULL, NULL, - gst_marshal_VOID__INT_INT, G_TYPE_NONE, 2, - G_TYPE_UINT, G_TYPE_UINT); gstelement_class->set_clock = gst_videosink_set_clock; } /* Public methods */ -/** - * gst_video_sink_got_video_size: - * @videosink: a #GstVideoSink which received video geometry. - * @width: a width as a #gint. - * @height: a height as a #gint. - * - * This will fire an have_size signal and update the internal object's - * geometry. - * - * This function should be used by video sink developpers. - */ -void -gst_video_sink_got_video_size (GstVideoSink *videosink, gint width, gint height) -{ - g_return_if_fail (videosink != NULL); - g_return_if_fail (GST_IS_VIDEOSINK (videosink)); - - g_signal_emit (G_OBJECT (videosink), gst_videosink_signals[HAVE_VIDEO_SIZE], - 0, width, height); -} - GType gst_videosink_get_type (void) { diff --git a/gst-libs/gst/video/gstvideosink.h b/gst-libs/gst/video/gstvideosink.h index 6ba23fd43..129a47d60 100644 --- a/gst-libs/gst/video/gstvideosink.h +++ b/gst-libs/gst/video/gstvideosink.h @@ -61,19 +61,12 @@ struct _GstVideoSink { struct _GstVideoSinkClass { GstElementClass parent_class; - - /* signals */ - void (*have_video_size) (GstVideoSink *element, gint width, gint height); - + gpointer _gst_reserved[GST_PADDING]; }; GType gst_videosink_get_type (void); -/* public methods to fire signals */ -void gst_video_sink_got_video_size (GstVideoSink *videosink, - gint width, gint height); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/gst-libs/gst/video/videosink.h b/gst-libs/gst/video/videosink.h index 6ba23fd43..129a47d60 100644 --- a/gst-libs/gst/video/videosink.h +++ b/gst-libs/gst/video/videosink.h @@ -61,19 +61,12 @@ struct _GstVideoSink { struct _GstVideoSinkClass { GstElementClass parent_class; - - /* signals */ - void (*have_video_size) (GstVideoSink *element, gint width, gint height); - + gpointer _gst_reserved[GST_PADDING]; }; GType gst_videosink_get_type (void); -/* public methods to fire signals */ -void gst_video_sink_got_video_size (GstVideoSink *videosink, - gint width, gint height); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 25a7b9648..7570d17ed 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -356,7 +356,7 @@ gst_ximagesink_handle_xevents (GstXImageSink *ximagesink, GstPad *pad) GST_VIDEOSINK_HEIGHT (ximagesink)); } - gst_video_sink_got_video_size (GST_VIDEOSINK (ximagesink), + gst_x_overlay_got_desired_size (GST_X_OVERLAY (ximagesink), GST_VIDEOSINK_WIDTH (ximagesink), GST_VIDEOSINK_HEIGHT (ximagesink)); } @@ -653,9 +653,6 @@ gst_ximagesink_sinkconnect (GstPad *pad, const GstCaps *caps) gst_x_overlay_got_desired_size (GST_X_OVERLAY (ximagesink), GST_VIDEOSINK_WIDTH (ximagesink), GST_VIDEOSINK_HEIGHT (ximagesink)); - gst_video_sink_got_video_size (GST_VIDEOSINK (ximagesink), - GST_VIDEOSINK_WIDTH (ximagesink), - GST_VIDEOSINK_HEIGHT (ximagesink)); return GST_PAD_LINK_OK; } diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index 6f1ab4b43..4fea2627b 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -809,9 +809,6 @@ gst_xvimagesink_sinkconnect (GstPad *pad, const GstCaps *caps) gst_x_overlay_got_desired_size (GST_X_OVERLAY (xvimagesink), GST_VIDEOSINK_WIDTH (xvimagesink), GST_VIDEOSINK_HEIGHT (xvimagesink)); - gst_video_sink_got_video_size (GST_VIDEOSINK (xvimagesink), - GST_VIDEOSINK_WIDTH (xvimagesink), - GST_VIDEOSINK_HEIGHT (xvimagesink)); return GST_PAD_LINK_OK; } diff --git a/tests/old/examples/gstplay/Makefile.am b/tests/old/examples/gstplay/Makefile.am index f80a8bfab..795fc3620 100644 --- a/tests/old/examples/gstplay/Makefile.am +++ b/tests/old/examples/gstplay/Makefile.am @@ -5,5 +5,6 @@ player_SOURCES = player.c player_CFLAGS = $(GST_CFLAGS) player_LDFLAGS = \ $(GST_LIBS) \ - $(top_builddir)/gst-libs/gst/play/libgstplay-@GST_MAJORMINOR@.la + $(top_builddir)/gst-libs/gst/play/libgstplay-@GST_MAJORMINOR@.la \ + $(top_builddir)/gst-libs/gst/libgstinterfaces-$(GST_MAJORMINOR).la |