CN104539593A - H.245 message analysis method - Google Patents
H.245 message analysis method Download PDFInfo
- Publication number
- CN104539593A CN104539593A CN201410783865.XA CN201410783865A CN104539593A CN 104539593 A CN104539593 A CN 104539593A CN 201410783865 A CN201410783865 A CN 201410783865A CN 104539593 A CN104539593 A CN 104539593A
- Authority
- CN
- China
- Prior art keywords
- message
- decoding
- bit
- function
- decoding function
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000004458 analytical method Methods 0.000 title claims description 7
- 230000011664 signaling Effects 0.000 claims abstract description 42
- 238000000034 method Methods 0.000 claims abstract description 16
- 238000000605 extraction Methods 0.000 claims abstract description 15
- 238000013507 mapping Methods 0.000 claims abstract description 7
- 238000010276 construction Methods 0.000 claims abstract description 4
- 230000000007 visual effect Effects 0.000 claims abstract description 4
- 230000006870 function Effects 0.000 claims description 90
- 239000002131 composite material Substances 0.000 claims description 10
- 239000000284 extract Substances 0.000 claims description 7
- 230000003068 static effect Effects 0.000 claims description 6
- 238000013461 design Methods 0.000 claims description 2
- 230000006854 communication Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
Landscapes
- Mobile Radio Communication Systems (AREA)
- Communication Control (AREA)
Abstract
本发明涉及一种H.245消息解析方法,含有下列步骤:1、H.245解码信令树的构建;2、消息定义、映射;3、解码:对每一条消息结构编写对应的解码函数,调用解码函数库对应的消息解码函数,完成解码工作;4、消息比特提取;5、H.245信令树的数据填充:对于每条控制信息,通过调用自己的解码函数返回所取的比特值,解码函数将对应的数值填充到本条消息对应的节点上;6、解码结果输出:调用输出显示模块,对此条消息的信令树进行遍历,逐级读取各层节点上填充的数据值,并进行可视化输出,验证解码的正确性;本发明能为可视电话业务数据帧的复用提供关键参数和函数接口。
The present invention relates to an H.245 message parsing method, comprising the following steps: 1. Construction of the H.245 decoding signaling tree; 2. Message definition and mapping; 3. Decoding: writing a corresponding decoding function for each message structure, Call the message decoding function corresponding to the decoding function library to complete the decoding work; 4. Message bit extraction; 5. Data filling of the H.245 signaling tree: for each piece of control information, return the bit value taken by calling its own decoding function , the decoding function fills the corresponding value into the node corresponding to this message; 6. Decoding result output: call the output display module to traverse the signaling tree of this message, and read the data values filled in the nodes of each layer step by step , and perform visual output to verify the correctness of decoding; the invention can provide key parameters and function interfaces for the multiplexing of videophone service data frames.
Description
(一)、技术领域:本发明涉及一种消息解析方法,特别是涉及一种H.245消息解析方法。 (1) Technical field: The present invention relates to a message analysis method, in particular to a H.245 message analysis method.
(二)、背景技术:H.245协议(Control protocol for multimedia communication)是H.323协议族中用于媒体信道控制的协议,主要完成多媒体通信中每个逻辑通道的建立、维护和释放,具体包括逻辑通道的打开和关闭、参数设定、收发双方的能力协商等控制功能,同时它还要完成多点会议呼叫中逻辑信道的配合控制功能。H.245定义了在通信过程中交互消息的语法和语义,对主要消息的交互过程进行了描述,其对消息语法的定义采用一种逐层嵌套的消息结构。 (2), background technology: H.245 protocol (Control protocol for multimedia communication) is a protocol used for media channel control in the H.323 protocol family, which mainly completes the establishment, maintenance and release of each logical channel in multimedia communication, specifically It includes control functions such as opening and closing of logical channels, parameter setting, capability negotiation between sending and receiving parties, and at the same time, it also completes the coordination control function of logical channels in multipoint conference calls. H.245 defines the syntax and semantics of interactive messages in the communication process, describes the interaction process of main messages, and adopts a layer-by-layer nested message structure for the definition of message syntax.
H.245在OSI框架中属于应用层协议,其功能决定了H.245消息要用到非常复杂的信令,因此使用抽象语法表示法ASN.1来定义信令的类型和格式,采用非对齐的紧缩编码规则(PER,Packet Encoding Rules)来进行表示。由于PER是以比特为单位编码的,且每个信息单元之间没有填充,因此实现起来比较复杂。 H.245 belongs to the application layer protocol in the OSI framework. Its function determines that the H.245 message needs to use very complex signaling. Therefore, the abstract syntax notation ASN.1 is used to define the type and format of the signaling, and the unaligned Packet Encoding Rules (PER, Packet Encoding Rules) for representation. Because PER is coded in units of bits, and there is no padding between each information unit, it is more complicated to implement.
(三)、发明内容: (3) Contents of the invention:
本发明要解决的技术问题是:提供一种H.245消息解析方法,该方法能为可 The technical problem to be solved by the present invention is: provide a kind of H.245 message parsing method, this method can be
视电话业务数据帧的复用提供关键参数和函数接口。 The multiplexing of video and telephone service data frames provides key parameters and function interfaces.
本发明的技术方案: Technical scheme of the present invention:
一种H.245消息解析方法,含有下列步骤: A kind of H.245 message parsing method, contains following steps:
步骤1、H.245解码信令树的构建: Step 1, construction of H.245 decoding signaling tree:
H.245消息的顶层是多媒体系统的控制消息(Multimedia System Control Message),多媒体系统的控制消息含有四种类型:接收方需响应并且应答的请求消息(Request Message)、应答请求消息(Request Message)的响应消息(Response Message)、接收方需响应但无需应答的命令消息(Command Message)、接收方不响应且无需应答的指示消息(Indication Message);这四种类型的消息是H.245控制协议的第一级消息类型,每种类型消息结构又包含了N种子消息类型,作为下一层子树,以此类推,依层嵌套,最终形成H.245整体信令消息;按照H.245整体信令消息的层次性嵌套结构,将其整个协议消息定义为一个树形的结构类型;对于H.245信令树结构,一条控制消息单元在树形结构中可能有很多条路径可以到达,但是对于待解码的比特流,每次有且只有一条路径有效,可以到达。要得到底层节点的信息,必须走完上层的节点,所以在解码时,必须考虑所有可能出现的路径,才能保证解码的正确性。 The top layer of the H.245 message is the control message of the multimedia system (Multimedia System Control Message). The control message of the multimedia system contains four types: the request message (Request Message) that the receiver needs to respond and respond to, and the response request message (Request Message). The response message (Response Message), the receiver needs to respond but does not need to respond to the command message (Command Message), the receiver does not respond and does not need to respond to the indication message (Indication Message); these four types of messages are the H.245 control protocol The first-level message type, each type of message structure contains N seed message types, as the next layer of subtrees, and so on, nested layer by layer, and finally form the H.245 overall signaling message; according to H.245 The hierarchical nesting structure of the overall signaling message defines its entire protocol message as a tree structure type; for the H.245 signaling tree structure, a control message unit may have many paths to reach in the tree structure , but for the bit stream to be decoded, there is only one valid path at a time and can be reached. In order to obtain the information of the underlying nodes, the nodes on the upper layer must be completed. Therefore, when decoding, all possible paths must be considered to ensure the correctness of decoding.
步骤2、消息定义、映射: Step 2, message definition, mapping:
将用ASN.1 PER定义描述的H.245数据类型和对应的消息结构定义、映射为程序语言描述的数据结构文件,这是解码的基础;映射后的结构具有足够的信息进行编码或者具有足够的域存放解码后的数据;映射完成的功能是将ASN.1描述的每种数据类型都映射到其对应的解码函数中去,这些解码函数再调用下层相应的解码函数实现消息的解码功能。 The H.245 data type described by the ASN.1 PER definition and the corresponding message structure are defined and mapped to the data structure file described by the program language, which is the basis of decoding; the mapped structure has enough information for encoding or has enough The field stores the decoded data; the function of mapping is to map each data type described by ASN.1 to its corresponding decoding function, and these decoding functions then call the corresponding decoding function of the lower layer to realize the decoding function of the message.
步骤3、解码: Step 3, decoding:
当数据类型和消息结构映射到程序文件后,接下来就是利用解码函数库进行解码,解码函数库是H.245解析的核心部分;依据H.245信令数结构,必须对每一条消息结构编写对应的解码函数;由于H.245消息的解码函数中包括对于基本数据类型和复合数据结构的调用,所以对于基本的数据类型和复合数据结构,也需要对应的解码函数库;解码函数部分以API接口向其它模块提供调用接口,其本身也对接口模块透明,消息的解码函数必须确定其所取得的比特数,并初始化缓冲区字节和比特两个指针位置,传给比特提取函数;通过接口部分接收经过ASN.1 PER编码后的H.245数据流,然后调用解码函数库对应的消息解码函数,完成解码工作,并将结果通过接口部分送出; After the data type and message structure are mapped to the program file, the next step is to use the decoding function library to decode. The decoding function library is the core part of H.245 analysis; according to the H.245 signaling number structure, each message structure must be written The corresponding decoding function; since the decoding function of the H.245 message includes the call to the basic data type and the composite data structure, the corresponding decoding function library is also required for the basic data type and the composite data structure; the decoding function part uses the API The interface provides a call interface to other modules, and it is also transparent to the interface module. The decoding function of the message must determine the number of bits it has obtained, and initialize the two pointer positions of the buffer byte and the bit, and pass it to the bit extraction function; through the interface The part receives the H.245 data stream encoded by ASN.1 PER, and then calls the message decoding function corresponding to the decoding function library to complete the decoding work, and sends the result through the interface part;
步骤4、消息比特提取: Step 4, message bit extraction:
对于H.245信令树,即使所需单元是必选单元并且比特数固定,仍需逐比特的按照树形结构走到信息所在的节点。为此,在解析模块中设计一个灵活地从比特流中取出任意比特的函数,此函数接受解码函数的调用,提取对应的信息流比特位,并将数值返回给解码函数;函数自身返回所取比特的位数,以验证提取比特位数量的正确性,并且根据所取比特位数调整双指针的位置;这样,即使H.245的信息层层嵌套,也可以通过反复调用此函数实现对信息单元的提取。 For the H.245 signaling tree, even if the required unit is mandatory and the number of bits is fixed, it is still necessary to go to the node where the information is located bit by bit according to the tree structure. To this end, a function that flexibly extracts any bit from the bit stream is designed in the parsing module. This function accepts the call of the decoding function, extracts the corresponding information stream bits, and returns the value to the decoding function; the function itself returns the extracted The number of bits to verify the correctness of the number of bits extracted, and adjust the position of the double pointer according to the number of bits taken; in this way, even if the information layers of H.245 are nested, it can be realized by repeatedly calling this function Extraction of information units.
步骤5、H.245信令树的数据填充: Step 5, data filling of H.245 signaling tree:
对于每条控制信息,通过调用自己的解码函数返回所取的比特值,解码函数将对应的数值填充到本条消息对应的节点上,本级其余节点不填充,值为空; For each piece of control information, the bit value is returned by calling its own decoding function, and the decoding function fills the corresponding value into the node corresponding to this message, and the other nodes of this level are not filled, and the value is empty;
步骤6、解码结果输出: Step 6, decoding result output:
当一条H.245信令解析完毕后,消息对应的信令树填充完毕,调用输出显示模块,对此条消息的信令树进行遍历,逐级读取各层节点上填充的数据值,并进行可视化输出,验证解码的正确性。 When an H.245 signaling is parsed, the signaling tree corresponding to the message is filled, and the output display module is called to traverse the signaling tree of this message, read the data values filled in the nodes of each layer step by step, and Perform visual output to verify the correctness of decoding.
步骤2中的H.245数据类型含有基本类型和复合类型。 The H.245 data types in step 2 contain basic types and complex types.
步骤4中的根据所取比特位数调整双指针的位置是指后移双指针的位置。 In step 4, adjusting the position of the double pointer according to the number of bits to be taken refers to moving the position of the double pointer backward.
在调用解码函数库之前,必须执行初始化操作,完成双指针的置0、H.245 Before calling the decoding function library, the initialization operation must be performed to complete the zeroing of the double pointer and the H.245
信令树各节点清空这些操作; Each node of the signaling tree clears these operations;
消息的解码函数必须确定其所取得的比特数,并初始化缓冲区字节和比特两个指针位置,传给比特提取函数; The decoding function of the message must determine the number of bits it has obtained, and initialize the two pointer positions of the buffer byte and the bit, and pass it to the bit extraction function;
比特提取函数取得所需要的比特后,将内容返回给对应的解码函数,自身返回所取比特的位数,以验证正确性,并且根据所取比特位数调整双指针的位置;双指针是关键,不能轻易修改位置; After the bit extraction function obtains the required bits, it returns the content to the corresponding decoding function, returns the number of bits taken by itself to verify the correctness, and adjusts the position of the double pointer according to the number of bits taken; the double pointer is the key , the position cannot be easily modified;
C语言中,并没有对应存储比特位(小于8)的数据结构,因此,比特数值的读取方法为:将包含待读取比特(n位)的字节从缓冲区中取出,先进行左移(由bit指针确定),进行左对齐,然后进行右对齐,将所取比特位之前的bit位清0,完成实际比特位读取; In the C language, there is no corresponding data structure for storing bits (less than 8). Therefore, the method of reading the bit value is: take the byte containing the bit to be read (n bits) out of the buffer, and first perform left Shift (determined by the bit pointer), perform left alignment, and then perform right alignment, clear the bit before the bit to be taken, and complete the actual bit reading;
每条H.245消息的结构定义就是复合数据类型的定义,各消息的解码函数最终需要调用基本类型的解码函数,将返回值填入信令树对应节点; The structure definition of each H.245 message is the definition of the composite data type. The decoding function of each message needs to call the decoding function of the basic type in the end, and fill the return value into the corresponding node of the signaling tree;
对于H.245消息定义中个数不定的参数,根据实际消息中参数数量的多少,提供不同的存储空间分配方案;如果参数数量较少,则使用静态存储空间;如果静态空间不足以存放参数,则动态申请空间。这种方法既能适应协议定义出的各种情况,又能在大多数消息解码过程中保证效率。 For the variable number of parameters in the H.245 message definition, different storage space allocation schemes are provided according to the number of parameters in the actual message; if the number of parameters is small, use static storage space; if the static space is not enough to store parameters, Then dynamically apply for space. This method can not only adapt to various situations defined by the protocol, but also ensure efficiency in most message decoding processes.
本发明的有益效果: Beneficial effects of the present invention:
1、 本发明在深入研究ASN.l描述的紧缩编码规则PER基础上首先提出了 1. The present invention first proposes the
PER树型解码结构,并设计实现了可用于通信系统的PER解码器;本发明针对信令树中每个结点对应的消息编写对应的解码函数,层层嵌套;在对消息解码时,以深度优先搜索方式对信令树进行遍历,消息的解码函数调用包含的基本和复合类型数据对应的解码函数,提取对应的比特值,并将数据值逐层填充到消息信令树对应的结点上,直到叶子结点结束。本发明对经过ASN.1 PER编码后的消息结构进行解码分析,获取控制消息的具体内容,为可视电话业务数据帧的复用提供关键参数和函数接口。 PER tree type decoding structure, and design and realize the PER decoder that can be used in the communication system; The present invention writes the corresponding decoding function for the message corresponding to each node in the signaling tree, nested layer by layer; when decoding the message, The signaling tree is traversed in a depth-first search manner. The decoding function of the message calls the decoding function corresponding to the basic and composite type data contained in the message, extracts the corresponding bit value, and fills the data value into the corresponding structure of the message signaling tree layer by layer. Click until the end of the leaf node. The invention decodes and analyzes the ASN.1 PER coded message structure, obtains the specific content of the control message, and provides key parameters and function interfaces for the multiplexing of videophone service data frames.
(四)、附图说明: (4) Description of drawings:
图1 为H.245信令树结构示意图; Figure 1 is a schematic diagram of the H.245 signaling tree structure;
图2 为H.245数据类型与消息结构到C数据结构文件的映射示意图; Fig. 2 is the mapping schematic diagram of H.245 data type and message structure to C data structure file;
图3为解码程序流程图。 Figure 3 is a flowchart of the decoding program.
(五)、具体实施方式: (5) Specific implementation methods:
H.245消息解析方法含有下列步骤: The H.245 message parsing method contains the following steps:
步骤1、H.245解码信令树的构建: Step 1, construction of H.245 decoding signaling tree:
H.245消息的顶层是多媒体系统的控制消息(Multimedia System Control Message),多媒体系统的控制消息含有四种类型:接收方需响应并且应答的请求消息(Request Message)、应答请求消息(Request Message)的响应消息(Response Message)、接收方需响应但无需应答的命令消息(Command Message)、接收方不响应且无需应答的指示消息(Indication Message);这四种类型的消息是H.245控制协议的第一级消息类型,每种类型消息结构又包含了N种子消息类型,作为下一层子树,以此类推,依层嵌套,最终形成H.245整体信令消息;按照H.245整体信令消息的层次性嵌套结构,将其整个协议消息定义为一个树形的结构类型(如图1所示);对于H.245信令树结构,一条控制消息单元在树形结构中可能有很多条路径可以到达,但是对于待解码的比特流,每次有且只有一条路径有效,可以到达。要得到底层节点的信息,必须走完上层的节点,所以在解码时,必须考虑所有可能出现的路径,才能保证解码的正确性。 The top layer of the H.245 message is the control message of the multimedia system (Multimedia System Control Message). The control message of the multimedia system contains four types: the request message (Request Message) that the receiver needs to respond and respond to, and the response request message (Request Message). The response message (Response Message), the command message (Command Message) that the receiver needs to respond but does not need to respond, and the indication message (Indication Message) that the receiver does not respond and does not need to respond; these four types of messages are the H.245 control protocol The first-level message type, each type of message structure contains N seed message types, as the next layer of subtrees, and so on, nested layer by layer, and finally form the H.245 overall signaling message; according to H.245 The hierarchical nesting structure of the overall signaling message defines its entire protocol message as a tree structure type (as shown in Figure 1); for the H.245 signaling tree structure, a control message unit is in the tree structure There may be many paths that can be reached, but for the bit stream to be decoded, there is only one path that is valid and can be reached at a time. In order to obtain the information of the underlying nodes, the upper nodes must be walked through, so when decoding, all possible paths must be considered to ensure the correctness of decoding.
步骤2、消息定义、映射: Step 2, message definition, mapping:
将用ASN.1 PER定义描述的H.245数据类型和对应的消息结构定义、映射为程序语言描述的数据结构文件(如图2所示),这是解码的基础;映射后的结构具有足够的信息进行编码或者具有足够的域存放解码后的数据;映射完成的功能是将ASN.1描述的每种数据类型都映射到其对应的解码函数中去,这些解码函数再调用下层相应的解码函数实现消息的解码功能。 The H.245 data type described by the ASN.1 PER definition and the corresponding message structure definition are mapped to the data structure file described by the program language (as shown in Figure 2), which is the basis of decoding; the mapped structure has enough The information is encoded or there are enough fields to store the decoded data; the function of mapping is to map each data type described by ASN.1 to its corresponding decoding function, and these decoding functions call the corresponding decoding of the lower layer The function realizes the decoding function of the message.
步骤3、解码: Step 3, decoding:
当数据类型和消息结构映射到程序文件后,接下来就是利用解码函数库进行解码(如图3所示),解码函数库是H.245解析的核心部分;依据H.245信令数结构,必须对每一条消息结构编写对应的解码函数;由于H.245消息的解码函数中包括对于基本数据类型和复合数据结构的调用,所以对于基本的数据类型和复合数据结构,也需要对应的解码函数库;解码函数部分以API接口向其它模块提供调用接口,其本身也对接口模块透明,消息的解码函数必须确定其所取得的比特数,并初始化缓冲区字节和比特两个指针位置,传给比特提取函数;通过接口部分接收经过ASN.1 PER编码后的H.245数据流,然后调用解码函数库对应的消息解码函数,完成解码工作,并将结果通过接口部分送出; After the data type and message structure are mapped to the program file, the next step is to use the decoding function library to decode (as shown in Figure 3). The decoding function library is the core part of H.245 analysis; according to the H.245 signaling data structure, The corresponding decoding function must be written for each message structure; since the decoding function of the H.245 message includes calls for basic data types and composite data structures, corresponding decoding functions are also required for basic data types and composite data structures library; the decoding function part uses the API interface to provide a call interface to other modules, and it is also transparent to the interface module. The decoding function of the message must determine the number of bits it has obtained, and initialize the two pointer positions of the buffer byte and the bit, and pass Give the bit extraction function; receive the H.245 data stream encoded by ASN.1 PER through the interface part, and then call the corresponding message decoding function of the decoding function library to complete the decoding work, and send the result through the interface part;
步骤4、消息比特提取: Step 4, message bit extraction:
对于H.245信令树,即使所需单元是必选单元并且比特数固定,仍需逐比特的按照树形结构走到信息所在的节点。为此,在解析模块中设计一个灵活地从比特流中取出任意比特的函数,此函数接受解码函数的调用,提取对应的信息流比特位,并将数值返回给解码函数;函数自身返回所取比特的位数,以验证提取比特位数量的正确性,并且根据所取比特位数调整双指针的位置;这样,即使H.245的信息层层嵌套,也可以通过反复调用此函数实现对信息单元的提取。 For the H.245 signaling tree, even if the required unit is mandatory and the number of bits is fixed, it is still necessary to go to the node where the information is located bit by bit according to the tree structure. To this end, a function that flexibly extracts any bit from the bit stream is designed in the parsing module. This function accepts the call of the decoding function, extracts the corresponding information stream bits, and returns the value to the decoding function; the function itself returns the extracted The number of bits to verify the correctness of the number of bits extracted, and adjust the position of the double pointer according to the number of bits taken; in this way, even if the information layers of H.245 are nested, it can be realized by repeatedly calling this function Extraction of information units.
步骤5、H.245信令树的数据填充: Step 5, data filling of H.245 signaling tree:
对于每条控制信息,通过调用自己的解码函数返回所取的比特值,解码函数将对应的数值填充到本条消息对应的节点上,本级其余节点不填充,值为空; For each piece of control information, the bit value is returned by calling its own decoding function, and the decoding function fills the corresponding value into the node corresponding to this message, and the other nodes of this level are not filled, and the value is empty;
步骤6、解码结果输出: Step 6, decoding result output:
当一条H.245信令解析完毕后,消息对应的信令树填充完毕,调用输出显示模块,对此条消息的信令树进行遍历,逐级读取各层节点上填充的数据值,并进行可视化输出,验证解码的正确性。 When an H.245 signaling is parsed, the signaling tree corresponding to the message is filled, and the output display module is called to traverse the signaling tree of this message, read the data values filled in the nodes of each layer step by step, and Perform visual output to verify the correctness of decoding.
步骤2中的H.245数据类型含有基本类型和复合类型。 The H.245 data types in step 2 contain basic types and compound types.
步骤4中的根据所取比特位数调整双指针的位置是指后移双指针的位置。 In step 4, adjusting the position of the double pointer according to the number of bits to be taken refers to moving the position of the double pointer backward.
在调用解码函数库之前,必须执行初始化操作,完成双指针的置0、H.245 Before calling the decoding function library, the initialization operation must be performed to complete the zeroing of the double pointer and the H.245
信令树各节点清空这些操作; Each node of the signaling tree clears these operations;
消息的解码函数必须确定其所取得的比特数,并初始化缓冲区字节和比特两个指针位置,传给比特提取函数; The decoding function of the message must determine the number of bits it has obtained, and initialize the two pointer positions of the buffer byte and the bit, and pass it to the bit extraction function;
比特提取函数取得所需要的比特后,将内容返回给对应的解码函数,自身返回所取比特的位数,以验证正确性,并且根据所取比特位数调整双指针的位置;双指针是关键,不能轻易修改位置; After the bit extraction function obtains the required bits, it returns the content to the corresponding decoding function, returns the number of bits taken by itself to verify the correctness, and adjusts the position of the double pointer according to the number of bits taken; the double pointer is the key , the position cannot be easily modified;
C语言中,并没有对应存储比特位(小于8)的数据结构,因此,比特数值的读取方法为:将包含待读取比特(n位)的字节从缓冲区中取出,先进行左移(由bit指针确定),进行左对齐,然后进行右对齐,将所取比特位之前的bit位清0,完成实际比特位读取; In the C language, there is no corresponding data structure for storing bits (less than 8). Therefore, the method of reading the bit value is: take the byte containing the bit to be read (n bits) out of the buffer, and first perform left Shift (determined by the bit pointer), perform left alignment, and then perform right alignment, clear the bit before the bit to be taken, and complete the actual bit reading;
每条H.245消息的结构定义就是复合数据类型的定义,各消息的解码函数最终需要调用基本类型的解码函数,将返回值填入信令树对应节点; The structure definition of each H.245 message is the definition of the composite data type. The decoding function of each message needs to call the decoding function of the basic type in the end, and fill the return value into the corresponding node of the signaling tree;
对于H.245消息定义中个数不定的参数,根据实际消息中参数数量的多少,提供不同的存储空间分配方案;如果参数数量较少,则使用静态存储空间;如果静态空间不足以存放参数,则动态申请空间。这种方法既能适应协议定义出的各种情况,又能在大多数消息解码过程中保证效率。 For the variable number of parameters in the H.245 message definition, different storage space allocation schemes are provided according to the number of parameters in the actual message; if the number of parameters is small, use static storage space; if the static space is not enough to store parameters, Then dynamically apply for space. This method can not only adapt to various situations defined by the protocol, but also ensure efficiency in most message decoding processes.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410783865.XA CN104539593B (en) | 2014-12-18 | 2014-12-18 | H.245 message resolution method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410783865.XA CN104539593B (en) | 2014-12-18 | 2014-12-18 | H.245 message resolution method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104539593A true CN104539593A (en) | 2015-04-22 |
CN104539593B CN104539593B (en) | 2017-06-23 |
Family
ID=52855062
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410783865.XA Active CN104539593B (en) | 2014-12-18 | 2014-12-18 | H.245 message resolution method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104539593B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106899377A (en) * | 2015-12-17 | 2017-06-27 | 联芯科技有限公司 | A kind of channel decoding method and device |
CN113742294A (en) * | 2021-08-23 | 2021-12-03 | 宜通世纪科技股份有限公司 | Method, system, device and medium for decoding ASN.1-PER signaling message |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6335927B1 (en) * | 1996-11-18 | 2002-01-01 | Mci Communications Corporation | System and method for providing requested quality of service in a hybrid network |
CN1882116A (en) * | 2005-08-11 | 2006-12-20 | 华为技术有限公司 | Mobile switching centre built in video gateway and method for realizing multimedia interconnection |
CN1910926A (en) * | 2004-01-21 | 2007-02-07 | 达丽星网络有限公司 | Method and apparatus for handling video communication errors |
US20090116477A1 (en) * | 2005-10-21 | 2009-05-07 | Siemens Aktiengesellschaft | Signaling Referring to Setup of H.324 Video Telephone Between Media Gateway and Controller |
CN101494696A (en) * | 2002-12-12 | 2009-07-29 | 达丽星网络有限公司 | Methods and system for fast session establishment between equipment using H.324 and related telecommunications protocols |
CN101640784A (en) * | 2008-07-28 | 2010-02-03 | 上海领世通信技术发展有限公司 | Device and method for controlling multi-image compounding in video conference system |
-
2014
- 2014-12-18 CN CN201410783865.XA patent/CN104539593B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6335927B1 (en) * | 1996-11-18 | 2002-01-01 | Mci Communications Corporation | System and method for providing requested quality of service in a hybrid network |
CN101494696A (en) * | 2002-12-12 | 2009-07-29 | 达丽星网络有限公司 | Methods and system for fast session establishment between equipment using H.324 and related telecommunications protocols |
CN1910926A (en) * | 2004-01-21 | 2007-02-07 | 达丽星网络有限公司 | Method and apparatus for handling video communication errors |
CN1882116A (en) * | 2005-08-11 | 2006-12-20 | 华为技术有限公司 | Mobile switching centre built in video gateway and method for realizing multimedia interconnection |
US20090116477A1 (en) * | 2005-10-21 | 2009-05-07 | Siemens Aktiengesellschaft | Signaling Referring to Setup of H.324 Video Telephone Between Media Gateway and Controller |
CN101640784A (en) * | 2008-07-28 | 2010-02-03 | 上海领世通信技术发展有限公司 | Device and method for controlling multi-image compounding in video conference system |
Non-Patent Citations (4)
Title |
---|
ITU-T: "H.246 Control Protocol For Multimedia Communication", 《ITU-T RECOMMENDATION》 * |
LV QIAN,HUANG BENXIONG,WANG FURONG: "The mechanism of ASN.1 encoding and decoding implementation in network protocols", 《INFORMATION TECHNOLOGY: CODING AND COMPUTING》 * |
冯雁; 彭宇; 刘芳: "SIP-H323信令转换网关中H.245隧道机制的实现方案", 《通信技术》 * |
申崇江,张文军,石峻: "可视电话系统中多媒体通信控制协议H1245的实现", 《红外与激光工程》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106899377A (en) * | 2015-12-17 | 2017-06-27 | 联芯科技有限公司 | A kind of channel decoding method and device |
CN106899377B (en) * | 2015-12-17 | 2019-07-12 | 辰芯科技有限公司 | A kind of channel decoding method and device |
CN113742294A (en) * | 2021-08-23 | 2021-12-03 | 宜通世纪科技股份有限公司 | Method, system, device and medium for decoding ASN.1-PER signaling message |
Also Published As
Publication number | Publication date |
---|---|
CN104539593B (en) | 2017-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6233984B2 (en) | Virtual reference decoder for multiview video coding | |
CN101390399B (en) | Backward Compatible Aggregation of Pictures in Scalable Video Coding | |
JP6117193B2 (en) | Method and apparatus for transmitting and receiving media content in a multimedia system | |
CN103314591B (en) | High layer syntax for temporal scalability | |
CN109691103A (en) | video encoding | |
CN104144349B (en) | SPICE coding and decoding videos extended method and system based on H264 | |
CN104754349A (en) | Method and device for hardware decoding of audio/video | |
CN108111865A (en) | JCTVC-L0226:VPS and VPS_EXTENSION updates | |
CN105009578B (en) | Multi-layer video stream decoding method and equipment | |
CN105491387A (en) | H264 hardware coding system based on three platforms of Intel, AMD and Nvidia | |
US20220335694A1 (en) | Anchoring a scene description to a user environment for streaming immersive media content | |
US8024366B2 (en) | System and method for the improved encoding/decoding of binary representations of structured, documents | |
CN113742294A (en) | Method, system, device and medium for decoding ASN.1-PER signaling message | |
CN104539593B (en) | H.245 message resolution method | |
CN115396647A (en) | A data processing method, device, equipment and storage medium for immersive media | |
JP2024504421A (en) | Volumetric media processing method and device, storage medium, and electronic device | |
CN102761543A (en) | Method and device for realizing SIP (session initiation protocol) universal encoding and decoding | |
CN109683873B (en) | Aerospace Information Interface Coding Method and System Architecture Using ASN1 Rules | |
US20100186464A1 (en) | Laundry refresher unit and laundry treating apparatus having the same | |
KR20230173096A (en) | Anchoring scene descriptions to user experiences for streaming immersive media content | |
US20140333640A1 (en) | System and method for forwarding a graphics command stream | |
CN1295689A (en) | Method and system for client-server interaction in interactive communications | |
CN102123286A (en) | NAL (network abstraction layer) module of video codec and implementation method thereof | |
CN102571541A (en) | Message encoding-decoding method and device | |
CN102625125A (en) | A method for real-time transmission of high-resolution multi-viewpoint stereoscopic video |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |