Nothing Special   »   [go: up one dir, main page]

CN106385597A - Clock adjustment method, device, terminal and multimedia synchronous playback system - Google Patents

Clock adjustment method, device, terminal and multimedia synchronous playback system Download PDF

Info

Publication number
CN106385597A
CN106385597A CN201610880739.5A CN201610880739A CN106385597A CN 106385597 A CN106385597 A CN 106385597A CN 201610880739 A CN201610880739 A CN 201610880739A CN 106385597 A CN106385597 A CN 106385597A
Authority
CN
China
Prior art keywords
clock
distance
system clock
time error
error
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
Application number
CN201610880739.5A
Other languages
Chinese (zh)
Inventor
谭春宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610880739.5A priority Critical patent/CN106385597A/en
Publication of CN106385597A publication Critical patent/CN106385597A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4305Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/242Synchronization processes, e.g. processing of PCR [Program Clock References]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4122Peripherals receiving signals from specially adapted client devices additional display device, e.g. video projector
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing 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/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The embodiment of the invention provides a clock adjusting method, a clock adjusting device, a terminal and a multimedia synchronous playing system; the method comprises the steps of acquiring a time error between a system clock of the self system and a system clock of a synchronous reference playing device in the process of playing multimedia data, then acquiring a distance between the synchronous reference playing device and the clock error when the absolute value of the clock error is smaller than a preset threshold value, judging whether the distance is larger than the preset distance, and if so, adjusting the system clock of the self system according to the time error to enable the time error to be zero; the scheme can improve the synchronism of multimedia playing among the multimedia playing devices.

Description

时钟调节方法、装置、终端及多媒体同步播放系统Clock adjustment method, device, terminal and multimedia synchronous playback system

技术领域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:

在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差;In the process of playing multimedia data, obtain the time error between the self system clock and the system clock of the synchronous reference playback device;

当所述时钟误差的绝对值小于预设阈值时,获取与所述同步参考播放设备之间的距离;When the absolute value of the clock error is less than a preset threshold, acquire the distance from the synchronous reference playback device;

判断所述距离是否大于预设距离;judging whether the distance is greater than a preset distance;

若是,则根据所述时间误差对自身系统时钟进行调节,以使得所述时间误差为零。If so, adjust the own system clock according to the time error, so that the time error is zero.

相应的,本发明实施例还提供一种时钟调节装置,包括:Correspondingly, an embodiment of the present invention also provides a clock adjustment device, including:

误差获取单元,用于在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差;The error acquisition unit is used to acquire the time error between its own system clock and the system clock of the synchronous reference playback device in the process of playing multimedia data;

距离获取单元,用于当所述时钟误差的绝对值小于预设阈值时,获取与所述同步参考播放设备之间的距离;A distance acquiring unit, configured to acquire the distance from the synchronous reference playback device when the absolute value of the clock error is less than a preset threshold;

距离判断单元,用于判断所述距离是否大于预设距离;a distance judging unit, configured to judge whether the distance is greater than a preset distance;

调节单元,用于在距离判断单元判断距离大于预设距离时,据所述时间误差对自身系统时钟进行调节,以使得所述时间误差为零。The adjustment unit is configured to adjust the own system clock according to the time error when the distance judging unit judges that the distance is greater than the preset distance, 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, in the process of playing multimedia data, the time error between the own system clock and the system clock of the synchronous reference playback device is obtained, and then, when the absolute value of the clock error is less than the preset threshold value, the synchronization with the time error is obtained. Referring to the distance between the playback devices, it is judged whether the distance is greater than the preset distance, and if so, the self-system clock is adjusted according to the time error, so that the time error is zero. This solution can adjust the system clock during multimedia playback and when the distance from the synchronous reference playback device is greater than the preset distance, so that the system clock is synchronized with the reference clock, thereby achieving the effect of multiple playback devices synchronously playing multimedia Compared with the prior art, the synchronization of playing multimedia between multimedia playing devices can be improved.

附图说明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 diagram of a scene of a multimedia synchronous playback system provided by Embodiment 4 of the present invention.

图6是本发明实施例五提供的终端的结构示意图。FIG. 6 is a schematic structural diagram of a terminal provided in Embodiment 5 of the present invention.

具体实施方式detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。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 a 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.), a speaker, or the like.

一种时钟调节方法,包括:在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,当该时钟误差的绝对值小于预设阈值时获取与该同步参考播放设备之间的距离,判断该距离是否大于预设距离,若是,则根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。A clock adjustment method, comprising: in the process of playing multimedia data, obtaining the time error between the own system clock and the system clock of a synchronous reference playback device, and then obtaining the same time error when the absolute value of the clock error is less than a preset threshold The synchronization refers to the distance between the playback devices, and judges whether the distance is greater than the preset distance, and if so, adjusts its own system clock according to the time error, so that the time error is zero.

如图1所示,该时钟调节方法,具体流程可以包括:As shown in Figure 1, the specific process of the clock adjustment method may include:

101、在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差。101. During the process of playing multimedia data, acquire a time error between the own system clock and the system clock of the synchronization reference playback device.

其中,该多媒体数据可以为音频数据、音视频数据等等。该音频数据包括但不限于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.

本实施例中同步参考播放设备的系统时钟即为同步播放的参考时钟。该同步参考播放设备为同步播放的参考设备,其可以从播放设备中选定。在多媒体播放系统中控制设备也播放多媒体时,该控制设备也是播放设备,因此,该同步参考播放设备可以为播放设备,或者控制设备等。在实际应用中,可以根据实际需求从播放设备中选取一个设备作为参考设备。In this embodiment, the system clock of the synchronous reference playback device is the reference clock for synchronous playback. The synchronous reference playback device is a reference device for synchronous playback, which can be selected from playback devices. When the control device also plays multimedia in the multimedia playback system, the control device is also a playback device. Therefore, the synchronous reference playback device may be a playback device, or a control device. In practical applications, a device may be selected from the playback devices as a reference device according to actual needs.

其中,该多媒体数据可以为音频数据、音视频数据等等。该音频数据包括但不限于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.

本实施例中同步参考播放设备的系统时钟即为同步播放的参考时钟。该同步参考播放设备为同步播放的参考设备,其可以从播放设备中选定。在多媒体播放系统中控制设备也播放多媒体时,该控制设备也是播放设备,因此,该同步参考播放设备可以为播放设备,或者控制设备等。在实际应用中,可以根据实际需求从播放设备中选取一个设备作为参考设备。In this embodiment, the system clock of the synchronous reference playback device is the reference clock for synchronous playback. The synchronous reference playback device is a reference device for synchronous playback, which can be selected from playback devices. When the control device also plays multimedia in the multimedia playback system, the control device is also a playback device. Therefore, the synchronous reference playback device may be a playback device, or a control device. In practical applications, a device may be selected from the playback devices as a reference device according to actual needs.

102、当该时钟误差的绝对值小于预设阈值时,获取与该同步参考播放设备之间的距离。102. Acquire a distance from the synchronization reference playback device when the absolute value of the clock error is smaller than a preset threshold.

具体地,在获取时间误差之后,获取距离之前,本实施例方法还可以包括:Specifically, after obtaining the time error and before obtaining the distance, the method in this embodiment may further include:

判断该时钟误差的绝对值是否小于预设阈值,若小于,则执行获取与该同步参考播放设备之间的距离的步骤。It is judged whether the absolute value of the clock error is smaller than a preset threshold, and if smaller, the step of obtaining the distance from the synchronous reference playback device is performed.

其中,获取与同步参考播放设备之间的距离的方式可以有多种,比如,可以根据信号强度来获取,也即步骤“获取与该同步参考播放设备之间的距离”,可以包括:Among them, there are many ways to obtain the distance from the synchronous reference playback device. For example, it can be obtained according to the signal strength, that is, the step "obtaining the distance from the synchronous reference playback device" may include:

向该同步参考播放设备发送测试信号;sending a test signal to the synchronous reference playback device;

接收该同步参考播放设备返回的测试信号的信号强度;Receive the signal strength of the test signal returned by the synchronous reference playback device;

根据该信号强度获取与同步参考播放设备之间的距离。According to the signal strength, the distance to the synchronization reference playback device is acquired.

具体地,可以根据测试信号发送时的信号强度与同步参考播放设备返回的接收信号强度获取信号强度的衰减,然后,基于该衰减来计算距离。Specifically, the attenuation of the signal strength may be obtained according to the signal strength when the test signal is sent and the received signal strength returned by the synchronous reference playback device, and then the distance is calculated based on the attenuation.

又比如,可以信号传输速度以及信号收发时差来获取,也即步骤“获取与该同步参考播放设备之间的距离”可以包括:For another example, it can be obtained by the signal transmission speed and the time difference between signal transmission and reception, that is, the step "obtaining the distance from the synchronous reference playback device" may include:

向该同步参考播放设备发送测试信号,并记录发送时间;Send a test signal to the synchronous reference playback device, and record the sending time;

获取该同步参考播放设备返回的接收该测试信号的接收时间;Obtain the receiving time of receiving the test signal returned by the synchronous reference playback device;

根据发送时间、接收时间以及测试信号传播速度获取与同步参考播放设备之间的距离。Acquire the distance to the synchronous reference playback device according to the sending time, receiving time and the propagation speed of the test signal.

本实施例中,测试信号,可以红外信号、蓝牙信号等等。In this embodiment, the test signal may be an infrared signal, a bluetooth signal, or the like.

103、判断该距离是否大于预设距离,若是,则执行步骤104,若否,则不需要调节,结束流程。103. Determine whether the distance is greater than the preset distance, if yes, perform step 104, if not, no adjustment is required, and the process ends.

由于在实际情况中,声音传播会有一定延迟,其会加大同步播放的同步误差。其中,声音传播的延迟大小与播放设备之间的物理距离大小有关,在播放设备之间的物理距离比较大时,声音传播的延迟也比较大,导致同步误差比较大;在播放设备之间的物理距离比较小时,声音传播的延迟也比较小,此时对同步误差影响程度较低。In actual situations, there will be a certain delay in sound propagation, which will increase the synchronization error of synchronous playback. Among them, the delay of sound propagation is related to the physical distance between playback devices. When the physical distance between playback devices is relatively large, the delay of sound propagation is also relatively large, resulting in relatively large synchronization errors; When the physical distance is relatively small, the delay of sound propagation is also relatively small, and at this time, the influence on the synchronization error is relatively low.

为提高媒体播放的同步性以及节省资源,本实施例方法可以在时钟误差比较小时基于设备间的距离决定是否同步调节;如下:In order to improve the synchronization of media playback and save resources, the method of this embodiment can determine whether to adjust synchronously based on the distance between devices when the clock error is relatively small; as follows:

(1)、当时钟误差的绝对值小于预设阈值,且设备间的距离大于预设距离时,进行同步调节。其中,预设阈值可以根据用户所能容忍的同步误差的绝对值设定,比如,该预设阈值可以与用户能容忍的同步误差相等,如均为1ms等。(1) When the absolute value of the clock error is less than the preset threshold and the distance between the devices is greater than the preset distance, perform synchronization adjustment. Wherein, the preset threshold can be set according to the absolute value of the synchronization error that the user can tolerate. For example, the preset threshold can be equal to the synchronization error that the user can tolerate, such as 1 ms.

比如,当前时钟误差或者同步误差较小(如小于用户所能容忍的同步误差),但播放设备之间的物理距离比较大(大于预设距离)时,声音传播的延迟比较大,其会较大程度地影响同步误差,使得同步误差变大,此时同步超过用户所能容忍的同步误差时,需要进行同步调节,提高媒体播放的同步性和媒体输出的品质;比如,同步误差为1ms,播放设备之间的物理距离比较大时,由于声音的传播存在延迟比较大,因此,可能会导致实际同步误差为2ms。For example, when the current clock error or synchronization error is small (such as less than the synchronization error that the user can tolerate), but the physical distance between the playback devices is relatively large (greater than the preset distance), the delay of sound propagation is relatively large, and it will be slower. Greatly affects the synchronization error, making the synchronization error larger. At this time, when the synchronization exceeds the synchronization error that the user can tolerate, synchronization adjustment is required to improve the synchronization of media playback and the quality of media output; for example, if the synchronization error is 1ms, When the physical distance between playback devices is relatively large, there may be a relatively large delay in the propagation of sound, so the actual synchronization error may be 2ms.

其中,预设距离可以根据经验值来设定,比如10米、8米等等。Wherein, the preset distance can be set according to experience values, such as 10 meters, 8 meters and so on.

(2)、当时钟误差的绝对值小于预设阈值,且设备间的距离不大于预设距离时,不进行同步调节。(2) When the absolute value of the clock error is less than the preset threshold and the distance between the devices is not greater than the preset distance, no synchronization adjustment is performed.

如果同步误差较小(如小于用户所能容忍的同步误差),且播放设备之间的物理距离较小时,声音传播的延迟比较小,此时,声音传播的延迟较小,其对同步误差的影响程度比较低,同步误差几乎不变;由于此时该同步误差小于用户所能容忍的同步误差,其可以不需要进行同步调节,节省资源。比如,同步误差为1ms,播放设备之间的物理距离比较小时,由于声音的传播存在延迟比较小,此时,实际同步误差可以为1.5ms,小于用户所能容忍的同步误差2m,因此,可以不需要进行同步调节。If the synchronization error is small (such as less than the synchronization error that the user can tolerate), and the physical distance between the playback devices is small, the delay of sound propagation is relatively small. At this time, the delay of sound propagation is small, and its influence on the synchronization error The degree of influence is relatively low, and the synchronization error is almost unchanged; since the synchronization error is smaller than the synchronization error that the user can tolerate at this time, it does not need to perform synchronization adjustment, saving resources. For example, if the synchronization error is 1ms, the physical distance between playback devices is relatively small, and the delay in sound propagation is relatively small. At this time, the actual synchronization error can be 1.5ms, which is less than the 2m synchronization error that users can tolerate. Therefore, it can Synchronization adjustments are not required.

可选地,在时钟误差比较大时,即时钟误差的绝对值不小于预设阈值时,此时,为提高媒体播放的同步性,本实施例还可以根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。Optionally, when the clock error is relatively large, that is, when the absolute value of the clock error is not less than the preset threshold, at this time, in order to improve the synchronization of media playback, this embodiment can also adjust its own system clock according to the time error , so that the time error is zero.

104、根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。104. Adjust the own system clock according to the time error, so that the time error is zero.

具体地,可以根据该时间误差确定同步调节的调节方向和调节量,根据该调节方向和调节量对自身系统时钟进行调节。Specifically, the adjustment direction and adjustment amount of the synchronous adjustment may be determined according to the time error, and the own system clock may be adjusted according to the adjustment direction and adjustment amount.

其中,调节方向可以包括正方向或者负方向,该正方向调节是加快系统时钟,负方向调节是减慢系统时钟。也可以是:负方向调节是加快系统时钟,正方向调节是减慢系统时钟;具体地可以根据实际需求设定。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.

其中,该调节量可为时间误差的绝对值,比如,时间误差为20ms时,调节量为20ms,时间误差为-30ms时,调节量为30ms。Wherein, the adjustment amount may be an absolute value of the time error, for example, when the time error is 20 ms, the adjustment amount is 20 ms, and when the time error is -30 ms, the adjustment amount is 30 ms.

本实施例在获取调节方向和调节量之后,可以按照调节方向将系统时钟调节一个调节量;如使自身系统时钟加快一个调节量,如加快20ms等。In this embodiment, after obtaining the adjustment direction and the adjustment amount, the system clock can be adjusted by an adjustment amount according to the adjustment direction; for example, the system clock can be accelerated by an adjustment amount, such as by 20 ms.

例如,在时钟误差为10ms时,调节量可以为10ms,调节方向为负方向,那么可以按照负方向将自身系统时钟调节10ms,即使系统时钟减慢10ms。For example, when the clock error is 10ms, the adjustment amount can be 10ms, and the adjustment direction is the negative direction, then the own system clock can be adjusted by 10ms in the negative direction, even if the system clock is slowed down by 10ms.

可选地,为了避免一次性调节系统时钟降低多媒体输出品质,本实施例可以根据调节方向和调节量对自身系统时钟进行多次微调,以使得该时间误差为零。Optionally, in order to avoid one-time adjustment of the system clock to reduce multimedia output quality, this embodiment may fine-tune its own system clock multiple times according to the adjustment direction and adjustment amount, so that the time error is zero.

比如,可以根据调节量(此时为总调节量)、调节方向和预设调节量对系统时钟进行多次微调。预设调节量可以根据实际需求设定,比如,可以为10ms、20ms、1s等等。For example, the system clock can be fine-tuned multiple times according to the adjustment amount (in this case, the total adjustment amount), the adjustment direction, and the preset adjustment amount. The preset adjustment amount can be set according to actual needs, for example, it can be 10ms, 20ms, 1s and so on.

比如,时间误差为15ms,预设调节量为5ms时,可以先按照调节方向调节一个预设调节量5ms,然后间隔预设时间段之后再次按照调节方向调节一个预设调节量5ms,如此再经过三次调节后,即可使得时间误差为零。For example, when the time error is 15ms and the preset adjustment amount is 5ms, you can first adjust a preset adjustment amount for 5ms according to the adjustment direction, and then adjust a preset adjustment amount for 5ms according to the adjustment direction again after a preset period of time, and then after After three adjustments, the time error can be made zero.

由上可知,本发明实施例采用在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,获取与该同步参考播放设备之间的距离,判断该距离是否大于预设距离,若是,则根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。该方案可以多媒体播放过程中,且在与同步参考播放设备之间的距离大于预设距离时对系统时钟进行调节,以使得系统时钟与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。As can be seen from the above, in the embodiment of the present invention, during the process of playing multimedia data, the time error between its own system clock and the system clock of the synchronous reference playback device is obtained, and then the distance between the synchronous reference playback device and the synchronous reference playback device is obtained to judge Whether the distance is greater than the preset distance, if so, adjust the own system clock according to the time error, so that the time error is zero. This solution can adjust the system clock during multimedia playback and when the distance from the synchronous reference playback device is greater than the preset distance, so that the system clock is synchronized with the reference clock, thereby achieving the effect of multiple playback devices synchronously playing multimedia Compared with the prior art, the synchronization of playing multimedia between multimedia playing devices can be improved.

此外,本发明实施例在时钟误差的绝对值小于预设阈值(时钟误差较小时),且与同步参考播放设备之间的距离大于预设距离时,对系统时钟进行调节,可以在保持实际播放同步的前提下节省资源,提高时钟调节的灵活性。并且本实施例还可以在时钟误差的绝对值不小于预设阈值(即时钟误差较大时),直接对系统时钟进行调节,提高了媒体播放的同步性以及同步调节的及时性,大大提升了用户体验。In addition, in the embodiment of the present invention, when the absolute value of the clock error is less than the preset threshold (when the clock error is small), and the distance from the synchronous reference playback device is greater than the preset distance, the system clock is adjusted, so that the actual playback can be maintained. On the premise of synchronization, resources are saved and the flexibility of clock adjustment is improved. And this embodiment can also directly adjust the system clock when the absolute value of the clock error is not less than the preset threshold (that is, when the clock error is large), which improves the synchronization of media playback and the timeliness of synchronization adjustment, greatly improving user experience.

