mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 13:11:06 +00:00
Brand new source, the cdparanoia source. Reads audio data from a CD, writes out raw audio. The tests/paranoia.c pro...
Original commit message from CVS: Brand new source, the cdparanoia source. Reads audio data from a CD, writes out raw audio. The tests/paranoia.c program will simply hook this up to a sound card. It works perfectly. Next step is to flesh out the rest of the element, including pad caps, better seek and playout control, signals, and whatever else comes up. A minor patch to the editor is included here, the GstElementFactory details struct has a name change from 'class' to 'klass' that wasn't reflected in the elementselect widget. Fixd.
This commit is contained in:
parent
c28633b01d
commit
ffbc7201a7
4 changed files with 46 additions and 3 deletions
|
@ -469,6 +469,7 @@ plugins/rtjpeg/Makefile
|
|||
plugins/vorbis/Makefile
|
||||
plugins/capture/Makefile
|
||||
plugins/capture/v4l/Makefile
|
||||
plugins/cdparanoia/Makefile
|
||||
gstplay/Makefile
|
||||
components/bonobo-gstmediaplay/Makefile
|
||||
test/Makefile
|
||||
|
|
|
@ -200,9 +200,9 @@ GstElementFactory *element_select_dialog() {
|
|||
elements = gst_elementfactory_get_list();
|
||||
while (elements) {
|
||||
element = (GstElementFactory *)(elements->data);
|
||||
printf("%s %s\n", element->name, element->details->class);
|
||||
printf("%s %s\n", element->name, element->details->klass);
|
||||
/* split up the factory's class */
|
||||
classes = g_strsplit(element->details->class,"/",0);
|
||||
classes = g_strsplit(element->details->klass,"/",0);
|
||||
class = classes;
|
||||
curlist = &classtree;
|
||||
/* walk down the class tree to find where to place this element */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
noinst_PROGRAMS = init loadall simplefake states caps queue registry
|
||||
noinst_PROGRAMS = init loadall simplefake states caps queue registry paranoia
|
||||
|
||||
LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(top_builddir)/gst/libgst.la
|
||||
CFLAGS = -Wall
|
||||
|
|
42
tests/paranoia.c
Normal file
42
tests/paranoia.c
Normal file
|
@ -0,0 +1,42 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
int main(int argc,char *argv[]) {
|
||||
GstPipeline *pipeline;
|
||||
GstElement *paranoia,*queue,*audio_thread,*audiosink;
|
||||
int i;
|
||||
|
||||
DEBUG_ENTER("(%d)",argc);
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
pipeline = GST_PIPELINE(gst_pipeline_new("paranoia"));
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
audio_thread = gst_thread_new("audio_thread");
|
||||
g_return_if_fail(audio_thread != NULL);
|
||||
|
||||
paranoia = gst_elementfactory_make("cdparanoia","paranoia");
|
||||
g_return_val_if_fail(1,paranoia != NULL);
|
||||
// gtk_object_set(GTK_OBJECT(paranoia),"extra_paranoia",FALSE,"cdda2wav_paranoia",FALSE,NULL);
|
||||
|
||||
queue = gst_elementfactory_make("queue","queue");
|
||||
g_return_val_if_fail(2,queue != NULL);
|
||||
|
||||
audiosink = gst_elementfactory_make("audiosink","audiosink");
|
||||
g_return_val_if_fail(2,audiosink != NULL);
|
||||
|
||||
gst_bin_add(GST_BIN(pipeline),paranoia);
|
||||
gst_bin_add(GST_BIN(pipeline),queue);
|
||||
gst_bin_add(GST_BIN(audio_thread),audiosink);
|
||||
gst_bin_add(GST_BIN(pipeline),audio_thread);
|
||||
gst_element_add_ghost_pad(GST_ELEMENT(audio_thread),gst_element_get_pad(audiosink,"sink"));
|
||||
|
||||
gst_element_connect(paranoia,"src",queue,"sink");
|
||||
gst_element_connect(queue,"src",audio_thread,"sink");
|
||||
|
||||
gst_element_set_state(GST_ELEMENT(pipeline),GST_STATE_PLAYING);
|
||||
if (GST_STATE(paranoia) != GST_STATE_PLAYING) fprintf(stderr,"error: state not set\n");
|
||||
|
||||
while (1) {
|
||||
gst_bin_iterate(GST_BIN(pipeline));
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue