1. 类定义 1.1 SrsConfig 类 /** * the config service provider. * for the config supports reload, so never keep the reference cross st-thread, * that is, never save the SrsConfDirective* get by any api of config, * for it maybe free in the reload st-thread…
相信对于继承和多态的概念性我就不在怎么解释啦!不管你是.Net还是Java面向对象编程都是比不缺少一堂课~~Net如此Java亦也有同样的思想成分包含其中. 继承,多态,封装是Java面向对象的3大特征. 继承 如果用.Net写一个A类继承B类的话,写法会是大致如下: Public Class A : B{ ....... } Java的话却要通过extends关键字在声明类的时候指定其父类(基类),所以上面的.Net写法要转换成Java的话应该是下面的样子: Public clas A ext…
1. SrsHls::on_audio 将音频数据封装到 ts 文件中. /* * mux the audio packet to ts. * @param shared_audio, directly ptr, copy it if need to save it. */ int SrsHls::on_audio(SrsSharedPtrMessage* shared_audio) { int ret = ERROR_SUCCESS; /* 检测是够使能了 hls */ if (!hls_en…