实施例二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. During the process of playing multimedia data, the playback device acquires a time error between its own system clock and the system clock of the synchronization reference playback device.

其中,该多媒体数据可以为音频数据、音视频数据等等。该音频数据的格式有多种,比如,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.

本实施例中该同步参考播放设备可以播放设备,或者控制设备。In this embodiment, the synchronous reference playback device may be a playback device or a control device.

具体地,播放设备获取同步参考设备当前的第一系统时间以及自身当前的第二系统时间,然后,根据第二系统时间和第一系统时间,获取系统时钟与参考时钟之间的时间误差。比如,第一系统时间为1:06,第二系统时间为1:00,此时可以获取时间误差为-6s。Specifically, the playback device obtains the current first system time of the synchronization 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、播放设备判断时间误差的绝对值小于预设阈值,若是,则执行步骤203,若否,则执行步骤205。202. The playback device determines that the absolute value of the time error is smaller than a preset threshold, if yes, execute step 203, and if not, execute step 205.

其中,预设阈值可以根据实际需求设定,如,可以根据用户所能容忍的同步误差设定,该预设阈值可以为1ms、2ms等等。Wherein, the preset threshold can be set according to actual needs, for example, it can be set according to the synchronization error that the user can tolerate, and the preset threshold can be 1 ms, 2 ms and so on.

本实施例,在时间误差较小时可以基于设备间的距离来确定是否调节,在时间误差较大时可以直接进行调节。In this embodiment, when the time error is small, whether to adjust can be determined based on the distance between devices, and when the time error is large, the adjustment can be directly performed.

203、播放设备获取与该同步参考播放设备之间的距离。203. The playback device acquires a distance from the synchronization reference playback device.

该距离为播放设备与同步参考播放设备之间的物理距离。其中,获取该距离的方式有多种,比如,可以基于信号强度来获取。The distance is the physical distance between the playback device and the synchronization reference playback device. There are multiple ways to acquire the distance, for example, it may be acquired based on signal strength.

具体地,播放设备可以向该同步参考播放设备发送测试信号,接收该同步参考播放设备返回的测试信号的信号强度,根据该信号强度获取与同步参考播放设备之间的距离。Specifically, the playback device may send a test signal to the synchronization reference playback device, receive the signal strength of the test signal returned by the synchronization reference playback device, and obtain the distance from the synchronization reference playback device according to the signal strength.

其中,测试信号,可以红外信号、蓝牙信号等等。Wherein, the test signal may be an infrared signal, a bluetooth signal or the like.

204、播放设备判断该距离是否大于预设距离,若是,则执行步骤205,若否,不进行时钟调节,结束流程。204. The playback device judges whether the distance is greater than the preset distance, if yes, execute step 205, if not, do not adjust the clock, and end the process.

考虑到。声音传播延迟对同步播放的同步误差的影响,以及播放设备间的距离会影响延迟,进而影响同步误差。本实施例可以在时间误差较小时基于设备间距离来确定是否进行调节,以节省资源。considering. The impact of sound propagation delay on the synchronization error of synchronous playback, and the distance between playback devices will affect the delay, which in turn affects the synchronization error. In this embodiment, when the time error is small, it may be determined based on the distance between devices whether to perform adjustment, so as to save resources.

205、播放设备根据时间误差确定需要进行调节的调节方向和调节量。205. The playback device determines the adjustment direction and adjustment amount that need to be adjusted 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 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 adjustment amount is 6s.

206、播放设备根据调节方向和调节量对系统时钟进行调节,以使得时间误差为零。206. The playback device adjusts the system clock according to the adjustment direction and the adjustment amount, so that the time error is zero.

比如,按照调节方向将系统时钟调节一个调节量;如使系统时钟加快一个调节量,如加快20ms等。For example, the system clock is adjusted by an adjustment amount according to the adjustment direction; for example, the system clock is accelerated by an adjustment amount, such as by 20 ms.

可选地,为了避免一次性调节系统时钟降低多媒体输出品质,本实施例播放设备可以根据调节方向和调节量对系统时钟进行多次微调,以使得该时间误差为零。如通过五次调节使时间误差为零。Optionally, in order to avoid one-time adjustment of the system clock to reduce multimedia output quality, the playback device in this embodiment may fine-tune the system clock multiple times according to the adjustment direction and adjustment amount, so that the time error is zero. For example, the time error is zero through five adjustments.

具体实施时,本发明不受所描述的各个步骤的执行顺序的限制,在不产生冲突的情况下,某些步骤还可以采用其它顺序进行或者同时进行。During specific implementation, the present invention is not limited by the execution order of the described steps, and some steps may be performed in other orders or simultaneously if no conflict arises.

由上可知,本发明实施例播放设备在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,当该时钟误差的绝对值小于预设阈值时获取与该同步参考播放设备之间的距离,判断该距离是否大于预设距离,若是,则根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。该方案可以多媒体播放过程中,且在与同步参考播放设备之间的距离大于预设距离时对系统时钟进行调节,以使得系统时钟与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。It can be seen from the above that, in the process of playing multimedia data, the playback device in the embodiment of the present invention obtains the time error between its own system clock and the system clock of the synchronous reference playback device, and then, when the absolute value of the clock error is less than the preset threshold Acquiring the distance from the synchronous reference playback device, judging whether the distance is greater than the preset distance, if so, adjusting the own system clock according to the time error, so that the time error is zero. This solution can adjust the system clock during multimedia playback and when the distance from the synchronous reference playback device is greater than the preset distance, so that the system clock is synchronized with the reference clock, thereby achieving the effect of multiple playback devices synchronously playing multimedia Compared with the prior art, the synchronization of playing multimedia between multimedia playing devices can be improved.

此外,本发明实施例播放设备在时钟误差的绝对值小于预设阈值(时钟误差较小时),且与同步参考播放设备之间的距离大于预设距离时,对系统时钟进行调节,可以在保持实际播放同步的前提下节省资源,提高时钟调节的灵活性。并且本实施例还可以在时钟误差的绝对值不小于预设阈值(即时钟误差较大时),直接对系统时钟进行调节,提高了媒体播放的同步性以及同步调节的及时性,大大提升了用户体验。In addition, when the absolute value of the clock error of the playback device in the embodiment of the present invention is less than the preset threshold (when the clock error is small), and the distance between the playback device and the synchronous reference playback device is greater than the preset distance, the system clock can be adjusted to maintain On the premise of actual playback synchronization, resources are saved and the flexibility of clock adjustment is improved. And this embodiment can also directly adjust the system clock when the absolute value of the clock error is not less than the preset threshold (that is, when the clock error is large), which improves the synchronization of media playback and the timeliness of synchronization adjustment, greatly improving user experience.

