<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="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]-->
<style>
<!--
_filtered {font-family:宋体;panose-1:2 1 6 0 3 1 1 1 1 1;}
_filtered {font-family:PMingLiU;panose-1:2 2 3 0 0 0 0 0 0 0;}
_filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
_filtered {font-family:"Palatino Linotype";panose-1:2 4 5 2 5 5 5 3 3 4;}
_filtered {panose-1:2 1 6 0 3 1 1 1 1 1;}
_filtered {font-family:Pristina;panose-1:3 6 4 2 4 4 6 8 2 4;}
_filtered {panose-1:2 2 3 0 0 0 0 0 0 0;}
_filtered {margin:72.0pt 90.0pt 72.0pt 90.0pt;}

 /* 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:Pristina;
        panose-1:3 6 4 2 4 4 6 8 2 4;}
@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;}
 /* 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
        {font-family:"Palatino Linotype";
        color:purple;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle18
        {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'>Hi,
Tian<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'>Actually,
after replying your mail, I just can’t help and have implemented a Mp3 sink as
what I proposed. And It works.<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'>It
works like: gst-launch filesrc location=xx.mp3 ! 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'>But
I haven’t try any Seek operations because currently I don’t have a player which
could use 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'><o:p>&nbsp;</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>&nbsp;</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 &amp; 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'>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'> 10:34<br>
<b><span style='font-weight:bold'>To:</span></b> Discussion of the development
of GStreamer<br>
<b><span style='font-weight:bold'>Subject:</span></b> [gst-devel] </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'> 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>&nbsp;</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"'>Thank you!&nbsp;
Actually we already started to do as what you proposed.&nbsp; 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.<br>
<br>
Best regards,<br>
Dale<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"'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt;font-family:
"Times New Roman"'>----- </span></font>原始邮件<font face="Times New Roman"><span
lang=EN-US style='font-family:"Times New Roman"'> ----<br>
</span></font>发件人:<font face="Times New Roman"><span lang=EN-US
style='font-family:"Times New Roman"'> &quot;Zheng, Huan&quot; &lt;huan.zheng@intel.com&gt;<br>
</span></font>收件人:<font face="Times New Roman"><span lang=EN-US
style='font-family:"Times New Roman"'> Discussion of the development of
GStreamer &lt;gstreamer-devel@lists.sourceforge.net&gt;<br>
</span></font>已发送:<font face="Times New Roman"><span lang=EN-US
style='font-family:"Times New Roman"'> 2008/10/8(</span></font>周三<font
face="Times New Roman"><span lang=EN-US style='font-family:"Times New Roman"'>),
</span></font>上午<font face="Times New Roman"><span lang=EN-US style='font-family:
"Times New Roman"'>11:37:13<br>
</span></font>主题:<font face="Times New Roman"><span lang=EN-US
style='font-family:"Times New Roman"'> Re: [gst-devel] how to implement an MP3
sink element<o:p></o:p></span></font></p>

<div>

<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</span></font><span lang=EN-US><o:p></o:p></span></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</span></font><span lang=EN-US><o:p></o:p></span></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</span></font><span
lang=EN-US><o:p></o:p></span></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 </span></font><span lang=EN-US><o:p></o:p></span></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'>&nbsp;</span></font><span
lang=EN-US><o:p></o:p></span></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.</span></font><span
lang=EN-US><o:p></o:p></span></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'>&nbsp;</span></font><span
lang=EN-US><o:p></o:p></span></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</span></font><span
lang=EN-US><o:p></o:p></span></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.</span></font><span
lang=EN-US><o:p></o:p></span></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'>&nbsp;</span></font><span
lang=EN-US><o:p></o:p></span></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!</span></font><span lang=EN-US><o:p></o:p></span></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'>&nbsp;</span></font><span
lang=EN-US><o:p></o:p></span></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)</span></font><span lang=EN-US><o:p></o:p></span></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</span></font><span
lang=EN-US><o:p></o:p></span></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 &amp; Developement Ltd</span></font><span lang=EN-US><o:p></o:p></span></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</span></font><span
lang=EN-US><o:p></o:p></span></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><span
lang=EN-US><o:p></o:p></span></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> Discussion of the development
of GStreamer<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'>&nbsp;<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?&nbsp; Now I'm try to design such a sink.<br>
Is it possible for us to inherited from GstAudioSink, which uses a
GstRingBuffer?&nbsp; 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 &quot;GST_BUFTYPE_MPEG: samples in mpeg audio format&quot;.&nbsp; Anyone
knows what that type can be used for?&nbsp; Is that something we can extend to
support MP3 frames in ring buffer?<br>
<br>
Thank you.<br>
Best regards,<br>
Dale</span></font><span lang=EN-US><o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><font size=3 face=宋体><span lang=EN-US style='font-size:12.0pt'>&nbsp;<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/" target="_blank"><span lang=EN-US><span
lang=EN-US>雅虎邮箱,您的终生邮箱!</span></span></a><o:p></o:p></span></font></p>

</div>

</div>

</div>

</div>

<p class=MsoNormal><font size=3 face=宋体><span lang=EN-US style='font-size:12.0pt'><o:p>&nbsp;</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>