zoukankan      html  css  js  c++  java
  • RTSP

     
     
     
     
    To use TCP communication, you need to request TCP connection during RTSP SETUP. You have to sent SETUP command with
    要使用TCP连接,RTSP客户端需要在SETUP阶段请求TCP连接。SETUP命令中应该包括如下格式的Transport:
    Transport: RTP/AVP/TCP;interleaved=0-1
    This will tell the server to send media data with TCP and interleave the data in channel 0 and 1. Given in the specification, data channel is even
    上述Transport将告诉服务端使用TCP协议发送媒体数据,并且使用信道 0 和 1 对流数据以及控制信息进行交织。详细说来,使用偶数信道作为数据
    number and control channel is odd (data_ch_num + 1). So, if you data channel is 0, your control channel will be 0 + 1 = 1.
    传输信道,使用奇数信道作为控制信道(数据信道 + 1)。所以,如果你设定数据信道为 0 ,那控制信道应该是 0 + 1 = 1。
     
    Below is an example of TCP SETUP
     
    RTP Data
     
    After the setup, RTP data will be sent through the TCP socket that is used for RTSP commands. The RTP data will be encapsulate in the following format
    SETUP之后,RTP数据将通过用来发送RTSP命令的TCP Socket进行发送。RTP数据将以如下格式进行封装:
    | magic number | channel number | embedded data length | data |
    magic number - 1 byte value of hex 0x24
    RTP数据标识符,"$"
    channel number - 1 byte value to denote the channel
    信道数字 - 1个字节,用来指示信道
    embedded data length - 2 bytes to denote the embedded data length
    数据长度 - 2个字节,用来指示插入数据长度
    data - data packet, ie RTP packet, with the total length of the embedded data length
    数据 - 数据包,比如说RTP包,总长度与上面的数据长度相同
  • 相关阅读:
    HDoj-2072-字数
    hibou 主界面自己侧滑的定义
    Android得到一个闹钟在第三方
    UILabel,UITextField 以及UIButton应用
    推荐几个好文章
    半年后,我还在路上。
    NGUI 3.5过程(三)Button button
    OpenGL研究2.0 计算圆
    CF 444A(DZY Loves Physics-低密度脂蛋白诱导子图)
    美日高价进口中国非转基因大豆:不仅吃还做药
  • 原文地址:https://www.cnblogs.com/jingzhishen/p/5401343.html
Copyright © 2011-2022 走看看