mp3 decoder

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

mp3 decoder

Gnanasekar-2
Hi all,

          I am working on developing plug-in for mp3.From the help of
mad plugin i found some of the ideas.from this what i came to know is
filesrc is getting an every 4K of data and passing it to chain function
of mad plugin.Here in chain this 4K is processed in some manner and
pushed to ( gst_pad_push (filter->srcpad, buf) ) source pad.

          But the thing is that i dont want to use this mad .. i have to
use my own plugin for mp3 decoder ... for this i found a decoder called
libmad. which is having some decoding algorithm.
But it is getting data as a single buffer of whole data.

          My query is that
         1. how to pass whole data from filesrc to plugin decoder?
         2. how to use libmad in my plugin ?
         3. how to pass output of decoded data to alsasink or osssink ?

Thanks and regards,
SK.Gnanasekar,

         

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp3 decoder

Edward Hervey
Administrator
So...

  Let me get this right. You want to create your own plugin using
'libmad' and for that you're looking at the code from the mad plugins
which ... already uses 'libmad'.

  You realize you're trying to do the EXACT SAME THING as the mad
plugin ?

    Edward


On Wed, 2008-11-19 at 14:59 +0530, Gnanasekar wrote:

> Hi all,
>
>           I am working on developing plug-in for mp3.From the help of
> mad plugin i found some of the ideas.from this what i came to know is
> filesrc is getting an every 4K of data and passing it to chain function
> of mad plugin.Here in chain this 4K is processed in some manner and
> pushed to ( gst_pad_push (filter->srcpad, buf) ) source pad.
>
>           But the thing is that i dont want to use this mad .. i have to
> use my own plugin for mp3 decoder ... for this i found a decoder called
> libmad. which is having some decoding algorithm.
> But it is getting data as a single buffer of whole data.
>
>           My query is that
>          1. how to pass whole data from filesrc to plugin decoder?
>          2. how to use libmad in my plugin ?
>          3. how to pass output of decoded data to alsasink or osssink ?
>
> Thanks and regards,
> SK.Gnanasekar,
>
>          
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp3 decoder

Gnanasekar-2
No , I am not .I am not going to do in the same way as mad used libmad decoder.
I was planned to dump the whole data (each 4K) in to a single buffer and passing that
buffer to decoder_init function of libmad which is doing decode oparation and processing those stuffs.Because decoder_int takes whole size of the source file(thats why i have been transfered all 4K's to a single  buffer).

So my functionality is goes like this,

filesrc -> passing 4K for each iteration
Gbuf   -> my own buffer for holding all 4K's in a single buffer
decoder_init(&Gbuf) -> passing Gbuf to decoder_init (libmad function)
input ,output,error -> these are callback functions which is defined in libmad.I am using all these call back functions altogether with this decode of libmad.

whether my flow is fine or any changes needed in the flow?

Thanks and Regards,
SK.Gnanasekar




Edward Hervey wrote:
So...

  Let me get this right. You want to create your own plugin using
'libmad' and for that you're looking at the code from the mad plugins
which ... already uses 'libmad'.

  You realize you're trying to do the EXACT SAME THING as the mad
plugin ?

    Edward


On Wed, 2008-11-19 at 14:59 +0530, Gnanasekar wrote:
  
Hi all,

          I am working on developing plug-in for mp3.From the help of 
mad plugin i found some of the ideas.from this what i came to know is 
filesrc is getting an every 4K of data and passing it to chain function 
of mad plugin.Here in chain this 4K is processed in some manner and 
pushed to ( gst_pad_push (filter->srcpad, buf) ) source pad.

          But the thing is that i dont want to use this mad .. i have to 
use my own plugin for mp3 decoder ... for this i found a decoder called 
libmad. which is having some decoding algorithm.
But it is getting data as a single buffer of whole data.

          My query is that
         1. how to pass whole data from filesrc to plugin decoder?
         2. how to use libmad in my plugin ?
         3. how to pass output of decoded data to alsasink or osssink ?

Thanks and regards,
SK.Gnanasekar,

         

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
    


  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp3 decoder

Edward Hervey
Administrator
Let me rephrase it in another way:
  The most efficient way to use libmad with GStreamer is how it's being
done in the mad gstreamer plugin.

If you want to do it another way you're:
 1. looking for trouble
 2. doubling your work
 3. going to end up with a really inefficient plugin

Why do you want to load everything in memory ? What's going to happen if
I give it a one hour podcast ? you're going to load the 60Mbytes in
memory.

   Edward

On Wed, 2008-11-19 at 17:21 +0530, Gnanasekar wrote:

> No , I am not .I am not going to do in the same way as mad used libmad
> decoder.
> I was planned to dump the whole data (each 4K) in to a single buffer
> and passing that
> buffer to decoder_init function of libmad which is doing decode
> oparation and processing those stuffs.Because decoder_int takes whole
> size of the source file(thats why i have been transfered all 4K's to a
> single  buffer).
>
> So my functionality is goes like this,
>
> filesrc -> passing 4K for each iteration
> Gbuf   -> my own buffer for holding all 4K's in a single buffer
> decoder_init(&Gbuf) -> passing Gbuf to decoder_init (libmad function)
> input ,output,error -> these are callback functions which is defined
> in libmad.I am using all these call back functions altogether with
> this decode of libmad.
>
> whether my flow is fine or any changes needed in the flow?
>
> Thanks and Regards,
> SK.Gnanasekar
>
>
>
>
> Edward Hervey wrote:
> > So...
> >
> >   Let me get this right. You want to create your own plugin using
> > 'libmad' and for that you're looking at the code from the mad plugins
> > which ... already uses 'libmad'.
> >
> >   You realize you're trying to do the EXACT SAME THING as the mad
> > plugin ?
> >
> >     Edward
> >
> >
> > On Wed, 2008-11-19 at 14:59 +0530, Gnanasekar wrote:
> >  
> > > Hi all,
> > >
> > >           I am working on developing plug-in for mp3.From the help of
> > > mad plugin i found some of the ideas.from this what i came to know is
> > > filesrc is getting an every 4K of data and passing it to chain function
> > > of mad plugin.Here in chain this 4K is processed in some manner and
> > > pushed to ( gst_pad_push (filter->srcpad, buf) ) source pad.
> > >
> > >           But the thing is that i dont want to use this mad .. i have to
> > > use my own plugin for mp3 decoder ... for this i found a decoder called
> > > libmad. which is having some decoding algorithm.
> > > But it is getting data as a single buffer of whole data.
> > >
> > >           My query is that
> > >          1. how to pass whole data from filesrc to plugin decoder?
> > >          2. how to use libmad in my plugin ?
> > >          3. how to pass output of decoded data to alsasink or osssink ?
> > >
> > > Thanks and regards,
> > > SK.Gnanasekar,
> > >
> > >          
> > >
> > > -------------------------------------------------------------------------
> > > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> > > Build the coolest Linux based applications with Moblin SDK & win great prizes
> > > Grand prize is a trip for two to an Open Source event anywhere in the world
> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> > >    
> >
> >
> >  
>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp3 decoder

Zaheer Merali
On Wed, Nov 19, 2008 at 12:03 PM, Edward Hervey <[hidden email]> wrote:

> Let me rephrase it in another way:
>  The most efficient way to use libmad with GStreamer is how it's being
> done in the mad gstreamer plugin.
>
> If you want to do it another way you're:
>  1. looking for trouble
>  2. doubling your work
>  3. going to end up with a really inefficient plugin
>
> Why do you want to load everything in memory ? What's going to happen if
> I give it a one hour podcast ? you're going to load the 60Mbytes in
> memory.
>

Or worse, a live stream such as an internet radio that runs 24 hours long.

Z

>   Edward
>
> On Wed, 2008-11-19 at 17:21 +0530, Gnanasekar wrote:
>> No , I am not .I am not going to do in the same way as mad used libmad
>> decoder.
>> I was planned to dump the whole data (each 4K) in to a single buffer
>> and passing that
>> buffer to decoder_init function of libmad which is doing decode
>> oparation and processing those stuffs.Because decoder_int takes whole
>> size of the source file(thats why i have been transfered all 4K's to a
>> single  buffer).
>>
>> So my functionality is goes like this,
>>
>> filesrc -> passing 4K for each iteration
>> Gbuf   -> my own buffer for holding all 4K's in a single buffer
>> decoder_init(&Gbuf) -> passing Gbuf to decoder_init (libmad function)
>> input ,output,error -> these are callback functions which is defined
>> in libmad.I am using all these call back functions altogether with
>> this decode of libmad.
>>
>> whether my flow is fine or any changes needed in the flow?
>>
>> Thanks and Regards,
>> SK.Gnanasekar
>>
>>
>>
>>
>> Edward Hervey wrote:
>> > So...
>> >
>> >   Let me get this right. You want to create your own plugin using
>> > 'libmad' and for that you're looking at the code from the mad plugins
>> > which ... already uses 'libmad'.
>> >
>> >   You realize you're trying to do the EXACT SAME THING as the mad
>> > plugin ?
>> >
>> >     Edward
>> >
>> >
>> > On Wed, 2008-11-19 at 14:59 +0530, Gnanasekar wrote:
>> >
>> > > Hi all,
>> > >
>> > >           I am working on developing plug-in for mp3.From the help of
>> > > mad plugin i found some of the ideas.from this what i came to know is
>> > > filesrc is getting an every 4K of data and passing it to chain function
>> > > of mad plugin.Here in chain this 4K is processed in some manner and
>> > > pushed to ( gst_pad_push (filter->srcpad, buf) ) source pad.
>> > >
>> > >           But the thing is that i dont want to use this mad .. i have to
>> > > use my own plugin for mp3 decoder ... for this i found a decoder called
>> > > libmad. which is having some decoding algorithm.
>> > > But it is getting data as a single buffer of whole data.
>> > >
>> > >           My query is that
>> > >          1. how to pass whole data from filesrc to plugin decoder?
>> > >          2. how to use libmad in my plugin ?
>> > >          3. how to pass output of decoded data to alsasink or osssink ?
>> > >
>> > > Thanks and regards,
>> > > SK.Gnanasekar,
>> > >
>> > >
>> > >
>> > > -------------------------------------------------------------------------
>> > > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> > > Build the coolest Linux based applications with Moblin SDK & win great prizes
>> > > Grand prize is a trip for two to an Open Source event anywhere in the world
>> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> > > _______________________________________________
>> > > gstreamer-devel mailing list
>> > > [hidden email]
>> > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>> > >
>> >
>> >
>> >
>>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp3 decoder

Frans van Berckel
In reply to this post by Gnanasekar-2
Hi,

Did you take a look into the GStreamer mp3 plugin by Fluendo?

https://core.fluendo.com/gstreamer/trac/browser/trunk



Frans van Berckel

On Wed, 2008-11-19 at 14:59 +0530, Gnanasekar wrote:

> Hi all,
>
>           I am working on developing plug-in for mp3.From the help of
> mad plugin i found some of the ideas.from this what i came to know is
> filesrc is getting an every 4K of data and passing it to chain function
> of mad plugin.Here in chain this 4K is processed in some manner and
> pushed to ( gst_pad_push (filter->srcpad, buf) ) source pad.
>
>           But the thing is that i dont want to use this mad .. i have to
> use my own plugin for mp3 decoder ... for this i found a decoder called
> libmad. which is having some decoding algorithm.
> But it is getting data as a single buffer of whole data.
>
>           My query is that
>          1. how to pass whole data from filesrc to plugin decoder?
>          2. how to use libmad in my plugin ?
>          3. how to pass output of decoded data to alsasink or osssink ?
>
> Thanks and regards,
> SK.Gnanasekar,
>
>          
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp3 decoder

Felipe Contreras
In reply to this post by Gnanasekar-2
On Wed, Nov 19, 2008 at 11:29 AM, Gnanasekar
<[hidden email]> wrote:

> Hi all,
>
>          I am working on developing plug-in for mp3.From the help of
> mad plugin i found some of the ideas.from this what i came to know is
> filesrc is getting an every 4K of data and passing it to chain function
> of mad plugin.Here in chain this 4K is processed in some manner and
> pushed to ( gst_pad_push (filter->srcpad, buf) ) source pad.
>
>          But the thing is that i dont want to use this mad .. i have to
> use my own plugin for mp3 decoder ... for this i found a decoder called
> libmad. which is having some decoding algorithm.
> But it is getting data as a single buffer of whole data.

Why don't you want to use the mad element?

>          My query is that
>         1. how to pass whole data from filesrc to plugin decoder?

You can use GstAdapter.

>         2. how to use libmad in my plugin ?

Check the mad element.

>         3. how to pass output of decoded data to alsasink or osssink ?

Read the plugin's writer guide, it explains that you need to do a pad push.

--
Felipe Contreras

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: mp3 decoder

Gnanasekar-2
In reply to this post by Frans van Berckel
This page is showing invalid security certificate ... i can't open this ...

Frans van Berckel wrote:
Hi,

Did you take a look into the GStreamer mp3 plugin by Fluendo?

https://core.fluendo.com/gstreamer/trac/browser/trunk



Frans van Berckel

On Wed, 2008-11-19 at 14:59 +0530, Gnanasekar wrote:
  
Hi all,

          I am working on developing plug-in for mp3.From the help of 
mad plugin i found some of the ideas.from this what i came to know is 
filesrc is getting an every 4K of data and passing it to chain function 
of mad plugin.Here in chain this 4K is processed in some manner and 
pushed to ( gst_pad_push (filter->srcpad, buf) ) source pad.

          But the thing is that i dont want to use this mad .. i have to 
use my own plugin for mp3 decoder ... for this i found a decoder called 
libmad. which is having some decoding algorithm.
But it is getting data as a single buffer of whole data.

          My query is that
         1. how to pass whole data from filesrc to plugin decoder?
         2. how to use libmad in my plugin ?
         3. how to pass output of decoded data to alsasink or osssink ?

Thanks and regards,
SK.Gnanasekar,

         

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

    


  


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel