mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
Makefile.am fixes
Original commit message from CVS: Makefile.am fixes
This commit is contained in:
parent
38b288c61c
commit
3fbaa5c582
6 changed files with 134 additions and 59 deletions
|
@ -1,4 +1,4 @@
|
|||
SUBDIRS = gst plugins test editor tools docs
|
||||
SUBDIRS = gst plugins test editor tools docs libs
|
||||
|
||||
bin_SCRIPTS = gstreamer-config
|
||||
|
||||
|
|
|
@ -318,6 +318,7 @@ plugins/mpeg2/ac3dec/Makefile
|
|||
plugins/mpeg1/Makefile
|
||||
plugins/mpeg1/mpeg_play/Makefile
|
||||
plugins/mpeg1/parse/Makefile
|
||||
plugins/mpeg1video/Makefile
|
||||
plugins/mpeg1video/parse/Makefile
|
||||
plugins/effects/Makefile
|
||||
plugins/effects/stereo/Makefile
|
||||
|
|
|
@ -103,8 +103,8 @@ void gst_clock_wait(GstClock *clock, GstClockTime time, GstObject *obj) {
|
|||
clock->locking = FALSE;
|
||||
}
|
||||
else {
|
||||
DEBUG("gst_clock: unlock all %p\n", obj);
|
||||
gst_clock_reset(clock);
|
||||
DEBUG("gst_clock: unlock all %p\n", obj);
|
||||
g_mutex_unlock(clock->sinkmutex);
|
||||
clock->locking = FALSE;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ aviparse_CFLAGS = $(shell gnome-config --cflags gnomeui)
|
|||
aviparse_LDFLAGS = $(shell gnome-config --libs gnomeui)
|
||||
mp1parse_CFLAGS = $(shell gnome-config --cflags gnomeui)
|
||||
mp1parse_LDFLAGS = $(shell gnome-config --libs gnomeui)
|
||||
mpeg2parse_CFLAGS = $(shell gnome-config --cflags gnomeui)
|
||||
mpeg2parse_LDFLAGS = $(shell gnome-config --libs gnomeui)
|
||||
|
||||
buffer_SOURCES = buffer.c mem.c
|
||||
teardown_SOURCES = teardown.c mem.c
|
||||
|
|
|
@ -1,38 +1,118 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <gnome.h>
|
||||
#include <gst/gst.h>
|
||||
|
||||
extern gboolean _gst_plugin_spew;
|
||||
|
||||
static int ac3fd;
|
||||
static gchar *desired_stream;
|
||||
|
||||
void mpeg2parse_write_ac3(GstPad *pad,GstBuffer *buf) {
|
||||
g_print(".");
|
||||
// g_print("MPEG2PARSE: got AC3 buffer of size %d\n",GST_BUFFER_SIZE(buf));
|
||||
write(ac3fd,GST_BUFFER_DATA(buf),GST_BUFFER_SIZE(buf));
|
||||
gst_buffer_unref(buf);
|
||||
void eof(GstSrc *src) {
|
||||
g_print("have eos, quitting\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void mpeg2parse_info_chain(GstPad *pad,GstBuffer *buf) {
|
||||
// g_print("MPEG2PARSE: got buffer of size %d\n",GST_BUFFER_SIZE(buf));
|
||||
gst_buffer_unref(buf);
|
||||
}
|
||||
void mpeg2parse_newpad(GstElement *parser,GstPad *pad, GstElement *pipeline) {
|
||||
GstElement *parse_audio, *parse_video, *decode, *decode_video, *play, *show;
|
||||
GstElement *audio_queue, *video_queue;
|
||||
GstElement *audio_thread, *video_thread;
|
||||
|
||||
void mpeg2parse_newpad(GstElement *parser,GstPad *pad) {
|
||||
GstPad *infopad;
|
||||
GtkWidget *appwindow;
|
||||
|
||||
g_print("MPEG2PARSE: have new pad \"%s\" from parser\n",
|
||||
gst_pad_get_name(pad));
|
||||
g_print("***** a new pad %s was created\n", gst_pad_get_name(pad));
|
||||
|
||||
infopad = gst_pad_new("sink",GST_PAD_SINK);
|
||||
if (strcmp(gst_pad_get_name(pad),desired_stream) == 0)
|
||||
gst_pad_set_chain_function(infopad,mpeg2parse_write_ac3);
|
||||
else
|
||||
gst_pad_set_chain_function(infopad,mpeg2parse_info_chain);
|
||||
gst_pad_connect(pad,infopad);
|
||||
// connect to audio pad
|
||||
//if (0) {
|
||||
if (strncmp(gst_pad_get_name(pad), "private_stream_1.0", 18) == 0) {
|
||||
gst_plugin_load("ac3parse");
|
||||
gst_plugin_load("ac3dec");
|
||||
// construct internal pipeline elements
|
||||
parse_audio = gst_elementfactory_make("ac3parse","parse_audio");
|
||||
g_return_if_fail(parse_audio != NULL);
|
||||
decode = gst_elementfactory_make("ac3dec","decode_audio");
|
||||
g_return_if_fail(decode != NULL);
|
||||
play = gst_elementfactory_make("audiosink","play_audio");
|
||||
g_return_if_fail(play != NULL);
|
||||
|
||||
// create the thread and pack stuff into it
|
||||
audio_thread = gst_thread_new("audio_thread");
|
||||
g_return_if_fail(audio_thread != NULL);
|
||||
gst_bin_add(GST_BIN(audio_thread),GST_ELEMENT(parse_audio));
|
||||
gst_bin_add(GST_BIN(audio_thread),GST_ELEMENT(decode));
|
||||
gst_bin_add(GST_BIN(audio_thread),GST_ELEMENT(play));
|
||||
|
||||
// set up pad connections
|
||||
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),
|
||||
gst_element_get_pad(parse_audio,"sink"));
|
||||
gst_pad_connect(gst_element_get_pad(parse_audio,"src"),
|
||||
gst_element_get_pad(decode,"sink"));
|
||||
gst_pad_connect(gst_element_get_pad(decode,"src"),
|
||||
gst_element_get_pad(play,"sink"));
|
||||
|
||||
// construct queue and connect everything in the main pipelie
|
||||
audio_queue = gst_elementfactory_make("queue","audio_queue");
|
||||
gtk_object_set(GTK_OBJECT(audio_queue),"max_level",30,NULL);
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_queue));
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(audio_thread));
|
||||
gst_pad_connect(pad,
|
||||
gst_element_get_pad(audio_queue,"sink"));
|
||||
gst_pad_connect(gst_element_get_pad(audio_queue,"src"),
|
||||
gst_element_get_pad(audio_thread,"sink"));
|
||||
|
||||
// set up thread state and kick things off
|
||||
gtk_object_set(GTK_OBJECT(audio_thread),"create_thread",TRUE,NULL);
|
||||
g_print("setting to RUNNING state\n");
|
||||
gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_RUNNING);
|
||||
g_print("setting to PLAYING state\n");
|
||||
gst_element_set_state(GST_ELEMENT(audio_thread),GST_STATE_PLAYING);
|
||||
//} else if (strncmp(gst_pad_get_name(pad), "video_", 6) == 0) {
|
||||
} else if (0) {
|
||||
|
||||
gst_plugin_load("mp1videoparse");
|
||||
gst_plugin_load("mpeg_play");
|
||||
gst_plugin_load("videosink");
|
||||
// construct internal pipeline elements
|
||||
parse_video = gst_elementfactory_make("mp1videoparse","parse_video");
|
||||
g_return_if_fail(parse_video != NULL);
|
||||
decode_video = gst_elementfactory_make("mpeg_play","decode_video");
|
||||
g_return_if_fail(decode_video != NULL);
|
||||
show = gst_elementfactory_make("videosink","show");
|
||||
g_return_if_fail(show != NULL);
|
||||
//gtk_object_set(GTK_OBJECT(show),"width",640, "height", 480,NULL);
|
||||
|
||||
appwindow = gnome_app_new("MPEG1 player","MPEG1 player");
|
||||
gnome_app_set_contents(GNOME_APP(appwindow),
|
||||
gst_util_get_widget_arg(GTK_OBJECT(show),"widget"));
|
||||
gtk_widget_show_all(appwindow);
|
||||
|
||||
// create the thread and pack stuff into it
|
||||
video_thread = gst_thread_new("video_thread");
|
||||
g_return_if_fail(video_thread != NULL);
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(parse_video));
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(decode_video));
|
||||
gst_bin_add(GST_BIN(video_thread),GST_ELEMENT(show));
|
||||
|
||||
// set up pad connections
|
||||
gst_element_add_ghost_pad(GST_ELEMENT(video_thread),
|
||||
gst_element_get_pad(parse_video,"sink"));
|
||||
gst_pad_connect(gst_element_get_pad(parse_video,"src"),
|
||||
gst_element_get_pad(decode_video,"sink"));
|
||||
gst_pad_connect(gst_element_get_pad(decode_video,"src"),
|
||||
gst_element_get_pad(show,"sink"));
|
||||
|
||||
// construct queue and connect everything in the main pipeline
|
||||
video_queue = gst_elementfactory_make("queue","video_queue");
|
||||
gtk_object_set(GTK_OBJECT(video_queue),"max_level",30,NULL);
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_queue));
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(video_thread));
|
||||
gst_pad_connect(pad,
|
||||
gst_element_get_pad(video_queue,"sink"));
|
||||
gst_pad_connect(gst_element_get_pad(video_queue,"src"),
|
||||
gst_element_get_pad(video_thread,"sink"));
|
||||
|
||||
// set up thread state and kick things off
|
||||
gtk_object_set(GTK_OBJECT(video_thread),"create_thread",TRUE,NULL);
|
||||
g_print("setting to RUNNING state\n");
|
||||
gst_element_set_state(GST_ELEMENT(video_thread),GST_STATE_RUNNING);
|
||||
g_print("setting to PLAYING state\n");
|
||||
gst_element_set_state(GST_ELEMENT(video_thread),GST_STATE_PLAYING);
|
||||
}
|
||||
g_print("\n");
|
||||
}
|
||||
|
||||
int main(int argc,char *argv[]) {
|
||||
|
@ -43,12 +123,9 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
g_print("have %d args\n",argc);
|
||||
|
||||
_gst_plugin_spew = TRUE;
|
||||
gst_init(&argc,&argv);
|
||||
// gst_plugin_load("mpeg2parse");
|
||||
gst_plugin_load_all();
|
||||
|
||||
ac3fd = creat("output.ac3",S_IREAD|S_IWRITE);
|
||||
gnome_init("MPEG2 Video player","0.0.1",argc,argv);
|
||||
gst_plugin_load("mpeg2parse");
|
||||
|
||||
pipeline = gst_pipeline_new("pipeline");
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
|
@ -58,6 +135,7 @@ int main(int argc,char *argv[]) {
|
|||
g_print("using DVD source\n");
|
||||
} else
|
||||
src = gst_elementfactory_make("disksrc","src");
|
||||
|
||||
g_return_if_fail(src != NULL);
|
||||
gtk_object_set(GTK_OBJECT(src),"location",argv[1],NULL);
|
||||
if (argc >= 3) {
|
||||
|
@ -69,27 +147,20 @@ int main(int argc,char *argv[]) {
|
|||
parse = gst_elementfactory_make("mpeg2parse","parse");
|
||||
g_return_if_fail(parse != NULL);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(parse),"new_pad",mpeg2parse_newpad,NULL);
|
||||
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src));
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(parse));
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(parse),"new_pad",mpeg2parse_newpad, pipeline);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(src),"eos",GTK_SIGNAL_FUNC(eof),NULL);
|
||||
|
||||
gst_pad_connect(gst_element_get_pad(src,"src"),
|
||||
gst_element_get_pad(parse,"sink"));
|
||||
|
||||
g_print("setting to RUNNING state\n");
|
||||
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_RUNNING);
|
||||
|
||||
if (argc >= 4) c = atoi(argv[3]);
|
||||
else c = 4;
|
||||
g_print("c is %d\n",c);
|
||||
|
||||
if (argc >= 5) desired_stream = argv[4];
|
||||
else desired_stream = "private_stream_1.0";
|
||||
|
||||
g_print("\n");
|
||||
for (i=0;i<c;i++) {
|
||||
g_print("\n");
|
||||
while (1) {
|
||||
gst_src_push(GST_SRC(src));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,10 +19,10 @@ int main(int argc,char *argv[]) {
|
|||
GtkWidget *draw;
|
||||
|
||||
|
||||
//_gst_plugin_spew = TRUE;
|
||||
gst_init(&argc,&argv);
|
||||
gst_plugin_load("v4lsrc");
|
||||
gst_plugin_load("videosink");
|
||||
//_gst_plugin_spew = TRUE;
|
||||
gst_init(&argc,&argv);
|
||||
gst_plugin_load("v4lsrc");
|
||||
gst_plugin_load("videosink");
|
||||
|
||||
gnome_init("Videotest","0.0.1",argc,argv);
|
||||
|
||||
|
@ -35,7 +35,7 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
src = gst_elementfactory_create(srcfactory,"src");
|
||||
videosink = gst_elementfactory_create(videosinkfactory,"videosink");
|
||||
gtk_object_set(GTK_OBJECT(videosink),"width",120,"height",80,NULL);
|
||||
gtk_object_set(GTK_OBJECT(videosink),"width",320,"height",240,NULL);
|
||||
|
||||
|
||||
gst_bin_add(GST_BIN(bin),GST_ELEMENT(src));
|
||||
|
@ -46,20 +46,20 @@ int main(int argc,char *argv[]) {
|
|||
|
||||
appwindow = gnome_app_new("Videotest","Videotest");
|
||||
|
||||
vbox1 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (vbox1);
|
||||
vbox1 = gtk_vbox_new (FALSE, 0);
|
||||
gtk_widget_show (vbox1);
|
||||
|
||||
button = gtk_button_new_with_label(_("test"));//_with_label (_("chup"));
|
||||
gtk_widget_show (button);
|
||||
gtk_widget_show (button);
|
||||
gtk_box_pack_start (GTK_BOX (vbox1), button, FALSE, FALSE, 0);
|
||||
//gtk_widget_set_usize (button, 50, 50);
|
||||
//gtk_widget_set_usize (button, 0, 0);
|
||||
|
||||
draw = gst_util_get_widget_arg(GTK_OBJECT(videosink),"widget"),
|
||||
draw = gst_util_get_widget_arg(GTK_OBJECT(videosink),"widget"),
|
||||
gtk_box_pack_start (GTK_BOX (vbox1),
|
||||
draw,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (draw);
|
||||
draw,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (draw);
|
||||
|
||||
gnome_app_set_contents(GNOME_APP(appwindow), vbox1);
|
||||
|
||||
|
@ -71,13 +71,14 @@ int main(int argc,char *argv[]) {
|
|||
gst_element_set_state(GST_ELEMENT(bin),GST_STATE_RUNNING);
|
||||
gst_element_set_state(GST_ELEMENT(bin),GST_STATE_PLAYING);
|
||||
|
||||
//gtk_object_set(GTK_OBJECT(src),"tune",133250,NULL);
|
||||
g_idle_add(idle_func,src);
|
||||
|
||||
gtk_main();
|
||||
}
|
||||
|
||||
gboolean idle_func(gpointer data) {
|
||||
static int i=0;
|
||||
static int i=0;
|
||||
//g_print("pushing %d\n",i++);
|
||||
gst_src_push(GST_SRC(data));
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue