<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:PMingLiU;
        panose-1:2 2 3 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Palatino Linotype";
        panose-1:2 4 5 2 5 5 5 3 3 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Pristina;
        panose-1:3 6 4 2 4 4 6 8 2 4;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 2 3 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:宋体;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Palatino Linotype";
        color:purple;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=ZH-CN link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'>My
idea is to derive from Gstbasesink<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'>And
this derived sink will do the following thing: 1, mp3 decode 2, pcm rendering
3, provide Gstclock<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'>And
there are several plugins that you will need to reference correspondingly: 1,
mad plugin 2, alsasink plugin 3, Gstbaseaudiosink<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'>And
this derived sink will depend on the following libraries: 1, mad decode library
2, id3tag library 3, libasound <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'>Inside
the </span></font><font size=2 color=red face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:red'>render</span></font><font
size=2 color=purple face="Palatino Linotype"><span lang=EN-US style='font-size:
10.0pt;font-family:"Palatino Linotype";color:purple'> function of this derived
sink, you will need to combine the </span></font><font size=2 color=red
face="Palatino Linotype"><span lang=EN-US style='font-size:10.0pt;font-family:
"Palatino Linotype";color:red'>chain</span></font><font size=2 color=purple
face="Palatino Linotype"><span lang=EN-US style='font-size:10.0pt;font-family:
"Palatino Linotype";color:purple'> function of mad plugin with </span></font><font
size=2 color=red face="Palatino Linotype"><span lang=EN-US style='font-size:
10.0pt;font-family:"Palatino Linotype";color:red'>ALSA</span></font><font
size=2 color=purple face="Palatino Linotype"><span lang=EN-US style='font-size:
10.0pt;font-family:"Palatino Linotype";color:purple'> pcm rendering functions.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'>What
I have done is that I have integrated ALSA pcm rendering into the </span></font><font
size=2 color=red face="Palatino Linotype"><span lang=EN-US style='font-size:
10.0pt;font-family:"Palatino Linotype";color:red'>render</span></font><font
size=2 color=purple face="Palatino Linotype"><span lang=EN-US style='font-size:
10.0pt;font-family:"Palatino Linotype";color:purple'> 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<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'>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.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'>Any
suggestions are appreciated!<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=purple face="Palatino Linotype"><span
lang=EN-US style='font-size:10.0pt;font-family:"Palatino Linotype";color:purple'><o:p> </o:p></span></font></p>
<div>
<p class=MsoNormal><font size=3 color=navy face=Pristina><span lang=EN-US
style='font-size:12.0pt;font-family:Pristina;color:navy'>Best Regards, Zheng,
Huan(ZBT)<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=purple face=Pristina><span lang=EN-US
style='font-size:12.0pt;font-family:Pristina;color:purple'>OTC/SSD/SSG<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=navy face=Pristina><span lang=EN-US
style='font-size:12.0pt;font-family:Pristina;color:navy'>Intel Aisa-Pacific
Research & Developement Ltd<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=purple face=Pristina><span lang=EN-US
style='font-size:12.0pt;font-family:Pristina;color:purple'>Tel: 021-6116 6435<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=purple face=Pristina><span lang=EN-US
style='font-size:12.0pt;font-family:Pristina;color:purple'>Inet: 8821 6435</span></font><font
color=purple><span lang=EN-US style='color:purple'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=purple face=Pristina><span lang=EN-US
style='font-size:12.0pt;font-family:Pristina;color:purple'>Cub: 3W035</span></font><span
lang=EN-US><o:p></o:p></span></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face=宋体><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
Dale Tian [mailto:daletian@yahoo.cn] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 2008</span></font><font
size=2><span style='font-size:10.0pt'>年</span></font><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>10</span></font><font
size=2><span style='font-size:10.0pt'>月</span></font><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>8</span></font><font
size=2><span style='font-size:10.0pt'>日</span></font><font size=2 face=Tahoma><span
lang=EN-US style='font-size:10.0pt;font-family:Tahoma'> 10:55<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">Discussion
of the development of GStreamer</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> [gst-devel] how to
implement an MP3 sink element</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face=宋体><span lang=EN-US style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<div>
<div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span lang=EN-US
style='font-size:12.0pt;font-family:"Times New Roman"'>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.<br>
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?<br>
<br>
Thank you.<br>
Best regards,<br>
Dale<o:p></o:p></span></font></p>
</div>
</div>
<p class=MsoNormal><font size=3 face=宋体><span lang=EN-US style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face=宋体><span lang=EN-US style='font-size:12.0pt'>
<hr size=1 width="100%" align=center>
</span></font></div>
<p class=MsoNormal><font size=3 face=宋体><span lang=EN-US style='font-size:12.0pt'><a
href="http://cn.mail.yahoo.com/"><span lang=EN-US><span lang=EN-US>雅虎邮箱,您的终生邮箱!</span></span></a><o:p></o:p></span></font></p>
</div>
</body>
</html>