<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:m="http://schemas.microsoft.com/office/2004/12/omml" 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 12 (filtered medium)"><base href="x-msg://5566/"><style><!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:新宋体;
        panose-1:2 1 6 9 3 1 1 1 1 1;}
@font-face
        {font-family:"\@新宋体";
        panose-1:2 1 6 9 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.hps
        {mso-style-name:hps;}
span.shorttext
        {mso-style-name:short_text;}
span.apple-tab-span
        {mso-style-name:apple-tab-span;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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=purple style='word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space'><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='text-indent:10.5pt;text-autospace:none'><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>I want to subclass  RTSPServer and RTSPClient classes to extend my specific functions.  However, with the </span><span lang=EN-US style='font-family:新宋体;color:blue;background:silver;mso-highlight:silver'>private</span><span lang=EN-US style='font-family:新宋体;color:teal;background:silver;mso-highlight:silver'> </span><span lang=EN-US style='font-family:新宋体;color:blue;background:silver;mso-highlight:silver'>class</span><span lang=EN-US style='font-family:新宋体;color:teal;background:silver;mso-highlight:silver'> </span><span lang=EN-US style='font-family:新宋体;color:#018081;background:silver;mso-highlight:silver'>RequestQueue</span><span lang=EN-US style='font-family:新宋体;color:teal;background:silver;mso-highlight:silver'> </span><span lang=EN-US style='font-family:新宋体;color:teal'>and some other private attributes defined within the </span><span lang=EN-US style='font-family:新宋体;color:#018081;background:silver;mso-highlight:silver'>RTSPClient</span><span lang=EN-US style='font-family:新宋体;color:#018081'> class, I found it hard to overide just a few method to make it, because my overrided methods can</span><span lang=EN-US style='color:#018081'>’</span><span lang=EN-US style='font-family:新宋体;color:#018081'>t access those private </span><span lang=EN-US style='font-family:新宋体;color:teal'>attributes</span><span lang=EN-US style='font-family:新宋体;color:#018081'> in the </span><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>RTSPClient class.  Also, when I want to add another video format to be processed by the server, I found that I need to override the c</span><span lang=EN-US style='font-family:新宋体;color:#018081;background:silver;mso-highlight:silver'>eateSourceObjects</span><span lang=EN-US style='font-family:新宋体;color:teal'> method to generate my specific RTPSource. So, I subclassed MediaSubsession class(eg, myMediaSubsession) and override its  </span><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>cr</span><span lang=EN-US style='font-family:新宋体;color:#018081;background:silver;mso-highlight:silver'>eateSourceObjects</span><span lang=EN-US style='font-family:新宋体;color:#018081'>. However, </span><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>c</span><span lang=EN-US style='font-family:新宋体;color:#018081;background:silver;mso-highlight:silver'>eateSourceObjects</span><span lang=EN-US style='font-family:新宋体;color:#018081'> is called by </span><span lang=EN-US style='font-family:新宋体;color:teal'>MediaSubsession::initiate() method, which in turn requires me to override it. After I have done that, I found the myMediaSubsession:: initiate() method still call the MediaSubsession::</span><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'> c</span><span lang=EN-US style='font-family:新宋体;color:#018081;background:silver;mso-highlight:silver'>eateSourceObjects</span><span lang=EN-US style='font-family:新宋体;color:#018081'> rather than </span><span lang=EN-US style='font-family:新宋体;color:teal'>myMediaSubsession::</span><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'> c</span><span lang=EN-US style='font-family:新宋体;color:#018081;background:silver;mso-highlight:silver'>eateSourceObjects</span><span lang=EN-US style='font-family:新宋体;color:teal'><o:p></o:p></span></p><p class=MsoNormal style='text-indent:12.0pt;text-autospace:none'><span lang=EN-US style='font-family:新宋体;color:teal'><o:p> </o:p></span></p><p class=MsoNormal style='text-indent:12.0pt;text-autospace:none'><span lang=EN-US style='font-family:新宋体;color:teal'>I wonder if I </span><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>want to subclass</span><span lang=EN-US style='font-family:新宋体;color:teal'> </span><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>RTSPServer and RTSPClient classes,  what is the minimum classes that I also need to subclass them to make it work? (RTSPClientSession, MediaSubSession, or …)<o:p></o:p></span></p></div></body></html>