noinst_PROGRAMS = init loadall simplefake states caps queue registry \
paranoia rip mp3encode autoplug props case4 markup load tee autoplug2 autoplug3 \
-capsconnect padfactory autoplug4 incsched reaping threadlock mp1vid
+capsconnect padfactory autoplug4 incsched reaping threadlock mp1vid
# we have nothing but apps here, we can do this safely
LIBS += $(GST_LIBS)
GstElement *element;
GstElement *videosink, *osssink;
GstAutoplug *autoplugger;
- GList *testcaps;
+ GstCaps *testcaps;
gst_init(&argc,&argv);
videosink = gst_elementfactory_make ("videosink", "videosink");
g_assert (videosink != NULL);
- testcaps = g_list_append (NULL,
- gst_caps_new ("test_caps",
- "video/mpeg",
- gst_props_new (
- "mpegversion", GST_PROPS_INT (1),
- "systemstream", GST_PROPS_BOOLEAN (TRUE),
- NULL)));
+ testcaps = gst_caps_new ("test_caps",
+ "video/mpeg",
+ gst_props_new (
+ "mpegversion", GST_PROPS_INT (1),
+ "systemstream", GST_PROPS_BOOLEAN (TRUE),
+ NULL));
autoplugger = gst_autoplugfactory_make ("static");
int main(int argc,char *argv[])
{
- gboolean testret;
xmlDocPtr doc;
xmlNodePtr parent;
GstElement *mpg123;
gst_debug_set_categories(-1);
g_print("\n\nConstructing stuff:\n");
- thread = gst_pipeline_new("thread");
- bin = gst_bin_new("bin");
+ thread = GST_BIN (gst_pipeline_new("thread"));
+ bin = GST_BIN (gst_bin_new("bin"));
src = gst_elementfactory_make("fakesrc","src");
identity = gst_elementfactory_make("identity","identity");
sink = gst_elementfactory_make("fakesink","sink");
g_print("\n\nIterating:\n");
gst_bin_iterate(thread);
+
+ return 0;
}
int main(int argc,char *argv[]) {
GstElement *element;
- int i;
gst_init(&argc,&argv);
element = gst_elementfactory_make(argv[1],"element");
+
+ return 0;
}
int main(int argc,char *argv[]) {
gst_init(&argc,&argv);
gst_plugin_load_all();
+
+ return 0;
}
+#include <string.h>
#include <gst/gst.h>
GstElement *audiothread;
int main(int argc,char *argv[]) {
GstElement *pipeline, *sourcethread, *src, *parse;
- int i;
+ //int i;
gst_init(&argc,&argv);
int main(int argc,char *argv[]) {
GstPipeline *pipeline;
GstElement *src,*lame,*sink;
- int bitrate;
+ int bitrate = 128000;
int fdin = -1;
int fdout = -1;
int i;
switch (argv[i][1]) {
case 'b': bitrate = atoi(argv[++i]);break;
case 0: {
- if (fdin == -1) fdin = stdin;
- else if (fdout == -1) fdout = stdout;
+ if (fdin == -1) fdin = STDIN_FILENO;
+ else if (fdout == -1) fdout = STDOUT_FILENO;
else fprintf(stderr,"unknown argument\n");exit(1);
break;
}
}
}
- pipeline = gst_pipeline_new("mp3encode");
+ pipeline = GST_PIPELINE (gst_pipeline_new("mp3encode"));
src = gst_elementfactory_make("fdsrc","src");
g_return_val_if_fail(src != NULL,1);
fprintf(stderr,"\n");
gst_bin_iterate(GST_BIN(pipeline));
}
+
+ return 0;
}
/* this is an example of the src pad dictating the caps
* the sink pad only accepts audio/raw */
-static GstCaps*
-negotiate (GstPad *pad, GstCaps *caps, gint count)
+static GstPadNegotiateReturn
+negotiate (GstPad *pad, GstCaps **caps, gpointer *count)
{
g_print ("negotiation entered\n");
- if (!strcmp (gst_caps_get_mime (caps), "audio/raw"))
- return caps;
+ if (!strcmp (gst_caps_get_mime (*caps), "audio/raw"))
+ return GST_PAD_NEGOTIATE_AGREE;
- return NULL;
+ return GST_PAD_NEGOTIATE_FAIL;
}
int
int main(int argc,char *argv[]) {
GstPipeline *pipeline;
GstElement *paranoia,*queue,*audio_thread,*osssink;
- int i;
- int track = (argc == 2) ? atoi(argv[1]) : 1;
+ //int track = (argc == 2) ? atoi(argv[1]) : 1;
GST_DEBUG_ENTER("(%d)",argc);
gst_info_set_categories(-1);
gst_debug_set_categories(-1);
- pipeline = gst_pipeline_new("pipeline");
- thread = gst_thread_new("thread");
+ pipeline = GST_BIN (gst_pipeline_new("pipeline"));
+ thread = GST_BIN (gst_thread_new("thread"));
src = gst_elementfactory_make("fakesrc","src");
queue1 = gst_elementfactory_make("queue","queue");
sink = gst_elementfactory_make("fakesink","sink");
gst_element_add_ghost_pad(GST_ELEMENT(thread),gst_element_get_pad(sink,"sink"),"sink");
gst_element_connect (src,"src",queue1,"sink");
- gst_element_connect (queue1, "src", thread, "sink");
+ gst_element_connect (queue1, "src", GST_ELEMENT (thread), "sink");
fprintf(stderr,"\n\n\n");
- gst_element_set_state (pipeline, GST_STATE_READY);
+ gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_READY);
fprintf(stderr,"\n\n\n");
- gst_element_set_state (pipeline, GST_STATE_NULL);
+ gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
+
+ return 0;
}
print_some_providers (gchar *mime)
{
guint16 type;
- GList *srcs, *sinks;
+ //GList *srcs, *sinks;
type = gst_type_find_by_mime (mime);
/*
dump_factory ("lame");
dump_factory ("mpeg_play");
+
+ return 0;
}
g_print ("\n *** using testfile %s\n", argv[1]);
xml = gst_xml_new();
- xml = gst_xml_parse_file (xml, argv[1], NULL);
+ gst_xml_parse_file (xml, argv[1], NULL);
toplevelelements = gst_xml_get_topelements (xml);
int main(int argc,char *argv[]) {
GstBin *pipeline, *thread;
- GstElement *src, *queue1, *sink;
+ GstElement *src, *sink;
gst_info_set_categories(-1);
gst_debug_set_categories(-1);
gst_init(&argc,&argv);
- pipeline = gst_pipeline_new("pipeline");
- thread = gst_thread_new("thread");
+ pipeline = GST_BIN (gst_pipeline_new("pipeline"));
+ thread = GST_BIN (gst_thread_new("thread"));
src = gst_elementfactory_make("fakesrc","src");
gtk_object_set(GTK_OBJECT(src),"silent",TRUE,NULL);
sink = gst_elementfactory_make("fakesink","sink");
while (1) {
fprintf(stderr,"\nSWITCHING to PLAYING:\n");
- gst_element_set_state (thread, GST_STATE_PLAYING);
+ gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
sleep(1);
fprintf(stderr,"\nSWITCHING to PAUSED:\n");
- gst_element_set_state (thread, GST_STATE_PAUSED);
+ gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PAUSED);
// sleep(1);
}
}