[aravis] gst: use theora in the test pipeline.



commit 5719e6bcd166102c823f85c0a6a62f13c27a7aba
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Mon Apr 26 15:33:24 2010 +0200

    gst: use theora in the test pipeline.

 gst/gstaravistest.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/gst/gstaravistest.c b/gst/gstaravistest.c
index 09b837b..7999e64 100644
--- a/gst/gstaravistest.c
+++ b/gst/gstaravistest.c
@@ -4,17 +4,25 @@
 int
 main (int argc, char **argv)
 {
-	GstElement *pipeline, *source, *sink;
+	GstElement *pipeline, *source, *filter, *sink;
+	GstElement *theora_encoder, *theora_decoder;
 	GMainLoop *loop;
 
 	gst_init (&argc, &argv);
 
+	gst_plugin_load_file (GST_ARAVIS_PLUGIN, NULL);
+
 	pipeline = gst_pipeline_new ("pipeline");
-	source = gst_element_factory_make ("videotestsrc", "source");
+	source = gst_element_factory_make ("aravissrc", "source");
+	filter = gst_element_factory_make ("ffmpegcolorspace", "filter");
+	theora_encoder = gst_element_factory_make ("theoraenc", "theoraenc");
+	theora_decoder = gst_element_factory_make ("theoradec", "theoradec");
 	sink = gst_element_factory_make ("autovideosink", "sink");
 
-	gst_bin_add_many (GST_BIN (pipeline), source, sink, NULL);
-	gst_element_link_many (source, sink, NULL);
+	g_object_set (source, "width", 256, "height", 256, "h-binning", 4, "v-binning", 4, NULL);
+
+	gst_bin_add_many (GST_BIN (pipeline), source, filter, theora_encoder, theora_decoder, sink, NULL);
+	gst_element_link_many (source, filter, theora_encoder, theora_decoder, sink, NULL);
 
 	gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]