From: Thomas Vander Stichele Date: Wed, 30 Nov 2005 18:37:24 +0000 (+0000) Subject: no examples X-Git-Tag: 1.19.3~505^2~2090 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc02c82c7607aaecb45cfd54c32ae93edc86dca0;p=platform%2Fupstream%2Fgstreamer.git no examples Original commit message from CVS: no examples --- diff --git a/common b/common index 33084fb..f9f5f06 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit 33084fbe0531733bc02aa1d9de608206d5553a15 +Subproject commit f9f5f063728688cf455a1512d492b632c43963d7 diff --git a/examples/Makefile.am b/examples/Makefile.am deleted file mode 100644 index 4620963..0000000 --- a/examples/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -if HAVE_GTK -GTK_SUBDIRS=dynparams level $(FT2_SUBDIRS) -else -GTK_SUBDIRS= -endif - -if USE_GCONF -GCONF_SUBDIRS=gstplay -else -GCONF_SUBDIRS= -endif - -SUBDIRS=$(GTK_SUBDIRS) $(GCONF_SUBDIRS) switch -DIST_SUBDIRS=capsfilter dynparams indexing gstplay switch level diff --git a/examples/capsfilter/Makefile.am b/examples/capsfilter/Makefile.am deleted file mode 100644 index f8562fe..0000000 --- a/examples/capsfilter/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -noinst_PROGRAMS = capsfilter1 - -LDADD = $(GST_LIBS) -AM_CFLAGS = $(GST_CFLAGS) - - diff --git a/examples/capsfilter/capsfilter1.c b/examples/capsfilter/capsfilter1.c deleted file mode 100644 index a59f728..0000000 --- a/examples/capsfilter/capsfilter1.c +++ /dev/null @@ -1,87 +0,0 @@ -#include -#include - -/* This app uses a filter to connect colorspace and videosink - * so that only RGB data can pass the connection, colorspace will use - * a converter to convert the I420 data to RGB. Without a filter, this - * connection would use the I420 format (assuming Xv is enabled) */ - -static void -new_pad_func (GstElement * element, GstPad * newpad, gpointer data) -{ - GstElement *pipeline = (GstElement *) data; - GstElement *queue = gst_bin_get_by_name (GST_BIN (pipeline), "queue"); - - if (!strcmp (gst_pad_get_name (newpad), "video_00")) { - gst_element_set_state (pipeline, GST_STATE_PAUSED); - gst_pad_link (newpad, gst_element_get_pad (queue, "sink")); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - } -} - -gint -main (gint argc, gchar * argv[]) -{ - GstElement *pipeline; - GstElement *filesrc; - GstElement *demux; - GstElement *thread; - GstElement *queue; - GstElement *mpeg2dec; - GstElement *colorspace; - GstElement *videosink; - gboolean res; - - gst_init (&argc, &argv); - - if (argc < 2) { - g_print ("usage: %s \n", argv[0]); - return (-1); - } - - pipeline = gst_pipeline_new ("main_pipeline"); - filesrc = gst_element_factory_make ("filesrc", "filesrc"); - g_return_val_if_fail (filesrc, -1); - g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL); - demux = gst_element_factory_make ("mpegdemux", "demux"); - g_return_val_if_fail (demux, -1); - g_signal_connect (G_OBJECT (demux), "new_pad", G_CALLBACK (new_pad_func), - pipeline); - - thread = gst_thread_new ("thread"); - queue = gst_element_factory_make ("queue", "queue"); - mpeg2dec = gst_element_factory_make ("mpeg2dec", "mpeg2dec"); - g_return_val_if_fail (mpeg2dec, -1); - colorspace = gst_element_factory_make ("ffmpegcolorspace", "colorspace"); - g_return_val_if_fail (colorspace, -1); - videosink = gst_element_factory_make (DEFAULT_VIDEOSINK, "videosink"); - g_return_val_if_fail (videosink, -1); - - gst_bin_add (GST_BIN (pipeline), filesrc); - gst_bin_add (GST_BIN (pipeline), demux); - - gst_bin_add (GST_BIN (thread), queue); - gst_bin_add (GST_BIN (thread), mpeg2dec); - gst_bin_add (GST_BIN (thread), colorspace); - gst_bin_add (GST_BIN (thread), videosink); - gst_bin_add (GST_BIN (pipeline), thread); - - gst_element_link_pads (filesrc, "src", demux, "sink"); - gst_element_link_pads (queue, "src", mpeg2dec, "sink"); - gst_element_link_pads (mpeg2dec, "src", colorspace, "sink"); - /* force RGB data passing between colorspace and videosink */ - res = gst_element_link_pads_filtered (colorspace, "src", videosink, "sink", - gst_caps_new_simple ("video/x-raw-rgb", NULL)); - if (!res) { - g_print ("could not connect colorspace and videosink\n"); - return -1; - } - - gst_element_set_state (pipeline, GST_STATE_PLAYING); - - while (gst_bin_iterate (GST_BIN (pipeline))); - - gst_element_set_state (pipeline, GST_STATE_NULL); - - return 0; -} diff --git a/examples/gob/Makefile.am b/examples/gob/Makefile.am deleted file mode 100644 index 7abde4d..0000000 --- a/examples/gob/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ - -plugin_LTLIBRARIES = libgstidentity2.la - -GOB_FILES_ID = gst-identity2.c gst-identity2.h gst-identity2-private.h - -BUILT_SOURCES = \ - $(GOB_FILES_ID) - -libgstidentity2_la_SOURCES = gst-identity2.gob $(GOB_FILES_ID) -libgstidentity2_la_CFLAGS = $(GST_CFLAGS) -libgstidentity2_la_LIBADD = - -%.c %.h %-private.h: %.gob - gob $< - -CLEANFILES = $(GOB_FILES_ID) - -dist-hook: - cd $(distdir); rm -f $(CLEANFILES) diff --git a/examples/gob/gst-identity2.gob b/examples/gob/gst-identity2.gob deleted file mode 100644 index 9c34cb5..0000000 --- a/examples/gob/gst-identity2.gob +++ /dev/null @@ -1,141 +0,0 @@ - -%header{ -#include -#include "gst-identity2.h" -#include "gst-identity2-private.h" -%} - -class Gst:Identity2 from Gst:Element { - - /* plugin init */ - private gboolean - plugin_init (GModule *module, GstPlugin *plugin) - { - static GstElementDetails identity2_details = { - "GOB Identity", - "Filter/Effect", - "Does nothing", - "1.0", - "Wim Taymans ", - "(C) 2001", - }; - GstElementFactory *factory; - - factory = gst_elementfactory_new ("identity2", TYPE_SELF, - &identity2_details); - g_return_val_if_fail (factory != NULL, FALSE); - - gst_plugin_add_feature (plugin, &(factory->feature)); - - return TRUE; - } - - /* pads FIXME gob oculd be improved here */ - private GstPad *sinkpad = - { - gst_pad_new ("sink", GST_PAD_SINK); - gst_element_add_pad (GST_ELEMENT (o), o->_priv->sinkpad); - gst_pad_set_chain_function (o->_priv->sinkpad, chain); - gst_pad_set_bufferpool_function (o->_priv->sinkpad, get_bufferpool); - //gst_pad_set_negotiate_function (o->_priv->sinkpad, negotiate_sink); - }; - private GstPad *srcpad = - { - gst_pad_new ("src", GST_PAD_SRC); - gst_element_add_pad (GST_ELEMENT (o), o->_priv->srcpad); - //gst_pad_set_negotiate_function (o->_priv->srcpad, negotiate_src); - }; - - /* arguments */ - /* - private gboolean loop_based = FALSE; argument BOOL loop_based - get { - ARG = self->_priv->loop_based; - } - set { - self->_priv->loop_based = ARG; - if (self->_priv->loop_based) { - gst_element_set_loop_function (GST_ELEMENT (self), loop); - gst_pad_set_chain_function (self->_priv->sinkpad, NULL); - } - else { - gst_pad_set_chain_function (self->_priv->sinkpad, chain); - gst_element_set_loop_function (GST_ELEMENT (self), NULL); - } - };*/ - private guint sleep_time = 0; argument UINT sleep_time link; - private gboolean silent = FALSE; argument BOOL silent link; - - /* signals */ - private signal last NONE(NONE) void handoff(self); - - /* core code here */ - private GstBufferPool* - get_bufferpool (GstPad *pad (check null)) - { - Self *self = SELF (gst_pad_get_parent (pad)); - - return gst_pad_get_bufferpool (self->_priv->srcpad); - } - - /* private GstPadNegotiateReturn - negotiate_src (GstPad *pad, GstCaps **caps, gpointer *data) - { - Self *self = SELF (gst_pad_get_parent (pad)); - - return gst_pad_negotiate_proxy (pad, self->_priv->sinkpad, caps); - } - - private GstPadNegotiateReturn - negotiate_sink (GstPad *pad, GstCaps **caps, gpointer *data) - { - Self *self = SELF (gst_pad_get_parent (pad)); - - return gst_pad_negotiate_proxy (pad, self->_priv->srcpad, caps); - } */ - - private void - chain (GstPad *pad (check null), GstBuffer *buf (check null)) - { - Self *self; - - self = SELF (gst_pad_get_parent (pad)); - - if (!self->_priv->silent) - g_print("identity2: chain ******* (%s:%s)i \n",GST_DEBUG_PAD_NAME(pad)); - - handoff (self); - gst_pad_push (self->_priv->srcpad, buf); - - if (self->_priv->sleep_time) - usleep (self->_priv->sleep_time); - } - - /*private void - loop (GstElement *element (check null)) - { - Self *self = SELF (element); - GstBuffer *buf; - - do { - buf = gst_pad_pull (self->_priv->sinkpad); - g_print("identity2: loop ******* (%s:%s)i \n",GST_DEBUG_PAD_NAME(self->_priv->sinkpad)); - - handoff (self); - gst_pad_push (self->_priv->srcpad, buf); - - if (self->_priv->sleep_time) - usleep (self->_priv->sleep_time); - - } while (!GST_ELEMENT_IS_COTHREAD_STOPPING(element)); - }*/ -} - -%{ -GstPluginDesc plugin_desc = { - GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "identity2", - gst_identity2_plugin_init -}; -%} diff --git a/examples/gstplay/.gitignore b/examples/gstplay/.gitignore deleted file mode 100644 index a1eb1c4..0000000 --- a/examples/gstplay/.gitignore +++ /dev/null @@ -1 +0,0 @@ -player diff --git a/examples/gstplay/Makefile.am b/examples/gstplay/Makefile.am deleted file mode 100644 index cbae9cb..0000000 --- a/examples/gstplay/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ - -noinst_PROGRAMS = player - -player_SOURCES = player.c -player_CFLAGS = $(GST_CFLAGS) $(GCONF_CFLAGS) -player_LDFLAGS = \ - $(GST_LIBS) \ - $(top_builddir)/gst-libs/gst/gconf/libgstgconf-@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/examples/gstplay/player.c b/examples/gstplay/player.c deleted file mode 100644 index 7645378..0000000 --- a/examples/gstplay/player.c +++ /dev/null @@ -1,176 +0,0 @@ -/* GStreamer - * Copyright (C) 2003 Julien Moutte - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include - -static GMainLoop *loop = NULL; -static gint64 length = 0; - -static void -print_tag (const GstTagList * list, const gchar * tag, gpointer unused) -{ - gint i, count; - - count = gst_tag_list_get_tag_size (list, tag); - - for (i = 0; i < count; i++) { - gchar *str; - - if (gst_tag_get_type (tag) == G_TYPE_STRING) { - if (!gst_tag_list_get_string_index (list, tag, i, &str)) - g_assert_not_reached (); - } else { - str = - g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i)); - } - - if (i == 0) { - g_print ("%15s: %s\n", gst_tag_get_nick (tag), str); - } else { - g_print (" : %s\n", str); - } - - g_free (str); - } -} - -static void -got_found_tag (GstPlay * play, GstElement * source, GstTagList * tag_list) -{ - gst_tag_list_foreach (tag_list, print_tag, NULL); -} - -static void -got_time_tick (GstPlay * play, gint64 time_nanos) -{ - g_print ("time tick %f\n", time_nanos / (float) GST_SECOND); -} - -static void -got_stream_length (GstPlay * play, gint64 length_nanos) -{ - g_print ("got length %" G_GUINT64_FORMAT "\n", length_nanos); - length = length_nanos; -} - -static void -got_video_size (GstPlay * play, gint width, gint height) -{ - g_print ("got video size %d, %d\n", width, height); -} - -static void -got_eos (GstPlay * play) -{ - g_print ("End Of Stream\n"); - g_main_loop_quit (loop); -} - -static gboolean -seek_timer (GstPlay * play) -{ - gst_play_seek_to_time (play, length / 2); - return FALSE; -} - -int -main (int argc, char *argv[]) -{ - GstPlay *play; - GstElement *data_src, *video_sink, *audio_sink, *vis_element; - GError *error = NULL; - - /* Initing GStreamer library */ - gst_init (&argc, &argv); - - if (argc != 2) { - g_print ("usage: %s