mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 10:10:32 +00:00
Fixed some compile warnings.
Original commit message from CVS: Fixed some compile warnings.
This commit is contained in:
parent
6ce3e6b34c
commit
87f9d504d5
17 changed files with 84 additions and 81 deletions
|
@ -20,20 +20,20 @@ int main(int argc,char *argv[]) {
|
|||
// gst_plugin_load("ac3parse");
|
||||
gst_plugin_load_all();
|
||||
|
||||
pipeline = gst_pipeline_new("pipeline");
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
pipeline = GST_PIPELINE (gst_pipeline_new("pipeline"));
|
||||
g_return_val_if_fail(pipeline != NULL, -1);
|
||||
|
||||
srcfactory = gst_elementfactory_find("disksrc");
|
||||
g_return_if_fail(srcfactory != NULL);
|
||||
g_return_val_if_fail(srcfactory != NULL, -1);
|
||||
parsefactory = gst_elementfactory_find("ac3parse");
|
||||
g_return_if_fail(parsefactory != NULL);
|
||||
g_return_val_if_fail(parsefactory != NULL, -1);
|
||||
|
||||
src = gst_elementfactory_create(srcfactory,"src");
|
||||
g_return_if_fail(src != NULL);
|
||||
g_return_val_if_fail(src != NULL, -1);
|
||||
gtk_object_set(GTK_OBJECT(src),"location",argv[1],"bytesperread",4096,NULL);
|
||||
g_print("should be using file '%s'\n",argv[1]);
|
||||
parse = gst_elementfactory_create(parsefactory,"parse");
|
||||
g_return_if_fail(parse != NULL);
|
||||
g_return_val_if_fail(parse != NULL, -1);
|
||||
|
||||
infopad = gst_pad_new("sink",GST_PAD_SINK);
|
||||
gst_pad_set_chain_function(infopad,ac3parse_info_chain);
|
||||
|
|
|
@ -5,10 +5,9 @@
|
|||
extern gboolean _gst_plugin_spew;
|
||||
|
||||
int main(int argc,char *argv[]) {
|
||||
GstElement *pipeline, *decodethread, *playthread;
|
||||
GstElement *pipeline, *decodethread;
|
||||
GstElement *src, *parse, *decode, *play;
|
||||
GstElement *queue;
|
||||
GstPad *infopad;
|
||||
|
||||
// g_print("have %d args\n",argc);
|
||||
|
||||
|
@ -16,22 +15,22 @@ int main(int argc,char *argv[]) {
|
|||
gst_init(&argc,&argv);
|
||||
|
||||
pipeline = gst_elementfactory_make("pipeline","ac3player");
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
g_return_val_if_fail(pipeline != NULL, -1);
|
||||
decodethread = gst_elementfactory_make("thread","decodethread");
|
||||
g_return_if_fail(decodethread != NULL);
|
||||
g_return_val_if_fail(decodethread != NULL, -1);
|
||||
queue = gst_elementfactory_make("queue","queue");
|
||||
g_return_if_fail(queue != NULL);
|
||||
g_return_val_if_fail(queue != NULL, -1);
|
||||
|
||||
src = gst_elementfactory_make("disksrc","src");
|
||||
g_return_if_fail(src != NULL);
|
||||
g_return_val_if_fail(src != NULL, -1);
|
||||
gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL);
|
||||
// g_print("should be using file '%s'\n",argv[1]);
|
||||
parse = gst_elementfactory_make("ac3parse","parse");
|
||||
g_return_if_fail(parse != NULL);
|
||||
g_return_val_if_fail(parse != NULL, -1);
|
||||
decode = gst_elementfactory_make("ac3dec","decode");
|
||||
g_return_if_fail(decode != NULL);
|
||||
g_return_val_if_fail(decode != NULL, -1);
|
||||
play = gst_elementfactory_make("osssink","play");
|
||||
g_return_if_fail(play != NULL);
|
||||
g_return_val_if_fail(play != NULL, -1);
|
||||
|
||||
// construct the decode thread
|
||||
g_print("constructing the decode thread\n");
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
int main(int argc,char *argv[]) {
|
||||
GstBuffer *buf;
|
||||
GstBuffer **buffers;
|
||||
gpointer dummy;
|
||||
int i,max;
|
||||
long usage1,usage2;
|
||||
|
||||
|
@ -22,7 +21,7 @@ int main(int argc,char *argv[]) {
|
|||
gst_buffer_unref(buf);
|
||||
}
|
||||
usage2 = vmsize();
|
||||
g_print(" used %d more bytes\n",usage2-usage1);
|
||||
g_print(" used %ld more bytes\n",usage2-usage1);
|
||||
|
||||
// g_print("pre-allocating space...");
|
||||
// usage1 = vmsize();
|
||||
|
@ -31,23 +30,25 @@ int main(int argc,char *argv[]) {
|
|||
// g_print(" (+%d)\n",usage2-usage1);
|
||||
|
||||
g_print("creating %d buffers...",max);
|
||||
buffers = g_new(GstBuffer,i);
|
||||
buffers = (GstBuffer **)g_new(GstBuffer, i);
|
||||
usage1 = vmsize();
|
||||
for (i=0;i<max;i++)
|
||||
buffers[i] = gst_buffer_new();
|
||||
// buffers[i] = (GstBuffer *)g_malloc(1024);
|
||||
usage2 = vmsize();
|
||||
g_print(" (+%d bytes), and destroying them...",usage2-usage1);
|
||||
g_print(" (+%ld bytes), and destroying them...",usage2-usage1);
|
||||
usage1 = vmsize();
|
||||
for (i=0;i<max;i++)
|
||||
gst_buffer_unref(buffers[i]);
|
||||
// g_free(buffers[i]);
|
||||
usage2 = vmsize();
|
||||
g_print("(-%d)\n",usage1-usage2);
|
||||
g_print("(-%ld)\n",usage1-usage2);
|
||||
g_free(buffers);
|
||||
|
||||
g_print("buffer is %d bytes, list is %d bytes\n",
|
||||
sizeof(GstBuffer),sizeof(GList));
|
||||
|
||||
g_print("memory usage is %d\n",vmsize());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
10
test/cobin.c
10
test/cobin.c
|
@ -11,15 +11,15 @@ int main(int argc,char *argv[]) {
|
|||
gst_plugin_load_all();
|
||||
|
||||
bin = gst_elementfactory_make("bin","bin");
|
||||
g_return_if_fail(bin != NULL);
|
||||
g_return_val_if_fail(bin != NULL, -1);
|
||||
|
||||
g_print("--- creating src and sink elements\n");
|
||||
src = gst_elementfactory_make("fakesrc","src");
|
||||
g_return_if_fail(src != NULL);
|
||||
g_return_val_if_fail(src != NULL, -1);
|
||||
identity = gst_elementfactory_make(argv[1],"identity");
|
||||
g_return_if_fail(identity != NULL);
|
||||
g_return_val_if_fail(identity != NULL, -1);
|
||||
sink = gst_elementfactory_make("fakesink","sink");
|
||||
g_return_if_fail(sink != NULL);
|
||||
g_return_val_if_fail(sink != NULL, -1);
|
||||
|
||||
g_print("--- about to add the elements to the pipeline\n");
|
||||
gst_bin_add(GST_BIN(bin),GST_ELEMENT(src));
|
||||
|
@ -37,4 +37,6 @@ int main(int argc,char *argv[]) {
|
|||
gst_bin_iterate(GST_BIN(bin));
|
||||
|
||||
g_print("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
@ -18,17 +19,17 @@ int main(int argc,char *argv[]) {
|
|||
fd = creat("output.vob",0644);
|
||||
|
||||
pipeline = gst_elementfactory_make("pipeline","dvdcat");
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
g_return_val_if_fail(pipeline != NULL, -1);
|
||||
|
||||
src = gst_elementfactory_make("dvdsrc","src");
|
||||
g_return_if_fail(src != NULL);
|
||||
g_return_val_if_fail(src != NULL, -1);
|
||||
|
||||
gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL);
|
||||
if (argc >= 3)
|
||||
gtk_object_set(GTK_OBJECT(src),"offset",atoi(argv[2]),NULL);
|
||||
|
||||
sink = gst_elementfactory_make("fdsink","sink");
|
||||
g_return_if_fail(sink != NULL);
|
||||
g_return_val_if_fail(sink != NULL, -1);
|
||||
gtk_object_set(GTK_OBJECT(sink),"fd",fd,NULL);
|
||||
|
||||
// construct the outer pipeline
|
||||
|
|
|
@ -15,7 +15,7 @@ main (int argc,char *argv[])
|
|||
GstElement *bin;
|
||||
GstElement *src;
|
||||
GstElement *dvdec;
|
||||
GstElement *cspace;
|
||||
//GstElement *cspace;
|
||||
GstElement *videosink;
|
||||
|
||||
GtkWidget *appwindow;
|
||||
|
|
14
test/fake.c
14
test/fake.c
|
@ -10,14 +10,14 @@ int main(int argc,char *argv[]) {
|
|||
// _gst_plugin_spew = TRUE;
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
bin = gst_pipeline_new("pipeline");
|
||||
g_return_if_fail(bin != NULL);
|
||||
bin = GST_BIN (gst_pipeline_new("pipeline"));
|
||||
g_return_val_if_fail(bin != NULL,-1);
|
||||
|
||||
g_print("--- creating src and sink elements\n");
|
||||
src = gst_elementfactory_make("fakesrc","src");
|
||||
g_return_if_fail(src != NULL);
|
||||
g_return_val_if_fail(src != NULL,-1);
|
||||
sink = gst_elementfactory_make("fakesink","sink");
|
||||
g_return_if_fail(sink != NULL);
|
||||
g_return_val_if_fail(sink != NULL,-1);
|
||||
|
||||
g_print("--- about to add the elements to the bin\n");
|
||||
gst_bin_add(bin,GST_ELEMENT(src));
|
||||
|
@ -25,9 +25,9 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
g_print("--- getting pads\n");
|
||||
srcpad = gst_element_get_pad(src,"src");
|
||||
g_return_if_fail(srcpad != NULL);
|
||||
g_return_val_if_fail(srcpad != NULL,-1);
|
||||
sinkpad = gst_element_get_pad(sink,"sink");
|
||||
g_return_if_fail(srcpad != NULL);
|
||||
g_return_val_if_fail(srcpad != NULL,-1);
|
||||
|
||||
g_print("--- connecting\n");
|
||||
gst_pad_connect(srcpad,sinkpad);
|
||||
|
@ -37,4 +37,6 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
g_print("--- iterating\n");
|
||||
gst_bin_iterate(bin);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
int vmsize() {
|
||||
int pid,fd,size,i,mem;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
|
@ -17,7 +18,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
|
|||
GstElement *parse_audio, *parse_video, *decode, *decode_video, *play, *encode;
|
||||
GstElement *audio_queue, *video_queue;
|
||||
GstElement *audio_thread, *video_thread;
|
||||
GstElement *videoscale;
|
||||
//GstElement *videoscale;
|
||||
GstElement *fdsink;
|
||||
GstElementFactory *fdsinkfactory;
|
||||
|
||||
|
@ -170,9 +171,7 @@ void mp2tomp1(GstElement *parser,GstPad *pad, GstElement *pipeline) {
|
|||
}
|
||||
|
||||
int main(int argc,char *argv[]) {
|
||||
GstElement *pipeline, *src, *parse, *out;
|
||||
GstPad *infopad;
|
||||
int i,c;
|
||||
GstElement *pipeline, *src, *parse;
|
||||
|
||||
g_print("have %d args\n",argc);
|
||||
|
||||
|
@ -180,7 +179,7 @@ int main(int argc,char *argv[]) {
|
|||
gst_plugin_load("mpeg1parse");
|
||||
|
||||
pipeline = gst_pipeline_new("pipeline");
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
g_return_val_if_fail(pipeline != NULL, -1);
|
||||
|
||||
if (strstr(argv[1],"video_ts")) {
|
||||
src = gst_elementfactory_make("dvdsrc","src");
|
||||
|
@ -188,7 +187,7 @@ int main(int argc,char *argv[]) {
|
|||
} else
|
||||
src = gst_elementfactory_make("disksrc","src");
|
||||
|
||||
g_return_if_fail(src != NULL);
|
||||
g_return_val_if_fail(src != NULL, -1);
|
||||
gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL);
|
||||
g_print("should be using file '%s'\n",argv[1]);
|
||||
|
||||
|
@ -196,7 +195,7 @@ int main(int argc,char *argv[]) {
|
|||
outfile = argv[2];
|
||||
|
||||
parse = gst_elementfactory_make("mpeg1parse","parse");
|
||||
g_return_if_fail(parse != NULL);
|
||||
g_return_val_if_fail(parse != NULL, -1);
|
||||
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src));
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse));
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
static GstElement *mux = NULL;
|
||||
static GstElement *merge_subtitles;
|
||||
//static GstElement *merge_subtitles;
|
||||
static GstElement *fdsink;
|
||||
|
||||
static void
|
||||
|
|
|
@ -4,30 +4,29 @@
|
|||
int main(int argc,char *argv[]) {
|
||||
GstElementFactory *srcfactory, *decodefactory, *playfactory;
|
||||
GstElement *pipeline, *src, *decode, *play;
|
||||
GstPad *infopad;
|
||||
|
||||
g_print("have %d args\n",argc);
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
pipeline = gst_pipeline_new("pipeline");
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
g_return_val_if_fail(pipeline != NULL, -1);
|
||||
|
||||
srcfactory = gst_elementfactory_find("disksrc");
|
||||
g_return_if_fail(srcfactory != NULL);
|
||||
g_return_val_if_fail(srcfactory != NULL, -1);
|
||||
decodefactory = gst_elementfactory_find("mad");
|
||||
g_return_if_fail(decodefactory != NULL);
|
||||
g_return_val_if_fail(decodefactory != NULL, -1);
|
||||
playfactory = gst_elementfactory_find("osssink");
|
||||
g_return_if_fail(playfactory != NULL);
|
||||
g_return_val_if_fail(playfactory != NULL, -1);
|
||||
|
||||
src = gst_elementfactory_create(srcfactory,"src");
|
||||
g_return_if_fail(src != NULL);
|
||||
g_return_val_if_fail(src != NULL, -1);
|
||||
gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL);
|
||||
g_print("should be using file '%s'\n",argv[1]);
|
||||
decode = gst_elementfactory_create(decodefactory,"decode");
|
||||
g_return_if_fail(decode != NULL);
|
||||
g_return_val_if_fail(decode != NULL, -1);
|
||||
play = gst_elementfactory_create(playfactory,"play");
|
||||
g_return_if_fail(play != NULL);
|
||||
g_return_val_if_fail(play != NULL, -1);
|
||||
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src));
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(decode));
|
||||
|
@ -44,4 +43,6 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
g_print("about to enter loop\n");
|
||||
while (gst_bin_iterate(GST_BIN(pipeline)));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -9,34 +9,33 @@ void eof(GstElement *src) {
|
|||
int main(int argc,char *argv[]) {
|
||||
GstElementFactory *srcfactory, *parsefactory, *decodefactory, *playfactory;
|
||||
GstElement *pipeline, *src, *parse, *decode, *play;
|
||||
GstPad *infopad;
|
||||
|
||||
g_print("have %d args\n",argc);
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
pipeline = gst_pipeline_new("pipeline");
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
g_return_val_if_fail(pipeline != NULL, -1);
|
||||
|
||||
srcfactory = gst_elementfactory_find("disksrc");
|
||||
g_return_if_fail(srcfactory != NULL);
|
||||
g_return_val_if_fail(srcfactory != NULL, -1);
|
||||
parsefactory = gst_elementfactory_find("mp3parse");
|
||||
g_return_if_fail(parsefactory != NULL);
|
||||
g_return_val_if_fail(parsefactory != NULL, -1);
|
||||
decodefactory = gst_elementfactory_find("mpg123");
|
||||
g_return_if_fail(decodefactory != NULL);
|
||||
g_return_val_if_fail(decodefactory != NULL, -1);
|
||||
playfactory = gst_elementfactory_find("osssink");
|
||||
g_return_if_fail(playfactory != NULL);
|
||||
g_return_val_if_fail(playfactory != NULL, -1);
|
||||
|
||||
src = gst_elementfactory_create(srcfactory,"src");
|
||||
g_return_if_fail(src != NULL);
|
||||
g_return_val_if_fail(src != NULL, -1);
|
||||
gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL);
|
||||
g_print("should be using file '%s'\n",argv[1]);
|
||||
parse = gst_elementfactory_create(parsefactory,"parse");
|
||||
g_return_if_fail(parse != NULL);
|
||||
g_return_val_if_fail(parse != NULL, -1);
|
||||
decode = gst_elementfactory_create(decodefactory,"decode");
|
||||
g_return_if_fail(decode != NULL);
|
||||
g_return_val_if_fail(decode != NULL, -1);
|
||||
play = gst_elementfactory_create(playfactory,"play");
|
||||
g_return_if_fail(play != NULL);
|
||||
g_return_val_if_fail(play != NULL, -1);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(src),"eos",
|
||||
GTK_SIGNAL_FUNC(eof),NULL);
|
||||
|
|
|
@ -8,7 +8,6 @@ int main(int argc,char *argv[]) {
|
|||
int fd;
|
||||
GstElement *pipeline, *osssrc, *fdsink;
|
||||
GstElementFactory *osssrcfactory, *fdsinkfactory;
|
||||
GList *padlist;
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "mem.h"
|
||||
|
||||
extern gboolean _gst_plugin_spew;
|
||||
|
@ -10,25 +11,25 @@ GstPipeline *teardown_create_pipeline() {
|
|||
GstElement *src, *sink;
|
||||
GstPad *srcpad, *sinkpad;
|
||||
|
||||
pipeline = gst_pipeline_new("pipeline");
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
pipeline = GST_PIPELINE (gst_pipeline_new("pipeline"));
|
||||
g_return_val_if_fail(pipeline != NULL, NULL);
|
||||
|
||||
srcfactory = gst_elementfactory_find("fakesrc");
|
||||
g_return_if_fail(srcfactory != NULL);
|
||||
g_return_val_if_fail(srcfactory != NULL, NULL);
|
||||
sinkfactory = gst_elementfactory_find("fakesink");
|
||||
g_return_if_fail(sinkfactory != NULL);
|
||||
g_return_val_if_fail(sinkfactory != NULL, NULL);
|
||||
src = gst_elementfactory_create(srcfactory,"src");
|
||||
g_return_if_fail(src != NULL);
|
||||
g_return_val_if_fail(src != NULL, NULL);
|
||||
sink = gst_elementfactory_create(sinkfactory,"sink");
|
||||
g_return_if_fail(sink != NULL);
|
||||
g_return_val_if_fail(sink != NULL, NULL);
|
||||
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src));
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(sink));
|
||||
|
||||
srcpad = gst_element_get_pad(src,"src");
|
||||
g_return_if_fail(srcpad != NULL);
|
||||
g_return_val_if_fail(srcpad != NULL, NULL);
|
||||
sinkpad = gst_element_get_pad(sink,"sink");
|
||||
g_return_if_fail(srcpad != NULL);
|
||||
g_return_val_if_fail(srcpad != NULL, NULL);
|
||||
|
||||
gst_pad_connect(srcpad,sinkpad);
|
||||
|
||||
|
@ -42,7 +43,7 @@ void teardown_destroy_pipeline(GstPipeline *pipeline) {
|
|||
|
||||
int main(int argc,char *argv[]) {
|
||||
GstElement *pipeline, *src;
|
||||
int i,j,max = 1;
|
||||
int i,max = 1;
|
||||
long usage1,usage2;
|
||||
|
||||
// _gst_plugin_spew = TRUE;
|
||||
|
@ -54,7 +55,7 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
usage1 = vmsize();
|
||||
for (i=0;i<max;i++) {
|
||||
pipeline = teardown_create_pipeline();
|
||||
pipeline = GST_ELEMENT (teardown_create_pipeline());
|
||||
src = gst_bin_get_by_name(GST_BIN(pipeline),"src");
|
||||
// g_print("got source %p, pushing",src);
|
||||
// for (j=0;j<max;j++) {
|
||||
|
@ -62,8 +63,10 @@ int main(int argc,char *argv[]) {
|
|||
// g_print(".");
|
||||
// }
|
||||
// g_print("\n");
|
||||
teardown_destroy_pipeline(pipeline);
|
||||
teardown_destroy_pipeline(GST_PIPELINE (pipeline));
|
||||
}
|
||||
usage2 = vmsize();
|
||||
g_print("uses %d bytes\n",usage2-usage1);
|
||||
g_print("uses %ld bytes\n",usage2-usage1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ int main(int argc,char *argv[]) {
|
|||
GstElement *osssrc, *videosrc, *fdsink, *encoder, *compress, *video_queue, *video_thread;
|
||||
GstElementFactory *osssrcfactory, *fdsinkfactory, *encoderfactory, *compressfactory;
|
||||
GstElementFactory *videosrcfactory;
|
||||
GList *padlist;
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
|
@ -18,7 +17,7 @@ int main(int argc,char *argv[]) {
|
|||
gst_plugin_load("aviencoder");
|
||||
gst_plugin_load("jpeg");
|
||||
|
||||
pipeline = gst_pipeline_new("pipeline");
|
||||
pipeline = GST_PIPELINE (gst_pipeline_new("pipeline"));
|
||||
|
||||
osssrcfactory = gst_elementfactory_find("osssrc");
|
||||
osssrc = gst_elementfactory_create(osssrcfactory,"osssrc");
|
||||
|
@ -44,7 +43,7 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
/* add objects to the main pipeline */
|
||||
video_thread = gst_thread_new("video_thread");
|
||||
g_return_if_fail(video_thread != NULL);
|
||||
g_return_val_if_fail(video_thread != NULL, -1);
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(compress));
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(encoder));
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(fdsink));
|
||||
|
|
|
@ -10,7 +10,6 @@ int main(int argc,char *argv[]) {
|
|||
GstElement *osssrc, *videosrc, *fdsink, *encoder, *compress, *video_queue, *video_thread;
|
||||
GstElementFactory *osssrcfactory, *fdsinkfactory, *encoderfactory, *compressfactory;
|
||||
GstElementFactory *videosrcfactory;
|
||||
GList *padlist;
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
|
@ -18,7 +17,7 @@ int main(int argc,char *argv[]) {
|
|||
gst_plugin_load("aviencoder");
|
||||
gst_plugin_load("wincodec");
|
||||
|
||||
pipeline = gst_pipeline_new("pipeline");
|
||||
pipeline = GST_PIPELINE (gst_pipeline_new("pipeline"));
|
||||
|
||||
osssrcfactory = gst_elementfactory_find("osssrc");
|
||||
osssrc = gst_elementfactory_create(osssrcfactory,"osssrc");
|
||||
|
@ -45,7 +44,7 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
/* add objects to the main pipeline */
|
||||
video_thread = gst_thread_new("video_thread");
|
||||
g_return_if_fail(video_thread != NULL);
|
||||
g_return_val_if_fail(video_thread != NULL, -1);
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(compress));
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(encoder));
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(fdsink));
|
||||
|
|
|
@ -121,11 +121,9 @@ int main(int argc,char *argv[])
|
|||
GstElement *muxthread_video, *muxer, *fdsink_video;
|
||||
GstElement *muxthread_audio, *fdsink_audio;
|
||||
GstElement *bin;
|
||||
GtkWidget *appwindow;
|
||||
GstCaps *srccaps;
|
||||
GstElement *new_element;
|
||||
GstAutoplug *autoplug;
|
||||
GtkWidget *socket;
|
||||
gint fd_video;
|
||||
gint fd_audio;
|
||||
|
||||
|
|
Loading…
Reference in a new issue