[gst-devel] CLI player

Thomas Vander Stichele thomas at apestaart.org
Mon Dec 4 12:40:51 CET 2006


Some general tips:

> hi,
>     Iam able to build a simple CLI player.For that i
> had built "mp3parse" mpegaudio parser,"mad" mad
> decoder "directsoundsink" directsound for output...

1) The "Enter" button is your friend.  Whitespace is your friend.
Please structure your mails a little more so they are easier to read.
If your mail looks like you wrote it in half a second without rereading
it to see if it makes sense, how much time do you think will people
spend on it reading it ?

> And
> my piece of code is pipeline = gst_pipeline_new
> ("audio-player");
> source = gst_element_factory_make ("filesrc",
> "file-source");
> parser = gst_element_factory_make ("mp3parse",
> "mp3-parser");
> decoder = gst_element_factory_make ("mad",
> "mp3-decoder");
> conv = gst_element_factory_make ("audioconvert",
> "converter");
> sink = gst_element_factory_make ("directsoundsink",
> "directsound-output");
> if (!pipeline || !source || !parser || !decoder ||
> !conv || !sink) {
> g_print ("One element could not be created\n");

2) Do not cut and paste code in your mailer like this if you want us to
be able to read or possibly even compile it.  Also, your code does not
compile.  Also, even if it did, it does not actually *do* anything.

> and i didn't get any error msg and the exe got
> created..

Without either the missing brace from your if, or an implementation of
main() ? That is amazing !

> When play an mp3 file it says that
> gstreamer/gst/gstinfo.c:line 413:assertion 'category
> !=NULL' failed and iam not able to hear anything in
> the speaker...Pls give me solution.....

3) Don't describe what happens if a cut-and-paste of the output attached
is a lot more clearer to compare with what we see when we run stuff.

Also, consider tip number 1) - I had to break up your mail into separate
lines to get a clue to fixing your problem.  You forgot to call
gst_init().  Even though you didn't attach your whole program as you
should have, I am pretty certain based on that output.

> 1.whether it would be any problem with the file iam
> trying to play..
> 2.or whether the directsound DLL may ne corrupt...

4) Always start by assuming *you* did something wrong.  Humility is a
virtue in programmers.  Especially if you did not do 2) and 3), there is
no easy way for someone else to verify that you did not do something

Good luck,

More information about the gstreamer-devel mailing list