WO2016201888A1 - 多媒体文件播放方法及装置 - Google Patents

多媒体文件播放方法及装置 Download PDF

Info

Publication number
WO2016201888A1
WO2016201888A1 PCT/CN2015/095330 CN2015095330W WO2016201888A1 WO 2016201888 A1 WO2016201888 A1 WO 2016201888A1 CN 2015095330 W CN2015095330 W CN 2015095330W WO 2016201888 A1 WO2016201888 A1 WO 2016201888A1
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
audio
video
playback device
timestamp
Prior art date
Application number
PCT/CN2015/095330
Other languages
English (en)
French (fr)
Inventor
谭康喜
魏先哲
马戈
Original Assignee
小米科技有限责任公司
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 小米科技有限责任公司 filed Critical 小米科技有限责任公司
Priority to JP2016525066A priority Critical patent/JP6626440B2/ja
Priority to RU2017102691A priority patent/RU2643192C1/ru
Priority to MX2017005370A priority patent/MX370893B/es
Publication of WO2016201888A1 publication Critical patent/WO2016201888A1/zh

Links

Images

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/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
    • H04N21/43076Synchronising 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 of the same content streams on multiple devices, e.g. when family members are watching the same movie on different devices
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/12Synchronisation between the display unit and other units, e.g. other display units, video-disc players
    • 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/236Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
    • H04N21/23605Creation or processing of packetized elementary streams [PES]
    • 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/434Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
    • H04N21/4343Extraction or processing of packetized elementary streams [PES]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2370/00Aspects of data communication
    • G09G2370/04Exchange of auxiliary data, i.e. other than image data, between monitor and graphics controller

Definitions

  • the present disclosure relates to the field of computers, and in particular, to a multimedia file playing method and apparatus.
  • multimedia playback devices with playback functions, such as computers, mobile phones, tablet computers, etc.
  • multimedia playback devices which can play multimedia files, including audio data packets and video data. package.
  • the multimedia playing device plays the multimedia file
  • the multimedia playing device needs to send the audio data packet included in the multimedia file to the audio playing device, and send the video data packet included in the multimedia file to the video playing device to play the multimedia file.
  • the multimedia playback device is a computer.
  • the host of the computer that is, the CPU (Central Processing Unit) needs to send the audio data package included in the multimedia file to the computer.
  • the speaker connected to the CPU transmits the video data package included in the multimedia file to the display connected to the CPU to play the multimedia file.
  • the CPU Central Processing Unit
  • the present disclosure provides a multimedia file playing method and apparatus.
  • a multimedia file playing method comprising:
  • the video playback device when receiving the first timestamp and the second timestamp, transmitting, according to the first timestamp and the second timestamp, a second audio data packet to the audio playback device, and to the The video playback device sends the second video data a packet to synchronously play the second audio data packet and the second video data packet, the second audio data packet being an audio data packet sent after the first audio data packet, the second video data packet a video data packet sent after the first video data packet.
  • the method before the sending, by the audio playback device, the first audio data packet included in the multimedia file, the method further includes:
  • the data test identifier is added to the obtained audio data packet, and the first audio data packet is obtained. And adding the data test identifier to the obtained video data packet, before obtaining the first video data packet, the method further includes:
  • the data test identifier is encapsulated in a specified format.
  • the sending, by the first timestamp and the second timestamp, the second audio data packet to the audio playback device, And sending the second video data packet to the video playing device including:
  • a multimedia file playback apparatus comprising:
  • a first sending module configured to send, to the audio playback device, a first audio data packet included in the multimedia file, where the first audio data packet carries a data test identifier, so that the audio playback device returns the first time based on the data test identifier
  • the first timestamp is a timestamp when the audio playback device receives the first audio data packet
  • a second sending module configured to send, to the video playing device, a first video data packet included in the multimedia file, where the first video data packet carries the data test identifier, so that the video playing device is based on the data test identifier Returning a second timestamp, where the second timestamp is a timestamp that the video playback device receives the first video data packet;
  • a third sending module configured to send the second audio to the audio playback device based on the first timestamp and the second timestamp when receiving the first timestamp and the second timestamp Packet, and to the video playback device Transmitting a second video data packet to synchronously play the second audio data packet and the second video data packet, where the second audio data packet is an audio data packet sent after the first audio data packet, The second video data packet is a video data packet sent after the first video data packet.
  • the device further includes:
  • An acquiring module configured to periodically acquire an audio data packet from an audio data packet included in the multimedia file, and periodically acquire a video data packet from a video data packet included in the multimedia file;
  • a adding module configured to add the data test identifier to the obtained audio data packet, obtain a first audio data packet, and add the data test identifier to the obtained video data packet to obtain a first video data packet.
  • the device further includes:
  • a packaging module configured to encapsulate the data test identifier according to a specified format.
  • the third sending module includes:
  • a first determining unit configured to determine, according to the first timestamp and a sending time of the first audio data packet, a transmission time interval of the first audio data packet, to obtain an audio transmission time interval
  • a second determining unit configured to determine, according to the second timestamp and a sending time of the first video data packet, a transmission time interval of the first video data packet, to obtain a video transmission time interval
  • a sending unit configured to send, according to the audio transmission time interval and the video transmission time interval, a second audio data packet to the audio playback device, and send a second video data packet to the video playback device.
  • a multimedia file playback apparatus comprising:
  • a memory for storing processor executable instructions
  • processor is configured to:
  • the video playback device when receiving the first timestamp and the second timestamp, transmitting, according to the first timestamp and the second timestamp, a second audio data packet to the audio playback device, and to the The video playback device sends a second video data packet to synchronously play the second audio data packet and the second video data packet, where the second audio data packet is the first An audio data packet sent after an audio data packet, the second video data packet being a video data packet sent after the first video data packet.
  • the multimedia playing device sends a first audio data packet to the audio playing device, and sends the first video data packet to the video device, the first audio data packet and the first A video data packet carries a data test identifier.
  • the audio playback device receives the data test identifier, the audio playback device returns a first timestamp.
  • the video playback device When the video playback device receives the data test identifier, the video playback device returns a second timestamp, the multimedia playback device sends a second audio data packet to the audio playback device based on the first timestamp and the second timestamp, and sends a second video data packet to the video playback device to play the first
  • the second audio data packet and the second video data packet can solve the problem that the audio data and the video data are not synchronized when the multimedia file is played.
  • FIG. 1 is a flowchart of a multimedia file playing method according to an exemplary embodiment.
  • FIG. 2 is a flowchart of another multimedia file playing method according to an exemplary embodiment.
  • FIG. 3 is a block diagram of a multimedia file playback apparatus, according to an exemplary embodiment.
  • FIG. 4 is a block diagram of another multimedia file playback apparatus, according to an exemplary embodiment.
  • FIG. 5 is a block diagram of still another multimedia file playing device according to an exemplary embodiment.
  • FIG. 6 is a block diagram of a third transmitting module according to an exemplary embodiment.
  • FIG. 7 is a block diagram of another multimedia file playback apparatus, according to an exemplary embodiment.
  • FIG. 1 is a flowchart of a multimedia file playing method according to an exemplary embodiment. As shown in FIG. 1, the method includes the following steps.
  • step 101 the first audio data packet included in the multimedia file is sent to the audio playback device, where the first audio data packet carries a data test identifier, so that the audio playback device returns a first time stamp based on the data test identifier, the first The timestamp is a timestamp of the first audio data packet received by the audio playback device.
  • step 102 the first video data packet included in the multimedia file is sent to the video playback device, where the first video data packet carries the data test identifier, so that the video playback device returns a second time stamp based on the data test identifier.
  • the second timestamp is a timestamp of the first video data packet received by the video playback device.
  • step 103 when the first timestamp and the second timestamp are received, the second audio data packet is sent to the audio playback device based on the first timestamp and the second timestamp, and the video is sent to the video
  • the playing device sends a second video data packet to synchronously play the second audio data packet and the second video data packet, where the second audio data packet is an audio data packet sent after the first audio data packet, the second video The data packet is a video data packet sent after the first video data packet.
  • the multimedia playback device sends a first audio data packet to the audio playback device, and sends a first video data packet to the video device, the first audio data packet and the first video data packet carrying data test. Identifying, when the audio playback device receives the data test identifier, the audio playback device returns a first timestamp, and when the video playback device receives the data test identifier, the video playback device returns a second timestamp, the multimedia The playback device sends a second audio data packet to the audio playback device based on the first timestamp and the second timestamp, and sends a second video data packet to the video playback device to synchronously play the second audio data packet and the first
  • the second video data packet can solve the problem that the audio data and the video data are not synchronized when the multimedia file is played.
  • the method before the first audio data package included in the multimedia file is sent to the audio playback device, the method further includes:
  • the data test identifier is added to the acquired audio data packet to obtain a first audio data packet, and the data test identifier is added to the acquired video data packet to obtain a first video data packet.
  • the data test identifier is added to the acquired audio data packet to obtain a first audio data packet, and the data test identifier is added to the acquired video data packet to obtain a first video data packet.
  • the data test identifier is encapsulated in a specified format.
  • sending the second audio data packet to the audio playback device based on the first timestamp and the second timestamp, and transmitting the second video data packet to the video playback device includes:
  • FIG. 2 is a flowchart of a multimedia file playing method according to an exemplary embodiment. Referring to FIG. 2, the method includes the following steps.
  • the multimedia playback device sends a first audio data packet included in the multimedia file to the audio playback device, where the first audio data packet carries a data test identifier.
  • the multimedia playback device When the multimedia playback device receives the multimedia file playback instruction, the multimedia playback device sends the audio data packet included in the multimedia file to the audio playback device, and sends the video data packet included in the multimedia file to the video playback device to play the Multimedia files.
  • the multimedia playback device may receive multiple audio data packets from the multimedia file during the multimedia playback device playing the multimedia file.
  • the multimedia playback device And acquiring an audio data packet, where the audio data packet is an audio data packet that needs to be currently played, and the multimedia playback device adds a data test identifier to the obtained audio data packet to obtain a first audio data packet, and then the multimedia audio package
  • the device can transmit the first audio data packet to the audio playback device.
  • the multimedia file playing instruction is used to play the multimedia file, and the multimedia file playing instruction is triggered by the user, and the user can trigger by using an instruction operation, for example, pressing a play button, a mouse clicking a play button, clicking a touch screen, etc.
  • an instruction operation for example, pressing a play button, a mouse clicking a play button, clicking a touch screen, etc.
  • the embodiment of the present disclosure does not specifically limit this.
  • the data test identifier carried by the first audio data packet is used to obtain the receiving time of the first audio data packet from the audio playback device, and the transmission of the first audio data packet may be reduced by using the data test identifier. Time, which in turn improves the efficiency of simultaneous playback of audio and video packets.
  • the multimedia playback device may encapsulate the data test identifier according to a specified format before adding the data test identifier to the acquired audio data packet.
  • the data test identifier may be ID1, and the specified format may be #data test identifier#, and the multimedia playback device encapsulates the data test identifier ID1 according to the specified format, and the encapsulated result is #ID1#.
  • the audio playback device can be a speaker, a power amplifier, a multimedia console, a speaker, etc.
  • the embodiment does not specifically limit this.
  • step 202 when the audio playback device receives the first audio data packet, the audio data playback device sends a first timestamp to the multimedia playback device based on the data test identifier carried by the first audio data packet, the first The timestamp is a timestamp of the first audio data packet received by the audio playback device.
  • the audio playback device determines that the first audio data packet carries the data test identifier, and at this time, the audio playback device can acquire the current time of the audio data playback device, and Determining the obtained current time as the receiving time of the first audio data packet, and in order to ensure the transmission security of the receiving time, the audio data playing device converts the receiving time of the first audio data packet into the first time stamp. And transmitting the first timestamp to the multimedia playing device.
  • the data test identifier carried by the first audio data packet is encapsulated according to a specified format, and therefore, when the audio playback device receives the first audio In the data packet, in order to obtain the data test identifier of the first audio data packet, the audio playback device needs to parse the data test identifier carried in the first audio data packet according to a specified format, thereby obtaining the data test identifier.
  • the audio playback device when the audio playback device receives the data test identifier carried by the first audio data packet as #ID1#, the audio playback device parses the #ID1# according to the specified format when the multimedia playback device is packaged, thereby obtaining the The data test ID is ID1.
  • step 203 the multimedia playback device sends a first video data packet included in the multimedia file to the video playback device, where the first video data packet carries the data test identifier.
  • the multimedia playback device may receive multiple video data from the multimedia file during the process of playing the multimedia file.
  • a video data packet is obtained, where the video data packet is a video data packet that needs to be played, and the multimedia playback device adds a data test identifier to the acquired video data packet to obtain a first video data packet, and then the multimedia data packet The playback device sends the first video data packet to the video playback device.
  • the data test identifier carried by the first video data packet is used to obtain the receiving time of the first video data packet from the video playback device, and the transmission of the first video data packet may be reduced by using the data test identifier. Time, which in turn improves the efficiency of simultaneous playback of audio and video packets.
  • the multimedia playback device may encapsulate the data test identifier according to a specified format before adding the data test identifier to the acquired video data packet.
  • the video playing device may not only be a display of the multimedia file playing device, such as a display of a mobile phone, a display of a tablet computer, or the like, or an independent display device, such as a display of a desktop computer or a display of a television set. Etc., the embodiments of the present disclosure do not specifically limit this.
  • step 204 when the video playback device receives the first video data packet, the video playback device returns a second timestamp to the multimedia playback device based on the data test identifier carried by the first video data packet, the second time.
  • the stamp is a timestamp of the first video data packet received by the video playback device.
  • the video playback device determines that the first video data packet carries the data test identifier. At this time, the video playback device can acquire the current time of the video playback device, and The current time is determined as the reception time of the first video data packet. To ensure the transmission security of the receiving time, the receiving time of the first video data packet between the video playing devices is converted into a second time stamp, and the second time stamp is sent to the multimedia playing device.
  • the data test identifier carried by the first video data packet is encapsulated according to a specified format, and therefore, when the video playback device receives the first video In the case of the data packet, in order to obtain the data test identifier of the first video data packet, the video playback device needs to parse the data test identifier carried in the first video data packet according to the specified format, thereby obtaining the data test identifier.
  • the operation of the video playback device to parse the data test identifier carried by the first video data packet is similar to the foregoing step 202.
  • the embodiments of the present disclosure are not described in detail herein.
  • the multimedia playback device since the performance of the audio playback device and the video playback device may be different, and the transmission time of the audio data packet is not equal to the transmission time of the video data packet, when the multimedia playback device plays the multimedia file, the played Audio data and video data may be out of sync. In order to avoid this phenomenon without burdening the multimedia playback device, the multimedia playback device may periodically receive audio packets from the multimedia file.
  • the multimedia playing device may periodically acquire a video data packet from the video data package included in the multimedia file, and add a data test identifier to the acquired video data packet.
  • the multimedia playing device may periodically acquire a video data packet from the video data package included in the multimedia file, and add a data test identifier to the acquired video data packet.
  • the multimedia playing device and the audio playing device and the video playing device can be connected by a data line, and the data line can be a data line supporting single-duplex communication or a data supporting full-duplex communication.
  • the HDMI High Definition Multimedia Interface
  • the USB Universal Serial BUS
  • the like are not specifically limited.
  • step 205 when the first timestamp and the second timestamp are received, the second audio data packet is sent to the audio playback device based on the first timestamp and the second timestamp, and the video is sent to the video
  • the playing device sends a second video data packet to synchronously play the second audio data packet and the second video data packet, where the second audio data packet is an audio data packet sent after the first audio data packet, the second video
  • the data packet is a video data packet sent after the first video data packet.
  • the multimedia playing device determines the transmission of the first audio data packet based on the first timestamp and the sending time of the first audio data packet. The time interval is obtained, and the audio transmission time interval is obtained. Similarly, the multimedia playback device determines the transmission time interval of the first video data packet based on the second timestamp and the sending time of the first video data packet, and obtains a video transmission time interval. The multimedia playback device transmits a second audio data packet to the audio playback device based on the obtained audio transmission time interval and the video transmission time interval, and transmits the second video data packet to the video playback device.
  • the multimedia playback device determines the transmission time interval of the first audio data packet based on the first timestamp and the sending time of the first audio data packet, and the operation of obtaining the audio transmission time interval may be: the multimedia playback device pair Converting, by the first timestamp, a receiving time of the first audio data packet, calculating a difference between a receiving time of the first audio data packet and a sending time of the first audio data packet, thereby calculating the difference Determined as the transmission time interval of the first audio data packet.
  • the multimedia playback device determines the transmission time interval of the first video data packet based on the second timestamp and the sending time of the first video data packet, and the operation of obtaining the video transmission time interval may be: the multimedia playback device Converting the second timestamp to obtain the receiving time of the first audio data packet, calculating a difference between the receiving time of the first video data packet and the sending time of the first video data packet, thereby The value is determined as the transmission time interval of the first video data packet.
  • the multimedia playback device sends a second audio data packet to the audio playback device based on the audio transmission time interval and the video transmission time interval, and sends a second video data packet to the video playback device to synchronously play the second audio data packet.
  • the manner of the audio data packet and the second video data packet may include the following cases in (1)-(3), as described below.
  • the multimedia playing device may first send the second audio data packet to the audio playing device, and at the same time, the multimedia playing device may start timing the sending time of the second audio data packet. When the timing time reaches the delay time, the multimedia playing device may further send the second video data packet to the video playing device to synchronously play the second audio data packet and the second video data packet.
  • the audio transmission time interval of the first audio data packet is 1 s
  • the video data transmission time interval of the first video data packet is 0.5 s
  • the transmission time of the first audio data packet is determined to be longer than the transmission time of the first video data packet. 0.5s long, count Calculating the difference between the video data transmission time interval and the audio data transmission time interval, and obtaining a delay time of 0.5 s. Therefore, the multimedia playback device may first send the second audio data packet to the audio playback device, and at the same time, the multimedia The playing device starts timing the sending time of the second audio data packet, and when the timing time reaches the delay time of 0.5 s, the multimedia playing device can further send the second video data packet to the video playing device to synchronously play the second audio. The data packet and the second video data packet.
  • the multimedia playback device may first send the second frequency data packet to the video playback device, and at the same time, the multimedia playback device sends the second video data packet. Starting timing, when the timing time reaches the delay time, the multimedia playing device may further send the second audio data packet to the audio playing device to synchronously play the second audio data packet and the second video data packet.
  • the audio transmission time interval of the first audio data packet is 0.5 s
  • the video data transmission time interval of the first video data packet is 1 s
  • the transmission time of the first audio data packet is determined to be greater than the transmission of the first video data packet.
  • the time is short, and the difference between the video data transmission time interval and the audio data transmission time interval is calculated, and the delay time is 0.5 s. Therefore, the multimedia playback device may first send the second frequency data packet to the video playback device. At the same time, the multimedia playing device starts timing the sending time of the second video data packet. When the time is up to 0.5 s, the multimedia playing device can send the second audio data packet to the audio playing device to play synchronously. The second audio data packet and the second video data packet.
  • the multimedia playback device plays the video
  • the device sends the second audio data packet to the audio playback device while transmitting the second frequency data packet to synchronously play the second audio data packet and the second video data packet.
  • the audio transmission time interval of the first audio data packet is 0.5 s
  • the video data transmission time interval of the first video data packet is also 0.5 s
  • the multimedia playback device determines the transmission time of the first audio data packet.
  • the transmission time of a video data packet is equal. Therefore, the multimedia playback device sends the second audio data packet to the audio playback device while transmitting the second audio data packet to the video playback device to synchronously play the second audio data packet. And the second video data packet.
  • the multimedia playback device sends a first audio data packet to the audio playback device, and sends a first video data packet to the video device, where the first audio data packet and the first video data packet carry a data test identifier.
  • the audio playback device receives the data test identifier
  • the audio playback device returns a first timestamp
  • the video playback device receives the data test identifier
  • the video playback device returns a second timestamp
  • the multimedia playback Device based on this Transmitting a second audio data packet to the audio playback device, and transmitting the second video data packet to the video playback device to synchronously play the second audio data packet and the second video data packet Therefore, the problem that the audio data and the video data are not synchronized when the multimedia file is played can be solved.
  • the multimedia playback device can periodically adjust the problem that the audio data and the video data are not synchronized when the multimedia file is played, and does not affect other operations of the multimedia playback device, thereby avoiding the The burden generated by the multimedia playback device during real-time adjustment when playing multimedia files.
  • FIG. 3 is a block diagram of a multimedia file playing device according to an exemplary embodiment.
  • the apparatus includes a first sending module 301, a second sending module 302, and a third sending module 303.
  • the first sending module 301 is configured to send, to the audio playback device, a first audio data packet included in the multimedia file, where the first audio data packet carries a data test identifier, so that the audio playback device returns a first time stamp based on the data test identifier.
  • the first timestamp is a timestamp that the audio playback device receives the first audio data packet;
  • the second sending module 302 is configured to send, to the video playing device, the first video data packet included in the multimedia file, where the first video data packet carries the data test identifier, so that the video playing device returns the second time based on the data test identifier.
  • Stamping, the second timestamp is a timestamp of the first video data packet received by the video playback device;
  • a third sending module 303 configured to send, according to the first timestamp and the second timestamp, a second audio data packet to the audio playback device, when the first timestamp and the second timestamp are received, and Sending a second video data packet to the video playing device to synchronously play the second audio data packet and the second video data packet, where the second audio data packet is an audio data packet sent after the first audio data packet, The second video data packet is a video data packet sent after the first video data packet.
  • the apparatus further includes an acquisition module 304, an addition module 305.
  • the obtaining module 304 is configured to periodically acquire an audio data packet from the audio data package included in the multimedia file, and periodically acquire a video data packet from the video data package included in the multimedia file;
  • the adding module 305 is configured to add the data test identifier to the acquired audio data packet, obtain a first audio data packet, and add the data test identifier to the obtained video data packet to obtain a first video data packet.
  • the apparatus further includes a package module 306.
  • the encapsulation module 306 is configured to encapsulate the data test identifier according to a specified format.
  • the third sending module 303 includes a first determining unit 3031, a second determining unit 3032, and a sending unit 3033.
  • the first determining unit 3031 is configured to determine, according to the first timestamp and the sending time of the first audio data packet, a transmission time interval of the first audio data packet, to obtain an audio transmission time interval.
  • the second determining unit 3032 is configured to determine, according to the second timestamp and the sending time of the first video data packet, a transmission time interval of the first video data packet, to obtain a video transmission time interval.
  • the sending unit 3033 is configured to send, according to the audio transmission time interval and the video transmission time interval, a second audio data packet to the audio playback device, and send the second video data packet to the video playback device.
  • the multimedia playback device sends a first audio data packet to the audio playback device, and sends a first video data packet to the video device, the first audio data packet and the first video data packet carrying data test. Identifying, when the audio playback device receives the data test identifier, the audio playback device returns a first timestamp, and when the video playback device receives the data test identifier, the video playback device returns a second timestamp, the multimedia The playback device sends a second audio data packet to the audio playback device based on the first timestamp and the second timestamp, and sends a second video data packet to the video playback device to synchronously play the second audio data packet and the first
  • the second video data packet can solve the problem that the audio data and the video data are not synchronized when the multimedia file is played.
  • the multimedia playback device can periodically adjust the problem that the audio data and the video data are not synchronized when the multimedia file is played, and does not affect other operations of the multimedia playback device, thereby avoiding the The burden generated by the multimedia playback device during real-time adjustment when playing multimedia files.
  • FIG. 7 is a block diagram of a multimedia file playback apparatus 700, according to an exemplary embodiment.
  • device 700 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • apparatus 700 can include one or more of the following components: processing component 702, memory 704, power component 706, multimedia component 708, audio component 710, input/output (I/O) interface 712, sensor component 714, And a communication component 716.
  • Processing component 702 typically controls the overall operation of device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • Processing component 702 can include one or more processors 720 to execute instructions to perform all or part of the steps described above.
  • processing component 702 can include one or more modules to facilitate interaction between component 702 and other components.
  • processing component 702 can include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
  • Memory 704 is configured to store various types of data to support operation at device 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phone book data, messages, pictures, videos, and the like. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof Now, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable programmable read only memory
  • PROM programmable read only memory
  • ROM read only memory
  • magnetic memory flash memory, disk or optical disk.
  • Power component 706 provides power to various components of device 700.
  • Power component 706 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 700.
  • the multimedia component 708 includes a screen between the device 700 and the user that provides an output interface.
  • the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the multimedia component 708 includes a front camera and/or a rear camera. When the device 700 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 710 is configured to output and/or input an audio signal.
  • audio component 710 includes a microphone (MIC) that is configured to receive an external audio signal when device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 704 or transmitted via communication component 716.
  • audio component 710 also includes a speaker for outputting an audio signal.
  • the I/O interface 712 provides an interface between the processing component 702 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
  • Sensor assembly 714 includes one or more sensors for providing device 700 with various aspects of status assessment.
  • sensor component 714 can detect an open/closed state of device 700, a relative positioning of components, such as the display and keypad of device 700, and sensor component 714 can also detect a change in position of one component of device 700 or device 700. The presence or absence of user contact with device 700, device 700 orientation or acceleration/deceleration, and temperature variation of device 700.
  • Sensor assembly 714 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor component 714 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 714 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 716 is configured to facilitate wired or wireless communication between device 700 and other devices.
  • the device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
  • communication component 716 receives a broadcast signal or broadcast associated message from an external broadcast management system via a broadcast channel. interest.
  • the communication component 716 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • apparatus 700 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor, or other electronic component implementation for performing the above methods.
  • non-transitory computer readable storage medium comprising instructions, such as a memory 704 comprising instructions executable by processor 720 of apparatus 700 to perform the above method.
  • the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
  • a non-transitory computer readable storage medium when instructions in the storage medium are executed by a processor of a mobile terminal, enabling the mobile terminal to perform a multimedia file playing method, the method comprising:
  • the audio playback device Sending, to the audio playback device, a first audio data packet included in the multimedia file, where the first audio data packet carries a data test identifier, so that the audio playback device returns a first time stamp based on the data test identifier, where the first time stamp is the audio Receiving, by the playback device, a timestamp of the first audio data packet;
  • the method before the first audio data package included in the multimedia file is sent to the audio playback device, the method further includes:
  • the data test identifier is added to the acquired audio data packet to obtain a first audio data packet, and the data test identifier is added to the acquired video data packet to obtain a first video data packet.
  • the data test identifier is added to the acquired audio data packet to obtain a first audio data packet, and the data test identifier is added to the acquired video data packet to obtain a first video data packet.
  • the data test identifier is encapsulated in a specified format.
  • sending the second audio data packet to the audio playback device based on the first timestamp and the second timestamp, and transmitting the second video data packet to the video playback device includes:
  • the multimedia playback device sends the first audio data packet to the audio playback device, and sends the first video data packet to the video device, the first audio data packet and the first video data packet carrying the data test identifier.
  • the audio playback device receives the data test identifier
  • the audio playback device returns a first timestamp
  • the video playback device receives the data test identifier
  • the video playback device returns a second timestamp
  • the device sends a second audio data packet to the audio playback device based on the first timestamp and the second timestamp, and sends a second video data packet to the video playback device to synchronously play the second audio data packet and the second
  • the video data packet can solve the problem that the audio data and the video data are not synchronized when the multimedia file is played.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Television Signal Processing For Recording (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本公开是关于一种多媒体文件播放方法及装置。所述方法包括:向音频播放设备发送第一音频数据包,以及向视频设备发送第一视频数据包,该第一音频数据包和该第一视频数据包携带数据测试标识;当该音频播放设备接收到该数据测试标识时,该音频播放设备返回第一时间戳;当该视频播放设备接收到该数据测试标识时,该视频播放设备返回第二时间戳;该多媒体播放设备基于该第一时间戳和该第二时间戳,向音频播放设备发送第二音频数据包,以及向视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,从而可以解决该多媒体文件播放时音频数据和视频数据不同步的问题。

Description

多媒体文件播放方法及装置
相关申请的交叉引用
本申请基于申请号为201510337320.0、申请日为2015/6/17的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及计算机领域,尤其涉及一种多媒体文件播放方法及装置。
背景技术
随着技术的快速发展,出现了越来越多具有播放功能的多媒体播放设备,比如计算机、手机、平板电脑等,通过这些多媒体播放设备可以播放多媒体文件,该多媒体文件包括音频数据包和视频数据包。当该多媒体播放设备播放多媒体文件时,该多媒体播放设备需要将该多媒体文件包括的音频数据包发送给音频播放设备,并将该多媒体文件包括的视频数据包发送给视频播放设备,以播放该多媒体文件。比如,该多媒体播放设备为计算机,当该计算机播放该多媒体文件时,该计算机的主机,也即是,CPU(Central Processing Unit,中央处理器)需要将多媒体文件包括的音频数据包发送给与该CPU连接的音箱,并将该多媒体文件包括的视频数据包发送给与该CPU连接的显示器,以播放该多媒体文件。
发明内容
为克服相关技术中存在的问题,本公开提供一种多媒体文件播放方法及装置。
根据本公开实施例的第一方面,提供一种多媒体文件播放方法,所述方法包括:
向音频播放设备发送多媒体文件包括的第一音频数据包,所述第一音频数据包携带数据测试标识,使所述音频播放设备基于所述数据测试标识返回第一时间戳,所述第一时间戳为所述音频播放设备接收到所述第一音频数据包的时间戳;
向视频播放设备发送所述多媒体文件包括的第一视频数据包,所述第一视频数据包携带所述数据测试标识,使所述视频播放设备基于所述数据测试标识返回第二时间戳,所述第二时间戳为所述视频播放设备接收到所述第一视频数据包的时间戳;
当接收到所述第一时间戳和所述第二时间戳时,基于所述第一时间戳和所述第二时间戳,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据 包,以同步播放所述第二音频数据包和所述第二视频数据包,所述第二音频数据包为所述第一音频数据包之后发送的音频数据包,所述第二视频数据包为所述第一视频数据包之后发送的视频数据包。
结合第一方面,在上述第一方面的第一种可能的实现方式中,所述向音频播放设备发送多媒体文件包括的第一音频数据包之前,还包括:
周期性地从所述多媒体文件包括的音频数据包中,获取一个音频数据包,以及周期性地从所述多媒体文件包括的视频数据包中,获取一个视频数据包;
向获取的音频数据包中添加所述数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加所述数据测试标识,得到第一视频数据包。
结合第一方面的第一种可能的实现方式,在上述第一方面的第二种可能的实现方式中,所述向获取的音频数据包中添加所述数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加所述数据测试标识,得到第一视频数据包之前,还包括:
将所述数据测试标识,按照指定格式进行封装。
结合第一方面,在上述第一方面的第三种可能的实现方式中,所述基于所述第一时间戳和所述第二时间戳,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包,包括:
基于所述第一时间戳和所述第一音频数据包的发送时间,确定所述第一音频数据包的传输时间间隔,得到音频传输时间间隔;
基于所述第二时间戳和所述第一视频数据包的发送时间,确定所述第一视频数据包的传输时间间隔,得到视频传输时间间隔;
基于所述音频传输时间间隔和所述视频传输时间间隔,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包。
根据本公开实施例的第二方面,提供一种多媒体文件播放装置,所述装置包括:
第一发送模块,用于向音频播放设备发送多媒体文件包括的第一音频数据包,所述第一音频数据包携带数据测试标识,使所述音频播放设备基于所述数据测试标识返回第一时间戳,所述第一时间戳为所述音频播放设备接收到所述第一音频数据包的时间戳;
第二发送模块,用于向视频播放设备发送所述多媒体文件包括的第一视频数据包,所述第一视频数据包携带所述数据测试标识,使所述视频播放设备基于所述数据测试标识返回第二时间戳,所述第二时间戳为所述视频播放设备接收到所述第一视频数据包的时间戳;
第三发送模块,用于当接收到所述第一时间戳和所述第二时间戳时,基于所述第一时间戳和所述第二时间戳,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备 发送第二视频数据包,以同步播放所述第二音频数据包和所述第二视频数据包,所述第二音频数据包为所述第一音频数据包之后发送的音频数据包,所述第二视频数据包为所述第一视频数据包之后发送的视频数据包。
结合第二方面,在上述第二方面的第一种可能的实现方式中,所述装置还包括:
获取模块,用于周期性地从所述多媒体文件包括的音频数据包中,获取一个音频数据包,以及周期性地从所述多媒体文件包括的视频数据包中,获取一个视频数据包;
添加模块,用于向获取的音频数据包中添加所述数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加所述数据测试标识,得到第一视频数据包。
结合第二方面的第一种可能的实现方式,在上述第二方面的第二种可能的实现方式中,所述装置还包括:
封装模块,用于将所述数据测试标识,按照指定格式进行封装。
结合第二方面,在上述第二方面的第三种可能的实现方式中,所述第三发送模块包括:
第一确定单元,用于基于所述第一时间戳和所述第一音频数据包的发送时间,确定所述第一音频数据包的传输时间间隔,得到音频传输时间间隔;
第二确定单元,用于基于所述第二时间戳和所述第一视频数据包的发送时间,确定所述第一视频数据包的传输时间间隔,得到视频传输时间间隔;
发送单元,用于基于所述音频传输时间间隔和所述视频传输时间间隔,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包。
根据本公开实施例的第三方面,提供一种多媒体文件播放装置,所述装置包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为:
向音频播放设备发送多媒体文件包括的第一音频数据包,所述第一音频数据包携带数据测试标识,使所述音频播放设备基于所述数据测试标识返回第一时间戳,所述第一时间戳为所述音频播放设备接收到所述第一音频数据包的时间戳;
向视频播放设备发送所述多媒体文件包括的第一视频数据包,所述第一视频数据包携带所述数据测试标识,使所述视频播放设备基于所述数据测试标识返回第二时间戳,所述第二时间戳为所述视频播放设备接收到所述第一视频数据包的时间戳;
当接收到所述第一时间戳和所述第二时间戳时,基于所述第一时间戳和所述第二时间戳,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包,以同步播放所述第二音频数据包和所述第二视频数据包,所述第二音频数据包为所述第 一音频数据包之后发送的音频数据包,所述第二视频数据包为所述第一视频数据包之后发送的视频数据包。
本公开的实施例提供的技术方案可以包括以下有益效果:该多媒体播放设备向音频播放设备发送第一音频数据包,以及向视频设备发送第一视频数据包,该第一音频数据包和该第一视频数据包携带数据测试标识,当该音频播放设备接收到该数据测试标识时,该音频播放设备返回第一时间戳,当该视频播放设备接收到该数据测试标识时,该视频播放设备返回第二时间戳,该多媒体播放设备基于该第一时间戳和该第二时间戳,向音频播放设备发送第二音频数据包,以及向视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,从而可以解决该多媒体文件播放时音频数据和视频数据不同步的问题。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。
图1是根据一示例性实施例示出的一种多媒体文件播放方法的流程图。
图2是根据一示例性实施例示出的另一种多媒体文件播放方法的流程图。
图3是根据一示例性实施例示出的一种多媒体文件播放装置的框图。
图4是根据一示例性实施例示出的另一种多媒体文件播放装置的框图。
图5是根据一示例性实施例示出的又一种多媒体文件播放装置的框图。
图6是根据一示例性实施例示出的一种第三发送模块的框图。
图7是根据一示例性实施例示出的另一种多媒体文件播放装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本发明的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种多媒体文件播放方法的流程图,如图1所示,该方法包括以下步骤。
在步骤101中,向音频播放设备发送多媒体文件包括的第一音频数据包,该第一音频数据包携带数据测试标识,使该音频播放设备基于该数据测试标识返回第一时间戳,该第一时间戳为该音频播放设备接收到该第一音频数据包的时间戳。
在步骤102中,向视频播放设备发送该多媒体文件包括的第一视频数据包,该第一视频数据包携带该数据测试标识,使该视频播放设备基于该数据测试标识返回第二时间戳,该第二时间戳为该视频播放设备接收到该第一视频数据包的时间戳。
在步骤103中,当接收到该第一时间戳和该第二时间戳时,基于该第一时间戳和该第二时间戳,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,该第二音频数据包为该第一音频数据包之后发送的音频数据包,该第二视频数据包为该第一视频数据包之后发送的视频数据包。
在本公开的实施例中,该多媒体播放设备向音频播放设备发送第一音频数据包,以及向视频设备发送第一视频数据包,该第一音频数据包和该第一视频数据包携带数据测试标识,当该音频播放设备接收到该数据测试标识时,该音频播放设备返回第一时间戳,当该视频播放设备接收到该数据测试标识时,该视频播放设备返回第二时间戳,该多媒体播放设备基于该第一时间戳和该第二时间戳,向音频播放设备发送第二音频数据包,以及向视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,从而可以解决该多媒体文件播放时音频数据和视频数据不同步的问题。
在本公开的另一实施例中,向音频播放设备发送多媒体文件包括的第一音频数据包之前,还包括:
周期性地从该多媒体文件包括的音频数据包中,获取一个音频数据包,以及周期性地从该多媒体文件包括的视频数据包中,获取一个视频数据包;
向获取的音频数据包中添加该数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加该数据测试标识,得到第一视频数据包。
在本公开的另一实施例中,向获取的音频数据包中添加该数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加该数据测试标识,得到第一视频数据包之前,还包括:
将该数据测试标识,按照指定格式进行封装。
在本公开的另一实施例中,基于该第一时间戳和该第二时间戳,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包,包括:
基于该第一时间戳和该第一音频数据包的发送时间,确定该第一音频数据包的传输时间 间隔,得到音频传输时间间隔;
基于该第二时间戳和该第一视频数据包的发送时间,确定该第一视频数据包的传输时间间隔,得到视频传输时间间隔;
基于该音频传输时间间隔和该视频传输时间间隔,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包。
上述所有可选技术方案,均可按照任意结合形成本公开的可选实施例,本公开实施例对此不再一一赘述。
图2是根据一示例性实施例示出的一种多媒体文件播放方法的流程图,参照图2,该方法包括以下步骤。
在步骤201中,该多媒体播放设备向音频播放设备发送多媒体文件包括的第一音频数据包,该第一音频数据包携带数据测试标识。
当该多媒体播放设备接收到多媒体文件播放指令时,该多媒体播放设备将该多媒体文件包括的音频数据包发送给音频播放设备,将该多媒体文件包括的视频数据包发送给视频播放设备,以播放该多媒体文件。而为了保证音频播放设备播放的音频数据和视频播放设备播放的视频数据保持同步,在该多媒体播放设备播放该多媒体文件的过程中,该多媒体播放设备可以从该多媒体文件包括的多个音频数据包中,获取一个音频数据包,该音频数据包为当前需要播放的音频数据包,该多媒体播放设备在获取的音频数据包中添加数据测试标识,以得到第一音频数据包,之后,该多媒体播放设备可以将该第一音频数据包发送给音频播放设备。
其中,该多媒体文件播放指令用于播放该多媒体文件,且该多媒体文件播放指令由用户触发,用户可以通过指令操作来进行触发,比如,按播放键、鼠标点击播放按钮、点击触摸屏的操作等等,本公开实施例对此不做具体限定。
需要说明的是,该第一音频数据包携带的数据测试标识用于从该音频播放设备中获取该第一音频数据包的接收时间,且通过该数据测试标识可以减少第一音频数据包的传输时间,进而提高了音频数据包和视频数据包同步播放的效率。
进一步,为了保证该数据测试标识被安全地发送到音频播放设备,该多媒体播放设备在获取的音频数据包中添加数据测试标识之前,该多媒体播放设备可以将该数据测试标识,按照指定格式进行封装。
比如,该数据测试标识可以为ID1,该指定格式可以为#数据测试标识#,则该多媒体播放设备按照指定格式对该数据测试标识ID1进行封装,得到封装后的结果为#ID1#。
需要说明的是,该音频播放设备可以是音箱、功放、多媒体控制台、扬声器等等,本公 开实施例对此不做具体限定。
在步骤202中,当该音频播放设备接收到第一音频数据包时,该音频数据播放设备基于该第一音频数据包携带的数据测试标识,向多媒体播放设备发送第一时间戳,该第一时间戳为该音频播放设备接收到该第一音频数据包的时间戳。
当该音频播放设备接收到第一音频数据包时,该音频数据播放设备确定该第一音频数据包携带数据测试标识,此时,该音频播放设备可以获取该音频数据播放设备的当前时间,并将获取的当前时间确定为该第一音频数据包的接收时间,为了保证该接收时间的传输安全性,该音频数据播放设备将该第一音频数据包的该接收时间转换为第一时间戳,并将该第一时间戳发送给该多媒体播放设备。
进一步,由于该多媒体播放设备在发送该第一音频数据包时,对该第一音频数据包携带的数据测试标识,按照指定格式进行了封装,因此,当该音频播放设备接收到该第一音频数据包时,为了获取该第一音频数据包携带数据测试标识,该音频播放设备需要按照指定格式,对该第一音频数据包携带的数据测试标识进行解析,从而得到该数据测试标识。
比如,当该音频播放设备接收到该第一音频数据包携带的数据测试标识为#ID1#时,该音频播放设备按照多媒体播放设备封装时的指定格式,对#ID1#进行解析,从而得到该数据测试标识为ID1。
在步骤203中,该多媒体播放设备向视频播放设备发送该多媒体文件包括的第一视频数据包,该第一视频数据包携带该数据测试标识。
为了保证音频播放设备播放的音频数据包和视频播放设备播放的视频数据包保持同步,在该多媒体播放设备在播放多媒体文件的过程中,该多媒体播放设备可以从该多媒体文件包括的多个视频数据包中,获取一个视频数据包,该视频数据包为当前需要播放的视频数据包,该多媒体播放设备在获取的视频数据包中添加数据测试标识,以得到第一视频数据包,之后,该多媒体播放设备将该第一视频数据包发送给视频播放设备。
需要说明的是,该第一视频数据包携带的数据测试标识用于从该视频播放设备中获取该第一视频数据包的接收时间,且通过该数据测试标识可以减少第一视频数据包的传输时间,进而提高了音频数据包和视频数据包同步播放的效率。
进一步,为了保证该数据测试标识被安全地发送到视频播放设备,该多媒体播放设备在获取的视频数据包中添加数据测试标识之前,该多媒体播放设备可以将该数据测试标识,按照指定格式进行封装。
该多媒体播放设备对该数据测试标识进行封装的操作与上述步骤201类似,本公开实施例在此不再进行详细阐述。
需要说明的是,该视频播放设备不仅可以是该多媒体文件播放设备的显示器,比如,手机的显示器、平板电脑的显示器等,也可以是独立的显示设备,比如台式计算机的显示器、电视机的显示器等等,本公开实施例对此不做具体限定。
在步骤204中,当该视频播放设备接收到第一视频数据包时,该视频播放设备基于该第一视频数据包携带的数据测试标识,向多媒体播放设备返回第二时间戳,该第二时间戳为该视频播放设备接收到该第一视频数据包的时间戳。
当该视频播放设备接收到第一视频数据包时,该视频播放设备确定该第一视频数据包携带数据测试标识,此时,该视频播放设备可以获取该视频播放设备的当前时间,并将获取的当前时间确定为该第一视频数据包的接收时间。而为了保证该接收时间的传输安全性,该视频播放设备间该第一视频数据包的接收时间转换为第二时间戳,并将该第二时间戳发送给该多媒体播放设备。
进一步,由于该多媒体播放设备在发送该第一视频数据包时,对该第一视频数据包携带的数据测试标识,按照指定格式进行了封装,因此,当该视频播放设备接收到该第一视频数据包时,为了获取该第一视频数据包携带数据测试标识,该视频播放设备需要按照指定格式,对该第一视频数据包携带的数据测试标识进行解析,从而得到该数据测试标识。
该视频播放设备对该第一视频数据包携带的数据测试标识进行解析的操作与上述步骤202类似,本公开实施例在此不再进行详细阐述。
进一步地,由于音频播放设备和视频播放设备的性能会存在差异,且音频数据包的传输时间与视频数据包的传输时间是不相等的,因此,当该多媒体播放设备播放多媒体文件时,播放的音频数据和视频数据会出现不同步的现象,为了避免这种现象,而又不给该多媒体播放设备增加过重的负担,该多媒体播放设备可以周期性的从该多媒体文件包括的音频数据包中,获取一个音频数据包,并在获取的音频数据包中添加数据测试标识,得到第一音频数据包,并将该第一音频数据包周期性地发送给音频播放设备,以使该音频播放设备周期性的返回第一时间戳;同理,该多媒体播放设备可以周期性的从该多媒体文件包括的视频数据包中,获取一个视频数据包,并在获取的视频数据包中添加数据测试标识,得到第一视频数据包,并将第一视频数据包周期性地发送给视频播放设备,以使该视频播放设备周期性的返回第二时间戳,以解决多媒体文件播放时音频数据和视频数据不同步的现象。
需要说明的是,该多媒体播放设备与音频播放设备和视频播放设备之间可以通过数据线来连接,该数据线可以为支持单双工通讯的数据线、也可以为支持全双工通讯的数据线,比如,HDMI(High Definition Multimedia Interface,数字高清多媒体接口)、USB(Universal Serial BUS,通用串行总线)等,本公开实施例对此不做具体限定。
在步骤205中,当接收到该第一时间戳和该第二时间戳时,基于该第一时间戳和该第二时间戳,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,该第二音频数据包为该第一音频数据包之后发送的音频数据包,该第二视频数据包为该第一视频数据包之后发送的视频数据包。
当该多媒体播放设备接收到该第一时间戳和该第二时间戳时,该多媒体播放设备基于该第一时间戳和该第一音频数据包的发送时间,确定该第一音频数据包的传输时间间隔,得到音频传输时间间隔;同理,该多媒体播放设备基于该第二时间戳和该第一视频数据包的发送时间,确定该第一视频数据包的传输时间间隔,得到视频传输时间间隔;该多媒体播放设备基于得到的音频传输时间间隔和视频传输时间间隔,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包。
其中,该多媒体播放设备基于该第一时间戳和该第一音频数据包的发送时间,确定该第一音频数据包的传输时间间隔,得到音频传输时间间隔的操作可以为:该多媒体播放设备对第一时间戳进行转换,从而得到该第一音频数据包的接收时间,计算该第一音频数据包的接收时间与该第一音频数据包的发送时间之间的差值,从而将该差值确定为该第一音频数据包的传输时间间隔。同理,该多媒体播放设备基于该第二时间戳和该第一视频数据包的发送时间,确定该第一视频数据包的传输时间间隔,得到视频传输时间间隔的操作可以为:该多媒体播放设备对第二时间戳进行转换,从而得到该第一音频数据包的接收时间,计算该第一视频数据包的接收时间与该第一视频数据包的发送时间之间的差值,从而将该差值确定为该第一视频数据包的传输时间间隔。
另外,该多媒体播放设备基于该音频传输时间间隔和该视频传输时间间隔,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包的方式可以包括如下(1)-(3)中情况,如下所述。
(1)、当该音频传输时间间隔大于该视频数据传输时间间隔时,确定第一音频数据包的传输时间比第一视频数据包的传输时间长,计算该视频数据传输时间间隔与音频数据传输时间间隔之间的差值,得到延迟时间,因此,该多媒体播放设备可以先向该音频播放设备发送第二音频数据包,同时,该多媒体播放设备可以对第二音频数据包的发送时间开始计时,当该计时时间达到该延迟时间时,该多媒体播放设备可以再向该视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包。
比如,该第一音频数据包的音频传输时间间隔为1s,该第一视频数据包的视频数据传输时间间隔为0.5s,确定第一音频数据包的传输时间比第一视频数据包的传输时间长0.5s,计 算该视频数据传输时间间隔与音频数据传输时间间隔之间的差值,得到延迟时间为0.5s,因此,该多媒体播放设备可以先向该音频播放设备发送第二音频数据包,同时,该多媒体播放设备对第二音频数据包的发送时间开始计时,当该计时时间达到延迟时间0.5s时,该多媒体播放设备可以再向该视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包。
(2)、当该音频传输时间间隔小于该视频数据传输时间间隔时,确定该第一音频数据包的传输时间比第一视频数据包的传输时间短,计算该音频数据传输时间间隔与该视频数据传输时间间隔之间的差值,得到延迟时间,因此,该多媒体播放设备可以先向该视频播放设备发送第二是频数据包,同时,该多媒体播放设备对第二视频数据包的发送时间开始计时,当该计时时间达到该延迟时间时,,该多媒体播放设备可以再向该音频播放设备发送第二音频数据包,以同步播放该第二音频数据包和该第二视频数据包。
比如,该第一音频数据包的音频传输时间间隔为0.5s,该第一视频数据包的视频数据传输时间间隔为1s,确定该第一音频数据包的传输时间比第一视频数据包的传输时间短,计算该视频数据传输时间间隔与音频数据传输时间间隔之间的差值,得到延迟时间为0.5s,因此,该多媒体播放设备可以先向该视频播放设备发送第二是频数据包,同时,该多媒体播放设备对第二视频数据包的发送时间开始计时,当该计时时间达到延迟时间0.5s时,该多媒体播放设备可以再向该音频播放设备发送第二音频数据包,以同步播放该第二音频数据包和该第二视频数据包。
(3)、当该音频传输时间间隔等于该视频数据传输时间间隔时,确定该第一音频数据包的传输时间与第一视频数据包的传输时间相等,因此,该多媒体播放设备向该视频播放设备发送第二是频数据包的同时向该音频播放设备发送第二音频数据包,以同步播放该第二音频数据包和该第二视频数据包。
比如,该第一音频数据包的音频传输时间间隔为0.5s,该第一视频数据包的视频数据传输时间间隔也为0.5s,该多媒体播放设备确定该第一音频数据包的传输时间与第一视频数据包的传输时间相等,因此,该多媒体播放设备向该视频播放设备发送第二是频数据包的同时向该音频播放设备发送第二音频数据包,以同步播放该第二音频数据包和该第二视频数据包。
在本公开实施例中,该多媒体播放设备向音频播放设备发送第一音频数据包,以及向视频设备发送第一视频数据包,该第一音频数据包和该第一视频数据包携带数据测试标识,当该音频播放设备接收到该数据测试标识时,该音频播放设备返回第一时间戳,当该视频播放设备接收到该数据测试标识时,该视频播放设备返回第二时间戳,该多媒体播放设备基于该 第一时间戳和该第二时间戳,向音频播放设备发送第二音频数据包,以及向视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,从而可以解决该多媒体文件播放时音频数据和视频数据不同步的问题。由于该数据测试标识是周期性的携带,从而该多媒体播放设备可以周期性的调节多媒体文件播放时音频数据和视频数据不同步的问题,同时也不影响该多媒体播放设备的其他运行,避免了该多媒体播放设备在播放多媒体文件时进行实时调整所产生的负担。
图3是根据一示例性实施例示出的一种多媒体文件播放装置框图。参照图3,该装置包括第一发送模块301,第二发送模块302,第三发送模块303。
第一发送模块301,用于向音频播放设备发送多媒体文件包括的第一音频数据包,该第一音频数据包携带数据测试标识,使该音频播放设备基于该数据测试标识返回第一时间戳,该第一时间戳为该音频播放设备接收到该第一音频数据包的时间戳;
第二发送模块302,用于向视频播放设备发送该多媒体文件包括的第一视频数据包,该第一视频数据包携带该数据测试标识,使该视频播放设备基于该数据测试标识返回第二时间戳,该第二时间戳为该视频播放设备接收到该第一视频数据包的时间戳;
第三发送模块303,用于当接收到该第一时间戳和该第二时间戳时,基于该第一时间戳和该第二时间戳,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,该第二音频数据包为该第一音频数据包之后发送的音频数据包,该第二视频数据包为该第一视频数据包之后发送的视频数据包。
在本公开的另一实施例中,参见图4,该装置还包括获取模块304,添加模块305。
获取模块304,用于周期性地从该多媒体文件包括的音频数据包中,获取一个音频数据包,以及周期性地从该多媒体文件包括的视频数据包中,获取一个视频数据包;
添加模块305,用于向获取的音频数据包中添加该数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加该数据测试标识,得到第一视频数据包。
在本公开的另一实施例中,参见图5,该装置还包括封装模块306。
封装模块306,用于将该数据测试标识,按照指定格式进行封装。
在本公开的另一实施例中,参见图6,该第三发送模块303包括第一确定单元3031,第二确定单元3032,发送单元3033。
第一确定单元3031,用于基于该第一时间戳和该第一音频数据包的发送时间,确定该第一音频数据包的传输时间间隔,得到音频传输时间间隔;
第二确定单元3032,用于基于该第二时间戳和该第一视频数据包的发送时间,确定该第一视频数据包的传输时间间隔,得到视频传输时间间隔;
发送单元3033,用于基于该音频传输时间间隔和该视频传输时间间隔,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包。
在本公开的实施例中,该多媒体播放设备向音频播放设备发送第一音频数据包,以及向视频设备发送第一视频数据包,该第一音频数据包和该第一视频数据包携带数据测试标识,当该音频播放设备接收到该数据测试标识时,该音频播放设备返回第一时间戳,当该视频播放设备接收到该数据测试标识时,该视频播放设备返回第二时间戳,该多媒体播放设备基于该第一时间戳和该第二时间戳,向音频播放设备发送第二音频数据包,以及向视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,从而可以解决该多媒体文件播放时音频数据和视频数据不同步的问题。由于该数据测试标识是周期性的携带,从而该多媒体播放设备可以周期性的调节多媒体文件播放时音频数据和视频数据不同步的问题,同时也不影响该多媒体播放设备的其他运行,避免了该多媒体播放设备在播放多媒体文件时进行实时调整所产生的负担。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图7是根据一示例性实施例示出的一种用于多媒体文件播放装置700的框图。例如,装置700可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图7,装置700可以包括以下一个或多个组件:处理组件702,存储器704,电源组件706,多媒体组件708,音频组件710,输入/输出(I/O)的接口712,传感器组件714,以及通信组件716。
处理组件702通常控制装置700的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件702可以包括一个或多个处理器720来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件702可以包括一个或多个模块,便于处理组件702和其他组件之间的交互。例如,处理部件702可以包括多媒体模块,以方便多媒体组件708和处理组件702之间的交互。
存储器704被配置为存储各种类型的数据以支持在设备700的操作。这些数据的示例包括用于在装置700上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器704可以由任何类型的易失性或非易失性存储设备或者它们的组合实 现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电力组件706为装置700的各种组件提供电力。电力组件706可以包括电源管理系统,一个或多个电源,及其他与为装置700生成、管理和分配电力相关联的组件。
多媒体组件708包括在所述装置700和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件708包括一个前置摄像头和/或后置摄像头。当设备700处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件710被配置为输出和/或输入音频信号。例如,音频组件710包括一个麦克风(MIC),当装置700处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器704或经由通信组件716发送。在一些实施例中,音频组件710还包括一个扬声器,用于输出音频信号。
I/O接口712为处理组件702和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件714包括一个或多个传感器,用于为装置700提供各个方面的状态评估。例如,传感器组件714可以检测到设备700的打开/关闭状态,组件的相对定位,例如所述组件为装置700的显示器和小键盘,传感器组件714还可以检测装置700或装置700一个组件的位置改变,用户与装置700接触的存在或不存在,装置700方位或加速/减速和装置700的温度变化。传感器组件714可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件714还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件714还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件716被配置为便于装置700和其他设备之间有线或无线方式的通信。装置700可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信部件716经由广播信道接收来自外部广播管理系统的广播信号或广播相关信 息。在一个示例性实施例中,所述通信部件716还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置700可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器704,上述指令可由装置700的处理器720执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种多媒体文件播放方法,该方法包括:
向音频播放设备发送多媒体文件包括的第一音频数据包,该第一音频数据包携带数据测试标识,使该音频播放设备基于该数据测试标识返回第一时间戳,该第一时间戳为该音频播放设备接收到该第一音频数据包的时间戳;
向视频播放设备发送该多媒体文件包括的第一视频数据包,该第一视频数据包携带该数据测试标识,使该视频播放设备基于该数据测试标识返回第二时间戳,该第二时间戳为该视频播放设备接收到该第一视频数据包的时间戳;
当接收到该第一时间戳和该第二时间戳时,基于该第一时间戳和该第二时间戳,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,该第二音频数据包为该第一音频数据包之后发送的音频数据包,该第二视频数据包为该第一视频数据包之后发送的视频数据包。
在本公开的另一实施例中,向音频播放设备发送多媒体文件包括的第一音频数据包之前,还包括:
周期性地从该多媒体文件包括的音频数据包中,获取一个音频数据包,以及周期性地从该多媒体文件包括的视频数据包中,获取一个视频数据包;
向获取的音频数据包中添加该数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加该数据测试标识,得到第一视频数据包。
在本公开的另一实施例中,向获取的音频数据包中添加该数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加该数据测试标识,得到第一视频数据包之前,还包括:
将该数据测试标识,按照指定格式进行封装。
在本公开的另一实施例中,基于该第一时间戳和该第二时间戳,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包,包括:
基于该第一时间戳和该第一音频数据包的发送时间,确定该第一音频数据包的传输时间间隔,得到音频传输时间间隔;
基于该第二时间戳和该第一视频数据包的发送时间,确定该第一视频数据包的传输时间间隔,得到视频传输时间间隔;
基于该音频传输时间间隔和该视频传输时间间隔,向该音频播放设备发送第二音频数据包,以及向该视频播放设备发送第二视频数据包。
在本公开的实施例中,多媒体播放设备向音频播放设备发送第一音频数据包,以及向视频设备发送第一视频数据包,该第一音频数据包和该第一视频数据包携带数据测试标识,当该音频播放设备接收到该数据测试标识时,该音频播放设备返回第一时间戳,当该视频播放设备接收到该数据测试标识时,该视频播放设备返回第二时间戳,该多媒体播放设备基于该第一时间戳和该第二时间戳,向音频播放设备发送第二音频数据包,以及向视频播放设备发送第二视频数据包,以同步播放该第二音频数据包和该第二视频数据包,从而可以解决该多媒体文件播放时音频数据和视频数据不同步的问题。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本申请旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制。

Claims (9)

  1. 一种多媒体文件播放方法,其特征在于,所述方法包括:
    向音频播放设备发送多媒体文件包括的第一音频数据包,所述第一音频数据包携带数据测试标识,使所述音频播放设备基于所述数据测试标识返回第一时间戳,所述第一时间戳为所述音频播放设备接收到所述第一音频数据包的时间戳;
    向视频播放设备发送所述多媒体文件包括的第一视频数据包,所述第一视频数据包携带所述数据测试标识,使所述视频播放设备基于所述数据测试标识返回第二时间戳,所述第二时间戳为所述视频播放设备接收到所述第一视频数据包的时间戳;
    当接收到所述第一时间戳和所述第二时间戳时,基于所述第一时间戳和所述第二时间戳,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包,以同步播放所述第二音频数据包和所述第二视频数据包,所述第二音频数据包为所述第一音频数据包之后发送的音频数据包,所述第二视频数据包为所述第一视频数据包之后发送的视频数据包。
  2. 如权利要求1所述的方法,其特征在于,所述向音频播放设备发送多媒体文件包括的第一音频数据包之前,还包括:
    周期性地从所述多媒体文件包括的音频数据包中,获取一个音频数据包,以及周期性地从所述多媒体文件包括的视频数据包中,获取一个视频数据包;
    向获取的音频数据包中添加所述数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加所述数据测试标识,得到第一视频数据包。
  3. 如权利要求2所述的方法,其特征在于,所述向获取的音频数据包中添加所述数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加所述数据测试标识,得到第一视频数据包之前,还包括:
    将所述数据测试标识,按照指定格式进行封装。
  4. 如权利要求1所述的方法,其特征在于,所述基于所述第一时间戳和所述第二时间戳,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包,包括:
    基于所述第一时间戳和所述第一音频数据包的发送时间,确定所述第一音频数据包的传 输时间间隔,得到音频传输时间间隔;
    基于所述第二时间戳和所述第一视频数据包的发送时间,确定所述第一视频数据包的传输时间间隔,得到视频传输时间间隔;
    基于所述音频传输时间间隔和所述视频传输时间间隔,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包。
  5. 一种多媒体文件播放装置,其特征在于,所述装置包括:
    第一发送模块,用于向音频播放设备发送多媒体文件包括的第一音频数据包,所述第一音频数据包携带数据测试标识,使所述音频播放设备基于所述数据测试标识返回第一时间戳,所述第一时间戳为所述音频播放设备接收到所述第一音频数据包的时间戳;
    第二发送模块,用于向视频播放设备发送所述多媒体文件包括的第一视频数据包,所述第一视频数据包携带所述数据测试标识,使所述视频播放设备基于所述数据测试标识返回第二时间戳,所述第二时间戳为所述视频播放设备接收到所述第一视频数据包的时间戳;
    第三发送模块,用于当接收到所述第一时间戳和所述第二时间戳时,基于所述第一时间戳和所述第二时间戳,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包,以同步播放所述第二音频数据包和所述第二视频数据包,所述第二音频数据包为所述第一音频数据包之后发送的音频数据包,所述第二视频数据包为所述第一视频数据包之后发送的视频数据包。
  6. 如权利要求5所述的装置,其特征在于,所述装置还包括:
    获取模块,用于周期性地从所述多媒体文件包括的音频数据包中,获取一个音频数据包,以及周期性地从所述多媒体文件包括的视频数据包中,获取一个视频数据包;
    添加模块,用于向获取的音频数据包中添加所述数据测试标识,得到第一音频数据包,以及向获取的视频数据包中添加所述数据测试标识,得到第一视频数据包。
  7. 如权利要求6所述的装置,其特征在于,所述装置还包括:
    封装模块,用于将所述数据测试标识,按照指定格式进行封装。
  8. 如权利要求5所述的装置,其特征在于,所述第三发送模块包括:
    第一确定单元,用于基于所述第一时间戳和所述第一音频数据包的发送时间,确定所述第一音频数据包的传输时间间隔,得到音频传输时间间隔;
    第二确定单元,用于基于所述第二时间戳和所述第一视频数据包的发送时间,确定所述第一视频数据包的传输时间间隔,得到视频传输时间间隔;
    发送单元,用于基于所述音频传输时间间隔和所述视频传输时间间隔,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包。
  9. 一种多媒体文件播放装置,其特征在于,所述装置包括:
    处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    向音频播放设备发送多媒体文件包括的第一音频数据包,所述第一音频数据包携带数据测试标识,使所述音频播放设备基于所述数据测试标识返回第一时间戳,所述第一时间戳为所述音频播放设备接收到所述第一音频数据包的时间戳;
    向视频播放设备发送所述多媒体文件包括的第一视频数据包,所述第一视频数据包携带所述数据测试标识,使所述视频播放设备基于所述数据测试标识返回第二时间戳,所述第二时间戳为所述视频播放设备接收到所述第一视频数据包的时间戳;
    当接收到所述第一时间戳和所述第二时间戳时,基于所述第一时间戳和所述第二时间戳,向所述音频播放设备发送第二音频数据包,以及向所述视频播放设备发送第二视频数据包,以同步播放所述第二音频数据包和所述第二视频数据包,所述第二音频数据包为所述第一音频数据包之后发送的音频数据包,所述第二视频数据包为所述第一视频数据包之后发送的视频数据包。
PCT/CN2015/095330 2015-06-17 2015-11-23 多媒体文件播放方法及装置 WO2016201888A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2016525066A JP6626440B2 (ja) 2015-06-17 2015-11-23 マルチメディアファイルを再生するための方法及び装置
RU2017102691A RU2643192C1 (ru) 2015-06-17 2015-11-23 Способ и устройство для воспроизведения мультимедийного файла
MX2017005370A MX370893B (es) 2015-06-17 2015-11-23 Metodo y dispositivo para reproducir archivos multimedia.

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510337320.0A CN104980820B (zh) 2015-06-17 2015-06-17 多媒体文件播放方法及装置
CN201510337320.0 2015-06-17

Publications (1)

Publication Number Publication Date
WO2016201888A1 true WO2016201888A1 (zh) 2016-12-22

Family

ID=54276822

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/095330 WO2016201888A1 (zh) 2015-06-17 2015-11-23 多媒体文件播放方法及装置

Country Status (7)

Country Link
US (1) US9961393B2 (zh)
EP (1) EP3107086A1 (zh)
JP (1) JP6626440B2 (zh)
CN (1) CN104980820B (zh)
MX (1) MX370893B (zh)
RU (1) RU2643192C1 (zh)
WO (1) WO2016201888A1 (zh)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104980820B (zh) * 2015-06-17 2018-09-18 小米科技有限责任公司 多媒体文件播放方法及装置
CN107948904B (zh) * 2017-12-26 2020-10-02 深圳Tcl新技术有限公司 音箱老化试验的方法、装置及计算机可读存储介质
CN108495239B (zh) * 2018-01-17 2020-09-29 深圳聚点互动科技有限公司 多设备间音频精确同步播放的方法、装置、设备及存储介质
US11297369B2 (en) 2018-03-30 2022-04-05 Apple Inc. Remotely controlling playback devices
US10993274B2 (en) 2018-03-30 2021-04-27 Apple Inc. Pairing devices by proxy
CN108377406B (zh) * 2018-04-24 2020-12-22 海信视像科技股份有限公司 一种调整音画同步的方法及装置
US10614857B2 (en) * 2018-07-02 2020-04-07 Apple Inc. Calibrating media playback channels for synchronized presentation
CN109819303B (zh) * 2019-03-06 2021-04-23 Oppo广东移动通信有限公司 数据输出方法及相关设备
CN110673813B (zh) * 2019-09-29 2023-04-07 阿波罗智联(北京)科技有限公司 一种数据处理方法、装置、电子设备和介质
CN111263206B (zh) * 2020-02-13 2022-06-10 Tcl移动通信科技(宁波)有限公司 多媒体信息的同步播放方法、装置、存储介质及移动终端
CN111428059A (zh) * 2020-03-19 2020-07-17 威比网络科技(上海)有限公司 关联音频的多媒体数据播放方法、装置、电子设备、存储介质
RU203858U1 (ru) * 2020-08-05 2021-04-23 Общество с ограниченной ответственностью "Витрина ТВ" Устройство отображения и воспроизведения аудиовизуального контента
CN111957039A (zh) * 2020-09-04 2020-11-20 Oppo(重庆)智能科技有限公司 一种游戏特效实现方法、装置及计算机可读存储介质
CN112235597B (zh) * 2020-09-17 2022-07-29 深圳市捷视飞通科技股份有限公司 流媒体直播音视频同步保护方法、装置、计算机设备
CN115426514A (zh) * 2022-07-22 2022-12-02 北京罗克维尔斯科技有限公司 跨设备音视频同步方法、装置、设备及介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128294A1 (en) * 2002-01-04 2003-07-10 James Lundblad Method and apparatus for synchronizing audio and video data
CN1725864A (zh) * 2004-07-23 2006-01-25 Lg电子株式会社 视频装置和控制该装置的方法
CN101047777A (zh) * 2006-03-31 2007-10-03 索尼株式会社 视频和音频处理系统、视频处理装置、音频处理装置、输出装置以及控制该系统的方法
CN101212588A (zh) * 2006-12-29 2008-07-02 明基电通股份有限公司 可同步播放视频信号及音频信号的音像播放系统及其方法
WO2009104869A1 (en) * 2008-02-20 2009-08-27 Electronics And Telecommunications Research Institute Method and apparatus for svc video and aac audio synchronization using npt
CN103905880A (zh) * 2014-03-13 2014-07-02 北京奇艺世纪科技有限公司 音视频数据的播放方法、智能电视和移动设备
CN104980820A (zh) * 2015-06-17 2015-10-14 小米科技有限责任公司 多媒体文件播放方法及装置

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0000873D0 (en) * 2000-01-14 2000-03-08 Koninkl Philips Electronics Nv Interconnection of audio/video devices
JP2004193868A (ja) * 2002-12-10 2004-07-08 Alps Electric Co Ltd 無線送受信システム及び無線送受信方法
JP2004282667A (ja) * 2003-03-19 2004-10-07 Matsushita Electric Ind Co Ltd 再生同期ずれ補正機能を備えた送信機及び受信機、並びにそれらを有する伝送装置
ATE373389T1 (de) * 2003-07-25 2007-09-15 Koninkl Philips Electronics Nv Verfahren und einrichtung zur erzeugung und erkennung von fingerabdrücken zur synchronisierung von audio und video
CN101080926A (zh) * 2004-12-16 2007-11-28 松下电器产业株式会社 无线通信系统
US8451375B2 (en) * 2005-04-28 2013-05-28 Panasonic Corporation Lip-sync correcting device and lip-sync correcting method
US8391284B2 (en) * 2007-04-23 2013-03-05 Nokia Corporation Usage of feedback information for multimedia sessions
WO2009053072A1 (en) * 2007-10-23 2009-04-30 Koninklijke Kpn N.V. Method and system for synchronizing a group of end-terminals
WO2009115121A2 (en) * 2008-03-19 2009-09-24 Telefonaktiebolaget Lm Ericsson (Publ) Method and apparatus for measuring audio-video time skew and end-to-end delay
CA2719939C (en) * 2008-04-16 2015-11-24 Panasonic Corporation Recording medium, recording device, recording method, and reproduction device
US8505054B1 (en) * 2009-12-18 2013-08-06 Joseph F. Kirley System, device, and method for distributing audio signals for an audio/video presentation
EP2529531B1 (en) * 2010-01-27 2019-10-09 Koninklijke KPN N.V. Method, system and device for synchronization of media streams
US9094564B2 (en) * 2010-05-07 2015-07-28 Microsoft Technology Licensing, Llc Clock synchronization for shared media playback
US9256247B2 (en) * 2012-01-04 2016-02-09 Marvell World Trade Ltd. Method and apparatus for communicating time information between time aware devices
US9553756B2 (en) * 2012-06-01 2017-01-24 Koninklijke Kpn N.V. Fingerprint-based inter-destination media synchronization
JP2014127213A (ja) * 2012-12-25 2014-07-07 Pioneer Electronic Corp 同期再生制御装置及び同期再生制御方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128294A1 (en) * 2002-01-04 2003-07-10 James Lundblad Method and apparatus for synchronizing audio and video data
CN1725864A (zh) * 2004-07-23 2006-01-25 Lg电子株式会社 视频装置和控制该装置的方法
CN101047777A (zh) * 2006-03-31 2007-10-03 索尼株式会社 视频和音频处理系统、视频处理装置、音频处理装置、输出装置以及控制该系统的方法
CN101212588A (zh) * 2006-12-29 2008-07-02 明基电通股份有限公司 可同步播放视频信号及音频信号的音像播放系统及其方法
WO2009104869A1 (en) * 2008-02-20 2009-08-27 Electronics And Telecommunications Research Institute Method and apparatus for svc video and aac audio synchronization using npt
CN103905880A (zh) * 2014-03-13 2014-07-02 北京奇艺世纪科技有限公司 音视频数据的播放方法、智能电视和移动设备
CN104980820A (zh) * 2015-06-17 2015-10-14 小米科技有限责任公司 多媒体文件播放方法及装置

Also Published As

Publication number Publication date
EP3107086A1 (en) 2016-12-21
CN104980820B (zh) 2018-09-18
CN104980820A (zh) 2015-10-14
JP6626440B2 (ja) 2019-12-25
US20160373801A1 (en) 2016-12-22
RU2643192C1 (ru) 2018-01-31
MX2017005370A (es) 2017-06-21
MX370893B (es) 2020-01-09
US9961393B2 (en) 2018-05-01
JP2017528009A (ja) 2017-09-21

Similar Documents

Publication Publication Date Title
WO2016201888A1 (zh) 多媒体文件播放方法及装置
WO2015180390A1 (zh) 日历提醒的方法及装置
JP2016535351A (ja) 動画情報共有方法、装置、プログラム、及び記録媒体
WO2016090826A1 (zh) 配置方法及装置
WO2017071073A1 (zh) 媒体同步方法和装置
JP6385429B2 (ja) ストリーム・メディア・データを再生する方法および装置
WO2019056210A1 (zh) 同步块的指示及确定方法、装置、基站、用户设备
WO2018120906A1 (zh) 缓存状态报告bsr上报触发方法、装置和用户终端
WO2017166761A1 (zh) 终端之间的媒体数据共享方法及装置
CN112969096A (zh) 媒体播放方法及装置、电子设备
WO2019157657A1 (zh) 信息配置方法及装置、基站和用户设备
WO2017161788A1 (zh) 数据处理方法、装置、终端及智能设备
WO2016015403A1 (zh) 一种接入wi-fi网络的方法及装置
WO2016155304A1 (zh) 无线访问接入点的控制方法及装置
WO2016119493A1 (zh) 接入网络的方法及装置
JP2018501746A (ja) 接続確立方法、装置、プログラム、及び記録媒体
WO2015161588A1 (zh) 一种配置拍摄参数的方法及装置
WO2018076358A1 (zh) 多媒体信息播放方法及系统、标准化服务器、直播终端
JP2017501598A5 (zh)
CN106792024B (zh) 多媒体信息的分享方法及装置
WO2019024053A1 (zh) 无人机控制方法及装置、无人机和遥控设备
KR102082069B1 (ko) 메시지를 푸시하는 방법 및 장치, 단말 기기
WO2019061085A1 (zh) 信道检测、信息发送方法、装置及通信设备
WO2019148349A1 (zh) 小区类型指示方法及装置
WO2019095183A1 (zh) 剩余关键系统信息的公共控制资源集合的时域信息指示方法

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2016525066

Country of ref document: JP

Kind code of ref document: A

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112016026107

Country of ref document: BR

ENP Entry into the national phase

Ref document number: 2017102691

Country of ref document: RU

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15895455

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: MX/A/2017/005370

Country of ref document: MX

ENP Entry into the national phase

Ref document number: 112016026107

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20161108

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15895455

Country of ref document: EP

Kind code of ref document: A1