mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
Fixed a couple of compiler warnings.
Original commit message from CVS: Fixed a couple of compiler warnings.
This commit is contained in:
parent
87f9d504d5
commit
42ebe8b588
14 changed files with 46 additions and 37 deletions
|
@ -2,7 +2,7 @@ SUBDIRS = sched eos nego
|
|||
|
||||
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)
|
||||
|
|
|
@ -12,7 +12,7 @@ main (int argc, char *argv[])
|
|||
GstElement *element;
|
||||
GstElement *videosink, *osssink;
|
||||
GstAutoplug *autoplugger;
|
||||
GList *testcaps;
|
||||
GstCaps *testcaps;
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
|
@ -21,13 +21,12 @@ main (int argc, char *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");
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
gboolean testret;
|
||||
xmlDocPtr doc;
|
||||
xmlNodePtr parent;
|
||||
GstElement *mpg123;
|
||||
|
|
|
@ -10,8 +10,8 @@ int main(int argc,char *argv[]) {
|
|||
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");
|
||||
|
@ -132,4 +132,6 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
g_print("\n\nIterating:\n");
|
||||
gst_bin_iterate(thread);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
int main(int argc,char *argv[]) {
|
||||
GstElement *element;
|
||||
int i;
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
element = gst_elementfactory_make(argv[1],"element");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3,4 +3,6 @@
|
|||
int main(int argc,char *argv[]) {
|
||||
gst_init(&argc,&argv);
|
||||
gst_plugin_load_all();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#include <string.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
GstElement *audiothread;
|
||||
|
@ -38,7 +39,7 @@ void new_pad(GstElement *parse,GstPad *pad,GstElement *pipeline) {
|
|||
|
||||
int main(int argc,char *argv[]) {
|
||||
GstElement *pipeline, *sourcethread, *src, *parse;
|
||||
int i;
|
||||
//int i;
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
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;
|
||||
|
@ -22,8 +22,8 @@ int main(int argc,char *argv[]) {
|
|||
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;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ int main(int argc,char *argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -81,4 +81,6 @@ int main(int argc,char *argv[]) {
|
|||
fprintf(stderr,"\n");
|
||||
gst_bin_iterate(GST_BIN(pipeline));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
/* 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
|
||||
|
|
|
@ -8,8 +8,7 @@ void paranoia_eos(GstPad *pad) {
|
|||
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);
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ int main(int argc,char *argv[]) {
|
|||
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");
|
||||
|
@ -23,13 +23,15 @@ int main(int argc,char *argv[]) {
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ static void
|
|||
print_some_providers (gchar *mime)
|
||||
{
|
||||
guint16 type;
|
||||
GList *srcs, *sinks;
|
||||
//GList *srcs, *sinks;
|
||||
type = gst_type_find_by_mime (mime);
|
||||
|
||||
/*
|
||||
|
@ -147,4 +147,6 @@ int main(int argc,char *argv[])
|
|||
|
||||
dump_factory ("lame");
|
||||
dump_factory ("mpeg_play");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ int main(int argc,char *argv[])
|
|||
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);
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
|
||||
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");
|
||||
|
@ -28,10 +28,10 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue