RTSP连接服务器是否成功,以及是否从服务器接收到实际播放的数据,主要是判断两个linux select函数的执行结果。
1.连接服务器的处理过程
1.连接服务器的处理过程
[cpp]
view plain
copy
- ARTSPConnection::onConnect(const sp<AMessage> &msg)
- int err = ::connect(
- mSocket, (const struct sockaddr *)&remote, sizeof(remote));
- LOGE("%s L%d err = %d", __FUNCTION__, __LINE__, err);
- if (err < 0) {
- if (errno == EINPROGRESS) { // 正在连接中
- sp<AMessage> msg = new AMessage(kWhatCompleteConnection, id());