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

Dale Tian daletian at yahoo.cn
Fri Oct 10 04:34:18 CEST 2008


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 renderfunction of this derived
sink, you will need to combine the chainfunction of mad plugin with ALSApcm rendering functions.
 
What
I have done is that I have integrated ALSA pcm rendering into the renderfunction 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081010/f71be231/attachment.htm>


More information about the gstreamer-devel mailing list