实施例三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以及调节单元304,如下:As shown in Figure 3, the clock adjustment device 300 may include: an error acquisition unit 301, a distance acquisition unit 302, a distance judgment unit 303, and an adjustment unit 304, as follows:

误差获取单元301,用于在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差;An error acquisition unit 301 is used to acquire the time error between the system clock of itself and the system clock of the synchronous reference playback device during the process of playing multimedia data;

距离获取单元302,用于当该时钟误差的绝对值小于预设阈值时,获取与该同步参考播放设备之间的距离;A distance acquiring unit 302, configured to acquire a distance from the synchronous reference playback device when the absolute value of the clock error is less than a preset threshold;

距离判断单元303,用于判断该距离是否大于预设距离;A distance judging unit 303, configured to judge whether the distance is greater than a preset distance;

调节单元304,用于在距离判断单元303判断距离大于预设距离时,据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。The adjusting unit 304 is configured to adjust the own system clock according to the time error when the distance judging unit 303 judges that the distance is greater than the preset distance, so that the time error is zero.

其中,本实施例该距离获取单元302,具体用于:Wherein, the distance acquisition unit 302 in this embodiment is specifically used for:

当该时钟误差的绝对值小于预设阈值时,向该同步参考播放设备发送测试信号;When the absolute value of the clock error is less than a preset threshold, a test signal is sent to the synchronous reference playback device;

接收该同步参考播放设备返回的测试信号的信号强度;Receive the signal strength of the test signal returned by the synchronous reference playback device;

根据该信号强度获取与同步参考播放设备之间的距离。According to the signal strength, the distance to the synchronization reference playback device is acquired.

参考图4,本实施例中调节单元304可以具体包括:Referring to FIG. 4, the adjustment unit 304 in this embodiment may specifically include:

确定子单元3041,用于根据该时间误差确定同步调节的调节方向和调节量;A determining subunit 3041, configured to determine the adjustment direction and adjustment amount of the synchronous adjustment according to the time error;

调节子单元3042,用于根据该调节方向和调节量对自身系统时钟进行调节。The adjustment subunit 3042 is configured to adjust its own system clock according to the adjustment direction and adjustment amount.

其中,该调节子单元3042可以具体用于:根据该调节方向和调节量对自身系统时钟进行多次微调。Wherein, the adjustment subunit 3042 may be specifically configured to fine-tune its own system clock multiple times according to the adjustment direction and adjustment amount.

可选地,为提高同步调节的及时性,本实施例中调节单元304,还用于:Optionally, in order to improve the timeliness of synchronous adjustment, the adjustment unit 304 in this embodiment is also used to:

当该时间误差的绝对值大于预设阈值时,根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。When the absolute value of the time error is greater than the preset threshold, the self-system clock is adjusted according to the time error, so that the time error is zero.

具体实施时,以上各个单元可以作为独立的实体来实现,也可以进行任意组合,作为同一或若干个实体来实现,以上各个单元的具体实施可参见前面的方法实施例,在此不再赘述。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判断该距离是否大于预设距离,若是,则由调节单元304根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。该方案可以多媒体播放过程中,且在与同步参考播放设备之间的距离大于预设距离时对系统时钟进行调节,以使得系统时钟与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。As can be seen from the above, the embodiment of the present invention adopts the error acquisition unit 301 to acquire the time error between its own system clock and the system clock of the synchronous reference playback device in the process of playing multimedia data, and then, the distance acquisition unit 302 calculates the time error between the clock error When the absolute value of is less than the preset threshold value, the distance between the synchronous reference playback device and the synchronous reference playback device is obtained, and the distance judging unit 303 judges whether the distance is greater than the preset distance. Adjust so that this time error is zero. This solution can adjust the system clock during multimedia playback and when the distance from the synchronous reference playback device is greater than the preset distance, so that the system clock is synchronized with the reference clock, thereby achieving the effect of multiple playback devices synchronously playing multimedia Compared with the prior art, the synchronization of playing multimedia between multimedia playing devices can be improved.

此外,本发明实施例在时钟误差的绝对值小于预设阈值(时钟误差较小时),且与同步参考播放设备之间的距离大于预设距离时,对系统时钟进行调节,可以在保持实际播放同步的前提下节省资源,提高时钟调节的灵活性。并且本实施例还可以在时钟误差的绝对值不小于预设阈值(即时钟误差较大时),直接对系统时钟进行调节,提高了媒体播放的同步性以及同步调节的及时性,大大提升了用户体验。In addition, in the embodiment of the present invention, when the absolute value of the clock error is less than the preset threshold (when the clock error is small), and the distance from the synchronous reference playback device is greater than the preset distance, the system clock is adjusted, so that the actual playback can be maintained. On the premise of synchronization, resources are saved and the flexibility of clock adjustment is improved. And this embodiment can also directly adjust the system clock when the absolute value of the clock error is not less than the preset threshold (that is, when the clock error is large), which improves the synchronization of media playback and the timeliness of synchronization adjustment, greatly improving user experience.

实施例四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, 2 and 3 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.

其中,控制设备可以为主控设备,播放设备可以为从属设备。参考图5,本实施例提供了一种多媒体同步播放系统,包括:源设备10、主控设备20、至少一个从属设备30;该源设备10、主控设备20、从属设备30之间可以通过网络相互连接。Wherein, the control device may be a master device, and the playback device may be a slave device. Referring to FIG. 5 , 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缓存媒体数据包并播放缓存的媒体数据包。之后从属设备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. Then the slave device 30 executes the clock adjustment steps described in Embodiments 1 and 2. I won't repeat them here.

由上可知,本发明实施例从属设备30在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,当该时钟误差的绝对值小于预设阈值时获取与该同步参考播放设备之间的距离,判断该距离是否大于预设距离,若是,则根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。该方案可以多媒体播放过程中,且在与同步参考播放设备之间的距离大于预设距离时对系统时钟进行调节,以使得系统时钟与参考时钟同步,进而达到多个播放设备同步播放多媒体的效果,相对于现有技术而言,可以提高多媒体播放设备之间播放多媒体的同步性。As can be seen from the above, in the process of playing multimedia data in the embodiment of the present invention, the slave device 30 obtains the time error between its own system clock and the system clock of the synchronous reference playback device, and then, when the absolute value of the clock error is less than the preset threshold Acquire the distance between the synchronous reference playback device and whether the distance is greater than the preset distance, if so, adjust the system clock according to the time error, so that the time error is zero. This solution can adjust the system clock during multimedia playback and when the distance from the synchronous reference playback device is greater than the preset distance, so that the system clock is synchronized with the reference clock, thereby achieving the effect of multiple playback devices synchronously playing multimedia Compared with the prior art, the synchronization of playing multimedia between multimedia playing devices can be improved.

此外,本发明实施例从属设备30在时钟误差的绝对值小于预设阈值(时钟误差较小时),且与同步参考播放设备之间的距离大于预设距离时,对系统时钟进行调节,可以在保持实际播放同步的前提下节省资源,提高时钟调节的灵活性。并且本实施例还可以在时钟误差的绝对值不小于预设阈值(即时钟误差较大时),直接对系统时钟进行调节,提高了媒体播放的同步性以及同步调节的及时性,大大提升了用户体验。In addition, in the embodiment of the present invention, the slave device 30 adjusts the system clock when the absolute value of the clock error is less than the preset threshold (when the clock error is small), and the distance between the slave device and the synchronous reference playback device is greater than the preset distance. On the premise of keeping the actual playback synchronization, resources are saved and the flexibility of clock adjustment is improved. And this embodiment can also directly adjust the system clock when the absolute value of the clock error is not less than the preset threshold (that is, when the clock error is large), which improves the synchronization of media playback and the timeliness of synchronization adjustment, greatly improving user experience.

实施例五Embodiment five

本发明实施例还提供一种终端,如图6所示,该终端400可以包括射频(RF,RadioFrequency)电路401、包括有一个或一个以上计算机可读存储介质的存储器402、输入单元403、显示单元404、传感器405、音频电路406、无线保真(WiFi,Wireless Fidelity)模块407、包括有一个或者一个以上处理核心的处理器408、以及电源409等部件。本领域技术人员可以理解,图6中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。The embodiment of the present invention also provides a terminal. As shown in FIG. 6, the terminal 400 may include a radio frequency (RF, Radio Frequency) circuit 401, a memory 402 including one or more computer-readable storage media, an input unit 403, a display A unit 404 , a sensor 405 , an audio circuit 406 , a wireless fidelity (WiFi, Wireless Fidelity) module 407 , a processor 408 including one or more processing cores, and a power supply 409 and other components. Those skilled in the art can understand that the terminal structure shown in FIG. 6 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.

