CN113709539A - Media file output method and device, equipment and storage medium - Google Patents

Media file output method and device, equipment and storage medium Download PDF

Info

Publication number
CN113709539A
CN113709539A CN202110913315.5A CN202110913315A CN113709539A CN 113709539 A CN113709539 A CN 113709539A CN 202110913315 A CN202110913315 A CN 202110913315A CN 113709539 A CN113709539 A CN 113709539A
Authority
CN
China
Prior art keywords
media file
time
output
transmission frame
determining
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
CN202110913315.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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110913315.5A priority Critical patent/CN113709539A/en
Publication of CN113709539A publication Critical patent/CN113709539A/en
Pending legal-status Critical Current

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
    • 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/43079Synchronising 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 additional data with content streams on multiple devices
    • 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/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The disclosure relates to a media file output method and device, equipment and a storage medium. The media file output method comprises the following steps: in response to detecting the first event, determining a first duration of output of the media file; sending the first duration to a second device; determining the indication time for the second equipment to transmit the media file to be output according to the output system time of the media file to be output and the first time length, and sending a transmission frame to the second equipment, wherein the transmission frame comprises the content of the media file to be output and the indication time. The synchronization precision of the method is very high, and the user experience is improved. In addition, because the network accessed by the first device and the second device is a local area network or a WIFI network, the supported file transmission distance is longer, and the output interruption of the multimedia file cannot be easily caused.

Description

Media file output method and device, equipment and storage medium
Technical Field
The present disclosure relates to media playing technologies in electronic devices, and in particular, to a method and an apparatus for outputting a media file, a device, and a storage medium.
Background
Present electronic equipment is more and more abundant in kind, and to intelligent audio amplifier, audio robot etc. in the electronic equipment, the user has the demand of playing the audio file in other electronic equipment through intelligent audio amplifier, audio robot etc.. At present, audio output of other electronic devices and smart speakers and the like is generally output in a bluetooth mode, that is, the smart speakers and the like are connected with devices such as a mobile phone as bluetooth devices, and audio files and the like are output in the bluetooth mode. Obviously, there are many disadvantages to this approach, such as long play delay, short communication distance, and occasional re-access while walking.
Disclosure of Invention
The disclosure provides a media file output method and device, equipment and a storage medium.
According to a first aspect of the embodiments of the present disclosure, there is provided a media file output method applied to a first device, the method including:
in response to detecting the first event, determining a first duration of output of the media file; sending the first duration to a second device;
determining the indication time for the second equipment to transmit the media file to be output according to the output system time of the media file to be output and the first time length, and sending a transmission frame to the second equipment, wherein the transmission frame comprises the content of the media file to be output and the indication time.
Optionally, before determining, according to the output system time of the media file to be output and the first time length, that the indicated time for transmitting the media file to be output by the second device is before, the method further includes:
acquiring the time delay of the transmission frame sent between the first equipment and the second equipment;
the determining the indication time for the second device to transmit the media file to be output according to the output system time of the media file to be output and the first time length comprises:
and determining the indication time for the second equipment to transmit the media file to be output according to the output system time of the media file to be output, the first time and the time delay.
Optionally, the method further includes:
in response to detecting the second event, determining a second duration of output of the media file; sending the second duration to the second device;
determining the indication time for the second equipment to transmit the media file to be output according to the output system time of the media file to be output, the second time length and the time delay;
and sending a transmission frame to the second equipment, wherein the transmission frame comprises the indication time determined by the second duration and the content of the media file to be output.
Optionally, the obtaining the time delay for sending the transmission frame between the first device and the second device includes:
sending a request message to the second device, and receiving a response message of the request message, wherein the response message comprises time information for receiving the request message;
and determining the average time delay of the request message and the corresponding response message based on the sending time and the receiving time of the request message and the corresponding response message with set times, and taking the average time delay as the time delay of the transmission frame.
According to a second aspect of the embodiments of the present disclosure, there is provided a media file output method applied to a second device, the method including:
receiving and storing a first time length and/or a second time length of output of a media file sent by first equipment;
receiving a transmission frame carrying media file content sent by the first equipment, and analyzing the transmission frame to acquire the media file content and indication time;
and determining the playing time of the media file content based on the indication time and the duration, and outputting the media file content when the playing time comes.
Optionally, the method includes:
and when the playing time is determined to be less than the local system time, discarding the media file content.
According to a third aspect of the embodiments of the present disclosure, there is provided a media file output apparatus applied to a first device, the apparatus including:
a detection unit for detecting a first event;
a first determining unit, configured to determine, in response to detecting the first event, a first duration of output of the media file;
a first sending unit, configured to send the first duration to a second device;
the second determining unit is used for determining the indication time of the second equipment for transmitting the media file to be output according to the output system time of the media file to be output and the first time length;
and the second sending unit is used for sending a transmission frame to the second equipment, wherein the transmission frame comprises the content of the media file to be output and the indication time.
Optionally, the apparatus further comprises:
an obtaining unit, configured to obtain a time delay for sending the transmission frame between the first device and the second device;
the second determining unit is further configured to determine, according to the output system time of the media file to be output, the first time duration, and the time delay, an indication time for the second device to transmit the media file to be output.
Optionally, the detecting unit is further configured to detect a second event;
the first determining unit is further used for determining a second time length for outputting the media file in response to detecting a second event;
the first sending unit is further configured to send the second duration to the second device;
the second determining unit is further configured to determine, according to the output system time of the media file to be output, the second duration and the time delay, an indication time for the second device to transmit the media file to be output;
the second sending unit is further configured to send a transmission frame to the second device, where the transmission frame includes the indication time determined by the second duration and the content of the media file to be output.
Optionally, the obtaining unit is further configured to:
sending a request message to the second device, and receiving a response message of the request message, wherein the response message comprises time information for receiving the request message;
and determining the average time delay of the request message and the corresponding response message based on the sending time and the receiving time of the request message and the corresponding response message with set times, and taking the average time delay as the time delay of the transmission frame.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a media file output apparatus applied to a second device, the apparatus including:
the first receiving unit is used for receiving and storing the first time length and/or the second time length of the output of the media file sent by the first equipment;
a second receiving unit, configured to receive a transmission frame carrying media file content sent by the first device;
the analysis unit is used for analyzing the transmission frame to obtain the media file content and the indication time;
the determining unit is used for determining the playing time of the media file content based on the indication time and the duration;
and the output unit is used for outputting the media file content when the playing time arrives.
Optionally, the determining unit is further configured to discard the content of the media file when determining that the playing time is less than the local system time.
According to a fifth aspect of embodiments of the present disclosure, there is provided a first device comprising a processor and a memory for storing processor-executable instructions, the processor being configured to be able to perform the media file output method of the first aspect when the executable instructions in the memory are called.
According to a sixth aspect of embodiments of the present disclosure, there is provided a first device comprising a processor and a memory for storing processor-executable instructions, the processor being configured to be able to perform the media file output method of the second aspect when the executable instructions in the memory are called.
According to a seventh aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the media file output method as described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the present disclosure, when the first device and the second device access the same network and the first device and the second device are connected to each other based on the access network, based on the connection, the media file in the first device may be output through the second device, and the embodiment of the present disclosure determines the transmission offset of the media file in advance and notifies the second device. And after the second device receives the media file to be played, the second device can realize the synchronous playing of the multimedia file at the first device side directly based on the local system clock time and the time offset. The synchronization precision achieved by the embodiment of the invention is very high, and the user experience is improved. In addition, because the network accessed by the first device and the second device is a local area network or a WIFI network, the supported file transmission distance is longer, and the output interruption of the multimedia file cannot be easily caused.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic flow chart illustrating a media file output method according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart illustrating a media file output method according to an embodiment of the disclosure;
FIG. 3 is a flow chart illustrating a media file output method according to an embodiment of the disclosure;
fig. 4 is a schematic structural diagram illustrating a media data transmission apparatus according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram illustrating a media data transmission apparatus according to an embodiment of the disclosure;
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a schematic flow chart of a media file output method according to an embodiment of the present disclosure, and as shown in fig. 1, the media file output method according to the embodiment of the present disclosure is applied to a first device, and the method includes the following steps:
s11, responding to the first event, determining a first time length of the output of the media file; and sending the first duration to a second device.
In the embodiment of the disclosure, the method is applied to the first device. The first device may be a cell phone, a game console, a wearable device, a virtual reality device, a personal digital assistant, a laptop, a tablet, etc.
The first event includes an event that the first device outputs the multimedia file through the second device, such as an instruction that the first device receives a user input, an instruction that an output of an audio file such as music or a song is required through a selected second device, and the like.
Here, the second device may be a speaker, a smart speaker, a robot for multimedia output, a television, or the like that supports the playing of multimedia files.
The first duration refers to a duration offset of the first device for enabling the second device to output the media file, namely, the first device determines the content of the currently played media file based on the current system time of the first device in advance, determines the indication time for the second device based on the offset, enables the second device to determine the output time of the content of the media file based on the indication time and the offset, and outputs the corresponding content of the media file when the output time comes. Thus, the embodiment of the present disclosure can implement absolute synchronization between the source end and the play end, and as long as the system clocks between the source end and the receive end are synchronized, the play of the media file content is synchronized. The embodiment of the disclosure is based on a time length offset mode, is applied to output synchronization of the media file between the first device and the second device, and improves the media file output experience of a user.
S12, determining the indication time of the second device for transmitting the media file to be output according to the output system time of the media file to be output and the first time length, and sending a transmission frame to the second device, wherein the transmission frame comprises the content of the media file to be output and the indication time.
In an embodiment of the present disclosure, before determining, according to the output system time of the media file to be output and the first time length, that the second device transmits the indication time of the media file to be output, the method further includes: acquiring the time delay of the transmission frame sent between the first equipment and the second equipment; correspondingly, the indication time for the second equipment to transmit the media file to be output is determined according to the output system time of the media file to be output, the first time and the time delay. Here, the obtaining of the time delay for sending the transmission frame between the first device and the second device specifically includes: sending a request message to the second device, and receiving a response message of the request message, wherein the response message comprises time information for receiving the request message; and determining the average time delay of the request message and the corresponding response message based on the sending time and the receiving time of the request message and the corresponding response message with set times, and taking the average time delay as the time delay of the transmission frame. The set number of times may be 20 times, 10 times, 30 times, etc., and the determination of the time delay may be made at any time period during the communication between the first device and the second device. The transmission delay may also be determined periodically.
In an embodiment of the present disclosure, in response to detecting the second event, determining a second duration of the media file output; sending the second duration to the second device; here, the second event may be replay after a pause operation in the process of playing the content of the media file, that is, an event of restarting playing the media file after the user has paused playing of the content of the media file. At this time, the first device re-determines the second duration as a duration offset of the media file playing of the second device, so that the second device determines the playing time of the received media file content based on the second duration, and plays the media file content when the playing time comes.
In this way, when the playing of the media file content is continued after the pause, the indication time for the second device to transmit the media file to be output is determined according to the output system time of the media file to be output, the second time length and the time delay; and sending a transmission frame to the second device, wherein the transmission frame comprises the indication time determined by the second duration and the content of the media file to be output.
As an example, the first device determines media file content played by a media application, determines that an indication time corresponding to the media file content to be transmitted is 14: 05: 31 seconds according to a system time corresponding to the media file content to be transmitted, for example, when the system time corresponding to the media file content to be transmitted is 14: 05: 36 seconds and the first duration is 5 seconds, carries the media file content to be transmitted and the indication time in a transmission frame, and sends the transmission frame to the second device. After receiving the transmission frame, the second device analyzes the transmission frame, obtains the content of the media file to be output and the indication time contained in the transmission frame, and determines the playing time of the content of the media file carried in the transmission frame based on the indication time, specifically, as for the above example, after determining that the indication time corresponding to the content of the media file in the transmission frame is 14: 05: 31 seconds, based on the first time length of 5 seconds, it may be determined that the playing time of the content of the media file is 14: 05: 36 seconds, and when determining that the current system time is, for example, 14: 05: 34 seconds, the content of the media file is played after 2 seconds. If the current system time is 14 o' clock 05 min 39 sec, and the playing time is obviously exceeded, the media file content in the transmission frame is discarded.
In the embodiment of the disclosure, the play offset of the content of the media file is determined at the source end and the play end of the media file, and complete synchronization can be realized for the play of the media file based on the source end and the play end of the media file with system time synchronization.
Fig. 2 is a schematic flow chart of a media file output method according to an embodiment of the present disclosure, and as shown in fig. 2, the media file output method according to the embodiment of the present disclosure is applied to a second device, and the method includes the following steps:
and S21, receiving the first time length and/or the second time length of the output of the media file sent by the first equipment, and storing the first time length and/or the second time length.
In the embodiment of the present disclosure, after the second device receives the time length related to the output of the media file sent by the first device, that is, the first time length or the second time length, the second device stores the time length. The first time length and/or the second time length of the output of the media file, namely the second equipment, determines the playing time of the media file content in the received transmission frame, and determines the time for playing and outputting the media file content in the transmission frame based on the playing time.
When the playing of the media file is continuous, the output first time length and/or the output second time length of the media file are/is effective all the time, and when the playing of the media file is interrupted, such as pause or disconnection for playing again, the media file needs to be received again.
S22, receiving a transmission frame carrying media file content sent by the first device, and analyzing the transmission frame to obtain the media file content and the indication time.
In the embodiment of the disclosure, after a transmission frame is received, the transmission frame is analyzed to obtain the media file content and the indication time carried in the transmission frame, so that the playing time of the media file content is determined based on the indication time and the first time length and/or the second time length of the output of the media file, and the media file content carried in the transmission frame is output when the playing time arrives.
S23, determining the playing time of the media file content based on the indication time and the duration, and outputting the media file content when the playing time comes.
In the embodiment of the present disclosure, when the playing time of the content of the media file in the transmission frame is determined based on the indication time carried in the transmission frame and the first time length and/or the second time length of the output of the media file, that is, the indication time and the time length related to the output of the media file are the time to be played of the content of the media file in the transmission frame, and when the playing time arrives, the content of the media file in the transmission frame is played based on the local system time of the second device.
And when the playing time is determined to be less than the local system time, determining that the media file content in the transmission frame misses the playing time, and discarding the media file content carried in the transmission frame.
The synchronization precision achieved by the embodiment of the invention is very high, and the user experience is improved. In addition, because the network accessed by the first device and the second device is a local area network or a WIFI network, the supported file transmission distance is longer, and the output interruption of the multimedia file cannot be easily caused.
Fig. 3 is a schematic flow chart of a media file output method according to an embodiment of the present disclosure, and as shown in fig. 3, the media file output method according to the embodiment of the present disclosure includes the following processing steps:
step 301, system clock synchronization is performed between the first device and the second device. Here, it may be that the second device initiates a clock synchronization request to the first device, and system clock synchronization is completed between the first device and the second device. For example, the second device may send a request message for clock synchronization to the first device, and the first device sends a response message for the request message to the second device, where the response message carries time information sent by the response message, and so on, so that the first device and the second device perform multiple message interactions and complete system clock synchronization based on the interaction message.
Step 302, when the first device determines that a media file needs to be sent to the second device and played by the second device, first send a first duration to the second device, where the duration is used to indicate a time offset for playing the currently sent media file, and as an example, the first duration may be 5 seconds, 3 seconds, 2 seconds, 1.5 seconds, and specifically is set according to a current network transmission delay and the like. And the second equipment stores the first time length after receiving the first time length so as to select the playing time of the media file based on the subsequent transmission frame and play the content of the media file. Here, when the playing of the media application file in the first device is started after the interruption of the playing of the media file, the playing offset of the media file, that is, the second duration, needs to be determined again, and the second duration needs to be notified to the second device. The second duration acts similarly to the first duration.
Step 303, the first device sends a transmission frame to the second device.
The method includes the steps that a first device determines media file contents played by a media application, according to system time corresponding to the media file contents to be transmitted, for example, the system time corresponding to the media file contents to be transmitted is 14: 05: 36 seconds, when a first duration is 5 seconds, an indication time corresponding to the media file contents to be transmitted is 14: 05: 31 seconds, the media file contents to be transmitted and the indication time are carried in a transmission frame, and the transmission frame is sent to a second device.
Step 304, after receiving the transmission frame, the second device parses the transmission frame, obtains the content of the media file to be output and the indication time contained in the transmission frame, and determines the playing time of the content of the media file carried in the transmission frame based on the indication time, specifically, with reference to the foregoing example, after determining that the indication time corresponding to the content of the media file in the transmission frame is 14: 05: 31 seconds, based on the first time length of 5 seconds, it may be determined that the playing time of the content of the media file is 14: 05: 36 seconds, and when determining that the current system time is, for example, 14: 05: 34 seconds, the content of the media file is played after 2 seconds. If the current system time is 14 o' clock 05 min 39 sec, and the playing time is obviously exceeded, the media file content in the transmission frame is discarded.
Fig. 4 is a schematic structural diagram of a media data transmission device according to an embodiment of the present disclosure, and as shown in fig. 4, the media data transmission device according to the embodiment of the present disclosure includes:
a detection unit 30 for detecting a first event;
a first determining unit 31, configured to determine, in response to detecting the first event, a first duration of output of the media file;
a first sending unit 32, configured to send the first duration to a second device;
a second determining unit 33, configured to determine, according to the output system time of the media file to be output and the first time length, an indication time for the second device to transmit the media file to be output;
a second sending unit 34, configured to send a transmission frame to the second device, where the transmission frame includes the content of the media file to be output and the indication time.
Optionally, on the basis of the media data transmission device shown in fig. 4, the media data transmission device according to the embodiment of the disclosure further includes:
an obtaining unit (not shown in fig. 4) configured to obtain a time delay for transmitting the transmission frame between the first device and the second device;
correspondingly, the second determining unit 33 is further configured to determine, according to the output system time of the media file to be output, the first time length, and the time delay, an indication time for the second device to transmit the media file to be output.
Optionally, the detecting unit 30 is further configured to detect a second event;
the first determining unit 31 is further configured to determine, in response to detecting the second event, a second duration for outputting the media file;
the first sending unit 32 is further configured to send the second duration to the second device;
the second determining unit 33 is further configured to determine, according to the output system time of the media file to be output, the second duration and the time delay, an indication time for the second device to transmit the media file to be output;
the second sending unit 34 is further configured to send a transmission frame to the second device, where the transmission frame includes the indication time determined by the second duration and the content of the media file to be output.
Optionally, the obtaining unit is further configured to:
sending a request message to the second device, and receiving a response message of the request message, wherein the response message comprises time information for receiving the request message;
and determining the average time delay of the request message and the corresponding response message based on the sending time and the receiving time of the request message and the corresponding response message with set times, and taking the average time delay as the time delay of the transmission frame.
In an exemplary embodiment, the detection Unit 30, the first determination Unit 31, the first transmission Unit 32, the second determination Unit 33, the second transmission Unit 34, the acquisition Unit, and the like may be implemented by one or more Central Processing Units (CPUs), Graphics Processing Units (GPUs), Baseband Processors (BPs), Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microcomputers), or other electronic elements.
In the embodiment of the present disclosure, the specific manner in which each unit in the media data transmission apparatus shown in fig. 4 performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 5 is a schematic structural diagram of a media data transmission device according to an embodiment of the disclosure, and as shown in fig. 5, the media data transmission device according to the embodiment of the disclosure includes:
a first receiving unit 40, configured to receive and store a first time length and/or a second time length for outputting a media file sent by a first device;
a second receiving unit 41, configured to receive a transmission frame carrying media file content sent by the first device;
an analyzing unit 42, configured to analyze the transmission frame, and obtain the content of the media file and the indication time;
a determining unit 43, configured to determine a playing time of the media file content based on the indication time and the duration;
an output unit 44, configured to output the media file content when the playing time comes.
Optionally, the determining unit 43 is further configured to discard the content of the media file when determining that the playing time is less than the local system time.
In an exemplary embodiment, the first receiving Unit 40, the second receiving Unit 41, the parsing Unit 42, the determining Unit 43, the output Unit 44, and the like may be implemented by one or more Central Processing Units (CPUs), Graphics Processing Units (GPUs), Baseband Processors (BPs), Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors (gpds), controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic elements.
In the embodiment of the present disclosure, the specific manner in which each unit in the media data transmission apparatus shown in fig. 5 performs operations has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 6 is a block diagram illustrating an electronic device 800 according to an example embodiment, where, as shown in FIG. 6, the electronic device 800 supports multiple screen outputs, and the electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operation at the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices 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, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. Power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as Wi-Fi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 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 Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic elements for performing the screen recording method of the multi-screen electronic device of the above-described embodiment.
In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 804 including instructions, executable by the processor 820 of the electronic device 800 to perform the screen recording method of the multi-screen electronic device of the above-described embodiment is also provided. For example, 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, an optical data storage device, and the like.
The disclosed embodiments also recite a non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the media data transmission method of the aforementioned embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (15)

1. A media file output method is applied to a first device, and is characterized by comprising the following steps:
in response to detecting the first event, determining a first duration of output of the media file; sending the first duration to a second device;
determining the indication time for the second equipment to transmit the media file to be output according to the output system time of the media file to be output and the first time length, and sending a transmission frame to the second equipment, wherein the transmission frame comprises the content of the media file to be output and the indication time.
2. The method of claim 1, wherein the indicated time for the second device to transmit the media file to be output is determined before according to the output system time of the media file to be output and the first time length, and the method further comprises:
acquiring the time delay of the transmission frame sent between the first equipment and the second equipment;
the determining the indication time for the second device to transmit the media file to be output according to the output system time of the media file to be output and the first time length comprises:
and determining the indication time for the second equipment to transmit the media file to be output according to the output system time of the media file to be output, the first time and the time delay.
3. The method of claim 2, further comprising:
in response to detecting the second event, determining a second duration of output of the media file; sending the second duration to the second device;
determining the indication time for the second equipment to transmit the media file to be output according to the output system time of the media file to be output, the second time length and the time delay;
and sending a transmission frame to the second equipment, wherein the transmission frame comprises the indication time determined by the second duration and the content of the media file to be output.
4. The method of claim 2, wherein the obtaining the time delay for transmitting the transmission frame between the first device and the second device comprises:
sending a request message to the second device, and receiving a response message of the request message, wherein the response message comprises time information for receiving the request message;
and determining the average time delay of the request message and the corresponding response message based on the sending time and the receiving time of the request message and the corresponding response message with set times, and taking the average time delay as the time delay of the transmission frame.
5. A media file output method applied to a second device, the method comprising:
receiving and storing a first time length and/or a second time length of output of a media file sent by first equipment;
receiving a transmission frame carrying media file content sent by the first equipment, and analyzing the transmission frame to acquire the media file content and indication time;
and determining the playing time of the media file content based on the indication time and the duration, and outputting the media file content when the playing time comes.
6. The method of claim 5, wherein the method comprises:
and when the playing time is determined to be less than the local system time, discarding the media file content.
7. An apparatus for outputting a media file, applied to a first device, the apparatus comprising:
a detection unit for detecting a first event;
a first determining unit, configured to determine, in response to detecting the first event, a first duration of output of the media file;
a first sending unit, configured to send the first duration to a second device;
the second determining unit is used for determining the indication time of the second equipment for transmitting the media file to be output according to the output system time of the media file to be output and the first time length;
and the second sending unit is used for sending a transmission frame to the second equipment, wherein the transmission frame comprises the content of the media file to be output and the indication time.
8. The apparatus of claim 7, further comprising:
an obtaining unit, configured to obtain a time delay for sending the transmission frame between the first device and the second device;
the second determining unit is further configured to determine, according to the output system time of the media file to be output, the first time duration, and the time delay, an indication time for the second device to transmit the media file to be output.
9. The apparatus of claim 8, wherein the detecting unit is further configured to detect a second event;
the first determining unit is further used for determining a second time length for outputting the media file in response to detecting a second event;
the first sending unit is further configured to send the second duration to the second device;
the second determining unit is further configured to determine, according to the output system time of the media file to be output, the second duration and the time delay, an indication time for the second device to transmit the media file to be output;
the second sending unit is further configured to send a transmission frame to the second device, where the transmission frame includes the indication time determined by the second duration and the content of the media file to be output.
10. The apparatus of claim 8, wherein the obtaining unit is further configured to:
sending a request message to the second device, and receiving a response message of the request message, wherein the response message comprises time information for receiving the request message;
and determining the average time delay of the request message and the corresponding response message based on the sending time and the receiving time of the request message and the corresponding response message with set times, and taking the average time delay as the time delay of the transmission frame.
11. An apparatus for outputting a media file, applied to a second device, the apparatus comprising:
the first receiving unit is used for receiving and storing the first time length and/or the second time length of the output of the media file sent by the first equipment;
a second receiving unit, configured to receive a transmission frame carrying media file content sent by the first device;
the analysis unit is used for analyzing the transmission frame to obtain the media file content and the indication time;
the determining unit is used for determining the playing time of the media file content based on the indication time and the duration;
and the output unit is used for outputting the media file content when the playing time arrives.
12. The apparatus of claim 11, wherein the determining unit is further configured to discard the media file content when determining that the playing time is less than a local system time.
13. A first device comprising a processor and a memory for storing processor-executable instructions, wherein the processor is configured to be capable of performing a media file output method as claimed in any one of claims 1 to 4 when the executable instructions in the memory are invoked.
14. A second device comprising a processor and a memory for storing processor-executable instructions, wherein the processor is configured to be capable of performing the media file output method of claim 5 or 6 when the executable instructions in the memory are invoked.
15. A non-transitory computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the media data transmission method of any one of claims 1 to 4, or perform the media file output method of claim 5 or 6.
CN202110913315.5A 2021-08-10 2021-08-10 Media file output method and device, equipment and storage medium Pending CN113709539A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110913315.5A CN113709539A (en) 2021-08-10 2021-08-10 Media file output method and device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110913315.5A CN113709539A (en) 2021-08-10 2021-08-10 Media file output method and device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113709539A true CN113709539A (en) 2021-11-26

Family

ID=78652099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110913315.5A Pending CN113709539A (en) 2021-08-10 2021-08-10 Media file output method and device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113709539A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102227142A (en) * 2011-06-10 2011-10-26 复旦大学 Synchronization playing method based on video data block distribution
US20120086814A1 (en) * 2010-04-09 2012-04-12 Satoshi Tsubaki Receiving device and camera system
CN107770569A (en) * 2016-08-18 2018-03-06 北京光子互动科技有限公司 Multimedia synchronous broadcast method, apparatus and system
CN109151987A (en) * 2018-07-03 2019-01-04 珠海全志科技股份有限公司 A kind of method that more room audio groups are played simultaneously in WLAN
CN110572799A (en) * 2019-07-25 2019-12-13 华为技术有限公司 Method and equipment for simultaneous response

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120086814A1 (en) * 2010-04-09 2012-04-12 Satoshi Tsubaki Receiving device and camera system
CN102227142A (en) * 2011-06-10 2011-10-26 复旦大学 Synchronization playing method based on video data block distribution
CN107770569A (en) * 2016-08-18 2018-03-06 北京光子互动科技有限公司 Multimedia synchronous broadcast method, apparatus and system
CN109151987A (en) * 2018-07-03 2019-01-04 珠海全志科技股份有限公司 A kind of method that more room audio groups are played simultaneously in WLAN
CN110572799A (en) * 2019-07-25 2019-12-13 华为技术有限公司 Method and equipment for simultaneous response

Similar Documents

Publication Publication Date Title
US9961393B2 (en) Method and device for playing multimedia file
JP6121621B2 (en) Voice call method, apparatus, program, and recording medium
EP3163887A1 (en) Method and apparatus for performing media synchronization
CN111246283B (en) Video playing method and device, electronic equipment and storage medium
CN112114765A (en) Screen projection method and device and storage medium
CN105786507B (en) Display interface switching method and device
CN112969096A (en) Media playing method and device and electronic equipment
CN109271239A (en) Method, apparatus, system, equipment and the medium of data processing
CN111182328B (en) Video editing method, device, server, terminal and storage medium
CN109451341B (en) Video playing method, video playing device, electronic equipment and storage medium
CN106792024B (en) Multimedia information sharing method and device
US20220159336A1 (en) Method and system for displaying screen
CN112291631A (en) Information acquisition method, device, terminal and storage medium
CN107272896B (en) Method and device for switching between VR mode and non-VR mode
CN111246278A (en) Video playing method and device, electronic equipment and storage medium
CN106034214A (en) Video data recording method and apparatus thereof
CN106254402A (en) The synchronous method of intelligent terminal's configuration information and device
CN109787890B (en) Instant messaging method, device and storage medium
CN107948876B (en) Method, device and medium for controlling sound box equipment
CN112769677B (en) Data synchronization method, apparatus, electronic device, storage medium, and program product
CN110769282A (en) Short video generation method, terminal and server
CN110809184A (en) Video processing method, device and storage medium
CN111182327B (en) Video editing method and device, video distribution server and terminal
CN114399306A (en) Virtual resource distribution method and device, electronic equipment and storage medium
CN113660513A (en) Method, device and storage medium for synchronizing playing time

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination