[gst-devel] how to implement an MP3 sink element
huan.zheng at intel.com
Wed Oct 8 05:37:13 CEST 2008
My idea is to derive from Gstbasesink
And this derived sink will do the following thing: 1, mp3 decode 2, pcm rendering 3, provide Gstclock
And there are several plugins that you will need to reference correspondingly: 1, mad plugin 2, alsasink plugin 3, Gstbaseaudiosink
And this derived sink will depend on the following libraries: 1, mad decode library 2, id3tag library 3, libasound
Inside the render function of this derived sink, you will need to combine the chain function of mad plugin with ALSA pcm rendering functions.
What I have done is that I have integrated ALSA pcm rendering into the render function of the derived sink, and let this sink provide a GstClock. So that this derived the sink could now directly play out raw pcm data. Usage is: filesrc location=rawpcm ! mysink
I’m not going to add mp3 decode into the render function, because my scenario is hardware decoding, what I’m going to do is to add mp3 frame parsing into the render function, and print out frame information for each frame.
Any suggestions are appreciated!
Best Regards, Zheng, Huan(ZBT)
Intel Aisa-Pacific Research & Developement Ltd
Tel: 021-6116 6435
Inet: 8821 6435
From: Dale Tian [mailto:daletian at yahoo.cn]
Sent: 2008年10月8日 10:55
To: Discussion of the development of GStreamer
Subject: [gst-devel] how to implement an MP3 sink element
Is there anyone has implemented an MP3 sink or some decoder+sink element, or have any ideas about that? Now I'm try to design such a sink.
Is it possible for us to inherited from GstAudioSink, which uses a GstRingBuffer? From current release I cannot see any code to support MP3 frames in the ring buffer, but in GstRingBuffer, it defines a buffer format type "GST_BUFTYPE_MPEG: samples in mpeg audio format". Anyone knows what that type can be used for? Is that something we can extend to support MP3 frames in ring buffer?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel