[gst-devel] 回复: how to implement an MP3 sink element

Zheng, Huan huan.zheng at intel.com
Fri Oct 10 05:18:34 CEST 2008


Hi, Tian
Actually, after replying your mail, I just can’t help and have implemented a Mp3 sink as what I proposed. And It works.
It works like: gst-launch filesrc location=xx.mp3 ! mysink
But I haven’t try any Seek operations because currently I don’t have a player which could use mysink.


Best Regards, Zheng, Huan(ZBT)
OTC/SSD/SSG
Intel Aisa-Pacific Research & Developement Ltd
Tel: 021-6116 6435
Inet: 8821 6435
Cub: 3W035
________________________________
From: Dale Tian [mailto:daletian at yahoo.cn]
Sent: 2008年10月10日 10:34
To: Discussion of the development of GStreamer
Subject: [gst-devel] 回复: how to implement an MP3 sink element

Thank you!  Actually we already started to do as what you proposed.  Before we implemented an audio sink derived from GstAudioSink already, now I'm try to seek a better solution to revise our old audio sink, you know, which had a ring buffer, to support MP3.

Best regards,
Dale

----- 原始邮件 ----
发件人: "Zheng, Huan" <huan.zheng at intel.com>
收件人: Discussion of the development of GStreamer <gstreamer-devel at lists.sourceforge.net>
已发送: 2008/10/8(周三), 上午11:37:13
主题: Re: [gst-devel] how to implement an MP3 sink element
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)
OTC/SSD/SSG
Intel Aisa-Pacific Research & Developement Ltd
Tel: 021-6116 6435
Inet: 8821 6435
Cub: 3W035
________________________________
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?

Thank you.
Best regards,
Dale

________________________________
雅虎邮箱,您的终生邮箱!<http://cn.mail.yahoo.com/>

________________________________
雅虎邮箱,您的终生邮箱!<http://cn.mail.yahoo.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081010/2b0f3c49/attachment.htm>


More information about the gstreamer-devel mailing list