技术领域technical field
本发明涉及同步播放技术领域,具体涉及一种时钟调节方法、装置、终端及多媒体同步播放系统。The invention relates to the technical field of synchronous playback, in particular to a clock adjustment method, device, terminal and multimedia synchronous playback system.
背景技术Background technique
随着生活水平的提高,家庭影音设备在人们的生活中扮演着重要的角色。当前,将多个多媒体播放设备(例如,音箱、播放器等)以及控制设备通过有线或无线网络互相连接,组成一个多媒体播放系统,同步播放相同的多媒体如音乐,已经得到广泛的应用。With the improvement of living standards, home audio-visual equipment plays an important role in people's lives. At present, it has been widely used to connect multiple multimedia playback devices (for example, speakers, players, etc.) and control devices to each other through a wired or wireless network to form a multimedia playback system, and to play the same multimedia such as music synchronously.
上述多媒体播放系统中,每个多媒体播放设备都具有独立的时钟系统。各个播放设备根据其自身的时钟系统来播放多媒体。然而,各个多媒体播放设备以及参考设备(一般为控制设备)的时钟系统并不总是同步的。各个播放设备以及参考设备彼此之间可能存在细微的时差。当多个多媒体播放设备播放相同的多媒体如音乐时,上述细微的时差导致各个多媒体播放设备的播放进度不一致,由此造成提高多媒体播放设备之间播放多媒体的同步性比较低。In the above multimedia playing system, each multimedia playing device has an independent clock system. Each playback device plays multimedia according to its own clock system. However, the clock systems of various multimedia playback devices and reference devices (generally control devices) are not always synchronized. There may be slight time differences between playback devices and reference devices. When multiple multimedia playback devices play the same multimedia such as music, the above-mentioned slight time difference leads to inconsistencies in the playback progress of each multimedia playback device, thus resulting in relatively low synchronization between multimedia playback devices.
发明内容Contents of the invention
本发明实施例提供一种时钟调节方法、装置、终端及多媒体同步播放系统,可以提高多媒体播放设备之间播放多媒体的同步性。Embodiments of the present invention provide a clock adjustment method, device, terminal and multimedia synchronous playback system, which can improve the synchronization of multimedia playback between multimedia playback devices.
本发明实施例提供一种时钟调节方法,包括:An embodiment of the present invention provides a clock adjustment method, including:
在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差;When playing multimedia data, obtain the time error between the system clock and the reference clock;
根据所述时间误差确定同步调节的调节方向;determining the adjustment direction of the synchronous adjustment according to the time error;
根据所述调节方向和预设调节量对所述系统时钟进行多次调节,以使得所述时间误差为零。The system clock is adjusted multiple times according to the adjustment direction and the preset adjustment amount, so that the time error is zero.
相应的,本发明实施例还提供一种时钟调节装置,包括:Correspondingly, an embodiment of the present invention also provides a clock adjustment device, including:
获取单元,用于在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差;The acquisition unit is used to acquire the time error between the system clock and the reference clock when the multimedia data is played;
方向确定单元,用于根据所述时间误差确定同步调节的调节方向;a direction determination unit, configured to determine the adjustment direction of the synchronous adjustment according to the time error;
调节单元,用于根据所述调节方向和预设调节量对所述系统时钟进行多次调节,以使得所述时间误差为零。The adjustment unit is configured to adjust the system clock multiple times according to the adjustment direction and the preset adjustment amount, so that the time error is zero.
相应的,本发明实施例还提供一种终端,包括:Correspondingly, the embodiment of the present invention also provides a terminal, including:
存储有可执行程序代码的存储器;a memory storing executable program code;
与所述存储器耦合的处理器;a processor coupled to the memory;
所述处理器调用所述存储器中存储的所述可执行程序代码,执行本发明实施例提供的任一时钟调节方法。The processor invokes the executable program code stored in the memory to execute any clock adjustment method provided by the embodiments of the present invention.
相应的,本发明实施例还提供了一种多媒体同步播放系统,包括:控制设备和至少一个播放设备;所述控制设备与所述播放设备连接;所述播放设备用于执行本发明实施例提供的任一时钟调节方法。Correspondingly, an embodiment of the present invention also provides a multimedia synchronous playback system, including: a control device and at least one playback device; the control device is connected to the playback device; Either clock adjustment method.
本发明实施例采用在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差,然后,根据该时间误差确定同步调节的调节方向,根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。该方案可以多媒体播放过程中对系统时钟进行多次调节,以使得与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。In the embodiment of the present invention, when playing multimedia data, the time error between the system clock and the reference clock is obtained, and then the adjustment direction of the synchronous adjustment is determined according to the time error, and the system clock is adjusted according to the adjustment direction and the preset adjustment amount. Adjust multiple times to make the time error zero. This solution can adjust the system clock multiple times during the multimedia playback process, so as to synchronize with the reference clock, and then achieve the effect of multiple playback devices playing multimedia synchronously. Synchronization of multimedia.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to these drawings without creative work.
图1是本发明实施例一提供的时钟调节方法的流程示意图。FIG. 1 is a schematic flowchart of a clock adjustment method provided by Embodiment 1 of the present invention.
图2是本发明实施例二提供的时钟调节方法的流程示意图。FIG. 2 is a schematic flowchart of a clock adjustment method provided by Embodiment 2 of the present invention.
图3是本发明实施例三提供的第一种时钟调节装置的结构示意图。FIG. 3 is a schematic structural diagram of a first clock adjusting device provided in Embodiment 3 of the present invention.
图4是本发明实施例三提供的第二种时钟调节装置的结构示意图。FIG. 4 is a schematic structural diagram of a second clock adjustment device provided by Embodiment 3 of the present invention.
图5是本发明实施例三提供的第三种时钟调节装置的结构示意图。FIG. 5 is a schematic structural diagram of a third clock adjustment device provided by Embodiment 3 of the present invention.
图6是本发明实施例三提供的第三种时钟调节装置的结构示意图。FIG. 6 is a schematic structural diagram of a third clock adjustment device provided by Embodiment 3 of the present invention.
图7是本发明实施例四提供的多媒体同步播放系统的场景示意图。FIG. 7 is a schematic diagram of a scene of a multimedia synchronous playback system provided by Embodiment 4 of the present invention.
图8是本发明实施例五提供的终端的结构示意图。FIG. 8 is a schematic structural diagram of a terminal provided in Embodiment 5 of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.
本发明的说明书和权利要求书以及上述附图中的术语“第一”、“第二”、“第三”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应当理解,这样描述的对象在适当情况下可以互换。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含。例如,包含了一系列步骤的过程、方法或包含了一系列模块或单元的装置、终端、系统不必限于清楚地列出的那些步骤或模块或单元,还可以包括没有清楚地列出的步骤或模块或单元,也可以包括对于这些过程、方法、装置、终端或系统固有的其它步骤或模块或单元。The terms "first", "second", "third", etc. (if any) in the description and claims of the present invention and the above drawings are used to distinguish similar objects and not necessarily to describe a specific order or sequentially. It should be understood that the items so described are interchangeable under appropriate circumstances. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, a method comprising a series of steps, or a device, a terminal, a system comprising a series of modules or units are not necessarily limited to those steps or modules or units clearly listed, and may also include steps or units not clearly listed. A module or unit may also include other steps or modules or units inherent to these processes, methods, apparatuses, terminals or systems.
本发明实施例提供一种时钟调节方法、装置、终端及多媒体同步播放系统,以下将分别进行详细说明。Embodiments of the present invention provide a clock adjustment method, device, terminal, and multimedia synchronous playback system, which will be described in detail below.
实施例一Embodiment one
本实施例将从时钟调节装置的角度进行描述该时钟调节装置具体可以集成播放设备中,该播放设备可以为终端(智能手机、平板电脑等)、音箱等播放设备。This embodiment will be described from the perspective of the clock adjustment device. The clock adjustment device may be integrated into a playback device, which may be a playback device such as a terminal (smart phone, tablet computer, etc.), speaker, or the like.
一种时钟调节方法,包括:在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差,然后,根据该时间误差确定同步调节的调节方向,根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。A clock adjustment method, comprising: when playing multimedia data, obtaining a time error between a system clock and a reference clock, then determining an adjustment direction for synchronous adjustment according to the time error, and determining the adjustment direction for synchronous adjustment according to the adjustment direction and a preset adjustment amount. The system clock is adjusted several times so that this time error is zero.
如图1所示,该时钟调节方法,具体流程可以包括:As shown in Figure 1, the specific process of the clock adjustment method may include:
101、在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差。101. When playing multimedia data, acquire a time error between a system clock and a reference clock.
其中,该多媒体数据可以为音频数据、音视频数据等等。该音频数据包括但不限于CD、WAV、MP3(Moving Picture Experts Group Audio Layer III)、WMA(Windows MediaAudio)等格式的音频数据。Wherein, the multimedia data may be audio data, audio and video data, and so on. The audio data includes but not limited to CD, WAV, MP3 (Moving Picture Experts Group Audio Layer III), WMA (Windows Media Audio) and other formats.
该参考时钟可以为参考设备的系统时钟,该参考设备为同步播放的参考设备,比如,其可以为控制设备或者播放设备。在实际应用中,可以根据实际需求从播放设备中选取一个设备作为参考设备。The reference clock may be a system clock of a reference device, and the reference device is a reference device for synchronous playback, for example, it may be a control device or a playback device. In practical applications, a device may be selected from the playback devices as a reference device according to actual needs.
具体地,步骤“获取系统时钟与参考时钟之间的时间误差”可以包括:Specifically, the step "obtaining the time error between the system clock and the reference clock" may include:
获取参考设备当前的第一系统时间;Obtain the current first system time of the reference device;
获取自身当前的第二系统时间;Obtain the current second system time of itself;
根据第二系统时间和第一系统时间,获取系统时钟与参考时钟之间的时间误差。Acquire the time error between the system clock and the reference clock according to the second system time and the first system time.
比如,可以计算第二系统时间与第一系统时间之间的时间差值,该时间差值即为系统时钟与参考时钟之间的时间误差;该第二系统时间与第一系统时间之间的时间差值指的是将第二系统时间减去第一系统时间得到的时间差值。For example, the time difference between the second system time and the first system time can be calculated, and the time difference is the time error between the system clock and the reference clock; the time difference between the second system time and the first system time The time difference refers to a time difference obtained by subtracting the second system time from the first system time.
在其他实施方式中,也可获取第一系统时间与第二系统时间的时间差值,即将第一系统时间减去第二系统时间得到的时间差值。In other implementation manners, a time difference between the first system time and the second system time may also be obtained, that is, a time difference obtained by subtracting the second system time from the first system time.
其中,获取参考设备当前的系统时间的方式可以有多种,比如,可以请求参考设备发送其当前的系统时间,也可以是参考设备主动推送。Among them, there are many ways to obtain the current system time of the reference device. For example, the reference device may be requested to send its current system time, or the reference device may actively push it.
102、根据该时间误差确定同步调节的调节方向。102. Determine the adjustment direction of the synchronous adjustment according to the time error.
其中,调节方向可以包括正方向或者负方向,该正方向调节是加快系统时钟,负方向调节是减慢系统时钟。也可以是:负方向调节是加快系统时钟,正方向调节是减慢系统时钟;具体地可以根据实际需求设定。Wherein, the adjustment direction may include a positive direction or a negative direction, the positive direction adjustment is to speed up the system clock, and the negative direction adjustment is to slow down the system clock. It can also be: the adjustment in the negative direction is to speed up the system clock, and the adjustment in the positive direction is to slow down the system clock; specifically, it can be set according to actual needs.
具体地,在时间误差是自身当前时间与参考设备当前时间的时间差值,正方向调节是加快系统时钟,负方向调节是减慢系统时钟的情况下,若时间误差大于零,确定同步调节的调节方向为负方向,即需要减慢自身的系统时钟;若时间误差小于零,确定调节方向为正方向,即需要加快自身的系统时钟。Specifically, when the time error is the time difference between the current time of itself and the current time of the reference device, the adjustment in the positive direction is to speed up the system clock, and the adjustment in the negative direction is to slow down the system clock, if the time error is greater than zero, determine the synchronization adjustment If the adjustment direction is negative, it needs to slow down its own system clock; if the time error is less than zero, it is determined that the adjustment direction is positive, that is, it needs to speed up its own system clock.
可选地,本实施例时钟调节方法,在获取时间误差之后,还可以根据该时间误差确定同步调节的总调节量,该总调节量可以为总步长。Optionally, in the clock adjustment method of this embodiment, after the time error is obtained, the total adjustment amount of the synchronous adjustment may be determined according to the time error, and the total adjustment amount may be the total step size.
其中,该总调节量为时间误差的绝对值,比如,时间误差为20ms时,总调节量为20ms,时间误差为-30ms时,总调节量为30ms。Wherein, the total adjustment amount is the absolute value of the time error, for example, when the time error is 20ms, the total adjustment amount is 20ms, and when the time error is -30ms, the total adjustment amount is 30ms.
103、根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。103. Adjust the system clock multiple times according to the adjustment direction and the preset adjustment amount, so that the time error is zero.
具体地,可以根据总调节量、调节方向和预设调节量对系统时钟进行多次调节。Specifically, the system clock can be adjusted multiple times according to the total adjustment amount, the adjustment direction, and the preset adjustment amount.
其中,预设调节量可以预设步调节长,其可以根据实际需求设定,比如,可以为10ms、20ms、1s等等。Wherein, the preset adjustment amount can be adjusted in preset steps, which can be set according to actual needs, for example, it can be 10ms, 20ms, 1s and so on.
本实施例中,可以以预设调节量和调节方向进行多次调节,使得总调节量为零,进而使得系统时钟与参考时钟之间的时间误差为零,达到时钟同步。具体地,步骤“以根据总调节量、调节方向和预设调节量对系统时钟进行多次调节,以使得该时间误差为零”可以包括:In this embodiment, multiple adjustments can be made with the preset adjustment amount and adjustment direction, so that the total adjustment amount is zero, and then the time error between the system clock and the reference clock is zero, achieving clock synchronization. Specifically, the step of "adjusting the system clock multiple times according to the total adjustment amount, the adjustment direction, and the preset adjustment amount, so that the time error is zero" may include:
根据该调节方向和预设调节量对该系统时钟进行调节;Adjust the system clock according to the adjustment direction and the preset adjustment amount;
根据该预设调节量更新该总调节量,得到更新后总调节量;updating the total adjustment amount according to the preset adjustment amount to obtain the updated total adjustment amount;
判断更新后总调节量是否小于预设调节量;Judging whether the total adjustment amount after the update is less than the preset adjustment amount;
若不小于预设调节量,则在预设时间段之后,返回执行根据该调节方向和预设调节量对该系统时钟进行调节的步骤。If not less than the preset adjustment amount, return to the step of adjusting the system clock according to the adjustment direction and the preset adjustment amount after the preset time period.
其中预设时间段可以根据实际需求预先设定,比如,可以给1s、5s、7s等等。也即本实施例方法每个该预设时间段根据该调节方向和预设调节量对该系统时钟进行调节。比如,在判断更新后总调节量不预设调节量之后,可以开始计时,当计时值达到预设时长时,则继续对系统时钟进行调节。The preset time period can be preset according to actual needs, for example, 1s, 5s, 7s, etc. can be given. That is, the method of this embodiment adjusts the system clock according to the adjustment direction and the preset adjustment amount every preset time period. For example, after it is judged that the total adjustment amount after the update is not the preset adjustment amount, timing may be started, and when the timing value reaches the preset duration, the system clock is continued to be adjusted.
其中,步骤“根据调节方向和预设调节量对系统时钟进行调节”可以包括:按照调节方向将系统时钟调节一个预设调节量。如使系统时钟加快一个预设调节步长,如加快10ms等。Wherein, the step of "adjusting the system clock according to the adjustment direction and the preset adjustment amount" may include: adjusting the system clock by a preset adjustment amount according to the adjustment direction. For example, speed up the system clock by a preset adjustment step, such as speeding up by 10ms.
比如,时间误差为15ms(此时总步长为15ms),预设调节步长为5ms时,可以先按照调节方向调节一个预设调节步长5ms,然后,更新总步长,即将总步长减去5ms,此时总步长为10ms,如此再经过三次调节后,即可将总步长调节为0。For example, when the time error is 15ms (the total step size is 15ms at this time), and the preset adjustment step size is 5ms, you can first adjust a preset adjustment step size of 5ms according to the adjustment direction, and then update the total step size, that is, the total step size Subtract 5ms, and the total step size is 10ms at this time, so after three adjustments, the total step size can be adjusted to 0.
考虑到在实际应用中总调节量有可能不一定是预设调节量的整数陪,如总步长为7ms,预设调节步长为2ms;因此,在对系统时钟调节后系统时钟可能与参考时钟不同步,同步调节的精确性较差;为了克服该问题,本实施例在每次对系统时钟调节之后,判断更新后总调节量是否小于预设调节量,若不小于,则按照预设调节量对系统时钟进行调整,若小于,则需要重新确定调节量,然后,根据重新确定的调节量对系统时钟进行调节。也即步骤“根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零”还可以包括:Considering that the total adjustment amount may not necessarily be the integer accompaniment of the preset adjustment amount in practical applications, for example, the total step size is 7ms, and the preset adjustment step size is 2ms; therefore, the system clock may be different from the reference The clocks are not synchronized, and the accuracy of synchronous adjustment is poor; in order to overcome this problem, this embodiment judges whether the total adjustment amount after the update is less than the preset adjustment amount after each adjustment of the system clock, and if not, then follow the preset adjustment amount. The adjustment amount adjusts the system clock. If it is less than the adjustment amount, the adjustment amount needs to be re-determined, and then the system clock is adjusted according to the re-determined adjustment amount. That is, the step "adjust the system clock multiple times according to the adjustment direction and the preset adjustment amount, so that the time error is zero" may also include:
当更新后总调节量小于预设调节量时,根据该更新后总调节量获取目标调节量;When the updated total adjustment amount is less than the preset adjustment amount, the target adjustment amount is obtained according to the updated total adjustment amount;
根据该目标调节量和该调节方向对当前系统时钟进行调节。The current system clock is adjusted according to the target adjustment amount and the adjustment direction.
比如,总步长为7ms,预设调节步长为2ms时,在经过三次调节之后,总步长变为1ms,其小于预设调节步长为2ms,此时,可以根据总步长1ms确定调节量为1ms,之后按照调节量为1ms对系统时钟调节,即可使得总步长为0,进而系统时钟之间的时间误差为0,达到时钟同步。For example, when the total step size is 7ms and the preset adjustment step size is 2ms, after three adjustments, the total step size becomes 1ms, which is smaller than the preset adjustment step size of 2ms. At this time, it can be determined according to the total step size of 1ms The adjustment amount is 1ms, and then the system clock is adjusted according to the adjustment amount of 1ms, so that the total step size is 0, and the time error between the system clocks is 0, achieving clock synchronization.
可选地,为节省系统资源以及时钟调节的准确性,在得到更新后总调节量之后,判断更新后总调节量是否小于预设调节量之前,本实施例方法可以包括:Optionally, in order to save system resources and the accuracy of clock adjustment, after obtaining the updated total adjustment amount and before judging whether the updated total adjustment amount is less than the preset adjustment amount, the method in this embodiment may include:
判断更新后总调节量是否为零;Determine whether the total adjustment amount is zero after the update;
若否,则执行判断更新后总调节量是否小于预设调节量的步骤;If not, then execute the step of judging whether the updated total adjustment amount is less than the preset adjustment amount;
若是,则结束流程。If so, end the process.
可选地,为了节省资源,可以在总调节量不为零启动多次调节机制对系统时钟进行调节,在不为零时不启动多次调节机制对系统时钟进行调节;也即本实施例调节方法在确定同步调节的总调节量之后,根据该调节方向和预设调节量对该系统时钟进行多次调节之前,还可以包括:Optionally, in order to save resources, multiple adjustment mechanisms can be activated to adjust the system clock when the total adjustment amount is not zero, and multiple adjustment mechanisms can be activated to adjust the system clock when the total adjustment amount is not zero; that is, this embodiment adjusts After determining the total adjustment amount of synchronous adjustment, the method may further include:
判断该总调节量是否为零;若否,则启动多次调节机制;Determine whether the total adjustment amount is zero; if not, start multiple adjustment mechanisms;
此时,步骤“根据该调节方向、该总调节量和预设调节量对该系统时钟进行多次调节”可以包括:在多次调节机制启动的情况下,根据该调节方向、该总调节量和预设调节量对该系统时钟进行多次调节。At this time, the step of "adjusting the system clock multiple times according to the adjustment direction, the total adjustment amount, and the preset adjustment amount" may include: when the adjustment mechanism is started multiple times, according to the adjustment direction, the total adjustment amount The system clock is adjusted multiple times with the preset adjustment amount.
可选地,考虑到如果之前已启动多次调节机制,且总调节量较大即历史总调节量较大,当前获取系统时钟与参考时钟之间的时间误差时还未调节完毕,那么此时,可以根据当前获取的时间误差来更新多次调节机制当前对应的调节方向和总调节量,之后可以根据新的调节方向和总调节量对系统时钟进行多次调节。也即在判断该总调节量不为零,启动多次调节机制之前,该时钟调节方法还包括:Optionally, considering that if the adjustment mechanism has been started multiple times before, and the total adjustment amount is relatively large, that is, the historical total adjustment amount is relatively large, and the time error between the system clock and the reference clock has not been adjusted when the time error between the system clock and the reference clock is currently obtained, then at this time , the current adjustment direction and total adjustment amount corresponding to the multiple adjustment mechanism can be updated according to the currently acquired time error, and then the system clock can be adjusted multiple times according to the new adjustment direction and total adjustment amount. That is, before judging that the total adjustment amount is not zero and starting multiple adjustment mechanisms, the clock adjustment method also includes:
判断多次调节机制当前是否启动;Determine whether the multiple adjustment mechanism is currently activated;
若未启动,则执行启动多次调节机制的步骤;If it is not started, perform the steps of starting the adjustment mechanism multiple times;
若启动,则根据该总调节量和该调节方向分别更新多次调节机制当前对应的总调节量和调节方向。If activated, the current total adjustment amount and adjustment direction corresponding to the multi-time adjustment mechanism are respectively updated according to the total adjustment amount and the adjustment direction.
例如,本次获取系统时钟之间的时间误差时,已经启动多次调节机制,并根据调节方向(如负方向)、总调节量(如10ms)以及预设调节量(如2ms)对系统时钟进行多次调节;此时,如果,时钟误差获取的周期为5ms,时钟调节的周期为2ms,那么下一次获取系统时钟之间的时间误差时就会对系统时钟调节两次,该总调节量由10ms变为6ms。若下一次获取的时钟误差为-5ms(可以得到调节方向为正方向,总调节量为5ms),那么可以根据下一次获取的时钟误差更新之前的总调节量和调节方向;具体地,将之前的总调节量由6ms变为5m,调节方向由负方向变为正方向。For example, when obtaining the time error between system clocks this time, the adjustment mechanism has been activated multiple times, and the system clock is adjusted according to the adjustment direction (such as negative direction), the total adjustment amount (such as 10ms) and the preset adjustment amount (such as 2ms). Perform multiple adjustments; at this time, if the clock error acquisition period is 5ms and the clock adjustment period is 2ms, then the system clock will be adjusted twice when the time error between the system clocks is obtained next time, the total adjustment amount From 10ms to 6ms. If the clock error acquired next time is -5ms (it can be obtained that the adjustment direction is positive and the total adjustment amount is 5ms), then the previous total adjustment amount and adjustment direction can be updated according to the next acquired clock error; specifically, the previous The total adjustment amount of the system changes from 6ms to 5m, and the adjustment direction changes from the negative direction to the positive direction.
由上可知,本发明实施例采用在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差,然后,根据该时间误差确定同步调节的调节方向,根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。该方案可以多媒体播放过程中对系统时钟进行多次调节,以使得与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。As can be seen from the above, the embodiment of the present invention adopts the method of obtaining the time error between the system clock and the reference clock when playing multimedia data, and then determining the adjustment direction of the synchronous adjustment according to the time error, and according to the adjustment direction and the preset adjustment amount. The system clock is adjusted multiple times so that the time error is zero. This solution can adjust the system clock multiple times during the multimedia playback process, so as to synchronize with the reference clock, and then achieve the effect of multiple playback devices playing multimedia synchronously. Synchronization of multimedia.
由于本发明实施例采用多次调节的方式将系统时钟调整至与参考时钟同步,避免一次性将系统时钟调整至与参考时钟同步导致多媒体输出的品质较低的问题,提高了多媒体输出的品质;并且采用多次调节的方式还可以减轻播放输出模块对于调节的运算压力。Since the embodiment of the present invention adjusts the system clock to be synchronized with the reference clock by means of multiple adjustments, the problem of lower quality of multimedia output caused by one-time adjustment of the system clock to be synchronized with the reference clock is avoided, and the quality of multimedia output is improved; In addition, the multi-time adjustment method can also reduce the calculation pressure of the playback output module for adjustment.
此外,本发明实施例采用多次调节的方式可以便于在调节过程中发现错误调节,并且可以及时地更正,提高了时钟调节的准确性。In addition, the embodiment of the present invention adopts the method of multiple adjustments, which can facilitate the discovery of wrong adjustments during the adjustment process, and can correct them in time, thereby improving the accuracy of clock adjustments.
实施例二Embodiment two
根据实施例一所描述的时钟调节方法,以下将举例作进一步详细说明。According to the clock adjustment method described in Embodiment 1, an example will be given below for further detailed description.
在本实施例中,将以实施例一所描述的时钟调节装置集成在播放设备为例进行详细描述。In this embodiment, a detailed description will be made by taking the integration of the clock adjusting device described in Embodiment 1 into a playback device as an example.
如图2所示,一种时钟调节方法,具体流程如下:As shown in Figure 2, a clock adjustment method, the specific process is as follows:
201、播放设备在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差。201. When playing multimedia data, the playback device acquires a time error between a system clock and a reference clock.
其中,该多媒体数据可以为音频数据、音视频数据等等。该音频数据的格式有多种,比如,MP3格式、WMA格式等等。Wherein, the multimedia data may be audio data, audio and video data, and so on. There are many formats of the audio data, for example, MP3 format, WMA format and so on.
具体地,播放设备获取参考设备当前的第一系统时间以及自身当前的第二系统时间,然后,根据第二系统时间和第一系统时间,获取系统时钟与参考时钟之间的时间误差。比如,第一系统时间为1:06,第二系统时间为1:00,此时可以获取时间误差为-6s。Specifically, the playback device obtains the current first system time of the reference device and its own current second system time, and then obtains the time error between the system clock and the reference clock according to the second system time and the first system time. For example, the first system time is 1:06, and the second system time is 1:00. At this time, the time error can be obtained as -6s.
202、播放设备根据时间误差确定同步调节的调节方向和总调节量。202. The playback device determines the adjustment direction and the total adjustment amount of the synchronous adjustment according to the time error.
其中,调节方向可以包括正方向或者负方向,该正方向调节是加快系统时钟,负方向调节是减慢系统时钟。其中,该总调节量为时间误差的绝对值。Wherein, the adjustment direction may include a positive direction or a negative direction, the positive direction adjustment is to speed up the system clock, and the negative direction adjustment is to slow down the system clock. Wherein, the total adjustment amount is the absolute value of the time error.
若时间误差大于零时,确定同步调节的调节方向为负方向,即需要减慢自身的系统时钟;若时间误差小于零,确定调节方向为正方向,即需要加快自身的系统时钟。比如,时间误差为-6s时,可以确定调节方向为正方向,总调节量为6s。If the time error is greater than zero, it is determined that the adjustment direction of the synchronous adjustment is the negative direction, that is, the own system clock needs to be slowed down; if the time error is less than zero, the adjustment direction is determined to be the positive direction, that is, the own system clock needs to be accelerated. For example, when the time error is -6s, it can be determined that the adjustment direction is positive, and the total adjustment amount is 6s.
203、播放设备判断总调节量是否为零,若否,则执行步骤204,若是,则执行步骤210。203. The playback device judges whether the total adjustment amount is zero, if not, execute step 204, and if yes, execute step 210.
具体地,在播放设备判断总调节量不为零时,可以开启多次调节机制,即微调机制,然后,播放设备可以按照以下步骤(步骤204-步骤209)对系统时钟进行调节,以使的时间误差为零,达到时钟同步。Specifically, when the playback device judges that the total adjustment amount is not zero, it can start multiple adjustment mechanisms, that is, the fine-tuning mechanism, and then the playback device can adjust the system clock according to the following steps (step 204-step 209), so that The time error is zero and clock synchronization is achieved.
可选地,播放设备在判断总调节量不为零,启动多次调节机制之前,还可以包括:判断多次调节机制当前是否启动;若未启动,则执行启动多次调节机制的步骤;若启动,则根据该总调节量和该调节方向分别更新多次调节机制当前对应的总调节量和调节方向。Optionally, before the playback device judges that the total adjustment amount is not zero and activates the multiple adjustment mechanisms, it may also include: judging whether the multiple adjustment mechanisms are currently activated; start, then update the current total adjustment amount and adjustment direction corresponding to the multiple adjustment mechanism respectively according to the total adjustment amount and the adjustment direction.
播放设备之后可以根据多次调节机制当前对应的总调节量和调节方向对系统时钟进行多次调节,多次调节的过程参考步骤204-步骤209。The playback device can then adjust the system clock multiple times according to the current total adjustment amount and adjustment direction corresponding to the multiple adjustment mechanism. For the multiple adjustment process, refer to step 204-step 209.
204、播放设备根据该调节方向和预设调节量对该系统时钟进行调节。204. The playback device adjusts the system clock according to the adjustment direction and the preset adjustment amount.
播放设备按照调节方向将系统时钟调节一个预设调节量。如使系统时钟加快一个预设调节步长,如加快10ms等。The playback device adjusts the system clock by a preset adjustment amount according to the adjustment direction. For example, speed up the system clock by a preset adjustment step, such as speeding up by 10ms.
比如,总步长为6ms,预设调节步长为2ms、调节方向为正方向时,可以按照正方向对系统时钟加快2ms。For example, when the total step size is 6ms, the preset adjustment step size is 2ms, and the adjustment direction is positive, the system clock can be accelerated by 2ms in the positive direction.
205、播放设备根据该预设调节量更新该总调节量,得到更新后总调节量。205. The playback device updates the total adjustment amount according to the preset adjustment amount to obtain the updated total adjustment amount.
具体地,更新过程包括:将总调节量减去预设调节量,得到更新后总调节量;如总步长为6ms,预设调节步长为2ms;更新后总步长为4ms。Specifically, the update process includes: subtracting the preset adjustment amount from the total adjustment amount to obtain the updated total adjustment amount; if the total step size is 6 ms, the preset adjustment step size is 2 ms; the updated total step size is 4 ms.
206、播放设备判断更新后总调节量是否为零,若是,则结束流程,若否,则执行步骤207。206. The playback device judges whether the total adjustment amount after the update is zero, if yes, end the process, if not, execute step 207.
207、播放设备判断更新后总调节量是否小于预设调节量,若否,则执行步骤208,若是,则执行步骤209。207. The playback device judges whether the updated total adjustment amount is smaller than the preset adjustment amount, if not, execute step 208, and if yes, execute step 209.
比如,更新后总步长为4ms,此时大于预设调节步长2ms,可以执行步骤204。For example, if the total step size after updating is 4ms, which is greater than the preset adjustment step size of 2ms, step 204 can be executed.
又比如,当更新后总步长为3m,预设调节步长为4ms时,此时更新后总步长小于预设调节步长,执行步骤209。For another example, when the updated total step size is 3 m and the preset adjustment step size is 4 ms, and the updated total step size is smaller than the preset adjustment step size, step 209 is executed.
208、按照第一预设时长进行等待,并等待到第一预设时长之后,返回执行步骤204。208. Wait according to the first preset time length, and after waiting for the first preset time length, return to step 204.
比附,播放设备开始等待并计时,当计时时长达到第一预设时长时,返回执行步骤204。In addition, the playback device starts to wait and count, and when the counting time reaches the first preset time, the execution returns to step 204 .
其中,第一预设时长可以根据实际需求设定,比如,可以为1s、2s、5ms、100ms等等。Wherein, the first preset duration can be set according to actual needs, for example, it can be 1s, 2s, 5ms, 100ms and so on.
209、播放设备根据该更新后总调节量获取目标调节量,并根据该目标调节量和该调节方向对当前系统时钟进行调节,以使得当前总调节量为零。209. The playback device acquires a target adjustment amount according to the updated total adjustment amount, and adjusts the current system clock according to the target adjustment amount and the adjustment direction, so that the current total adjustment amount is zero.
比如,当更新后总步长为3m,预设调节步长为4ms时,可以重新确定调节量,此时可以确定为1ms,然后,根据之前调节方向以及重新确定的调节量对系统时钟进行调节,使得当前总调节量为零。For example, when the total step length after the update is 3m and the preset adjustment step length is 4ms, the adjustment amount can be re-determined, at this time it can be determined as 1ms, and then the system clock is adjusted according to the previous adjustment direction and the re-determined adjustment amount , so that the current total adjustment amount is zero.
本实施例中,根据该目标调节量和该调节方向对当前系统时钟进行一次或者多次调节,使得当前总调节量为零。多次调节的过程可以包括:In this embodiment, the current system clock is adjusted one or more times according to the target adjustment amount and the adjustment direction, so that the current total adjustment amount is zero. The process of multiple adjustments can include:
根据该调节方向和目标调节量对该系统时钟进行调节;Adjust the system clock according to the adjustment direction and the target adjustment amount;
根据该目标调节量更新当前总调节量,得到更新后总调节量;Update the current total adjustment amount according to the target adjustment amount to obtain the updated total adjustment amount;
判断更新后总调节量是否为零;若是,则流程结束,若否,则返回执行步骤“根据该调节方向和目标调节量对该系统时钟进行调节”。Determine whether the total adjustment amount after the update is zero; if yes, the process ends; if not, return to the execution step "adjust the system clock according to the adjustment direction and the target adjustment amount".
210、播放设备按照第二预设时长进行等待,并在等待第二预设时长之后,返回执行步骤201。210. The playback device waits according to the second preset duration, and returns to step 201 after waiting for the second preset duration.
比如,播放设备开始等待并计时,当计时时长达到第二预设时长时,返回执行步骤201。For example, the playback device starts to wait and count, and when the counted time reaches the second preset time, the execution returns to step 201 .
其中,第二预设时长可以根据实际需求设定,比如,可以为3s、2s、5ms、100ms等等。Wherein, the second preset duration can be set according to actual needs, for example, it can be 3s, 2s, 5ms, 100ms and so on.
由上可知,本发明实施例采用播放设备在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差,然后,根据该时间误差确定同步调节的调节方向,根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。该方案可以多媒体播放过程中对系统时钟进行多次调节,以使得与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。As can be seen from the above, the embodiment of the present invention adopts the playback device to obtain the time error between the system clock and the reference clock when playing multimedia data, and then determine the adjustment direction of the synchronous adjustment according to the time error, and then adjust according to the adjustment direction and the preset adjustment The system clock is adjusted several times so that the time error is zero. This solution can adjust the system clock multiple times during the multimedia playback process, so as to synchronize with the reference clock, and then achieve the effect of multiple playback devices playing multimedia synchronously. Synchronization of multimedia.
由于本发明实施例播放设备采用多次调节的方式将系统时钟调整至与参考时钟同步,避免一次性将系统时钟调整至与参考时钟同步导致多媒体输出的品质较低的问题,提高了多媒体输出的品质;并且采用多次调节的方式还可以减轻播放输出模块对于调节的运算压力。Since the playback device in the embodiment of the present invention adjusts the system clock to be synchronized with the reference clock by means of multiple adjustments, the problem of low quality of multimedia output caused by adjusting the system clock to be synchronized with the reference clock at one time is avoided, and the quality of multimedia output is improved. Quality; and adopting multiple adjustments can also reduce the calculation pressure of the playback output module for adjustments.
此外,本发明实施例播放设备采用多次调节的方式可以便于在调节过程中发现错误调节,并且可以及时地更正,提高了时钟调节的准确性。In addition, the playback device in the embodiment of the present invention adopts multiple adjustments, which can facilitate the discovery of wrong adjustments during the adjustment process, and can correct them in time, thereby improving the accuracy of clock adjustments.
实施例三Embodiment Three
为了更好地实施以上方法,本发明实施例还提供一种时钟调节装置,该时钟调节装置可以集成在播放设备中,该播放设备可以是智能手机、平板电脑、音箱等设备。In order to better implement the above method, an embodiment of the present invention also provides a clock adjustment device, which can be integrated into a playback device, and the playback device can be a smart phone, a tablet computer, a speaker, and the like.
如图3所示,时钟调节装置300可以包括:获取单元301、方向确定单元302以及调节单元303,如下:As shown in FIG. 3, the clock adjustment device 300 may include: an acquisition unit 301, a direction determination unit 302, and an adjustment unit 303, as follows:
获取单元301,用于在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差;An acquisition unit 301, configured to acquire the time error between the system clock and the reference clock when playing multimedia data;
方向确定单元302,用于根据该时间误差确定同步调节的调节方向;a direction determining unit 302, configured to determine the adjustment direction of the synchronous adjustment according to the time error;
调节单元303,用于根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。The adjustment unit 303 is configured to adjust the system clock multiple times according to the adjustment direction and the preset adjustment amount, so that the time error is zero.
可选地,参考图4,本实施例时钟调节装置300还可以包括:调节量确定单元304;Optionally, referring to FIG. 4 , the clock adjustment device 300 in this embodiment may further include: an adjustment amount determination unit 304;
该调节量确定单304,用于在获取单元301获取时间误差之后,调节单元303对该系统时钟进行多次调节之前,根据该时间误差确定同步调节的总调节量;The adjustment amount determination unit 304 is used to determine the total adjustment amount of synchronous adjustment according to the time error after the acquisition unit 301 acquires the time error and before the adjustment unit 303 adjusts the system clock multiple times;
该调节单元303,具体用于根据该调节方向、该总调节量和预设调节量对该系统时钟进行多次调节。The adjustment unit 303 is specifically configured to adjust the system clock multiple times according to the adjustment direction, the total adjustment amount and the preset adjustment amount.
其中,本实施例调节单元303,参考图5,具体包括:Wherein, the adjustment unit 303 of this embodiment, referring to FIG. 5 , specifically includes:
第一调节子单元3031,用于根据该调节方向和预设调节量对该系统时钟进行调节;The first adjustment subunit 3031 is configured to adjust the system clock according to the adjustment direction and the preset adjustment amount;
更新子单元3032,用于根据该预设调节量更新该总调节量,得到更新后总调节量;An update subunit 3032, configured to update the total adjustment amount according to the preset adjustment amount to obtain the updated total adjustment amount;
判断子单元3033,用于判断更新后总调节量是否小于预设调节量;若不小于预设调节量,则在预设时间段之后,触发第一调节子单元3031执行根据该调节方向和预设调节量对该系统时钟进行调节的步骤;The judging subunit 3033 is used to judge whether the updated total adjustment amount is less than the preset adjustment amount; if it is not less than the preset adjustment amount, after a preset time period, trigger the first adjustment subunit 3031 to execute according to the adjustment direction and the preset adjustment amount. Steps for adjusting the system clock by setting the adjustment amount;
获取子单元3034,用于当该判断子单元3033判断更新后总调节量小于预设调节量时,根据该更新后总调节量获取目标调节量;The acquisition subunit 3034 is used to obtain the target adjustment amount according to the updated total adjustment amount when the judgment subunit 3033 judges that the updated total adjustment amount is less than the preset adjustment amount;
第二调节子单元3035,用于根据该目标调节量和该调节方向对当前系统时钟进行调节。The second adjustment subunit 3035 is configured to adjust the current system clock according to the target adjustment amount and the adjustment direction.
可选地,参考图6,本实施例的时钟调节装置300还可以包括:调节量判断单元Optionally, referring to FIG. 6 , the clock adjustment device 300 of this embodiment may further include: an adjustment amount judging unit
调节量判断单元305,用于在更新子单元得到更新后总调节量之后,该判断子单元判断更新后总调节量是否小于预设调节量之前,判断更新后总调节量是否为零;The adjustment amount judging unit 305 is used to determine whether the updated total adjustment amount is zero after the update subunit obtains the updated total adjustment amount, before the judgment subunit judges whether the updated total adjustment amount is less than the preset adjustment amount;
该判断子单元3033,用于在调节量判断单元305判断更新后总调节量不为零时,判断更新后总调节量是否小于预设调节量。The judgment subunit 3033 is used for judging whether the updated total adjustment amount is smaller than the preset adjustment amount when the adjustment amount judgment unit 305 judges that the updated total adjustment amount is not zero.
可选地,本实施例时钟调节装置300还可以包括:总量判断单元;Optionally, the clock adjusting device 300 in this embodiment may further include: a total amount judging unit;
该总量判断单元,用于在调节量确定单元304确定同步调节的总调节量之后,该调节单元303根据该调节方向、该总调节量和预设调节量对该系统时钟进行多次调节之前,判断该总调节量是否为零;The total amount judging unit is used for adjusting the system clock multiple times before the adjustment unit 303 adjusts the system clock according to the adjustment direction, the total adjustment amount and the preset adjustment amount after the adjustment amount determination unit 304 determines the total adjustment amount of synchronous adjustment , to determine whether the total adjustment amount is zero;
此时,调节单元303可以具体用于:在总量判断单元判断该总调节量不为零时,根据该调节方向、该总调节量和预设调节量对该系统时钟进行多次调节。At this time, the adjustment unit 303 can be specifically configured to: when the total amount judging unit judges that the total adjustment amount is not zero, adjust the system clock multiple times according to the adjustment direction, the total adjustment amount and the preset adjustment amount.
具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。During specific implementation, each of the above units may be implemented as an independent entity, or may be combined arbitrarily as the same or several entities. The specific implementation of each of the above units may refer to the previous method embodiments, and will not be repeated here.
由上可知,本发明实施例采用获取单元301在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差,然后,由方向确定单元302根据该时间误差确定同步调节的调节方向,由调节单元303根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。该方案可以多媒体播放过程中对系统时钟进行多次调节,以使得与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。As can be seen from the above, the embodiment of the present invention uses the acquisition unit 301 to acquire the time error between the system clock and the reference clock when playing multimedia data, and then, the direction determination unit 302 determines the adjustment direction of the synchronous adjustment according to the time error, and the adjustment direction is determined by the adjustment unit 302. Unit 303 adjusts the system clock several times according to the adjustment direction and the preset adjustment amount, so that the time error is zero. This solution can adjust the system clock multiple times during the multimedia playback process, so as to synchronize with the reference clock, and then achieve the effect of multiple playback devices playing multimedia synchronously. Synchronization of multimedia.
由于本发明实施例采用多次调节的方式将系统时钟调整至与参考时钟同步,避免一次性将系统时钟调整至与参考时钟同步导致多媒体输出的品质较低的问题,提高了多媒体输出的品质;并且采用多次调节的方式还可以减轻播放输出模块对于调节的运算压力。Since the embodiment of the present invention adjusts the system clock to be synchronized with the reference clock by means of multiple adjustments, the problem of lower quality of multimedia output caused by one-time adjustment of the system clock to be synchronized with the reference clock is avoided, and the quality of multimedia output is improved; In addition, the multi-time adjustment method can also reduce the calculation pressure of the playback output module for adjustment.
此外,本发明实施例采用多次调节的方式可以便于在调节过程中发现错误调节,并且可以及时地更正,提高了时钟调节的准确性。In addition, the embodiment of the present invention adopts the method of multiple adjustments, which can facilitate the discovery of wrong adjustments during the adjustment process, and can correct them in time, thereby improving the accuracy of clock adjustments.
实施例四Embodiment Four
根据实施例一和二所描述的时钟调节方法,以下将举例作进一步详细说明。According to the clock adjustment methods described in Embodiments 1 and 2, an example will be given below for further detailed description.
在本实施例中,将以实施例一和二所描述时钟调节装置集成在从属设备中为例进行详细描述。In this embodiment, a detailed description will be made by taking the clock adjustment apparatus described in Embodiments 1 and 2 integrated in a slave device as an example.
本发明实施例提供了一种多媒体同步播放系统,可以包括:控制设备和至少一个播放设备;所述控制设备与所述播放设备连接(如通过网络连接);所述播放设备用于执行上述实施例提供的任一时钟调节方法。An embodiment of the present invention provides a multimedia synchronous playback system, which may include: a control device and at least one playback device; the control device is connected to the playback device (such as through a network connection); the playback device is used to perform the above implementation Either of the clock tuning methods provided by the example.
其中,控制设备可以作为主控设备,播放设备可以作为从属设备。Wherein, the control device can be used as a master device, and the playback device can be used as a slave device.
参考图7,本实施例提供了一种多媒体同步播放系统,包括:源设备10、主控设备20、至少一个从属设备30;该源设备10、主控设备20、从属设备30之间可以通过网络相互连接。Referring to FIG. 7 , this embodiment provides a multimedia synchronous playback system, including: a source device 10, a master device 20, and at least one slave device 30; the source device 10, the master device 20, and the slave device 30 can be connected through Networks are interconnected.
其中,主控设备20用于控制从属设备,其可以为终端,如手机、平板电脑等,该主控设备也可以为播放设备,比如,音箱等播放设备;本实施例将以主控设备20为终端为例进行说明。Wherein, the main control device 20 is used to control the slave device, which can be a terminal, such as a mobile phone, a tablet computer, etc., and the main control device can also be a playback device, such as a playback device such as a speaker; this embodiment will use the main control device 20 The terminal is used as an example for description.
该从属设备30可以为受控于主控设备20的播放设备,该从属设备可以为音箱、具有播放功能的终端等播放设备。The slave device 30 may be a playback device controlled by the master device 20, and the slave device may be a playback device such as a sound box or a terminal with a playback function.
其中,源设备10用于提供待播放的多媒体数据,其可以服务器等网络设备。Wherein, the source device 10 is used to provide multimedia data to be played, which may be a network device such as a server.
在同步播放多媒体之前,本实施例可以从多个从属设备30中选取一个设备作为同步播放的参考设备,在同步播放过程中,所有从属设备的时钟均将与该参考设备的系统时钟保存同步。比如,可以由主控设备20从多个从属设备30中选取一个从属设备作为同步播放的参考设备,然后,将参考设备的标识发送给各个从属设备。Before playing multimedia synchronously, this embodiment can select a device from multiple slave devices 30 as a reference device for synchronous playback. During the process of synchronous playback, the clocks of all slave devices will be synchronized with the system clock of the reference device. For example, the master control device 20 may select a slave device from multiple slave devices 30 as a reference device for synchronous playback, and then send the identifier of the reference device to each slave device.
应当注意的是:当主控设备20若除分发媒体数据之外也接收自身分发的媒体数据播放时,该主控设备20也为从属设备。此时,可以选取主控设备20为参考播设备。It should be noted that: when the master device 20 also receives and plays the media data distributed by itself in addition to distributing media data, the master device 20 is also a slave device. At this time, the main control device 20 may be selected as the reference broadcast device.
多媒体播放的流程如下:The process of multimedia playback is as follows:
源设备10向主控设备20发送多媒体数据;主控设备20对多媒体数据进行打包,得到多个媒体数据包;主控设备20向各个从属设备30发送媒体数据包;从属设备30缓存媒体数据包并播放缓存的媒体数据包。The source device 10 sends multimedia data to the master device 20; the master device 20 packages the multimedia data to obtain multiple media data packets; the master device 20 sends media data packets to each slave device 30; the slave device 30 buffers the media data packets and play the cached media packets.
从属设备30在播放媒体数据包的过程中,检测自身系统时钟与参考设备的系统时钟之间的时间误差。During the process of playing the media data packet, the slave device 30 detects a time error between its own system clock and the system clock of the reference device.
从属设备30根据时间误差确定同步调节的调节方向和总调节量。从属设备30根据所述调节方向、所述总调节量和预设调节量对所述系统时钟进行多次调节,以使得所述时间误差为零。The slave device 30 determines the adjustment direction and the total adjustment amount of the synchronous adjustment according to the time error. The slave device 30 adjusts the system clock multiple times according to the adjustment direction, the total adjustment amount and the preset adjustment amount, so that the time error is zero.
其中,从属设备30对系统时钟进行多次调节的过程,可以参考实施例二中播放设备多次调节的过程,比如参考步骤203-步骤209,此处不再赘述。Wherein, the process of multiple adjustments of the system clock by the slave device 30 may refer to the process of multiple adjustments of the playback device in Embodiment 2, for example, refer to steps 203-209, which will not be repeated here.
由上可知,本发明实施例采用从属设备30在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差,然后,根据该时间误差确定同步调节的调节方向,根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。该方案可以多媒体播放过程中对系统时钟进行多次调节,以使得与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。As can be seen from the above, the embodiment of the present invention uses the slave device 30 to obtain the time error between the system clock and the reference clock when playing multimedia data, and then determine the adjustment direction of the synchronous adjustment according to the time error, and according to the adjustment direction and the preset The adjustment variable adjusts the system clock several times so that the time error is zero. This solution can adjust the system clock multiple times during the multimedia playback process, so as to synchronize with the reference clock, and then achieve the effect of multiple playback devices playing multimedia synchronously. Synchronization of multimedia.
由于本发明实施例从属设备30采用多次调节的方式将系统时钟调整至与参考时钟同步,避免一次性将系统时钟调整至与参考时钟同步导致多媒体输出的品质较低的问题,提高了多媒体输出的品质;并且采用多次调节的方式还可以减轻播放输出模块对于调节的运算压力。Since the slave device 30 in the embodiment of the present invention adjusts the system clock to be synchronized with the reference clock by means of multiple adjustments, it avoids the problem of lower quality of multimedia output caused by adjusting the system clock to be synchronized with the reference clock at one time, and improves the multimedia output. quality; and the way of multiple adjustments can also reduce the calculation pressure of the playback output module for adjustment.
实施例五Embodiment five
本发明实施例还提供一种终端,如图8所示,该终端500可以包括射频(RF,RadioFrequency)电路501、包括有一个或一个以上计算机可读存储介质的存储器502、输入单元503、显示单元504、传感器505、音频电路506、无线保真(WiFi,Wireless Fidelity)模块507、包括有一个或者一个以上处理核心的处理器508、以及电源509等部件。本领域技术人员可以理解,图8中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The embodiment of the present invention also provides a terminal. As shown in FIG. A unit 504 , a sensor 505 , an audio circuit 506 , a wireless fidelity (WiFi, Wireless Fidelity) module 507 , a processor 508 including one or more processing cores, and a power supply 509 and other components. Those skilled in the art can understand that the terminal structure shown in FIG. 8 does not constitute a limitation on the terminal, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.
射频电路501可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器508处理;另外,将涉及上行的数据发送给基站。通常,射频电路501包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,射频电路501还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GSM,Global System of Mobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division Multiple Access)、长期演进(LTE,Long TermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The radio frequency circuit 501 can be used to send and receive information, or to receive and send signals during a call. In particular, after receiving the downlink information of the base station, it is processed by one or more processors 508; in addition, the data related to the uplink is sent to the base station . Generally, the radio frequency circuit 501 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM, Subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, Low Noise Amplifier), duplexer, etc. In addition, the radio frequency circuit 501 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division Multiple Access), Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), email, Short Message Service (SMS, Short Messaging Service), etc.
存储器502可用于存储应用程序和数据。存储器502存储的应用程序中包含有可执行程序代码。应用程序可以组成各种功能模块。处理器508通过运行存储在存储器502的应用程序,从而执行各种功能应用以及数据处理。存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器508和输入单元503对存储器502的访问。Memory 502 may be used to store applications and data. The application programs stored in the memory 502 include executable program codes. Applications can be composed of various functional modules. The processor 508 executes various functional applications and data processing by running the application programs stored in the memory 502 . The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of the terminal (such as audio data, phonebook, etc.) and the like. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 502 may further include a memory controller to provide access to the memory 502 by the processor 508 and the input unit 503 .
输入单元503可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元503可以包括指纹识别模组。在一些实施例中,输入单元503还可以包括触敏表面。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器508,并能接收处理器508发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元503还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 503 can be used to receive input numbers, character information or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 503 may include a fingerprint identification module. In some embodiments, the input unit 503 may also include a touch-sensitive surface. A touch-sensitive surface, also known as a touch display or trackpad, collects user touch operations on or near it (for example, the user uses a finger, stylus, etc. any suitable object or accessory on the touch-sensitive surface or on the touch-sensitive Operation near the surface), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 508, and can receive and execute commands sent by the processor 508. In addition, touch-sensitive surfaces can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to touch-sensitive surfaces, the input unit 503 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, joysticks, and the like.
显示单元504可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元504可包括显示面板。可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器508以确定触摸事件的类型,随后处理器508根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图8中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display unit 504 can be used to display information input by or provided to the user and various graphical user interfaces of the terminal. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The display unit 504 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface can cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it is sent to the processor 508 to determine the type of the touch event, and then the processor 508 displays on the display according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 8, the touch-sensitive surface and the display panel are used as two independent components to realize the input and input functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize the input and output functions.
终端还可包括至少一种传感器505,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The terminal may also include at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or the backlight when the terminal moves to the ear . As a kind of motion sensor, the gravitational acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used for applications that recognize the attitude of mobile phones (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.
音频电路506可通过扬声器、传声器提供用户与终端之间的音频接口。音频电路506可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路506接收后转换为音频数据,再将音频数据输出处理器508处理后,经射频电路501以发送给比如另一终端,或者将音频数据输出至存储器502以便进一步处理。音频电路506还可能包括耳塞插孔,以提供外设耳机与终端的通信。The audio circuit 506 can provide an audio interface between the user and the terminal through a speaker or a microphone. The audio circuit 506 can convert the received audio data into an electrical signal, transmit it to the speaker, and the speaker converts it into a sound signal output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted into The audio data, after being processed by the audio data output processor 508, is sent to another terminal through the radio frequency circuit 501, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earplug jack to provide communication between an external earphone and the terminal.
无线保真(WiFi)属于短距离无线传输技术,终端通过无线保真模块507可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图8示出了无线保真模块507,但是可以理解的是,其并不属于终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wireless Fidelity (WiFi) is a short-distance wireless transmission technology. The terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 507. It provides users with wireless broadband Internet access. Although Fig. 8 shows the Wi-Fi module 507, it can be understood that it is not an essential component of the terminal, and can be completely omitted as required without changing the essence of the invention.
处理器508是终端的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或执行存储在存储器502内的应用程序,以及调用存储在存储器502内的数据,执行终端的各种功能和处理数据,从而对终端进行整体监控。可选的,处理器508可包括一个或多个处理核心;优选的,处理器508可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器508中。The processor 508 is the control center of the terminal. It uses various interfaces and lines to connect various parts of the entire terminal. By running or executing the application programs stored in the memory 502 and calling the data stored in the memory 502, various functions of the terminal are executed. function and process data, so as to monitor the terminal as a whole. Optionally, the processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 508 .
终端还包括给各个部件供电的电源509(比如电池)。优选的,电源可以通过电源管理系统与处理器508逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源509还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal also includes a power source 509 (such as a battery) for powering various components. Preferably, the power supply can be logically connected to the processor 508 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 509 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
尽管图8中未示出,终端还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 8 , the terminal may also include a camera, a Bluetooth module, etc., which will not be repeated here.
具体在本实施例中,终端中的处理器508会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行程序代码加载到存储器502中,并由处理器508来运行存储在存储器502中的应用程序,从而实现各种功能:Specifically, in this embodiment, the processor 508 in the terminal loads the executable program code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 508 executes the executable program code stored in the The application program in memory 502, thereby realizes various functions:
在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差,然后,根据该时间误差确定同步调节的调节方向,根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。When playing multimedia data, the time error between the system clock and the reference clock is obtained, and then the adjustment direction of the synchronous adjustment is determined according to the time error, and the system clock is adjusted multiple times according to the adjustment direction and the preset adjustment amount, so as to Make this time error zero.
处理器508还实现功能:在获取时间误差之后,对所述系统时钟进行多次调节之前根据所述时间误差确定同步调节的总调节量;The processor 508 also implements a function: after obtaining the time error, before performing multiple adjustments to the system clock, determine the total adjustment amount of the synchronous adjustment according to the time error;
此时,根据所述调节方向和预设调节量对所述系统时钟进行多次调节,包括:根据所述调节方向、所述总调节量和预设调节量对所述系统时钟进行多次调节。At this time, performing multiple adjustments to the system clock according to the adjustment direction and a preset adjustment amount includes: performing multiple adjustments to the system clock according to the adjustment direction, the total adjustment amount, and a preset adjustment amount .
其中,根据所述调节方向、所述总调节量和预设调节量对所述系统时钟进行多次调节,包括:Wherein, the system clock is adjusted multiple times according to the adjustment direction, the total adjustment amount and the preset adjustment amount, including:
根据所述调节方向和预设调节量对所述系统时钟进行调节;adjusting the system clock according to the adjustment direction and a preset adjustment amount;
根据所述预设调节量更新所述总调节量,得到更新后总调节量;updating the total adjustment amount according to the preset adjustment amount to obtain the updated total adjustment amount;
判断更新后总调节量是否小于预设调节量;Judging whether the total adjustment amount after the update is less than the preset adjustment amount;
若不小于预设调节量,则在预设时间段之后,返回执行根据所述调节方向和预设调节量对所述系统时钟进行调节的步骤。If not less than the preset adjustment amount, return to the step of adjusting the system clock according to the adjustment direction and the preset adjustment amount after a preset time period.
处理器508还实现功能:当更新后总调节量小于预设调节量时,根据所述更新后总调节量获取目标调节量;The processor 508 also realizes the function: when the updated total adjustment amount is less than the preset adjustment amount, obtain the target adjustment amount according to the updated total adjustment amount;
根据所述目标调节量和所述调节方向对当前系统时钟进行调节。The current system clock is adjusted according to the target adjustment amount and the adjustment direction.
处理器508还实现功能:在得到更新后总调节量之后,判断更新后总调节量是否小于预设调节量之前,判断更新后总调节量是否为零;The processor 508 also realizes the function: after obtaining the updated total adjustment amount, before judging whether the updated total adjustment amount is less than the preset adjustment amount, judging whether the updated total adjustment amount is zero;
若否,则执行判断更新后总调节量是否小于预设调节量的步骤。If not, execute the step of judging whether the updated total adjustment amount is smaller than the preset adjustment amount.
处理器508还实现功能:在确定同步调节的总调节量之后,根据所述调节方向、所述总调节量和预设调节量对所述系统时钟进行多次调节之前,判断所述总调节量是否为零;The processor 508 also implements the function: after determining the total adjustment amount of synchronous adjustment, before performing multiple adjustments on the system clock according to the adjustment direction, the total adjustment amount and the preset adjustment amount, determine the total adjustment amount is zero;
若否,则执行根据所述调节方向、所述总调节量和预设调节量对所述系统时钟进行多次调节的步骤。If not, perform the step of adjusting the system clock multiple times according to the adjustment direction, the total adjustment amount and the preset adjustment amount.
上述操作具体可参见前面的方法实施例,在此不再赘述。For details of the above operations, reference may be made to the foregoing method embodiments, and details are not repeated here.
由上可知,本发明实施例提供了一种终端,该终端在播放多媒体数据时,获取系统时钟与参考时钟之间的时间误差,然后,根据该时间误差确定同步调节的调节方向,根据该调节方向和预设调节量对该系统时钟进行多次调节,以使得该时间误差为零。该方案可以多媒体播放过程中对系统时钟进行多次调节,以使得与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。It can be seen from the above that the embodiment of the present invention provides a terminal, the terminal obtains the time error between the system clock and the reference clock when playing multimedia data, and then determines the adjustment direction of the synchronous adjustment according to the time error, and according to the adjustment The direction and preset adjustments adjust the system clock multiple times so that the time error is zero. This solution can adjust the system clock multiple times during the multimedia playback process, so as to synchronize with the reference clock, and then achieve the effect of multiple playback devices playing multimedia synchronously. Synchronization of multimedia.
由于本发明实施例采用多次调节的方式将系统时钟调整至与参考时钟同步,避免一次性将系统时钟调整至与参考时钟同步导致多媒体输出的品质较低的问题,提高了多媒体输出的品质;并且采用多次调节的方式还可以减轻播放输出模块对于调节的运算压力。Since the embodiment of the present invention adjusts the system clock to be synchronized with the reference clock by means of multiple adjustments, the problem of lower quality of multimedia output caused by one-time adjustment of the system clock to be synchronized with the reference clock is avoided, and the quality of multimedia output is improved; In addition, the multi-time adjustment method can also reduce the calculation pressure of the playback output module for adjustment.
此外,本发明实施例采用多次调节的方式可以便于在调节过程中发现错误调节,并且可以及时地更正,提高了时钟调节的准确性。In addition, the embodiment of the present invention adopts the method of multiple adjustments, which can facilitate the discovery of wrong adjustments during the adjustment process, and can correct them in time, thereby improving the accuracy of clock adjustments.
需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。It should be noted that those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. The medium may include: a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and the like.
以上对本发明实施例所提供的一种时钟调节方法、装置、终端及多媒体同步播放系统进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A clock adjustment method, device, terminal, and multimedia synchronous playback system provided by the embodiments of the present invention have been described above in detail. In this paper, specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments It is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, this The content of the description should not be construed as limiting the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610882865.4ACN106375823B (en) | 2016-10-08 | 2016-10-08 | Clock adjusting method, device, terminal and multimedia synchronous playing system |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610882865.4ACN106375823B (en) | 2016-10-08 | 2016-10-08 | Clock adjusting method, device, terminal and multimedia synchronous playing system |
| Publication Number | Publication Date |
|---|---|
| CN106375823A CN106375823A (en) | 2017-02-01 |
| CN106375823Btrue CN106375823B (en) | 2018-03-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610882865.4AActiveCN106375823B (en) | 2016-10-08 | 2016-10-08 | Clock adjusting method, device, terminal and multimedia synchronous playing system |
| Country | Link |
|---|---|
| CN (1) | CN106375823B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112055242A (en)* | 2020-09-02 | 2020-12-08 | 中国第一汽车股份有限公司 | Video synchronous playing method, device, system and storage medium |
| CN116722867B (en)* | 2023-08-09 | 2024-03-29 | 芯潮流(珠海)科技有限公司 | Clock adjusting circuit and high-speed photoelectric receiving and transmitting chip using same |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1574887A (en)* | 2003-06-12 | 2005-02-02 | 日本电气株式会社 | Media synchronizing system and service providing method for using the same |
| CN1579059A (en)* | 2001-09-04 | 2005-02-09 | 诺基亚有限公司 | Method and apparatus for reducing synchronization delay in packet-based voice terminals |
| CN1835597A (en)* | 2005-03-17 | 2006-09-20 | 华为技术有限公司 | Method and device of regulating program reference clock |
| CN1988667A (en)* | 2006-12-07 | 2007-06-27 | 中兴通讯股份有限公司 | Clock synchronizing method in broadcast network |
| CN101039145A (en)* | 2007-03-30 | 2007-09-19 | 华为技术有限公司 | Method and apparatus for realizing clock |
| CN101202613A (en)* | 2006-12-11 | 2008-06-18 | 中兴通讯股份有限公司 | Terminal for clock synchronising |
| CN102611918A (en)* | 2012-03-28 | 2012-07-25 | 深圳市普乐方文化科技有限公司 | Synchronous video playing control system and method |
| CN104618737A (en)* | 2013-11-01 | 2015-05-13 | 深圳中兴力维技术有限公司 | Streaming media system clock slow synchronization method and streaming media system clock slow synchronization device |
| CN105872261A (en)* | 2016-06-15 | 2016-08-17 | 维沃移动通信有限公司 | Audio playing method and mobile terminal |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3985682B2 (en)* | 2003-01-17 | 2007-10-03 | ソニー株式会社 | Information distribution system, terminal device, schedule transmission device, display information transmission device, and information distribution method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1579059A (en)* | 2001-09-04 | 2005-02-09 | 诺基亚有限公司 | Method and apparatus for reducing synchronization delay in packet-based voice terminals |
| CN1574887A (en)* | 2003-06-12 | 2005-02-02 | 日本电气株式会社 | Media synchronizing system and service providing method for using the same |
| CN1835597A (en)* | 2005-03-17 | 2006-09-20 | 华为技术有限公司 | Method and device of regulating program reference clock |
| CN1988667A (en)* | 2006-12-07 | 2007-06-27 | 中兴通讯股份有限公司 | Clock synchronizing method in broadcast network |
| CN101202613A (en)* | 2006-12-11 | 2008-06-18 | 中兴通讯股份有限公司 | Terminal for clock synchronising |
| CN101039145A (en)* | 2007-03-30 | 2007-09-19 | 华为技术有限公司 | Method and apparatus for realizing clock |
| CN102611918A (en)* | 2012-03-28 | 2012-07-25 | 深圳市普乐方文化科技有限公司 | Synchronous video playing control system and method |
| CN104618737A (en)* | 2013-11-01 | 2015-05-13 | 深圳中兴力维技术有限公司 | Streaming media system clock slow synchronization method and streaming media system clock slow synchronization device |
| CN105872261A (en)* | 2016-06-15 | 2016-08-17 | 维沃移动通信有限公司 | Audio playing method and mobile terminal |
| Publication number | Publication date |
|---|---|
| CN106375823A (en) | 2017-02-01 |
| Publication | Publication Date | Title |
|---|---|---|
| CN106373600B (en) | Audio synchronous playing method, device, system and terminal | |
| CN106411447B (en) | playing control method, device and terminal | |
| CN106452643B (en) | playing control method, device, terminal and playing system | |
| CN106341713B (en) | Multimedia synchronous playing method, device, system and terminal | |
| CN106411448A (en) | Play control method, device and terminal | |
| CN103905876A (en) | Video data and audio data synchronized playing method and device and equipment | |
| CN103905878A (en) | Video data and audio data synchronized playing method and device and equipment | |
| US10463965B2 (en) | Control method of scene sound effect and related products | |
| CN106254924B (en) | Multimedia data playing method, system and related equipment | |
| CN106448714A (en) | A method, device and system for synchronous playback of playback equipment | |
| CN106452644A (en) | Play control method, device and terminal | |
| CN106453597A (en) | Method, device and system for adjusting data synchronization period | |
| CN106653068A (en) | A method, device and terminal for playing audio data | |
| CN105959482A (en) | Scene sound effect control method and electronic device | |
| CN106412625B (en) | multimedia synchronous playing method, device, terminal and system | |
| CN106375823B (en) | Clock adjusting method, device, terminal and multimedia synchronous playing system | |
| CN106454421B (en) | A clock adjustment method, device, terminal and multimedia synchronous playback system | |
| CN106445458B (en) | Playing control method, device and terminal | |
| CN106454420B (en) | Clock synchronization method and device | |
| CN105159655B (en) | Behavior event playing method and device | |
| CN106385597A (en) | Clock adjustment method, device, terminal and multimedia synchronous playback system | |
| CN103345930B (en) | data synthesis method, device and terminal | |
| CN106375824B (en) | Clock adjusting method, device, terminal and multimedia synchronous playing system | |
| CN106385598A (en) | Clock adjusting method and device, terminal and multimedia synchronous playing system | |
| CN106375822B (en) | A kind of multimedia synchronous plays method, apparatus, system and terminal |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP01 | Change in the name or title of a patent holder | ||
| CP01 | Change in the name or title of a patent holder | Address after:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee after:OPPO Guangdong Mobile Communications Co., Ltd. Address before:Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18 Patentee before:Guangdong Opel Mobile Communications Co., Ltd. |