[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN103731232B - A kind of adaptive method and device of sip terminal encoding and decoding - Google Patents

A kind of adaptive method and device of sip terminal encoding and decoding Download PDF

Info

Publication number
CN103731232B
CN103731232B CN201210386995.0A CN201210386995A CN103731232B CN 103731232 B CN103731232 B CN 103731232B CN 201210386995 A CN201210386995 A CN 201210386995A CN 103731232 B CN103731232 B CN 103731232B
Authority
CN
China
Prior art keywords
opposite end
local terminal
decoding
coding
decoding capability
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.)
Active
Application number
CN201210386995.0A
Other languages
Chinese (zh)
Other versions
CN103731232A (en
Inventor
杨阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SANYA ZHONGXING SOFTWARE Co Ltd
Original Assignee
SANYA ZHONGXING SOFTWARE Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SANYA ZHONGXING SOFTWARE Co Ltd filed Critical SANYA ZHONGXING SOFTWARE Co Ltd
Priority to CN201210386995.0A priority Critical patent/CN103731232B/en
Publication of CN103731232A publication Critical patent/CN103731232A/en
Application granted granted Critical
Publication of CN103731232B publication Critical patent/CN103731232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a kind of adaptive method and devices of sip terminal encoding and decoding, are related to multi-media processing field, the described method includes:After local terminal establishes the SIP sessions with opposite end, local terminal and the coding/decoding capability of opposite end are obtained;When the coding/decoding capability that both sides consult when local terminal detects SIP session establishments is not suitable with current code stream communication, local terminal carries out encoding and decoding self-adaptive processing;Its encoding and decoding self-adaptive processing result is sent to opposite end by local terminal, so that opposite end carries out the corresponding adjustment of coding/decoding capability.It exchanges influence of the flow to video communication again the invention avoids media, and controls the code stream of RTP channels also more convenient than by SIP signalings by RTCP channels, reduce influence of the coding/decoding capability variation to communication effect, reached optimal communication efficiency.

Description

A kind of adaptive method and device of sip terminal encoding and decoding
Technical field
It is more particularly to a kind of to lead in Session initiation Protocol SIP the present invention relates to video conference terminal multi-media processing field Change codec state during news in real time, to realize the method for optimal communication effect and its relevant apparatus.
Background technology
With the rapid development of internet and video signal apply it is popular, IETF be organized in propose within 1999 compared with H.323 more simple for, free Session Initiation Protocol.Its application target is based on Internet environment, realizes that data, sound regard This application of video communication is introduced into huge numbers of families especially by Internet, really embodied popular by frequency real-time communication. SIP is when realizing video communication, it is necessary to describe the media collection that this session uses using Session Description Protocol SDP.SIP is used Offer/answer models basic SDP complete the negotiation of Terminal Multimedia Capability.Terminal leads to the video of itself in offer Letter ability, transmission of video mechanism, voice communication capability, voice transfer mechanism are sent to called terminal, and called terminal is according to itself Video and audio communication ability, from offer choose video and audio ability, be put into answer selection video and audio ability and itself Video and audio transmission mechanism come respond offer complete capability negotiation.
With the development of video conference, the sound, video capability in SDP are more and more, and offer provides a variety of sounds, video energy Power, answer roots reply a variety of sounds of other side, coding and decoding video ability according to the coding/decoding capability of oneself and the volume solution ability of other side. Both sides select one kind according to the coding/decoding capability negotiated and are sent to other side.If side coding/decoding capability in communication process When changing, capability negotiation is re-started, is communicated with new ability.Therefore, it is necessary to realize to receive code stream into Row monitoring, is decoded in real time according to the loadtype for receiving code stream.
The content of the invention
It is an object of the invention to provide a kind of adaptive method and device of sip terminal encoding and decoding, by each matchmaker Optimal communication effect is realized in the control of the flexible code stream of body channel.
According to an aspect of the invention, there is provided a kind of method that sip terminal encoding and decoding are adaptive, including:
After local terminal establishes the SIP sessions with opposite end, local terminal and the coding/decoding capability of opposite end are obtained;
When the coding/decoding capability that both sides consult when local terminal detects SIP session establishments is not suitable with current code stream communication, Local terminal carries out encoding and decoding self-adaptive processing;
Its encoding and decoding self-adaptive processing result is sent to opposite end by local terminal, so that opposite end carries out the corresponding tune of coding/decoding capability It is whole.
Preferably, local terminal by extract each realtime transmission protocol RTP channel of local terminal and opposite end code/decode format and The loadtype of channel code stream obtains local terminal and the coding/decoding capability of opposite end.
Preferably, for local terminal according to opposite end decoding capability, dynamic adjusts local terminal coded format, and the local terminal after adjustment is encoded Form is sent to opposite end.
Preferably, opposite end adjusts its decoding capability, and updates local terminal coding energy according to the local terminal coded format received Power.
Preferably, local terminal obtains opposite end coded format to be adjusted, and the opposite end is encoded lattice according to its decoding capability Formula is sent to opposite end, so that opposite end adjusts opposite end code capacity.
Preferably, opposite end is according to the opposite end coded format received, adjusts its code capacity, and by the code capacity Local terminal is sent to, so that local terminal updates opposite end coding/decoding capability.
Preferably, using the corresponding RTCP Real-time Transport Control Protocol RTCP channels of RTP channels by local terminal coded format or opposite end Coded format is sent to opposite end.
According to another aspect of the present invention, a kind of adaptive device of sip terminal encoding and decoding is provided, including:
Channel coding/decoding parameter configuration module, for after the SIP sessions with opposite end are established, obtaining the volume of local terminal and opposite end Decoding capability;
Code stream dynamic monitoring module is not suitable with for the coding/decoding capability that both sides consult when detecting SIP session establishments When current code stream communicates, encoding and decoding self-adaptive processing is carried out;
Codec state notification module, for encoding and decoding self-adaptive processing result to be sent to opposite end, so that opposite end carries out The corresponding adjustment of coding/decoding capability.
Preferably, the code stream dynamic monitoring module according to opposite end decoding capability dynamic change local terminal coded format or Opposite end coded format to be adjusted is obtained according to local terminal decoding capability.
Preferably, the codec state notification module includes:
Encoding state changes notice submodule, for the local terminal coded format after adjusting to be sent to opposite end;
Opposite end encoding state changes notice submodule, for opposite end coded format to be adjusted to be sent to opposite end, for Opposite end carries out code capacity adjustment.
Compared with prior art, the beneficial effects of the present invention are:
Both sides carry out code stream communication after capabilities exchange is completed by RTP channels, if the channel negotiated is with a variety of Coding/decoding capability, it is corresponding by the RTP channels when coding or decoded state of a side change in communication process RTCP channels send the new encoding state of message informing other side or require the coded format of other side, so avoid to pass through SDP Influence of the ability to other channels is renegotiated, and the code stream of RTP channels is controlled also than the letter by SIP by RTCP channels Order is more convenient, pair influence smaller to change because of ability to communication band.Therefore, the present invention is in the volume by obtaining other side After decoding capability, using RTCP channels control other side coding and the encoding state of other side's local terminal is notified to change, reduce ability change Change the influence to communication effect, achieve the purpose that optimal communication effect.
Description of the drawings
Fig. 1 is the adaptive method flow diagram of sip terminal encoding and decoding provided in an embodiment of the present invention;
Fig. 2 is the adaptive device block diagram of sip terminal encoding and decoding provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with attached drawing to a preferred embodiment of the present invention will be described in detail, it should be understood that described below is excellent Embodiment is selected to be merely to illustrate and explain the present invention, is not intended to limit the present invention.
The present invention is applied to Session Initiation Protocol and communicates, and realizes the adaptive coding/decoding of both sides, and method includes:Local terminal establish and it is right After the SIP sessions at end, local terminal is by extracting the load of the code/decode format and channel code stream of each RTP channels of local terminal and opposite end Type obtains local terminal and the coding/decoding capability of opposite end;The coding/decoding capability that both sides consult when local terminal detects SIP session establishments When being not suitable with current code stream communication, for local terminal according to opposite end decoding capability, dynamic adjusts local terminal coded format, and is believed using RTP Local terminal coded format after adjustment is sent to opposite end by the corresponding RTCP channels in road, and opposite end is made to be encoded according to the local terminal received Form adjusts its decoding capability, and updates local terminal code capacity or local terminal according to its decoding capability, obtains pair to be adjusted Hold coded format, and the opposite end coded format be sent to opposite end using RTP channels corresponding RTCP channels, make opposite end according to The opposite end coded format received adjusts its code capacity, and the code capacity is sent to local terminal, so that local terminal updates Its encoding and decoding self-adaptive processing result is sent to opposite end by opposite end coding/decoding capability, i.e. local terminal, so that opposite end carries out encoding and decoding energy The corresponding adjustment of power.That is, in communication process, when the codec state of a side changes, following place is substantially carried out Reason:
1st, channel coding/decoding parameter configuration:Opposite end coding/decoding capability and this are preserved by the media capability of SDP in SIP sessions Coding/decoding capability is held, and the coding/decoding capability of each RTP channels is mapped with loadtype.
2nd, the dynamic monitoring of code stream:For monitoring the loadtype of code stream in RTP channels, by the load class for receiving code stream Type and the decoding capability for changing channel from local codec parameters dynamic, need not change if consistent with current decoding capability Become, if it is inconsistent, carrying out the adjustment of the decoded state.
3rd, the encoding state of other side's local terminal is notified:We send code stream state instruction, are believed by the corresponding RTCP of RTP channels The encoding state of we is sent to other side by road.
4th, other side is notified to require the encoding state of other side:It is required that other side changes encoding state, it is corresponding by RTP channels The coded format of the other side of we's requirement is sent to other side by RTCP channels.
Below in conjunction with attached drawing 1 to attached drawing 2, the present invention is further described.
Fig. 1 is the adaptive method flow diagram of sip terminal encoding and decoding provided in an embodiment of the present invention, as shown in Figure 1, step Including:
Step 10:Terminal establishes session connection in a manner of SIP, extracts the encoding and decoding of each RTP channels of opposite end and local terminal Form and corresponding loadtype, so it is known that the coding/decoding capability of local terminal and the coding/decoding capability of opposite end, and can be with The coded format of other side is judged by the loadtype for receiving code stream.
Step 11:When network environment changes or terminal capability changes, when a side detects session establishment When the ability that both sides consult is not suitable with current communication, encoding and decoding self-adaptive processing can be carried out.
Step 12:After step 11 carries out, judgement needs to carry out code adjustment or decoding adjustment.
If necessary to change local terminal coded format, then pair that obtains in step 10 of local terminal coded format after changing is required It holds in the range of decoding capability, after changing local terminal coded format, after being changed by code stream using the corresponding RTCP channels of RTP channels Parameter notify to opposite end, convenient for opposite end according to this parameter carry out relative decoding information processing.
If it is determined that needing to change local terminal codec format, then the variation that other side is notified to carry out opposite end coded format is needed, it It asks in the range of the local terminal decoding capability that opposite end coded format obtains in step 10, utilizes the corresponding RTCP channels of RTP channels will It is required that opposite end coded format be sent to other side, notify other side carry out corresponding RTP Channel coding parameters modification.
Step 13:After step 12 carries out, other side's coding information is received by RTCP channels or other side requires the coding of we After information, the processing of related fields can be carried out according to these information RTP channels corresponding to RTCP channels.Receive the coding of other side Information can update the encoding state of other side, convenient for later encoding and decoding self adaptive flow.The other side received requires the coding of local terminal to disappear After breath, the coding of the channel is re-started according to the form of the requirement of other side, and the information recompiled notifies, to other side, to allow Other side updates our encoding state.
Fig. 2 is the adaptive device block diagram of sip terminal encoding and decoding provided in an embodiment of the present invention, as shown in Fig. 2, device bag Include channel coding/decoding parameter configuration module, code stream dynamic monitoring module, codec state notification module.
The channel coding/decoding parameter configuration module be used for establish and opposite end SIP sessions after, by extract local terminal and The code/decode format of each RTP channels of opposite end and the loadtype of channel code stream obtain local terminal and the coding/decoding capability of opposite end, For subsequently carrying out encoding and decoding self-adaptive processing.
Coding/decoding capability of the code stream dynamic monitoring module for both sides to consult when detecting SIP session establishments is uncomfortable When code stream that should be preceding communicates, encoding and decoding self-adaptive processing is carried out, that is to say, that need to carry out encoding and decoding certainly when local terminal detects When adapting to processing, local terminal is treated according to opposite end decoding capability dynamic adjustment local terminal coded format or according to its decoding capability The opposite end coded format of adjustment.
The codec state notification module is used to encoding and decoding self-adaptive processing result being sent to opposite end, for opposite end into The corresponding adjustment of row coding/decoding capability.The codec state notification module includes being used to believe using the corresponding RTCP of RTP channels The encoding state that local terminal coded format after adjustment is sent to opposite end by road changes notice submodule and for utilizing RTP channels pair The opposite end encoding state that opposite end coded format to be adjusted is sent to opposite end by the RTCP channels answered changes notice submodule.
In conclusion the present invention has following technique effect:
1st, present invention utilizes RTCP channels to control RTP channel coding methods, when side's codec state changes, The codec state variation that capabilities exchange is achieved that individual channel need not be re-started, media is avoided and exchanges flow pair again The influence of video communication.
2nd, the present invention can notify the encoding state of other side's local terminal in time, have good side to the adaptive decoding of other side It helps, it is therefore prevented that code stream changes influence of the testing process to decoded state.
Although the present invention is described in detail above, but the invention is not restricted to this, those skilled in the art of the present technique It can be carry out various modifications with principle according to the present invention.Therefore, all modifications made according to the principle of the invention, all should be understood to Fall into protection scope of the present invention.

Claims (9)

1. a kind of adaptive method of sip terminal encoding and decoding, which is characterized in that including:
After local terminal establishes the Session initiation Protocol SIP sessions with opposite end, assisted by each real-time Transmission for extracting local terminal and opposite end The code/decode format of RTP channels and the loadtype of channel code stream are discussed, obtains local terminal and the coding/decoding capability of opposite end;
When the coding/decoding capability that both sides consult when local terminal detects SIP session establishments is not suitable with current code stream communication, local terminal Encoding and decoding self-adaptive processing is carried out according to the local terminal and opposite end coding/decoding capability obtained;
Its encoding and decoding self-adaptive processing result is sent to opposite end by local terminal, so that opposite end carries out the corresponding adjustment of coding/decoding capability.
2. according to the method described in claim 1, it is characterized in that, local terminal is according to opposite end decoding capability, dynamic adjustment local terminal volume Code form, and the local terminal coded format after adjustment is sent to opposite end.
3. according to the method described in claim 2, it is characterized in that, opposite end is according to the local terminal coded format received, adjustment Its decoding capability, and update local terminal code capacity.
4. according to the method described in claim 1, it is characterized in that, local terminal obtains opposite end to be adjusted according to its decoding capability Coded format, and the opposite end coded format is sent to opposite end, so that opposite end adjusts opposite end code capacity.
5. according to the method described in claim 4, it is characterized in that, opposite end is according to the opposite end coded format received, adjustment Its code capacity, and the code capacity is sent to local terminal, so that local terminal updates opposite end coding/decoding capability.
6. according to the method described in claim 1-5 any one, which is characterized in that utilize the corresponding real-time Transmission of RTP channels Local terminal coded format or opposite end coded format are sent to opposite end by control protocol RTCP channels.
7. a kind of adaptive device of sip terminal encoding and decoding, which is characterized in that including:
Channel coding/decoding parameter configuration module, for after the Session initiation Protocol SIP sessions with opposite end are established, passing through and extracting sheet End and the code/decode format of each realtime transmission protocol RTP channel of opposite end and the loadtype of channel code stream, obtain local terminal and The coding/decoding capability of opposite end;
Code stream dynamic monitoring module is not suitable with currently for the coding/decoding capability that both sides consult when detecting SIP session establishments Code stream communication when, encoding and decoding self-adaptive processing is carried out according to the local terminal and opposite end coding/decoding capability that are obtained;
Codec state notification module, for encoding and decoding self-adaptive processing result to be sent to opposite end, so that opposite end carries out volume solution The corresponding adjustment of code ability.
8. device according to claim 7, which is characterized in that the code stream dynamic monitoring module is according to opposite end decoding capability Dynamic changes local terminal coded format or obtains opposite end coded format to be adjusted according to local terminal decoding capability.
9. the device according to claim 7 or 8, which is characterized in that the codec state notification module includes:
Encoding state changes notice submodule, for that will be adjusted using the corresponding RTCP Real-time Transport Control Protocol RTCP channels of RTP channels Local terminal coded format after whole is sent to opposite end;
Opposite end encoding state changes notice submodule, for being compiled opposite end to be adjusted using the corresponding RTCP channels of RTP channels Code form is sent to opposite end, so that opposite end carries out code capacity adjustment.
CN201210386995.0A 2012-10-12 2012-10-12 A kind of adaptive method and device of sip terminal encoding and decoding Active CN103731232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210386995.0A CN103731232B (en) 2012-10-12 2012-10-12 A kind of adaptive method and device of sip terminal encoding and decoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210386995.0A CN103731232B (en) 2012-10-12 2012-10-12 A kind of adaptive method and device of sip terminal encoding and decoding

Publications (2)

Publication Number Publication Date
CN103731232A CN103731232A (en) 2014-04-16
CN103731232B true CN103731232B (en) 2018-06-01

Family

ID=50455173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210386995.0A Active CN103731232B (en) 2012-10-12 2012-10-12 A kind of adaptive method and device of sip terminal encoding and decoding

Country Status (1)

Country Link
CN (1) CN103731232B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105743872B (en) * 2014-12-12 2019-06-18 华为终端有限公司 A kind of automatic adjusting method of data transmission system and PCM communication agreement
KR20190053832A (en) * 2016-09-23 2019-05-20 광동 오포 모바일 텔레커뮤니케이션즈 코포레이션 리미티드 Method and apparatus for wireless communication
CN109217980B (en) * 2017-07-03 2020-11-06 腾讯科技(深圳)有限公司 Encoding and decoding capacity configuration method, device and computer storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227482A (en) * 2008-02-02 2008-07-23 中兴通讯股份有限公司 System, apparatus and method of media negotiation in network telephone call
CN101478621A (en) * 2009-01-24 2009-07-08 华为技术有限公司 Encoding and decoding negotiation method for ciphered voice call, communication system and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1902381A4 (en) * 2005-07-11 2009-06-24 Packetvideo Corp System and method for transferring data
CN102223201B (en) * 2010-04-15 2014-01-01 中兴通讯股份有限公司 Negotiation method of codec capability and terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101227482A (en) * 2008-02-02 2008-07-23 中兴通讯股份有限公司 System, apparatus and method of media negotiation in network telephone call
CN101478621A (en) * 2009-01-24 2009-07-08 华为技术有限公司 Encoding and decoding negotiation method for ciphered voice call, communication system and device

Also Published As

Publication number Publication date
CN103731232A (en) 2014-04-16

Similar Documents

Publication Publication Date Title
CN104126310B (en) Screen mirror image method and its device
CN101453477B (en) Method and device for uploading real-time media content
CN105610635A (en) Voice code transmitting method and apparatus
CN106921843B (en) Data transmission method and device
WO2007016270A3 (en) Method and apparatus for providing interactive media during communication in channel-based media telecommunication protocols
JP2012523199A (en) Method and apparatus for session negotiation
CN103026680A (en) Session control for media stream transmission
CN103595978B (en) Method and system for consulting code distinguishability in video communication
CN103731232B (en) A kind of adaptive method and device of sip terminal encoding and decoding
WO2005072495A3 (en) Method and apparatus for facilitating a ptt session initiation using an ip-based protocol
US10431234B2 (en) Device and method for transmitting and receiving voice data in wireless communication system
CN102547416A (en) Method for partially loading media based on mobile phone and television
CN110225504A (en) Transmit the method and wireless device component of data
CN108259510A (en) A kind of media data real-time Transmission control method, system and storage medium
US9705935B2 (en) Efficient interworking between circuit-switched and packet-switched multimedia services
CN103684970B (en) The transmission method of media data flow and thin terminal
CN101911622A (en) Gateway device, system, and communication method
CN101547266B (en) Method and system for providing intelligent service and gateway
CN103151041B (en) A kind of implementation method of automatic speech recognition business, system and media server
CN107005352A (en) Method of adjustment, system and the relevant device of voice auto-adaptive parameter
CN109788072A (en) A method of standard Webrtc client is accessed into existing system
CN107404363B (en) Method, system, terminal and network side equipment for adjusting voice code rate
CN107181723A (en) A kind of media coding/decoding negotiation method and terminal device
CN107872291A (en) A kind of method of adjustment and terminal of voice code check
CN110445929A (en) Call connection method for building up and first terminal, server and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant