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…
1. SrsHls::on_video /* * mux the video packets to ts. * @param shared_video, directly ptr, copy it if need to save it. * @param is_sps_pps, whether the video is h.264 sps/pps. */ int SrsHls::on_video(SrsSharedPtrMessage* shared_video, bool is_sps_pps…
1. SrsRtmpConn::service_cycle 当服务器在 conn 线程的开始调用 connect_app 函数接收并解析客户端发送的 connect 消息后,调用该 service_cycle 函数开始服务客户端的具体请求. /** * when valid and connected to vhost/app, service the client. */ int SrsRtmpConn::service_cycle() { int ret = ERROR_SUCCESS; /…