Synchronization of a media codec between network elements of a media communication session
Embodiments disclosed herein provide systems, methods, and computer readable media for synchronizing a media codec between network elements of a media communication session. In a particular embodiment, a method provides designating a first network element to be a static-clock network element during the media communication session and designating at least a second network element to be a dynamic-clock network element during the media communication session. The method further provides determining that a difference in clock speed exists between a second clock speed for the media codec at the second network element and a first clock speed for the media codec at the first network element. Also, the method provides adjusting the second clock speed to account for the difference in clock speed.
1. A method for synchronizing a media codec between network elements of a media communication session, the method comprising:
after initiation of the media communication session between a first network element and at least a second network element:
determining that a first clock speed for the media codec at the first network element comprises a most accurate clock speed relative to clock speeds of other network elements on the media communication session;
designating the first network element to be a static-clock network element during the media communication session and designating at least the second network element to be a dynamic-clock network element during the media communication session, wherein real-time user communications are exchanged between the first network element and at least the second network element during the media communication session, and wherein the real-time user communications comprise media encoded using the media codec;
determining that a difference in clock speed exists between a second clock speed for the media codec at the second network element and the first clock speed; and
adjusting the second clock speed to account for the difference in clock speed;
at a time after designating the first network element to be the static-clock network element:
determining that the first clock speed no longer comprises the most accurate clock speed;
designating the first network element as a dynamic-clock network element; and
designating another network element now having the most accurate clock speed to be the static-clock network element.
2. The method of claim 1 , wherein determining that the difference in clock speed exists comprises:
at the second network element, receiving a plurality of data packets for the media communication session from the first network element;
calculating an average frequency in which the plurality of data packets is received; and
determining that a difference in frequency exists between the average frequency and a frequency of the first clock speed.
3. The method of claim 2 , wherein calculating the average frequency comprises:
using the second clock speed to maintain a counter to calculate an arrival rate of the plurality of data packets.
4. The method of claim 2 , wherein adjusting the second first clock speed comprises:
increasing the second clock speed when the average frequency is determined to be lower than the frequency of the first clock speed; and
decreasing the second clock speed when the average frequency is determined to be higher than the frequency of the first clock speed.
5. The method of claim 2 , wherein the plurality of data packets is received in the Real-time Transport Protocol (RTP).
6. The method of claim 1 , wherein the first network element comprises a first endpoint to the media communication session that is operated by a first user, the second network element comprises a second endpoint to the media communication session that is operated by a second user, and the media communication session is initiated by a conference system that provides real-time media communication services to the first network element and at least the second network element.
7. The method of claim 1 , further comprising:
at the second network element, receiving a clock speed indication from the first network element indicating the first clock speed.
8. The method of claim 1 , wherein the first clock speed comprises a default clock speed for the media codec.
9. A network element to synchronize a media codec between network elements of a media communication session, the network element comprising:
one or more computer readable storage media;
a processing system operatively coupled with the one or more computer readable storage media; and
program instructions stored on the one or more computer readable storage media that, when read and executed by the processing system, direct the processing system to:
after initiation of the media communication session between a first network element and at least a second network element:
determine that a first clock speed for the media codec at the first network element comprises a most accurate clock speed relative to clock speeds of other network elements on the media communication session;
designate the first network element to be a static-clock network element during the media communication session and designate at least the second network element to be a dynamic-clock network element during the media communication session, wherein real-time user communications are exchanged between the first network element and at least the second network element during the media communication session, wherein the real-time user communications comprise media encoded using the media codec;
determine that a difference in clock speed exists between a second clock speed for the media codec at the second network element and the first clock speed; and
adjust the second clock speed to account for the difference in clock speed;
at a time after designating the first network element to be the static-clock network element:
determine that the first clock speed no longer comprises the most accurate clock speed;
designate the first network element as a dynamic-clock network element; and
designate another network element now having the most accurate clock speed to be the static-clock network element.
10. The network element of claim 9 , wherein the first network element comprises a first endpoint to the media communication session that is operated by a first user, the second network element comprises a second endpoint to the media communication session that is operated by a second user, and the media communication session is initiated by a conference system that provides real-time media communication services to the first network element and at least the second network element.
11. The network element of claim 9 , wherein the program instructions further direct the processing system to:
provide the second network element with a clock speed indication from the first network element indicating the first clock speed.
12. A network element to synchronize a media codec between network elements of a media communication session, the network element comprising:
one or more computer readable storage media;
a processing system operatively coupled with the one or more computer readable storage media; and
program instructions stored on the one or more computer readable storage media that, when read and executed by the processing system, direct the processing system to:
after initiation of the media communication session between a first network element and at least the network element:
designate the network element to be a dynamic-clock network element during the media communication session, wherein a first clock speed for the media codec at the first network element is determined to comprise a most accurate clock speed relative to clock speeds of other network elements on the media communication session, wherein the first network element is designated to be a static-clock network element during the media communication session, wherein real-time user communications are exchanged between the first network element and at least the network element during the media communication session, and wherein the real-time user communications comprise media encoded using the media codec;
determine that a difference in clock speed exists between a second clock speed for the media codec at the network element and the first clock speed; and
adjust the second clock speed to account for the difference in clock speed;
wherein at a time after designating the first network element to be the static-clock network element, the first clock speed is determined to no longer comprise the most accurate clock speed, first network element is designated as a dynamic-clock network element, and another network element now having the most accurate clock speed is designated to be the static-clock network element.
13. The network element of claim 12 , wherein to determine that the difference in clock speed exists, the program instructions direct the processing system to:
receive a plurality of data packets for the media communication session from the first network element;
calculate an average frequency in which the plurality of data packets is received; and
determine that a difference in frequency exists between the average frequency and a frequency of the first clock speed.
14. The network element of claim 13 , wherein to calculate the average frequency, the program instructions direct the processing system to:
use the second clock speed to maintain a counter to calculate an arrival rate of the plurality of data packets.
15. The network element of claim 13 , wherein to adjust the second clock speed, the program instructions direct the processing system to:
increase the second clock speed when the average frequency is determined to be lower than the frequency of the first clock speed; and
decrease the second clock speed when the average frequency is determined to be higher than the frequency of the first clock speed.
16. The network element of claim 13 , wherein the plurality of data packets is received in the Real-time Transport Protocol (RTP).