CN110278047A - The method, device and equipment of synchronous for clock, setting Streaming Media frame pts value - Google Patents
The method, device and equipment of synchronous for clock, setting Streaming Media frame pts value Download PDFInfo
- Publication number
- CN110278047A CN110278047A CN201810218778.8A CN201810218778A CN110278047A CN 110278047 A CN110278047 A CN 110278047A CN 201810218778 A CN201810218778 A CN 201810218778A CN 110278047 A CN110278047 A CN 110278047A
- Authority
- CN
- China
- Prior art keywords
- terminal
- synchronized
- clock source
- moment
- network synchronization
- 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.)
- Pending
Links
- 230000001360 synchronised effect Effects 0.000 title claims abstract description 362
- 238000000034 method Methods 0.000 title claims abstract description 82
- 230000004044 response Effects 0.000 claims description 79
- 238000004891 communication Methods 0.000 claims description 66
- 238000004364 calculation method Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 claims description 3
- 230000005540 biological transmission Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 240000000233 Melia azedarach Species 0.000 description 5
- 238000009434 installation Methods 0.000 description 4
- 230000000977 initiatory effect Effects 0.000 description 3
- 241000196324 Embryophyta Species 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000006837 decompression Effects 0.000 description 2
- 238000009795 derivation Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
- H04J3/0667—Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/65—Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/4302—Content synchronisation processes, e.g. decoder synchronisation
- H04N21/4305—Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8547—Content authoring involving timestamps for synchronizing content
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
This application discloses a kind of method and devices synchronous for clock, which comprises selection network synchronization clock source;Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;The current time of the terminal to be synchronized is calibrated according to the synchronization point difference.The application also provides a kind of for the method and apparatus of the pts value of Streaming Media frame to be arranged.The application also provides a kind of computer-readable medium and electronic equipment synchronous for clock.
Description
Technical field
This application involves multi-way stream media clock field of synchronization in network, and in particular to a method of it is synchronous for clock
And device.The application is related to a kind of for the method and apparatus of the pts value of Streaming Media frame to be arranged simultaneously.
Background technique
Video conference is a kind of network application, refers to that the people positioned at multiple physical spaces is carried out by communication equipment and network
The meeting to talk face to face.Each participant can synchronize the sound for listening to other meeting-place by loudspeaker, can be by aobvious
Show that device synchronizes the image for seeing other meeting-place participants, movement and expression, the content of electronic presentations plate can also be sended and received,
Participant is set to have feeling on the spot in person.Similar network application further includes more people Lian Mai.
The audio and video of transmission over networks are transmitted in the form of audio stream and video flowing, and Streaming Media is referred to as.It is so-called
Streaming Media refers to the media formats played in a network by the way of stream transmission, is called streaming video.In application, sender
Streaming Media partition packetization is transmitted on network, is played Streaming Media by the timing before being packaged after recipient's decompression.If one
Terminal needs while receiving multichannel Streaming Media and playing, then also needs the precedence relationship according to timing before being packaged while playing.
More commonly used method is to be indicated same flow source of media packaged data playing sequence on network using Presentation Time Stamp or come from
The relationship that the packaged data in different Streaming Media sources play simultaneously.
Presentation Time Stamp (Presentation Time Stamp, PTS), usually a character string uniquely identify
The a certain moment is the mark of streaming media playing relationship.In with Streaming Media all the way, playing sequence is indicated, pts value is smaller, more early
It plays.Meanwhile the difference of PTS represents the interval of this two frames streaming media playing between two Streaming Media frames.But synchronization is not
Whether the pts value for acquiring a frame Streaming Media respectively with terminal is likely to different, identical depending on the reference clock for value.
Do you how to determine that the different two frames Streaming Media of pts value should play simultaneously? due to can not directly know not
Whether the two frame Streaming Medias with terminal are collected simultaneously, so the prior art is determined by a kind of indirect mode.
Assuming that the delay difference that first Streaming Media frame that different terminals acquire respectively is transmitted to reception terminal is little, that
, when according to first Streaming Media frame for receiving every road terminal transmission, receive the system time and first Streaming Media of terminal
The pts value of frame, can approximate derivation Chu Ge road SS later Streaming Media frame collected simultaneously.
But due to the unstability of network, when this hypothesis is invalid, will occur playing timing error problem, and this
Kind mistake can continue up down.
Summary of the invention
The application provides a kind of method synchronous for clock and a kind of for the side of the pts value of Streaming Media frame to be arranged
Method, to solve the pts value difference because of the Streaming Media frame of different terminals synchronization caused by receive terminal plays timing error and ask
Topic.
A kind of method synchronous for clock provided by the present application comprising:
Select network synchronization clock source;
Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;
The current time of the terminal to be synchronized is calibrated according to the synchronization point difference.
Optionally, the current time for calibrating the terminal to be synchronized according to the synchronization point difference includes:
The current of network synchronization clock source is determined with the synchronization point difference according to the terminal current time to be synchronized
Calculate the moment;
Whether the communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, and decision is
The no clock that the terminal to be synchronized is calibrated using the current reckoning moment.
Optionally, the synchronization point difference between determination terminal to be synchronized and network synchronization clock source, comprising:
Obtain A1 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;
At the time of obtaining terminal to be synchronized and receive the response that network synchronization clock source is returned based on the synchronization signal
A2;
Obtain B at the time of network synchronization clock source receives the synchronization signal;
Determine that the synchronization point between terminal to be synchronized and network synchronization clock source is poor according to described A1, A2 and moment B
Value.
Optionally, described to be determined between terminal to be synchronized and network synchronization clock source according to described A1, A2 and moment B
Synchronization point difference specifically:
The synchronization point between terminal to be synchronized and network synchronization clock source is obtained using the difference of the A1 and A2 mean value and B
Difference D.
Optionally, B at the time of the acquisition network synchronization clock source receives the synchronization signal specifically:
The response message that parsing network synchronization clock source is returned based on the synchronization signal, passes through the result of the parsing
Obtain B at the time of the network synchronization clock source receives the synchronization signal.
Optionally, described when generating Network Synchronization according to the terminal current time to be synchronized and the synchronization point difference
The current reckoning moment of Zhong Yuan, comprising:
By the terminal current time to be synchronized and synchronization point difference and, acquisition network synchronization clock source it is current
Calculate the moment.
Optionally, whether the communication response according to the terminal to be synchronized and the network synchronization clock source, which meets, sets
Fixed condition decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment, comprising:
Whether meet setting condition according to the communication response time in the terminal to be synchronized and the network synchronization clock source,
Decide whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment.
Optionally, described whether full according to the communication response time in the terminal to be synchronized and the network synchronization clock source
Foot imposes a condition, and decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment;Include:
Whether met according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source and is set
Fixed condition decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment.
Optionally, described according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source
Whether the condition of satisfaction setting, decide whether current to calculate that the moment calibrates the clock of the terminal to be synchronized using described;Include:
It is less than described according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source
When calibration condition, the clock of the terminal to be synchronized is calibrated using the current reckoning moment.
Optionally, it is described described according to communicating round-trip institute between the terminal to be synchronized and the network synchronization clock source
When being less than calibration condition with the time, the clock of the terminal to be synchronized is calibrated using the current reckoning moment, comprising:
Obtain A11 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;And obtain end to be synchronized
A12 at the time of termination receives the response that network synchronization clock source is returned based on the synchronization signal;
Determine the difference T2 of the A12 and A11;
Judge whether T2 is less than to determine T2 the same manner in the difference T1 of previous acquisition;The difference T1 of the previous acquisition
Meet the condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of T1 is set to larger than the threshold value of setting;
If so, calibrating the clock of the terminal to be synchronized using the current reckoning moment;And
Judge whether the difference T2 is less than the threshold value of setting;
If so, stopping calibration;
If it is not, then continuing to calibrate.
Optionally, it is described described according to communicating round-trip institute between the terminal to be synchronized and the network synchronization clock source
When being less than calibration condition with the time, the clock of the terminal to be synchronized is calibrated using the current reckoning moment, comprising:
Obtain C11 at the time of network synchronization clock source sends synchronization signal to terminal to be synchronized;And obtain Network Synchronization
C12 at the time of clock source receives the response that terminal to be synchronized is returned based on the synchronization signal;
Determine the difference F2 of the C12 and C11;
Judge whether F2 is less than to determine F2 the same manner in the difference F1 of previous acquisition;The difference F1 of the previous acquisition
Meet the condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of F1 is set to larger than the threshold value of setting;
If so, calibrating the clock of the terminal to be synchronized using the current reckoning moment;And
Judge whether the difference F2 is less than the threshold value of setting;
If so, stopping calibration;
If it is not, then continuing to calibrate.
Optionally, the threshold value set is 100 millisecond.
Optionally, further include, when meeting following either condition, the step of terminal forced termination clock alignment to be synchronized,
Including at least with the next item down condition:
The accumulative number of communications with the network synchronization clock source of the terminal to be synchronized is more than preset number limit value;
The clock synchronization time that the terminal to be synchronized adds up is more than preset time limit value.
Optionally, the information round-trip time is identical between the terminal to be synchronized and the network synchronization clock source.
In addition, the application also provides a kind of device synchronous for clock comprising:
Selecting unit: for selecting network synchronization clock source;
Determine synchronization point difference unit: for determining the synchronization point between terminal to be synchronized and network synchronization clock source
Difference;
Determine current reckoning moment unit: for according to the terminal current time to be synchronized and the synchronization point difference
Determine the current reckoning moment in network synchronization clock source;
Calibration unit: it is set for whether the communication response in the terminal to be synchronized with the network synchronization clock source to meet
Fixed condition decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment.
In addition, the application also provide it is a kind of for the method for the pts value of Streaming Media frame to be arranged comprising:
Streaming Media frame is acquired, the system time of terminal system when determining acquisition;
The relative calibration moment of determination is obtained according to the system time;
Set the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, it is described acquisition according to the system time and the relative calibration moment of determination it is as follows:
Select network synchronization clock source;
Determine the synchronization point difference between the terminal and network synchronization clock source of the acquisition Streaming Media frame;
Network synchronization clock is determined according to the terminal current time of the acquisition Streaming Media frame and the synchronization point difference
The current reckoning moment in source;
When communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, work as by described in
The preceding reckoning moment is determined as the relative calibration moment.
Optionally, the synchronization point difference between determination terminal to be synchronized and network synchronization clock source, comprising:
Obtain A1 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;
At the time of obtaining terminal to be synchronized and receive the response that network synchronization clock source is returned based on the synchronization signal
A2;
Obtain B at the time of network synchronization clock source receives the synchronization signal;
Determine that the synchronization point between terminal to be synchronized and network synchronization clock source is poor according to described A1, A2 and moment B
Value.
Optionally, described to be determined between terminal to be synchronized and network synchronization clock source according to described A1, A2 and moment B
Synchronization point difference specifically:
The synchronization point between terminal to be synchronized and network synchronization clock source is obtained using the difference of the A1 and A2 mean value and B
Difference D.
Optionally, B at the time of the acquisition network synchronization clock source receives the synchronization signal specifically:
The response message that parsing network synchronization clock source is returned based on the synchronization signal, passes through the result of the parsing
Obtain B at the time of the network synchronization clock source receives the synchronization signal.
Optionally, described when generating Network Synchronization according to the terminal current time to be synchronized and the synchronization point difference
The current reckoning moment of Zhong Yuan, comprising:
By the terminal current time to be synchronized and synchronization point difference and, acquisition network synchronization clock source it is current
Calculate the moment.
Optionally, the communication response in the terminal to be synchronized Yu the network synchronization clock source, which meets, imposes a condition
When, the current reckoning moment is determined as the relative calibration moment, comprising:
Met according to the communication response time in the terminal to be synchronized and the network synchronization clock source and imposed a condition, by institute
It states and currently calculates that the moment is determined as the relative calibration moment.
Optionally, the communication response time according to the terminal to be synchronized and the network synchronization clock source, which meets, sets
The current reckoning moment is determined as the relative calibration moment by fixed condition;Include:
Meet setting item according to the round-trip time used is communicated between the terminal to be synchronized and the network synchronization clock source
The current reckoning moment is determined as the relative calibration moment by part.
Optionally,
It is described to be set according to the round-trip time satisfaction used of communication between the terminal to be synchronized and the network synchronization clock source
The current reckoning moment is determined as the relative calibration moment by fixed condition;Include:
It is less than described according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source
When calibration condition, the current reckoning moment is determined as the relative calibration moment.
Optionally, described according to communicating round-trip institute's used time between the terminal to be synchronized and the network synchronization clock source
Between be less than calibration condition when, the current reckoning moment is determined as the relative calibration moment, comprising:
Obtain A11 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;And obtain end to be synchronized
A12 at the time of termination receives the response that network synchronization clock source is returned based on the synchronization signal;
Determine the difference T2 of the A12 and A11;
Judge whether T2 is less than to determine T2 the same manner in the difference T1 of previous acquisition;The difference T1 of the previous acquisition
Meet the condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of T1 is set to larger than the threshold value of setting;
If so, judging whether the difference T2 is less than the threshold value of setting;
If so, stopping calibrating and the current reckoning moment being determined as the relative calibration moment;
If it is not, then continuing to calibrate.
Optionally, it is described described according to communicating round-trip institute between the terminal to be synchronized and the network synchronization clock source
When being less than calibration condition with the time, the current reckoning moment is determined as the relative calibration moment, comprising:
Obtain C11 at the time of network synchronization clock source sends synchronization signal to terminal to be synchronized;And obtain Network Synchronization
C12 at the time of clock source receives the response that terminal to be synchronized is returned based on the synchronization signal;
Determine the difference F2 of the C12 and C11;
Judge whether F2 is less than to determine F2 the same manner in the difference F1 of previous acquisition;The difference F1 of the previous acquisition
Meet the condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of F1 is set to larger than the threshold value of setting;
If so, judging whether the difference F2 is less than the threshold value of setting;
If so, stopping calibrating and the current reckoning moment being determined as the relative calibration moment;
If it is not, then continuing to calibrate.
Optionally, the threshold value set is 100 millisecond.
Optionally, further include, when meeting following either condition, the step of terminal forced termination clock alignment to be synchronized,
Including at least with the next item down condition:
The accumulative number of communications with the network synchronization clock source of the terminal to be synchronized is more than preset number limit value;
The clock synchronization time that the terminal to be synchronized adds up is more than preset time limit value.
Optionally, the information round-trip time is identical between the terminal to be synchronized and the network synchronization clock source.
In addition, the application also provide it is a kind of for the device of the pts value of Streaming Media frame to be arranged comprising:
Acquisition unit: for acquiring Streaming Media frame, the system time of terminal system when determining acquisition;
Obtain relative calibration moment unit: for obtaining according to the system time and the relative calibration moment of determination;
PTS unit is set: for setting the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, the acquisition relative calibration moment unit, comprising:
Select subelement: for selecting network synchronization clock source;
Determine synchronization point difference subelement: for determining terminal and the network synchronization clock source of the acquisition Streaming Media frame
Between synchronization point difference;
It determines and current calculates moment subelement: for according to terminal current time of the acquisition Streaming Media frame and described same
Step moment difference determines the current reckoning moment in network synchronization clock source;
It calibrates subelement: meeting setting for the communication response in the terminal to be synchronized Yu the network synchronization clock source
When condition, the current reckoning moment is determined as the relative calibration moment.
In addition, the application also provides a kind of computer-readable medium synchronous for clock, it is stored with instruction, described instruction
It can be loaded by processor and execute following steps:
Select network synchronization clock source;
Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;
The current of network synchronization clock source is determined with the synchronization point difference according to the terminal current time to be synchronized
Calculate the moment;
Whether the communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, and decision is
The no clock that the terminal to be synchronized is calibrated using the current reckoning moment.
In addition, the application also provides a kind of electronic equipment synchronous for clock comprising: memory and processor;
For the memory for storing computer executable instructions, the processor is executable for executing the computer
Instruction:
Select network synchronization clock source;
Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;
The current of network synchronization clock source is determined with the synchronization point difference according to the terminal current time to be synchronized
Calculate the moment;
Whether the communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, and decision is
The no clock that the terminal to be synchronized is calibrated using the current reckoning moment.
In addition, the application also provides a kind of for the computer-readable medium of the pts value of Streaming Media frame to be arranged, store thereon
There is instruction, described instruction can be loaded by processor and execute following steps:
Streaming Media frame is acquired, the system time of terminal system when determining acquisition;
The relative calibration moment of determination is obtained according to the system time;
Set the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, it is described acquisition according to the system time and the relative calibration moment of determination it is as follows:
Select network synchronization clock source;
Determine the synchronization point difference between the terminal and network synchronization clock source of the acquisition Streaming Media frame;
Network synchronization clock is determined according to the terminal current time of the acquisition Streaming Media frame and the synchronization point difference
The current reckoning moment in source;
When communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, work as by described in
The preceding reckoning moment is determined as the relative calibration moment.
In addition, the application also provide it is a kind of for the electronic equipment of the pts value of Streaming Media frame to be arranged comprising: memory,
And processor;
For the memory for storing computer executable instructions, the processor is executable for executing the computer
Instruction:
Streaming Media frame is acquired, the system time of terminal system when determining acquisition;
The relative calibration moment of determination is obtained according to the system time;
Set the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, it is described acquisition according to the system time and the relative calibration moment of determination it is as follows:
Select network synchronization clock source;
Determine the synchronization point difference between the terminal and network synchronization clock source of the acquisition Streaming Media frame;
Network synchronization clock is determined according to the terminal current time of the acquisition Streaming Media frame and the synchronization point difference
The current reckoning moment in source;
When communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, work as by described in
The preceding reckoning moment is determined as the relative calibration moment.
Compared with prior art, the one aspect of the application have the advantage that make in network terminal to be synchronized with
The same network synchronization clock source carries out clock alignment, is believed by preset condition screening for calibrating the synchronous of terminal to be synchronized
Breath, makes the clock of terminal to be synchronized progressively reach required precision.
Further, achieve the purpose that all terminal clocks to be synchronized are synchronous.To be in network using sequential relationship as base
The information of plinth provides reliable standard.
Detailed description of the invention
Fig. 1 is a kind of flow chart of method synchronous for clock;
Fig. 2 is a kind of sub-process figure of method synchronous for clock;
Fig. 3 is the sub-process figure of another method synchronous for clock;
Fig. 4 is a kind of unit block diagram of device synchronous for clock;
Fig. 5 is a kind of for the flow chart of the method for the pts value of Streaming Media frame to be arranged;
Fig. 6 is a kind of for the sub-process figure of the method for the pts value of Streaming Media frame to be arranged;
Fig. 7 is the sub-process figure that another is used to be arranged the method for the pts value of Streaming Media frame;
Fig. 8 is the sub-process figure that another is used to be arranged the method for the pts value of Streaming Media frame;
Fig. 9 is a kind of for the unit block diagram of the device of the pts value of Streaming Media frame to be arranged;
Figure 10 is a kind of for the subelement block diagram of the device of the pts value of Streaming Media frame to be arranged.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with
Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where
Under do similar popularization, therefore the application is not limited by following public specific implementation.
The application provides a kind of method synchronous for clock.The application also provides a kind of for Streaming Media frame to be arranged
The method of pts value.The application also provides a kind of device synchronous for clock.The application also provides a kind of for Streaming Media to be arranged
The device of the pts value of frame.It is described in detail one by one in the following embodiments.
Video conference is a kind of network application, refers to that the people positioned at multiple physical spaces is carried out by communication equipment and network
The meeting to talk face to face.Each participant can synchronize the sound for listening to other meeting-place by loudspeaker, can be by aobvious
Show that device synchronizes the image for seeing other meeting-place participants, movement and expression, the content of electronic presentations plate can also be sended and received,
Participant is set to have feeling on the spot in person.Similar network application further includes more people Lian Mai.
The audio and video of transmission over networks are transmitted in the form of audio stream and video flowing, and Streaming Media is referred to as.It is so-called
Streaming Media refers to the media formats played in a network by the way of stream transmission, is called streaming video.In application, sender
The packing of Streaming Media sectional compression is transmitted on network, is played Streaming Media by the timing before being packaged after recipient's decompression.If
One terminal needs while receiving multichannel Streaming Media and playing, then also needs the precedence relationship according to timing before being packaged while broadcasting
It puts.More commonly used method is to indicate same flow source of media packaged data playing sequence using Presentation Time Stamp or come on network
The relationship played simultaneously from the packaged data in different Streaming Media sources.
Presentation Time Stamp (Presentation Time Stamp, PTS), usually a character string uniquely identify
The a certain moment is the mark of streaming media playing relationship.In with Streaming Media all the way, playing sequence is indicated, pts value is smaller, more early
It plays.Meanwhile the difference of PTS represents the interval of this two frames streaming media playing between two Streaming Media frames.But synchronization is not
Whether the pts value for acquiring a frame Streaming Media respectively with terminal is likely to different, identical depending on the reference clock for value.
Do you how to determine that the different two frames Streaming Media of pts value should play simultaneously? due to can not directly know not
Whether the two frame Streaming Medias with terminal are collected simultaneously, so the prior art is determined by a kind of indirect mode.
Assuming that the delay difference that first Streaming Media frame that different terminals acquire respectively is transmitted to reception terminal is little, that
, when according to first Streaming Media frame for receiving every road terminal transmission, receive the system time and first Streaming Media of terminal
The pts value of frame, can approximate derivation Chu Ge road SS later Streaming Media frame collected simultaneously.
But due to the unstability of network, when this hypothesis is invalid, will occur playing timing error problem, and this
Kind mistake can continue up down.
To a kind of embodiment of the method synchronous for clock provided by the present application, including, select network synchronization clock source;
Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;According to synchronization point difference calibration
The current time of terminal to be synchronized.The clock information provided using consolidated network synchronous clock source of the present embodiment is standard by network
The clock alignment of all terminals to be synchronized in.
The present embodiment is described in detail below with reference to Fig. 1, wherein Fig. 1 is a kind of method synchronous for clock
Flow chart.
Assuming that the information round-trip time is identical between the terminal to be synchronized and the network synchronization clock source.
Step S101 selects network synchronization clock source.
The purpose of this step is relative standard of the determining network synchronization clock source as unified time in a network.Net
Network synchronous clock source includes network precise synchronization clock source and network relative synchronization clock source.
Network precise synchronization clock source is mainly distributed across Network Time Protocol (Network Time all over the world
Protocol, NTP) server.Server be centralized calculation can be provided for the network user under network environment, information is delivered and data
The special purpose computer of the services such as management.The high-performance computer system of certain service can be provided other machines by namely referring in network
System.Server requires stability, safety, performance etc. higher.The server for providing NTP service is referred to as NTP service
Device.
NTP is the agreement of each computer time in synchronizing network.Can make computer be synchronized with server or when
Zhong Yuan.Ntp server can provide high-precision time adjustment for different terminal devices, and the difference with the standard time can be accurate
To millisecond magnitude.
Ntp server obtains universal time by atomic clock, observatory, satellite etc..
Network relative synchronization clock source is the equipment that any one in network can provide clock information, such as desktop computer, shifting
Dynamic terminal, server etc..
In the application scenarios of video conference or more people Lian Mai, do not need synchronous clock source offer clock information relative to
The accuracy of universal time, and require the clock information of all terminals to be synchronized same relative to consolidated network synchronous clock source
Step, therefore, the present embodiment can satisfy the needs of application scenarios using network relative synchronization clock source.
The selection network synchronization clock source, be exactly in a network for the equipment of all clocks to be calibrated determine one can be with
The synchronous clock source of unified time is provided.
Step S102 determines the synchronization point difference between terminal to be synchronized and network synchronization clock source.
Terminal (Terminal), also referred to as terminal device are the equipment that network outermost is in computer network, main to use
In the input and the output of processing result etc. of user information.In the present embodiment, the applied fields such as video conference or more people Lian Mai
All terminals of scape are referred to as terminal to be synchronized.
The terminal to be synchronized, be in network it is in need calibration clock terminal.The reference of terminal calibration to be synchronized
Time is provided by network synchronization clock source.
As previously mentioned, network synchronization clock source is divided into network absolute synchronization clock source and network relative synchronization clock source, this
In embodiment, answering for the application scenarios such as video conference or more people Lian Mai can satisfy using network relative synchronization clock source
With.
The process that the terminal to be synchronized acquires the synchronizing information in the network synchronization clock source is as follows:
Terminal to be synchronized sends synchronization signal to network synchronization clock source, is A1 at the time of transmitted;
After network synchronization clock source receives the synchronization signal of terminal to be synchronized, return to after response message is packaged to same
Terminal is walked, wherein response message includes B at the time of network synchronization clock source receives the synchronization signal;
Terminal to be synchronized receives the response message that network synchronization clock source is returned based on the synchronization signal, receives and rings
It is A2 at the time of answering information;
After the response message that terminal parsing to be synchronized returns, B at the time of can get network synchronization clock source.
A1, A2 and B are referred to as the synchronizing information in network synchronization clock source.
The response message is a kind of information given a response in the form of network protocol to solicited message;Response message with
The network protocol of solicited message is consistent.
For example, selecting network synchronization clock source for ntp server.In a network, when needs and ntp server synchronised clock
When, terminal to be synchronized sends synchronization signal to ntp server, while recording A1 at the time of transmission sends synchronization signal;NTP service
After device receives synchronization signal, B at the time of record receives synchronization signal, and the response message comprising moment B is returned to same
Walk terminal;Terminal to be synchronized receives the response message that ntp server returns, and after resolution response information, obtains synchronization point B, together
When, A2 at the time of record receives the response message that ntp server returns.
Terminal to be synchronized can be by carrying out above-mentioned communication with network synchronization clock source repeatedly, to obtain satisfactory net
The synchronizing information of network synchronous clock source.
Synchronization point difference in the present embodiment, between determination terminal to be synchronized and network synchronization clock source, comprising:
Obtain A1 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;
At the time of obtaining terminal to be synchronized and receive the response that network synchronization clock source is returned based on the synchronization signal
A2;
Obtain B at the time of network synchronization clock source receives the synchronization signal;The concrete operations of terminal to be synchronized are as follows: solution
The response message that analysis network synchronization clock source is returned based on the synchronization signal obtains the net by the result of the parsing
B at the time of network synchronous clock source receives the synchronization signal.
Determine that the synchronization point between terminal to be synchronized and network synchronization clock source is poor according to described A1, A2 and moment B
Value.
It is described when determining terminal and Network Synchronization to be synchronized according to described A1, A2 and moment B according in above description
Synchronization point difference between Zhong Yuan specifically:
The synchronization point between terminal to be synchronized and network synchronization clock source is obtained using the difference of the A1 and A2 mean value and B
Difference D.
For example, it is assumed that A1 and A2 mean value are A, i.e. mean value A=(A1+A2)/2, then synchronization point difference D=B-A.
In the present embodiment, the synchronization point difference is exactly the synchronization point value and Network Synchronization calculated under assumed condition
The deviation of the actual synchronization point of clock source.
Step S103 determines network synchronization clock according to the terminal current time to be synchronized and the synchronization point difference
The current reckoning moment in source.
The purpose of this step is to obtain the current reckoning moment in network synchronization clock source.
Due to the transmission time problem of network, inevitable B at the time of network synchronization clock source receives the synchronization signal
Exist between A2 at the time of receiving the response that network synchronization clock source returned based on the synchronization signal with terminal to be synchronized
Time difference calibrates bring large error to reduce the time difference to terminal clock to be synchronized, and the present embodiment is calculated using current
It is uncertain that moment makes up large error bring.
It is described that network synchronization clock source is generated according to the terminal current time to be synchronized and the synchronization point difference
It is current to calculate the moment, comprising:
By the terminal current time to be synchronized and synchronization point difference and, acquisition network synchronization clock source it is current
Calculate the moment.
For example, it is assumed that the current reckoning moment in network synchronization clock source is Y, terminal current time to be synchronized is X, then Y=X
+ D, error are positive and negative (A2-A1)/2.
Whether step S104, the communication response in the terminal to be synchronized Yu the network synchronization clock source meet setting item
When part, decide whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment.
The purpose of this step be under setting condition, using it is described it is current calculate the moment calibrate the terminal to be synchronized when
Clock.Further, terminal to be synchronized can acquire the synchronizing information in network synchronization clock source repeatedly, meet setting when communication responds
When condition, the clock of terminal to be synchronized is calibrated.When using the condition of convergence, the clock of terminal to be synchronized will be constantly close to network
The real clock value of synchronous clock source.
The communication response, including send communication request information and reception corresponding with communication request information response letter
Breath.
It is described whether full according to the communication response in the terminal to be synchronized and the network synchronization clock source in the present embodiment
Foot imposes a condition, and decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment, comprising:
Whether meet setting condition according to the communication response time in the terminal to be synchronized and the network synchronization clock source,
Decide whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment.
Further, comprising:
Whether met according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source and is set
Fixed condition decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment.
Further, comprising:
It is less than described according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source
When calibration condition, the clock of the terminal to be synchronized is calibrated using the current reckoning moment.
In the present embodiment, the above method can be realized from multiple angles, for example, initiating synchronous calibration behaviour by terminal to be synchronized
Make, as shown in Fig. 2, specific step is as follows, comprising:
Step S104-1-1 obtains A11 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;And
Obtain A12 at the time of terminal to be synchronized receives the response that network synchronization clock source is returned based on the synchronization signal;
Step S104-1-2 determines the difference T2 of the A12 and A11;
Step S104-1-3, judges whether T2 is less than to determine T2 the same manner in the difference T1 of previous acquisition;Before described
The difference T1 of secondary acquisition meets the condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of T1 is set to larger than
The threshold value of setting;
Step S104-1-4, if so, calibrating the clock of the terminal to be synchronized using the current reckoning moment;
Step S104-1-5, judges whether the difference T2 is less than the threshold value of setting;
Step S104-1-6, if so, stopping calibration;
Step S104-1-7, if it is not, then continuing to calibrate.
Above-mentioned specific implementation step is to initiate synchronous calibration by terminal to be synchronized to operate, and is sent to network synchronization clock source same
Step request, obtain network synchronization clock source synchronizing information A11, A12 after, by this obtain A12 and A11 difference T2 with
The difference T1 that synchronizing information A1, A2 in network synchronization clock source is obtained when the clock of previous calibration terminal to be synchronized compares, if
T2 meets the condition of convergence compared with T1, then the clock of the terminal to be synchronized is calibrated using the current reckoning moment.
Convergence, is a several scientific name word, is an important tool of Study Function, refers to and converge at a bit, to a certain value
It is close.
The condition of convergence is exactly constantly to the close condition that must possess of a certain value.
The purpose of the present embodiment is exactly the requirement for making clock alignment constantly reach clock accuracy.
Since when terminal to be synchronized for the first time sends synchronization request to network synchronization clock source, the actual value of T1 is not deposited
In order to keep the continuity of program, the condition of the initialization of T1 has also been devised in the present embodiment: the value of T1, which is set to larger than, to be set
Fixed threshold value.
Threshold means boundary, therefore threshold value is called critical value, refers to minimum or peak that an effect can generate.
The threshold value of the setting is the precision for measuring clock alignment, when clock is calibrated to the threshold value less than setting,
Indicate that clock has reached defined precision, clock alignment is completed.
For example, it is assumed that this calibration clock when obtain terminal to be synchronized to network synchronization clock source send synchronization signal when
A11 is carved, at the time of obtaining terminal to be synchronized and receive the response that network synchronization clock source is returned based on the synchronization signal
A12, the difference of A12 and A11 is T2 when this calibrates clock, then T2=A12-A11;Assuming that obtaining when previous calibration clock to same
A1 at the time of terminal sends synchronization signal to network synchronization clock source is walked, terminal to be synchronized is obtained and receives network synchronization clock source
The A2 at the time of response returned based on the synchronization signal, the difference of A2 and A1 is T1 when previous calibration clock, then T1=A2-
A1.It is described to judge whether T2 is less than to determine T2 the same manner in the difference T1 of previous acquisition, that is, judges whether T2 < T1 is true,
As immediately, then the clock of the terminal to be synchronized is calibrated using the current reckoning moment.Most importantly in calibration clock
After make T1=T2, so as to can be calibrated on the basis of new next time, make calibration constantly close to required precision, reach accordingly
Calibrate the convergent purpose of terminal clock to be synchronized.
Another angle is initiated synchronous calibration by network synchronization clock source and is operated, as shown in figure 3, specific step is as follows, packet
It includes:
Step S104-2-1 obtains C11 at the time of network synchronization clock source sends synchronization signal to terminal to be synchronized;And
Obtain C12 at the time of network synchronization clock source receives the response that terminal to be synchronized is returned based on the synchronization signal;
Step S104-2-2 determines the difference F2 of the C12 and C11;
Step S104-2-3, judges whether F2 is less than to determine F2 the same manner in the difference F1 of previous acquisition;Before described
The difference F1 of secondary acquisition meets the condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of F1 is set to larger than
The threshold value of setting;
Step S104-2-4, if so, calibrating the clock of the terminal to be synchronized using the current reckoning moment;
Step S104-2-5, judges whether the difference F2 is less than the threshold value of setting;
Step S104-2-6, if so, stopping calibration;
Step S104-2-7, if it is not, then continuing to calibrate.
Above-mentioned specific implementation step is only different in the main body for initiating simultaneously operating, is implementing upper and upper one implementation
The difference of step is simultaneously little, is not repeated herein.
The optimal threshold value of setting described in above-mentioned specific implementation step is 100 milliseconds.
Complicated network environment may make the request receiving time difference of terminal to be synchronized be unable to satisfy setting condition always,
For the time overlength for avoiding clock synchronous, the wasting of resources of terminal to be synchronized is caused, the present embodiment has also been devised described to be synchronized
The step of terminal forced termination clock alignment, includes at least with the next item down condition:
The accumulative number of communications with the network synchronization clock source of the terminal to be synchronized is more than preset number limit value.
The clock synchronization time that the terminal to be synchronized adds up is more than preset time limit value.
The present embodiment makes terminal to be synchronized all in network and the same network synchronization clock source carry out clock alignment, leads to
It crosses preset condition and constantly screens synchronizing information for calibrating terminal to be synchronized, the clock of terminal to be synchronized is made to progressively reach precision
It is required that further, achieving the purpose that all terminal clocks to be synchronized are synchronous.To in network based on sequential relationship
Information provides reliable standard.
Corresponding with the first method synchronous for clock provided by the present application, it is synchronous that the application also provides a kind of clock
Device.Since Installation practice is substantially similar to embodiment of the method, so describing fairly simple, relevant part is referred to
The corresponding explanation of embodiment of the method.Installation practice described below is only schematical.
Fig. 4 shows a kind of embodiment of device synchronous for clock provided by the present application.Fig. 4 is a kind of for clock
The unit block diagram of synchronous device.
Referring to FIG. 4, the application provides a kind of device synchronous for clock, comprising: selecting unit 401 is determined and synchronized
Moment difference unit 402 determines current reckoning moment unit 403, calibration unit 404.
Selecting unit 401: for selecting network synchronization clock source;
Determine synchronization point difference unit 402: synchronous between terminal to be synchronized and network synchronization clock source for determining
Moment difference;
Determine current reckoning moment unit 403: for according to the terminal current time to be synchronized and the synchronization point
Difference determines the current reckoning moment in network synchronization clock source;
Calibration unit 404: whether full for the communication response in the terminal to be synchronized Yu the network synchronization clock source
Foot imposes a condition, and decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment.
Based on the embodiment of the first method synchronous for clock provided by the present application, present invention also provides one
Plant the embodiment for the method for the pts value of Streaming Media frame to be arranged.Due to the present embodiment with it is above-mentioned the first for clock it is same
Based on the embodiment of the method for step, so describing fairly simple, the correspondence that relevant part refers to embodiment of the method is said
It is bright.
Fig. 5 shows provided by the present application a kind of for the embodiment of the method for the pts value of Streaming Media frame to be arranged.Fig. 5 is
It is a kind of for being arranged the flow chart of the method for the pts value of Streaming Media frame, Fig. 6 is a kind of for the pts value of Streaming Media frame to be arranged
The sub-process figure of method.
Assuming that the information round-trip time is identical between the terminal to be synchronized and the network synchronization clock source.
Fig. 5 and Fig. 6 are please referred to, it is provided by the present application a kind of for the method for the pts value of Streaming Media frame to be arranged, comprising:
Step S501 acquires Streaming Media frame, the system time of terminal system when determining acquisition.
Step S502 obtains according to the system time relative calibration moment of determination.
Step S503 sets the relative calibration moment to the pts value of the Streaming Media frame.
Referring to FIG. 6, wherein, step S502, acquisition relative calibration moment of determination according to the system time
It is as follows:
Step S502-1 selects network synchronization clock source.
Step S502-2 determines that the synchronization point between the terminal and network synchronization clock source of the acquisition Streaming Media frame is poor
Value.
Synchronization point difference in the present embodiment, between determination terminal to be synchronized and network synchronization clock source, comprising:
Obtain A1 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;
At the time of obtaining terminal to be synchronized and receive the response that network synchronization clock source is returned based on the synchronization signal
A2;
Obtain B at the time of network synchronization clock source receives the synchronization signal;
Determine that the synchronization point between terminal to be synchronized and network synchronization clock source is poor according to described A1, A2 and moment B
Value.
Wherein, it is described determined according to described A1, A2 and moment B it is same between terminal to be synchronized and network synchronization clock source
Moment difference is walked, specifically:
The synchronization point between terminal to be synchronized and network synchronization clock source is obtained using the difference of the A1 and A2 mean value and B
Difference D.
B at the time of the acquisition network synchronization clock source receives the synchronization signal, specifically:
The response message that parsing network synchronization clock source is returned based on the synchronization signal, passes through the result of the parsing
Obtain B at the time of the network synchronization clock source receives the synchronization signal.
Step S502-3 determines net according to the terminal current time of the acquisition Streaming Media frame and the synchronization point difference
The current reckoning moment of network synchronous clock source.
Include:
By the terminal current time to be synchronized and synchronization point difference and, acquisition network synchronization clock source it is current
Calculate the moment.
Step S502-4, the communication response in the terminal to be synchronized Yu the network synchronization clock source, which meets, to impose a condition
When, the current reckoning moment is determined as the relative calibration moment.
In the present embodiment, comprising:
Met according to the communication response time in the terminal to be synchronized and the network synchronization clock source and imposed a condition, by institute
It states and currently calculates that the moment is determined as the relative calibration moment.
Further, comprising:
Meet setting item according to the round-trip time used is communicated between the terminal to be synchronized and the network synchronization clock source
The current reckoning moment is determined as the relative calibration moment by part.
Further, comprising:
It is less than described according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source
When calibration condition, the current reckoning moment is determined as the relative calibration moment.
In the present embodiment, the above method can be realized from multiple angles, for example, initiating synchronous calibration behaviour by terminal to be synchronized
Make, as shown in fig. 7, specific step is as follows, comprising:
S502-4-1-1 obtains A11 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;And it obtains
A12 at the time of taking terminal to be synchronized to receive the response that network synchronization clock source is returned based on the synchronization signal;
S502-4-1-2 determines the difference T2 of the A12 and A11;
S502-4-1-3, judges whether T2 is less than to determine T2 the same manner in the difference T1 of previous acquisition;It is described previous
The difference T1 of acquisition meets the condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of T1, which is set to larger than, to be set
Fixed threshold value;
S502-4-1-4, if so, judging whether the difference T2 is less than the threshold value of setting;
S502-4-1-5, if so, stopping calibrating and the current reckoning moment being determined as the relative calibration moment;
S502-4-1-6, if it is not, then continuing to calibrate.
Another angle is initiated synchronous calibration by network synchronization clock source and is operated, as shown in figure 8, specific step is as follows, packet
It includes:
S502-4-2-1 obtains C11 at the time of network synchronization clock source sends synchronization signal to terminal to be synchronized;And it obtains
C12 at the time of taking network synchronization clock source to receive the response that terminal to be synchronized is returned based on the synchronization signal;
S502-4-2-2 determines the difference F2 of the C12 and C11;
S502-4-2-3, judges whether F2 is less than to determine F2 the same manner in the difference F1 of previous acquisition;It is described previous
The difference F1 of acquisition meets the condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of F1, which is set to larger than, to be set
Fixed threshold value;
S502-4-2-4, if so, judging whether the difference F2 is less than the threshold value of setting;
S502-4-2-5, if so, stopping calibrating and the current reckoning moment being determined as the relative calibration moment;
S502-4-2-6, if it is not, then continuing to calibrate.
The optimal threshold value of setting described in above-mentioned specific implementation step is 100 milliseconds.
Complicated network environment may make the request receiving time difference of terminal to be synchronized be unable to satisfy setting condition always,
For the time overlength for avoiding clock synchronous, the wasting of resources of terminal to be synchronized is caused, the present embodiment has also been devised described to be synchronized
The step of terminal forced termination clock alignment, includes at least with the next item down condition:
The accumulative number of communications with the network synchronization clock source of the terminal to be synchronized is more than preset number limit value;
The clock synchronization time that the terminal to be synchronized adds up is more than preset time limit value.
The present embodiment makes the pts value and the same network synchronization clock of the Streaming Media frame of terminal to be synchronized all in network
Source carries out clock alignment, and the synchronizing information for calibrating terminal to be synchronized is constantly screened by preset condition, thus, make different ends
The pts value of the Streaming Media frame at end reaches unified required precision, to ensure that the Streaming Media frame synchronization of different terminals is orderly broadcast
It puts.
When acquiring the not calibrated terminal clock of terminal of Streaming Media frame described in above embodiments, when obtaining the relative calibration
It carves, the pts value of the Streaming Media frame is set using the relative calibration moment.Certainly, also may include in other embodiments
Following steps: the terminal of the acquisition Streaming Media frame calibrates clock using the relative calibration moment.The acquisition Streaming Media frame
Terminal calibration clock after, system time when terminal acquisition Streaming Media frame as the relative calibration moment, without again with
Network synchronization clock source carries out clock synchronous working.
The similar above application, those skilled in the art can make corresponding change, the application couple according to the actual situation
This is with no restrictions.But any technical solution for the method for the pts value of setting Streaming Media frame involved in the application includes
Within the scope of protection of this application.
Corresponding with the application method of pts value for Streaming Media frame to be arranged provided above, the application also provides one
Plant the device for the pts value of Streaming Media frame to be arranged.Since Installation practice is substantially similar to embodiment of the method, so describing
Fairly simple, relevant part refers to the corresponding explanation of embodiment of the method.Installation practice described below is only
Schematically.
Fig. 9 shows provided by the present application a kind of for the embodiment of the device of the pts value of Streaming Media frame to be arranged.Fig. 9 is
It is a kind of for the unit block diagram of the device of the pts value of Streaming Media frame to be arranged;Figure 10 is a kind of for the pts value of Streaming Media frame to be arranged
Device subelement block diagram.
Referring to FIG. 9, the application provide it is a kind of for the device of the pts value of Streaming Media frame to be arranged, comprising: acquisition unit
601, relative calibration moment unit 602 is obtained, PTS unit 603 is set.Acquisition unit 601: it for acquiring Streaming Media frame, determines
The system time of terminal system when acquisition;
Obtain relative calibration moment unit 602: for obtaining according to the system time and the relative calibration moment of determination;
PTS unit 603 is set: for setting the relative calibration moment to the pts value of the Streaming Media frame;
Referring to FIG. 10, wherein, the acquisition relative calibration moment unit 602, comprising: selection subelement 602-1 is determined
Synchronization point difference subelement 602-2 determines current reckoning moment subelement 602-3, calibrates subelement 602-4.
Select subelement 602-1: for selecting network synchronization clock source;
Determine synchronization point difference subelement 602-2: for determining the terminal and Network Synchronization of the acquisition Streaming Media frame
Synchronization point difference between clock source;
Determine and current calculate moment subelement 602-3: for according to terminal current time of the acquisition Streaming Media frame with
The synchronization point difference determines the current reckoning moment in network synchronization clock source;
Calibrate subelement 602-4: full for the communication response in the terminal to be synchronized Yu the network synchronization clock source
When foot imposes a condition, the current reckoning moment is determined as the relative calibration moment.
A kind of computer-readable medium embodiment provided by the present application is as follows:
This application provides a kind of computer-readable mediums synchronous for clock.
The computer-readable medium embodiment synchronous for clock provided by the present application describes fairly simple, related
Part refer to above-mentioned offer the embodiment of the method synchronous for clock corresponding explanation.Reality described below
It is only schematical to apply example.
The application provides a kind of computer-readable medium synchronous for clock, is stored with instruction, and described instruction can be by
Processor loads and executes following steps:
Select network synchronization clock source;
Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;
The current of network synchronization clock source is determined with the synchronization point difference according to the terminal current time to be synchronized
Calculate the moment;
Whether the communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, and decision is
The no clock that the terminal to be synchronized is calibrated using the current reckoning moment.
A kind of electronic equipment embodiment provided by the present application is as follows:
This application provides a kind of electronic equipments synchronous for clock.
The electronic equipment embodiment synchronous for clock provided by the present application describes fairly simple, relevant part
The corresponding explanation of the embodiment of the method synchronous for clock of above-mentioned offer is provided.Embodiment described below is only
It is only illustrative.
The application provides a kind of electronic equipment synchronous for clock, comprising: memory and processor;
For the memory for storing computer executable instructions, the processor is executable for executing the computer
Instruction:
Select network synchronization clock source;
Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;
The current of network synchronization clock source is determined with the synchronization point difference according to the terminal current time to be synchronized
Calculate the moment;
Whether the communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, and decision is
The no clock that the terminal to be synchronized is calibrated using the current reckoning moment.
A kind of computer-readable medium embodiment provided by the present application is as follows:
This application provides a kind of for the computer-readable medium of the pts value of Streaming Media frame to be arranged.
The computer-readable medium embodiment of the pts value for Streaming Media frame to be arranged provided by the present application describes to obtain ratio
Relatively simple, relevant part refers to the described for pair of the embodiment of the method for the pts value of Streaming Media frame to be arranged of above-mentioned offer
It should illustrate.Embodiment described below is only schematical.
The application provides a kind of for the computer-readable medium of the pts value of Streaming Media frame to be arranged, and is stored with instruction, described
Instruction can be loaded by processor and execute following steps:
Streaming Media frame is acquired, the system time of terminal system when determining acquisition;
The relative calibration moment of determination is obtained according to the system time;
Set the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, it is described acquisition according to the system time and the relative calibration moment of determination it is as follows:
Select network synchronization clock source;
Determine the synchronization point difference between the terminal and network synchronization clock source of the acquisition Streaming Media frame;
Network synchronization clock is determined according to the terminal current time of the acquisition Streaming Media frame and the synchronization point difference
The current reckoning moment in source;
When communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, work as by described in
The preceding reckoning moment is determined as the relative calibration moment.
A kind of electronic equipment embodiment provided by the present application is as follows:
This application provides a kind of for the electronic equipment of the pts value of Streaming Media frame to be arranged.
The electronic equipment embodiment of the pts value for Streaming Media frame to be arranged provided by the present application describes simpler
Single, the correspondence for the embodiment of the method for the pts value of Streaming Media frame to be arranged that relevant part refers to above-mentioned offer is said
It is bright.Embodiment described below is only schematical.
The application provides a kind of for the electronic equipment of the pts value of Streaming Media frame to be arranged, comprising: memory, and processing
Device;
For the memory for storing computer executable instructions, the processor is executable for executing the computer
Instruction:
Streaming Media frame is acquired, the system time of terminal system when determining acquisition;
The relative calibration moment of determination is obtained according to the system time;
Set the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, it is described acquisition according to the system time and the relative calibration moment of determination it is as follows:
Select network synchronization clock source;
Determine the synchronization point difference between the terminal and network synchronization clock source of the acquisition Streaming Media frame;
Network synchronization clock is determined according to the terminal current time of the acquisition Streaming Media frame and the synchronization point difference
The current reckoning moment in source;
When communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, work as by described in
The preceding reckoning moment is determined as the relative calibration moment.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this field skill
Art personnel are not departing from spirit and scope, can make possible variation and modification, therefore the guarantor of the application
Shield range should be subject to the range that the claim of this application defined.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
1, computer-readable medium can be by any side including permanent and non-permanent, removable and non-removable media
Method or technology realize that information stores.Information can be computer readable instructions, data structure, the module of program or other numbers
According to.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or
Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include non-temporary computer readable media (transitory media), such as modulates
Data-signal and carrier wave.
2, it will be understood by those skilled in the art that embodiments herein can provide as the production of method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It can be used moreover, the application can be used in the computer that one or more wherein includes computer usable program code
The computer program product implemented on storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Form.
Claims (33)
1. a kind of method synchronous for clock characterized by comprising
Select network synchronization clock source;
Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;
The current time of the terminal to be synchronized is calibrated according to the synchronization point difference.
2. the method synchronous for clock according to claim 1, which is characterized in that described poor according to the synchronization point
The current time of terminal to be synchronized described in value calibration includes:
The current reckoning in network synchronization clock source is determined according to the terminal current time to be synchronized and the synchronization point difference
Moment;
Whether the communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, decides whether to adopt
The clock of the terminal to be synchronized is calibrated with the current reckoning moment.
3. the method synchronous for clock according to claim 2, which is characterized in that determination terminal to be synchronized and net
Synchronization point difference between network synchronous clock source, comprising:
Obtain A1 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;
Obtain A2 at the time of terminal to be synchronized receives the response that network synchronization clock source is returned based on the synchronization signal;
Obtain B at the time of network synchronization clock source receives the synchronization signal;
The synchronization point difference between terminal to be synchronized and network synchronization clock source is determined according to described A1, A2 and moment B.
4. the method synchronous for clock according to claim 3, it is characterised in that:
It is described to determine that the synchronization point between terminal to be synchronized and network synchronization clock source is poor according to described A1, A2 and moment B
Value specifically:
The synchronization point difference between terminal to be synchronized and network synchronization clock source is obtained using the difference of the A1 and A2 mean value and B
D。
5. the method synchronous for clock according to claim 3, which is characterized in that the acquisition network synchronization clock source
B at the time of receiving the synchronization signal specifically:
The response message that parsing network synchronization clock source is returned based on the synchronization signal is obtained by the result of the parsing
B at the time of the network synchronization clock source receives the synchronization signal.
6. the method synchronous for clock according to claim 2, which is characterized in that described according to the terminal to be synchronized
Current time and the synchronization point difference generate the current reckoning moment in network synchronization clock source, comprising:
By the terminal current time to be synchronized and synchronization point difference and, the current reckoning in acquisition network synchronization clock source
Moment.
7. the method synchronous for clock according to claim 2, which is characterized in that described according to the terminal to be synchronized
Whether meet setting condition with the communication response in the network synchronization clock source, decides whether using the current reckoning moment school
The clock of the quasi- terminal to be synchronized, comprising:
Whether meet setting condition according to the communication response time in the terminal to be synchronized and the network synchronization clock source, determines
Whether the clock of the to be synchronized terminal is calibrated using the current reckoning moment.
8. the method synchronous for clock according to claim 7, which is characterized in that described according to the terminal to be synchronized
Whether meet setting condition with the communication response time in the network synchronization clock source, when deciding whether using the current reckoning
Carve the clock for calibrating the terminal to be synchronized;Include:
Whether meet setting according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source
Condition decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment.
9. the method synchronous for clock according to claim 8, it is characterised in that:
It is described whether to meet and set according to communicating the round-trip used time between the terminal to be synchronized and the network synchronization clock source
Fixed condition decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment;Include:
Calibration is less than according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source described
When condition, the clock of the terminal to be synchronized is calibrated using the current reckoning moment.
10. the method synchronous for clock according to claim 9, which is characterized in that
It is described to be less than described according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source
When calibration condition, the clock of the terminal to be synchronized is calibrated using the current reckoning moment, comprising:
Obtain A11 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;And it obtains terminal to be synchronized and connects
A12 at the time of receiving the response that network synchronization clock source is returned based on the synchronization signal;
Determine the difference T2 of the A12 and A11;
Judge whether T2 is less than to determine T2 the same manner in the difference T1 of previous acquisition;The difference T1 of the previous acquisition meets
The condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of T1 is set to larger than the threshold value of setting;
If so, calibrating the clock of the terminal to be synchronized using the current reckoning moment;And
Judge whether the difference T2 is less than the threshold value of setting;
If so, stopping calibration;
If it is not, then continuing to calibrate.
11. the method synchronous for clock according to claim 9, which is characterized in that it is described described according to
When communicating the round-trip used time between synchronous terminal and the network synchronization clock source and being less than calibration condition, using described when being pushed forward
The calculation moment calibrates the clock of the terminal to be synchronized, comprising:
Obtain C11 at the time of network synchronization clock source sends synchronization signal to terminal to be synchronized;And obtain network synchronization clock
C12 at the time of source receives the response that terminal to be synchronized is returned based on the synchronization signal;
Determine the difference F2 of the C12 and C11;
Judge whether F2 is less than to determine F2 the same manner in the difference F1 of previous acquisition;The difference F1 of the previous acquisition meets
The condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of F1 is set to larger than the threshold value of setting;
If so, calibrating the clock of the terminal to be synchronized using the current reckoning moment;And
Judge whether the difference F2 is less than the threshold value of setting;
If so, stopping calibration;
If it is not, then continuing to calibrate.
12. 0 or 11 described in any item methods synchronous for clock according to claim 1, which is characterized in that the setting
Threshold value is 100 milliseconds.
13. according to the described in any item methods synchronous for clock of claim 2 to 11, which is characterized in that further include, full
When the following either condition of foot, the step of terminal forced termination clock alignment to be synchronized, include at least with the next item down condition:
The accumulative number of communications with the network synchronization clock source of the terminal to be synchronized is more than preset number limit value;
The clock synchronization time that the terminal to be synchronized adds up is more than preset time limit value.
14. according to the described in any item methods synchronous for clock of claim 2 to 11, which is characterized in that described to be synchronized
The information round-trip time is identical between terminal and the network synchronization clock source.
15. a kind of device synchronous for clock characterized by comprising
Selecting unit: for selecting network synchronization clock source;
Determine synchronization point difference unit: for determining that the synchronization point between terminal to be synchronized and network synchronization clock source is poor
Value;
Determine current reckoning moment unit: for determining according to the terminal current time to be synchronized and the synchronization point difference
The current reckoning moment in network synchronization clock source;
Calibration unit: whether meet setting item for the communication response in the terminal to be synchronized Yu the network synchronization clock source
Part decides whether the clock that the terminal to be synchronized is calibrated using the current reckoning moment.
16. a kind of for the method for the pts value of Streaming Media frame to be arranged characterized by comprising
Streaming Media frame is acquired, the system time of terminal system when determining acquisition;
The relative calibration moment of determination is obtained according to the system time;
Set the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, it is described acquisition according to the system time and the relative calibration moment of determination it is as follows:
Select network synchronization clock source;
Determine the synchronization point difference between the terminal and network synchronization clock source of the acquisition Streaming Media frame;
Network synchronization clock source is determined according to the terminal current time of the acquisition Streaming Media frame and the synchronization point difference
It is current to calculate the moment;
When communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, it ought be pushed forward described
The calculation moment is determined as the relative calibration moment.
17. according to claim 16 for the method for the pts value of Streaming Media frame to be arranged, which is characterized in that the determination
Synchronization point difference between terminal to be synchronized and network synchronization clock source, comprising:
Obtain A1 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;
Obtain A2 at the time of terminal to be synchronized receives the response that network synchronization clock source is returned based on the synchronization signal;
Obtain B at the time of network synchronization clock source receives the synchronization signal;
The synchronization point difference between terminal to be synchronized and network synchronization clock source is determined according to described A1, A2 and moment B.
18. according to claim 17 for the method for the pts value of Streaming Media frame to be arranged, it is characterised in that:
It is described to determine that the synchronization point between terminal to be synchronized and network synchronization clock source is poor according to described A1, A2 and moment B
Value specifically:
The synchronization point difference between terminal to be synchronized and network synchronization clock source is obtained using the difference of the A1 and A2 mean value and B
D。
19. according to claim 17 for the method for the pts value of Streaming Media frame to be arranged, spy is, the acquisition net
B at the time of network synchronous clock source receives the synchronization signal specifically:
The response message that parsing network synchronization clock source is returned based on the synchronization signal is obtained by the result of the parsing
B at the time of the network synchronization clock source receives the synchronization signal.
20. according to claim 16 for the method for the pts value of Streaming Media frame to be arranged, which is characterized in that the basis
The terminal current time to be synchronized and the synchronization point difference generate the current reckoning moment in network synchronization clock source, packet
It includes:
By the terminal current time to be synchronized and synchronization point difference and, the current reckoning in acquisition network synchronization clock source
Moment.
21. according to claim 16 for the method for the pts value of Streaming Media frame to be arranged, which is characterized in that described in institute
It is when stating communication response satisfaction setting condition of the terminal to be synchronized with the network synchronization clock source, the current reckoning moment is true
It is set to the relative calibration moment, comprising:
Met according to the communication response time in the terminal to be synchronized and the network synchronization clock source and imposed a condition, worked as by described in
The preceding reckoning moment is determined as the relative calibration moment.
22. according to claim 21 for the method for the pts value of Streaming Media frame to be arranged, which is characterized in that the basis
The communication response time in the terminal to be synchronized and the network synchronization clock source, which meets, to impose a condition, when by the current reckoning
It is determined as the relative calibration moment quarter;Include:
Meet setting condition according to the round-trip time used is communicated between the terminal to be synchronized and the network synchronization clock source, it will
The current reckoning moment is determined as the relative calibration moment.
23. according to claim 22 for the method for the pts value of Streaming Media frame to be arranged, it is characterised in that:
It is described that setting item is met according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source
The current reckoning moment is determined as the relative calibration moment by part;Include:
Calibration is less than according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source described
When condition, the current reckoning moment is determined as the relative calibration moment.
24. according to claim 23 for the method for the pts value of Streaming Media frame to be arranged, which is characterized in that
Calibration is less than according to the round-trip time used of communication between the terminal to be synchronized and the network synchronization clock source described
When condition, the current reckoning moment is determined as the relative calibration moment, comprising:
Obtain A11 at the time of terminal to be synchronized sends synchronization signal to network synchronization clock source;And it obtains terminal to be synchronized and connects
A12 at the time of receiving the response that network synchronization clock source is returned based on the synchronization signal;
Determine the difference T2 of the A12 and A11;
Judge whether T2 is less than to determine T2 the same manner in the difference T1 of previous acquisition;The difference T1 of the previous acquisition meets
The condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of T1 is set to larger than the threshold value of setting;
If so, judging whether the difference T2 is less than the threshold value of setting;
If so, stopping calibrating and the current reckoning moment being determined as the relative calibration moment;
If it is not, then continuing to calibrate.
25. according to claim 23 for the method for the pts value of Streaming Media frame to be arranged, which is characterized in that described in institute
It, will when stating according to the round-trip time used is communicated between the terminal to be synchronized and the network synchronization clock source less than calibration condition
The current reckoning moment is determined as the relative calibration moment, comprising:
Obtain C11 at the time of network synchronization clock source sends synchronization signal to terminal to be synchronized;And obtain network synchronization clock
C12 at the time of source receives the response that terminal to be synchronized is returned based on the synchronization signal;
Determine the difference F2 of the C12 and C11;
Judge whether F2 is less than to determine F2 the same manner in the difference F1 of previous acquisition;The difference F1 of the previous acquisition meets
The condition of the clock of previous calibration terminal to be synchronized;When initialization, the value of F1 is set to larger than the threshold value of setting;
If so, judging whether the difference F2 is less than the threshold value of setting;
If so, stopping calibrating and the current reckoning moment being determined as the relative calibration moment;
If it is not, then continuing to calibrate.
26. described in any item for the method for the pts value of Streaming Media frame to be arranged according to claim 24 or 25, feature exists
In the threshold value set is 100 millisecond.
27. 6 to 25 is described in any item for the method for the pts value of Streaming Media frame to be arranged according to claim 1, feature exists
In further including, when meeting following either condition, the step of terminal forced termination clock alignment to be synchronized, including at least following
One condition:
The accumulative number of communications with the network synchronization clock source of the terminal to be synchronized is more than preset number limit value;
The clock synchronization time that the terminal to be synchronized adds up is more than preset time limit value.
28. 6 to 25 is described in any item for the method for the pts value of Streaming Media frame to be arranged according to claim 1, feature exists
In the information round-trip time is identical between the terminal to be synchronized and the network synchronization clock source.
29. a kind of for the device of the pts value of Streaming Media frame to be arranged characterized by comprising
Acquisition unit: for acquiring Streaming Media frame, the system time of terminal system when determining acquisition;
Obtain relative calibration moment unit: for obtaining according to the system time and the relative calibration moment of determination;
PTS unit is set: for setting the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, the acquisition relative calibration moment unit, comprising:
Select subelement: for selecting network synchronization clock source;
Determine synchronization point difference subelement: between the terminal and network synchronization clock source for determining the acquisition Streaming Media frame
Synchronization point difference;
Determine and current calculate moment subelement: for according to terminal current time of the acquisition Streaming Media frame with it is described synchronous when
Carve the current reckoning moment that difference determines network synchronization clock source;
It calibrates subelement: meeting for the communication response in the terminal to be synchronized Yu the network synchronization clock source and impose a condition
When, the current reckoning moment is determined as the relative calibration moment.
30. a kind of computer-readable medium synchronous for clock, which is characterized in that be stored thereon with instruction, described instruction energy
It is enough to be loaded by processor and execute following steps:
Select network synchronization clock source;
Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;
The current reckoning in network synchronization clock source is determined according to the terminal current time to be synchronized and the synchronization point difference
Moment;
Whether the communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, decides whether to adopt
The clock of the terminal to be synchronized is calibrated with the current reckoning moment.
31. a kind of electronic equipment synchronous for clock characterized by comprising memory and processor;
The memory is for storing computer executable instructions, and for executing, the computer is executable to be referred to the processor
It enables:
Select network synchronization clock source;
Determine the synchronization point difference between terminal to be synchronized and network synchronization clock source;
The current reckoning in network synchronization clock source is determined according to the terminal current time to be synchronized and the synchronization point difference
Moment;
Whether the communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, decides whether to adopt
The clock of the terminal to be synchronized is calibrated with the current reckoning moment.
32. a kind of for the computer-readable medium of the pts value of Streaming Media frame to be arranged, which is characterized in that it is stored thereon with instruction,
Described instruction can be loaded by processor and execute following steps:
Streaming Media frame is acquired, the system time of terminal system when determining acquisition;
The relative calibration moment of determination is obtained according to the system time;
Set the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, it is described acquisition according to the system time and the relative calibration moment of determination it is as follows:
Select network synchronization clock source;
Determine the synchronization point difference between the terminal and network synchronization clock source of the acquisition Streaming Media frame;
Network synchronization clock source is determined according to the terminal current time of the acquisition Streaming Media frame and the synchronization point difference
It is current to calculate the moment;
When communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, it ought be pushed forward described
The calculation moment is determined as the relative calibration moment.
33. a kind of for the electronic equipment of the pts value of Streaming Media frame to be arranged characterized by comprising memory, and processing
Device;
The memory is for storing computer executable instructions, and for executing, the computer is executable to be referred to the processor
It enables:
Streaming Media frame is acquired, the system time of terminal system when determining acquisition;
The relative calibration moment of determination is obtained according to the system time;
Set the relative calibration moment to the pts value of the Streaming Media frame;
Wherein, it is described acquisition according to the system time and the relative calibration moment of determination it is as follows:
Select network synchronization clock source;
Determine the synchronization point difference between the terminal and network synchronization clock source of the acquisition Streaming Media frame;
Network synchronization clock source is determined according to the terminal current time of the acquisition Streaming Media frame and the synchronization point difference
It is current to calculate the moment;
When communication response in the terminal to be synchronized Yu the network synchronization clock source meets setting condition, it ought be pushed forward described
The calculation moment is determined as the relative calibration moment.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810218778.8A CN110278047A (en) | 2018-03-16 | 2018-03-16 | The method, device and equipment of synchronous for clock, setting Streaming Media frame pts value |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810218778.8A CN110278047A (en) | 2018-03-16 | 2018-03-16 | The method, device and equipment of synchronous for clock, setting Streaming Media frame pts value |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN110278047A true CN110278047A (en) | 2019-09-24 |
Family
ID=67958572
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810218778.8A Pending CN110278047A (en) | 2018-03-16 | 2018-03-16 | The method, device and equipment of synchronous for clock, setting Streaming Media frame pts value |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110278047A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112532309A (en) * | 2020-12-21 | 2021-03-19 | 四川安迪科技实业有限公司 | Physical layer transmission method and device suitable for simple satellite Internet of things terminal |
| CN112748758A (en) * | 2020-12-28 | 2021-05-04 | 深兰人工智能(深圳)有限公司 | Clock source selection method and device, electronic equipment and storage medium |
| CN115001617A (en) * | 2022-06-02 | 2022-09-02 | 广东电网有限责任公司 | Clock synchronization method and device, mobile terminal and storage medium |
| CN115174979A (en) * | 2022-06-20 | 2022-10-11 | 阿里巴巴(中国)有限公司 | Streaming media transmission network, transmission control method, device, equipment and storage medium |
| WO2023104108A1 (en) * | 2021-12-10 | 2023-06-15 | 中兴通讯股份有限公司 | Time calibration method and device, and computer-readable storage medium |
Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101217330A (en) * | 2008-01-02 | 2008-07-09 | 中兴通讯股份有限公司 | A method and device for time synchronization correction |
| CN101789859A (en) * | 2010-01-29 | 2010-07-28 | 中国科学院空间科学与应用研究中心 | Noncoherent distance measurement/time synchronism system of cluster link two-way asynchronous communication channel |
| CN101977433A (en) * | 2010-11-09 | 2011-02-16 | 西安电子科技大学 | Averaging Clock Synchronization Method for Wireless Sensor Networks |
| CN102546071A (en) * | 2011-12-23 | 2012-07-04 | 北京北方烽火科技有限公司 | Clock synchronization method and system |
| CN102869084A (en) * | 2011-07-04 | 2013-01-09 | 三菱电机株式会社 | Methods and devices for performing synchronization and compensating clock drift among communication devices |
| CN104618737A (en) * | 2013-11-01 | 2015-05-13 | 深圳中兴力维技术有限公司 | Streaming media system clock slow synchronization method and streaming media system clock slow synchronization device |
| CN104836654A (en) * | 2015-04-15 | 2015-08-12 | 浙江大学 | Clock synchronizing method based on Ethernet POWERLINK |
| CN105490799A (en) * | 2016-01-15 | 2016-04-13 | 南京邮电大学 | Multi-terminal time synchronization method based on bidirectional message exchange |
| CN105680969A (en) * | 2015-12-31 | 2016-06-15 | 浙江中控技术股份有限公司 | Clock synchronization method and device |
| US20160359610A1 (en) * | 2015-06-05 | 2016-12-08 | Analog Devices Global | Method and apparatus for synchronization of slave clock to master clock |
| CN106804058A (en) * | 2017-02-16 | 2017-06-06 | 上海交通大学 | The sub-clustering method for synchronizing time that a kind of combination topology is safeguarded |
| CN107017958A (en) * | 2016-01-28 | 2017-08-04 | 浙江宇视科技有限公司 | A kind of method for synchronizing time and corresponding system based on NTP |
-
2018
- 2018-03-16 CN CN201810218778.8A patent/CN110278047A/en active Pending
Patent Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101217330A (en) * | 2008-01-02 | 2008-07-09 | 中兴通讯股份有限公司 | A method and device for time synchronization correction |
| CN101789859A (en) * | 2010-01-29 | 2010-07-28 | 中国科学院空间科学与应用研究中心 | Noncoherent distance measurement/time synchronism system of cluster link two-way asynchronous communication channel |
| CN101977433A (en) * | 2010-11-09 | 2011-02-16 | 西安电子科技大学 | Averaging Clock Synchronization Method for Wireless Sensor Networks |
| CN102869084A (en) * | 2011-07-04 | 2013-01-09 | 三菱电机株式会社 | Methods and devices for performing synchronization and compensating clock drift among communication devices |
| CN102546071A (en) * | 2011-12-23 | 2012-07-04 | 北京北方烽火科技有限公司 | Clock synchronization method and system |
| CN104618737A (en) * | 2013-11-01 | 2015-05-13 | 深圳中兴力维技术有限公司 | Streaming media system clock slow synchronization method and streaming media system clock slow synchronization device |
| CN104836654A (en) * | 2015-04-15 | 2015-08-12 | 浙江大学 | Clock synchronizing method based on Ethernet POWERLINK |
| US20160359610A1 (en) * | 2015-06-05 | 2016-12-08 | Analog Devices Global | Method and apparatus for synchronization of slave clock to master clock |
| CN105680969A (en) * | 2015-12-31 | 2016-06-15 | 浙江中控技术股份有限公司 | Clock synchronization method and device |
| CN105490799A (en) * | 2016-01-15 | 2016-04-13 | 南京邮电大学 | Multi-terminal time synchronization method based on bidirectional message exchange |
| CN107017958A (en) * | 2016-01-28 | 2017-08-04 | 浙江宇视科技有限公司 | A kind of method for synchronizing time and corresponding system based on NTP |
| CN106804058A (en) * | 2017-02-16 | 2017-06-06 | 上海交通大学 | The sub-clustering method for synchronizing time that a kind of combination topology is safeguarded |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112532309A (en) * | 2020-12-21 | 2021-03-19 | 四川安迪科技实业有限公司 | Physical layer transmission method and device suitable for simple satellite Internet of things terminal |
| CN112532309B (en) * | 2020-12-21 | 2022-07-22 | 四川安迪科技实业有限公司 | Physical layer transmission method and device suitable for simple satellite internet of things terminal |
| CN112748758A (en) * | 2020-12-28 | 2021-05-04 | 深兰人工智能(深圳)有限公司 | Clock source selection method and device, electronic equipment and storage medium |
| WO2023104108A1 (en) * | 2021-12-10 | 2023-06-15 | 中兴通讯股份有限公司 | Time calibration method and device, and computer-readable storage medium |
| CN115001617A (en) * | 2022-06-02 | 2022-09-02 | 广东电网有限责任公司 | Clock synchronization method and device, mobile terminal and storage medium |
| CN115174979A (en) * | 2022-06-20 | 2022-10-11 | 阿里巴巴(中国)有限公司 | Streaming media transmission network, transmission control method, device, equipment and storage medium |
| CN115174979B (en) * | 2022-06-20 | 2023-12-29 | 阿里巴巴(中国)有限公司 | Streaming media transmission network, transmission control method, device, equipment and storage medium |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110278047A (en) | The method, device and equipment of synchronous for clock, setting Streaming Media frame pts value | |
| US10855763B2 (en) | Method and apparatus for synchronizing applications' consumption of remote data | |
| US9357005B2 (en) | Method and system for synchronized distributed display over multiple client devices | |
| CN1489356B (en) | Media source, media receiver, media processing system and method for synchronously playing media data packets | |
| US9131016B2 (en) | Method and apparatus for virtual auditorium usable for a conference call or remote live presentation with audience response thereto | |
| JP2007020183A (en) | Time synchronization method in Residential Ethernet system | |
| CN104284098A (en) | Method and system for processing video data | |
| US12429904B2 (en) | Heterogeneous computing systems and methods for clock synchronization | |
| US20230031866A1 (en) | System and method for remote audio recording | |
| JP2017050609A (en) | Video processing system, video processing apparatus, video processing program, and video processing method | |
| CN108923995A (en) | A kind of transmission time delay confirming method and device | |
| CN101355531A (en) | Method, device and equipment for sending and receiving messages | |
| JP7377352B2 (en) | Multi-member instant messaging method, system, device, electronic device, and computer program | |
| CN109246664A (en) | A kind of tone testing method and device | |
| JP2009081654A (en) | Stream synchronous reproduction system and method | |
| HK40013106A (en) | Method and device and equipment for clock synchronization and setting pts value of streaming media frame | |
| Huang et al. | Evolution of temporal multimedia synchronization principles | |
| CN115297364B (en) | Cloud game video transmission time delay determining method, cloud game video transmission time delay determining system and electronic equipment | |
| CN112671696B (en) | Message transmission method, device, computer equipment and computer storage medium | |
| CN115442786B (en) | Bluetooth synchronization method, system, Bluetooth device and computer-readable storage medium | |
| US12388888B2 (en) | Packet replacement during poor network connectivity or network congestion | |
| CN115174981B (en) | Remote joint singing method, device, equipment and storage medium based on micro-service | |
| US12424198B2 (en) | Word replacement during poor network connectivity or network congestion | |
| CN108595638A (en) | A kind of method that association allocating time range is determined under distributed system | |
| WO2023274516A1 (en) | Collaborative delivery of correlated media streams |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40013106 Country of ref document: HK |
|
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190924 |
|
| RJ01 | Rejection of invention patent application after publication |