射频电路401可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器408处理;另外,将涉及上行的数据发送给基站。通常,射频电路401包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,Low Noise Amplifier)、双工器等。此外,射频电路401还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(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 401 can be used to send and receive information, or to receive and send signals during a call. In particular, after receiving the downlink information from the base station, it is processed by one or more processors 408; in addition, the uplink data is sent to the base station . Generally, the radio frequency circuit 401 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 401 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.

存储器402可用于存储应用程序和数据。存储器402存储的应用程序中包含有可执行程序代码。应用程序可以组成各种功能模块。处理器408通过运行存储在存储器402的应用程序,从而执行各种功能应用以及数据处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器408和输入单元403对存储器402的访问。Memory 402 may be used to store applications and data. The application programs stored in the memory 402 include executable program codes. Applications can be composed of various functional modules. The processor 408 executes various functional applications and data processing by running the application programs stored in the memory 402 . The memory 402 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 402 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 402 may further include a memory controller to provide the processor 408 and the input unit 403 with access to the memory 402 .

输入单元403可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,输入单元403可以包括指纹识别模组。在一些实施例中,输入单元403还可以包括触敏表面。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器408,并能接收处理器408发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元403还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 403 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 403 may include a fingerprint identification module. In some embodiments, the input unit 403 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 408, and can receive and execute commands sent by the processor 408. 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 403 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.

显示单元404可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元404可包括显示面板。可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器408以确定触摸事件的类型,随后处理器408根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图6中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display unit 404 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 404 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 may cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, the touch operation is sent to the processor 408 to determine the type of the touch event, and then the processor 408 displays on the display according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 6, 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.

终端还可包括至少一种传感器405,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The terminal may also include at least one sensor 405, 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.

音频电路406可通过扬声器、传声器提供用户与终端之间的音频接口。音频电路406可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路406接收后转换为音频数据,再将音频数据输出处理器408处理后,经射频电路401以发送给比如另一终端,或者将音频数据输出至存储器402以便进一步处理。音频电路406还可能包括耳塞插孔,以提供外设耳机与终端的通信。The audio circuit 406 can provide an audio interface between the user and the terminal through a speaker or a microphone. The audio circuit 406 can convert the received audio data into an electrical signal, transmit it to the speaker, and convert it into a sound signal output by the speaker; 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 408, is sent to another terminal through the radio frequency circuit 401, or the audio data is output to the memory 402 for further processing. The audio circuit 406 may also include an earplug jack to provide communication between an external earphone and the terminal.

无线保真(WiFi)属于短距离无线传输技术,终端通过无线保真模块407可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了无线保真模块407,但是可以理解的是,其并不属于终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。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 407. It provides users with wireless broadband Internet access. Although Fig. 6 shows the Wi-Fi module 407, 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.

处理器408是终端的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或执行存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行终端的各种功能和处理数据,从而对终端进行整体监控。可选的,处理器408可包括一个或多个处理核心;优选的,处理器408可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器408中。The processor 408 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 program stored in the memory 402 and calling the data stored in the memory 402, various functions of the terminal are executed. function and process data, so as to monitor the terminal as a whole. Optionally, the processor 408 may include one or more processing cores; preferably, the processor 408 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, 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 408 .

终端还包括给各个部件供电的电源409(比如电池)。优选的,电源可以通过电源管理系统与处理器408逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源409还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal also includes a power source 409 (such as a battery) for powering various components. Preferably, the power supply can be logically connected to the processor 408 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system. The power supply 409 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.

尽管图6中未示出,终端还可以包括摄像头、蓝牙模块等,在此不再赘述。Although not shown in FIG. 6 , the terminal may also include a camera, a Bluetooth module, etc., which will not be repeated here.

具体在本实施例中,终端中的处理器408会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行程序代码加载到存储器402中,并由处理器408来运行存储在存储器402中的应用程序,从而实现各种功能:Specifically, in this embodiment, the processor 408 in the terminal loads the executable program code corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 408 executes the executable program code stored in the The application program in memory 402, thereby realizes various functions:

在播放多媒体数据的过程中,获取自身系统时钟与同步参考播放设备的系统时钟之间的时间误差,然后,当该时钟误差的绝对值小于预设阈值时获取与该同步参考播放设备之间的距离,判断该距离是否大于预设距离,若是,则根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。In the process of playing multimedia data, the time error between the self system clock and the system clock of the synchronous reference playback device is obtained, and then, when the absolute value of the clock error is less than the preset threshold value, the time error between the synchronous reference playback device and the synchronous reference playback device is obtained distance, judging whether the distance is greater than the preset distance, if so, adjusting the own system clock according to the time error, so that the time error is zero.

优选地,该获取与该同步参考播放设备之间的距离,包括:Preferably, the distance between the acquisition and the synchronous reference playback device includes:

向该同步参考播放设备发送测试信号;sending a test signal to the synchronous reference playback device;

接收该同步参考播放设备返回的测试信号的信号强度;Receive the signal strength of the test signal returned by the synchronous reference playback device;

根据该信号强度获取与同步参考播放设备之间的距离。According to the signal strength, the distance to the synchronization reference playback device is acquired.

优选地,根据该时间误差对自身系统时钟进行调节,包括:Preferably, the self-system clock is adjusted according to the time error, including:

根据该时间误差确定同步调节的调节方向和调节量;Determine the adjustment direction and adjustment amount of synchronous adjustment according to the time error;

根据该调节方向和调节量对自身系统时钟进行调节。The self-system clock is adjusted according to the adjustment direction and adjustment amount.

优选地,根据该调节方向和调节量对自身系统时钟进行调节,包括:根据该调节方向和调节量对自身系统时钟进行多次微调。Preferably, adjusting the self-system clock according to the adjustment direction and the adjustment amount includes: fine-tuning the self-system clock several times according to the adjustment direction and the adjustment amount.

优选地,处理器408还实现功能:当该时间误差的绝对值大于预设阈值时,根据该时间误差对自身系统时钟进行调节,以使得该时间误差为零。Preferably, the processor 408 further implements a function: when the absolute value of the time error is greater than a preset threshold, adjust its own system clock according to the time error, so that the time error is zero.

上述操作具体可参见前面的方法实施例,在此不再赘述。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 its own system clock and the system clock of the synchronous reference playback device during the process of playing multimedia data, and then, when the clock error When the absolute value is less than the preset threshold, the distance to the synchronous reference playback device is obtained, and it is judged whether the distance is greater than the preset distance. If so, the self-system clock is adjusted according to the time error, so that the time error is zero. This solution can adjust the system clock during multimedia playback and when the distance from the synchronous reference playback device is greater than the preset distance, so that the system clock is synchronized with the reference clock, thereby achieving the effect of multiple playback devices synchronously playing multimedia Compared with the prior art, the synchronization of playing multimedia between multimedia playing devices can be improved.

需要说明的是,本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,存储介质可以包括:只读存储器(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 specification The content should not be construed as a limitation of the invention.

Claims (12)

1. a kind of clock adjustment is it is characterised in that include:
During playing multi-medium data, obtain between itself system clock and the system clock of reference synchronization playback equipment Time error;
When described clocking error absolute value be less than predetermined threshold value when, obtain and described reference synchronization playback equipment between away from From;
Judge whether described distance is more than predeterminable range;
If so, then according to described time error, its own system clock is adjusted, so that described time error is zero.
2. clock adjustment as claimed in claim 1 is it is characterised in that described acquisition and described reference synchronization playback equipment The distance between, including:
Send test signal to described reference synchronization playback equipment;
Receive the signal intensity of the test signal that described reference synchronization playback equipment returns;
According to the distance between the acquisition of described signal intensity and reference synchronization playback equipment.
3. clock adjustment as claimed in claim 1 is it is characterised in that according to described time error to its own system clock It is adjusted, including:
Determine regulation direction and the regulated quantity of adjusted in concert according to described time error;
According to described regulation direction and regulated quantity, its own system clock is adjusted.
4. clock adjustment as claimed in claim 3 is it is characterised in that according to described regulation direction and regulated quantity to itself System clock is adjusted, including:According to described regulation direction and regulated quantity, its own system clock is repeatedly finely tuned.
5. clock adjustment as claimed in claim 1 is it is characterised in that also include:
When the absolute value of described time error is more than predetermined threshold value, according to described time error, its own system clock is adjusted Section, so that described time error is zero.
6. a kind of clock adjustment apparatus are it is characterised in that include:
Error acquiring unit, is play with reference synchronization for during playing multi-medium data, obtaining itself system clock Time error between the system clock of equipment;
Distance acquiring unit, for when the absolute value of described clocking error is less than predetermined threshold value, obtaining and described reference synchronization The distance between playback equipment;
Distance Judgment unit, for judging whether described distance is more than predeterminable range;
Adjustment unit, for when Distance Judgment unit judges distance is more than predeterminable range, according to described time error to itself being System clock is adjusted, so that described time error is zero.
7. clock adjustment apparatus as claimed in claim 6 are it is characterised in that described distance acquiring unit, specifically for:
When the absolute value of described clocking error is less than predetermined threshold value, send test signal to described reference synchronization playback equipment;
Receive the signal intensity of the test signal that described reference synchronization playback equipment returns;
According to the distance between the acquisition of described signal intensity and reference synchronization playback equipment.
8. clock adjustment apparatus as claimed in claim 6 are it is characterised in that described adjustment unit, specifically for:
Determination subelement, for determining regulation direction and the regulated quantity of adjusted in concert according to described time error;
Regulator unit, for being adjusted to its own system clock according to described regulation direction and regulated quantity.
9. clock adjustment apparatus as claimed in claim 6 are it is characterised in that described regulator unit, specifically for:According to institute State regulation direction and regulated quantity is repeatedly finely tuned to its own system clock.
10. clock adjustment apparatus as claimed in claim 6, it is characterised in that described adjustment unit, are additionally operable to:
When the absolute value of described time error is more than predetermined threshold value, according to described time error, its own system clock is adjusted Section, so that described time error is zero.
A kind of 11. terminals are it is characterised in that include:
Be stored with the memorizer of executable program code;
The processor coupling with described memorizer;
Described processor calls the described executable program code of storage in described memorizer, and execution such as claim 1 is to right Require the method described in 5 any one.
A kind of 12. multimedia synchronous Play Systems are it is characterised in that include:Control device and at least one playback equipment;Described Control device is connected with described playback equipment;Described playback equipment is used for execution if claim 1 is to any one of claim 5 institute The method stated.
CN201610880739.5A 2016-10-08 2016-10-08 Clock adjustment method, device, terminal and multimedia synchronous playback system Pending CN106385597A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610880739.5A CN106385597A (en) 2016-10-08 2016-10-08 Clock adjustment method, device, terminal and multimedia synchronous playback system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610880739.5A CN106385597A (en) 2016-10-08 2016-10-08 Clock adjustment method, device, terminal and multimedia synchronous playback system

Publications (1)

Publication Number Publication Date
CN106385597A true CN106385597A (en) 2017-02-08

Family

ID=57936506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610880739.5A Pending CN106385597A (en) 2016-10-08 2016-10-08 Clock adjustment method, device, terminal and multimedia synchronous playback system

Country Status (1)

Country Link
CN (1) CN106385597A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379491A (en) * 2018-09-30 2019-02-22 Oppo广东移动通信有限公司 Audio playback method, apparatus, electronic device, and computer-readable medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07280971A (en) * 1994-04-07 1995-10-27 Nissin Electric Co Ltd Monitor control system with the synchronizing function
CN1934790A (en) * 2004-03-17 2007-03-21 皇家飞利浦电子股份有限公司 Radio communication device
CN101118282A (en) * 2006-08-04 2008-02-06 Nec显示器解决方案株式会社 Distance measuring system and method
CN101547083A (en) * 2008-03-24 2009-09-30 杭州华三通信技术有限公司 Time synchronizer, time synchronization system and time synchronization method
CN101815177A (en) * 2010-03-11 2010-08-25 广东威创视讯科技股份有限公司 Synchronous displaying device, synchronous displaying method and superposition splice displaying system
CN201812149U (en) * 2010-10-14 2011-04-27 烟台持久钟表集团有限公司 Primary-secondary clock system
CN103200098A (en) * 2007-08-31 2013-07-10 晶像股份有限公司 Ensuring physical locality of entities sharing data
CN103220239A (en) * 2012-01-23 2013-07-24 辉达公司 Timing calibration method and device
CN103929677A (en) * 2014-03-27 2014-07-16 小米科技有限责任公司 Multimedia file playing method and device
CN104618737A (en) * 2013-11-01 2015-05-13 深圳中兴力维技术有限公司 Streaming media system clock slow synchronization method and streaming media system clock slow synchronization device
CN104703047A (en) * 2015-03-23 2015-06-10 北京京东方多媒体科技有限公司 Display parameter regulating method, remote controller and display device
CN104950309A (en) * 2014-03-26 2015-09-30 昊阳天宇科技(深圳)有限公司 Distance measuring apparatus and distance measuring method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07280971A (en) * 1994-04-07 1995-10-27 Nissin Electric Co Ltd Monitor control system with the synchronizing function
CN1934790A (en) * 2004-03-17 2007-03-21 皇家飞利浦电子股份有限公司 Radio communication device
CN101118282A (en) * 2006-08-04 2008-02-06 Nec显示器解决方案株式会社 Distance measuring system and method
CN103200098A (en) * 2007-08-31 2013-07-10 晶像股份有限公司 Ensuring physical locality of entities sharing data
CN101547083A (en) * 2008-03-24 2009-09-30 杭州华三通信技术有限公司 Time synchronizer, time synchronization system and time synchronization method
CN101815177A (en) * 2010-03-11 2010-08-25 广东威创视讯科技股份有限公司 Synchronous displaying device, synchronous displaying method and superposition splice displaying system
CN201812149U (en) * 2010-10-14 2011-04-27 烟台持久钟表集团有限公司 Primary-secondary clock system
CN103220239A (en) * 2012-01-23 2013-07-24 辉达公司 Timing calibration method and device
CN104618737A (en) * 2013-11-01 2015-05-13 深圳中兴力维技术有限公司 Streaming media system clock slow synchronization method and streaming media system clock slow synchronization device
CN104950309A (en) * 2014-03-26 2015-09-30 昊阳天宇科技(深圳)有限公司 Distance measuring apparatus and distance measuring method
CN103929677A (en) * 2014-03-27 2014-07-16 小米科技有限责任公司 Multimedia file playing method and device
CN104703047A (en) * 2015-03-23 2015-06-10 北京京东方多媒体科技有限公司 Display parameter regulating method, remote controller and display device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
于湘等: "二十世纪世界重大发明", 《二十世纪人类大事记丛书》 *
谢广明等: "机器人综合实践", 《北京大学机器人学基础系列教材》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379491A (en) * 2018-09-30 2019-02-22 Oppo广东移动通信有限公司 Audio playback method, apparatus, electronic device, and computer-readable medium
WO2020063046A1 (en) * 2018-09-30 2020-04-02 Oppo广东移动通信有限公司 Audio playback method and device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN106373600B (en) Audio synchronous playing method, device, system and terminal
CN104243671B (en) Volume adjusting method, device and electronic equipment
CN103905879B (en) The method, apparatus and equipment that a kind of video data and audio data are played simultaneously
CN103905881B (en) The method, apparatus and equipment that a kind of video data and audio data are played simultaneously
CN103905876A (en) Video data and audio data synchronized playing method and device and equipment
CN106411448A (en) Play control method, device and terminal
CN106254903B (en) A kind of synchronous broadcast method of multi-medium data, apparatus and system
CN106341713B (en) Multimedia synchronous playing method, device, system and terminal
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
CN106411447B (en) playing control method, device and terminal
CN106452643B (en) playing control method, device, terminal and playing system
CN106101776B (en) Volume adjusting method, intelligent device and sound box
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
CN106452644A (en) Play control method, device and terminal
CN106412625B (en) multimedia synchronous playing method, device, terminal and system
CN106303616B (en) Play control method, device and terminal
CN106375823B (en) Clock adjusting method, device, terminal and multimedia synchronous playing system
CN111885591A (en) Network connection method, device, storage medium and terminal
CN105159655B (en) Behavior event playing method and device
CN106454420B (en) Clock synchronization method and device
CN106454953A (en) Flow control method, device and terminal
CN106445458B (en) Playing control method, device and terminal
CN112367425B (en) Volume adjusting method and device and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170208