CN108259998B - Player, play control method and device, electronic equipment and play system - Google Patents

Player, play control method and device, electronic equipment and play system Download PDF

Info

Publication number
CN108259998B
CN108259998B CN201810171871.8A CN201810171871A CN108259998B CN 108259998 B CN108259998 B CN 108259998B CN 201810171871 A CN201810171871 A CN 201810171871A CN 108259998 B CN108259998 B CN 108259998B
Authority
CN
China
Prior art keywords
player
data volume
playing
data
total data
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.)
Active
Application number
CN201810171871.8A
Other languages
Chinese (zh)
Other versions
CN108259998A (en
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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201810171871.8A priority Critical patent/CN108259998B/en
Publication of CN108259998A publication Critical patent/CN108259998A/en
Application granted granted Critical
Publication of CN108259998B publication Critical patent/CN108259998B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/4424Monitoring of the internal components or processes of the client device, e.g. CPU or memory load, processing speed, timer, counter or percentage of the hard disk space used
    • 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
    • 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/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • 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/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • H04N21/8173End-user applications, e.g. Web browser, game
    • 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/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Abstract

The embodiment of the invention discloses a player, a play control method, a play control device, electronic equipment and a play system, wherein the method comprises the following steps: determining a first total data volume cached by each target plug-in a player at the current moment; if the first total data volume is smaller than the preset cache threshold value, a pause playing message is sent to a playing control unit in the player, so that the whole pipeline of the player is taken as a concerned object, and data buffering is not carried out until the available buffer data volume in the whole pipeline is lower than the cache threshold value, so that the stop playing times of the player are effectively reduced, and the user experience is improved.

Description

Player, play control method and device, electronic equipment and play system
Technical Field
The embodiment of the invention relates to the technical field of video players, in particular to a player, a playing control method and device, electronic equipment and a playing system.
Background
When a user watches videos online, if the network is unstable or local large code stream videos are played, the problem of playing the videos is solved. At this time, it is necessary to pause the playback when there is no data, and to continue the playback after a certain amount of data has been buffered.
In the prior art, a buffer queue in a player controls the pause and play of the player by monitoring the data amount buffered by the buffer queue, specifically, when the buffer queue monitors that the data amount buffered by the buffer queue is smaller than a preset lower limit, notification information is sent to a play control unit in the player so that the play control unit pauses play; and when the buffer queue monitors that the data amount buffered by the buffer queue is larger than the preset upper limit, sending notification information to a broadcast control unit in the player so as to enable the broadcast control unit to continue playing.
However, the amount of data monitored by the prior art is inaccurate, resulting in frequent pauses of the player.
Disclosure of Invention
The embodiment of the invention provides a player, a playing control method and device, electronic equipment and a playing system, and aims to solve the problem that in the prior art, the monitored data volume is inaccurate, so that the player is frequently paused.
In a first aspect, an embodiment of the present invention provides a play control method for a player, including:
determining a first total data volume cached by each target plug-in a player at the current moment, wherein each target plug-in comprises a cache queue and at least one plug-in at the downstream of the cache queue;
and if the first total data volume is smaller than a preset cache threshold value, sending a pause playing message to a playing control unit in the player so that the playing control unit controls the player to pause playing.
In a second aspect, an embodiment of the present invention provides a play control apparatus for a player, where the apparatus includes:
the determining module is used for determining a first total data volume cached by each target plug-in the player at the current moment, wherein each target plug-in comprises a cache queue and at least one plug-in at the downstream of the cache queue;
and the sending module is used for sending a pause playing message to a playing control unit in the player if the first total data volume is smaller than a preset cache threshold value, so that the playing control unit controls the player to pause playing.
In a third aspect, an embodiment of the present invention provides a player, including:
the data source element is used for acquiring original data to be played;
a separator for separating the raw data into audio data and/or video data;
the buffer queue is used for buffering the audio data and/or the video data;
a decoder for decrypting the buffered audio data and/or video data;
the broadcast control unit is used for playing the decrypted audio data and/or video data;
a statistical unit, configured to execute the play control method of the player according to the first aspect.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including:
a memory for storing a computer program;
a processor, configured to execute the computer program to implement the play control method of the player according to the first aspect.
In a fifth aspect, an embodiment of the present invention provides a playing system, including: the player is arranged on the electronic equipment, and the player is the player of the third aspect.
In a sixth aspect, an embodiment of the present invention provides a computer storage medium, where a computer program is stored, and the computer program, when executed, implements the fingerprint identification method according to the first aspect.
The embodiment of the invention has the following beneficial effects:
in the embodiment of the present invention, by determining the first total data amount cached by each target plug-in the player at the current time, if the first total data amount is smaller than the preset cache threshold, a pause playing message is sent to the playing control unit in the player, so that the playing control unit controls the player to pause playing, and performs data buffering. That is, in this embodiment, the whole pipeline of the player is taken as a focus object, and data buffering is not performed until the amount of available buffer data in the whole pipeline is lower than the buffer threshold, so that the number of times of stopping playing of the player is effectively reduced, and user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a playing control method of a player according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a frame layer of a player according to the present embodiment;
fig. 3 is a flowchart of a playing control method of a player according to a second embodiment of the present invention;
fig. 4 is another flowchart of a playing control method of a player according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a play control apparatus of a player according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a play control apparatus of a player according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a player according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a playing system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical scheme provided by the embodiment of the invention is suitable for any audio player, video player or audio-video player.
According to the playing control method of the player provided by the embodiment of the invention, the first total data volume cached by each target plug-in the player at the current moment is determined, and if the first total data volume is smaller than the preset cache threshold value, the playing pause message is sent to the playing control unit in the player, so that the problems that in the prior art, only the cache data in the cache queue is monitored, the monitoring on the cache data in the player is inaccurate, the player is frequently paused, and the experience is reduced are solved.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a flowchart of a play control method of a player according to an embodiment of the present invention, as shown in fig. 1, the method of this embodiment may include:
s101, determining a first total data volume cached by each target plug-in a player at the current moment, wherein each target plug-in comprises a cache queue and at least one plug-in at the downstream of the cache queue.
The electronic equipment related to the embodiment of the invention can be an electronic equipment such as a mobile phone, a tablet computer and the like which is provided with a player so as to provide audio and/or video services for a user.
The player of this embodiment may be a player based on a GStreamer architecture, The GStreamer is used as a streaming media application framework recommended by a GNOME (The GNU Network Object Model Environment, a tool for operating and setting a computer Environment) desktop Environment, an architecture based on plug-in (plugin) and pipeline (pipeline) is adopted, all functional modules in The framework are implemented as pluggable components (components), and can be conveniently installed on any pipeline when needed, and since all plug-ins perform unified data exchange through a pipeline mechanism, it is easy to "assemble" a multimedia application with complete functions by using various existing plug-ins.
Fig. 2 is a schematic diagram of a frame layer of a player according to the present embodiment, wherein a user interface layer and a driver layer of the player are not shown. As shown in fig. 2, the player of this embodiment may include plug-ins such as a data Source unit (Source), a demultiplexer (demux), a buffer Queue (Queue), a Decoder (Decoder) and an Audio and Video synchronization terminal (Sink), where the Decoder includes an Audio Decoder (Audio Decoder) and a Video Decoder (Video Decoder).
The data source unit is configured to obtain original data to be played, for example, by parsing an access source URL (Uniform Resource Locator), establishing a connection using an http protocol, obtaining the original data to be played, and sending the obtained original data to the separator. The separator is used for separating the original data into audio data and video data, sending the separated audio data and video data to the buffer queue and buffering in the buffer queue.
Then, the buffer queue transmits the buffered audio data and video data to a decoder, and the decoder decodes the encoded audio data and video data. Specifically, an audio decoder decodes audio data, and a video decoder decodes video data. And then, inputting the decoded audio data and video data into the Sink, realizing audio and video synchronization in the Sink, and outputting and displaying.
As can be seen from fig. 2, each unit in the player is a plug-in unit (i.e., a plug-in unit), and is connected in series to form a pipeline (pipeline).
It should be noted that fig. 2 shows an audio and video player, where the audio and video player may play audio data and video data simultaneously, and optionally, the player of this embodiment may also play audio of sound, or play video of pictures, which is not limited in this embodiment.
In the prior art, in the playing process, data cached in a cache queue is counted, and when the amount of the data cached in the cache queue is smaller than a preset cache threshold, the player suspends playing to perform data caching.
As shown in fig. 2, in addition to buffering data in the buffer queue, each plug-in (e.g. decoder, Sink) downstream of the buffer queue also buffers available playing data in the player. When the sum of the data amount cached in the cache queue and each downstream plug-in can meet the playing requirement at the current moment, the player does not need to pause. However, in the prior art, only the cache queue is used as a monitoring object, which may cause inaccurate cache data monitoring, frequent pause of the player, and reduced user experience.
In order to solve the above technical problem, in the embodiment of the present invention, the whole pipeline of the player is used as a monitoring object, and the data amount in the whole pipeline is counted in real time or at regular time.
Specifically, in the present embodiment, both the buffer queue in the player and at least one plug-in unit downstream of the buffer queue are used as target plug-ins, for example, as shown in fig. 2, the buffer queue and the decoder and/or Sink are used as target plug-ins. Determining the data volume of each target plug-in unit buffer at the current moment, and taking the sum of the data volume of each target plug-in unit buffer as the first total data volume of the current moment. For example, as shown in fig. 2, the sum of the data amount buffered in the buffer queue and the decoder at the current time is taken as the first total data amount; or taking the sum of the data amounts cached in the current time cache queue and the Sink as a first total data amount; or, taking the sum of the data amount buffered in the buffer queue, the decoder and the Sink at the current moment as the first total data amount.
In an example, the data amount buffered in the buffer queue at the current time and the data amount buffered in at least one plug-in unit downstream of the buffer queue at the current time may be obtained by monitoring each target plug-in unit respectively, and the data amounts buffered are added to serve as the first total data amount.
For example, as shown in fig. 2, the amount of data buffered in the buffer queue at the current time is 20 bytes, the amount of data buffered in the decoder downstream of the buffer queue is 10 bytes, and the amount of data buffered in the Sink downstream of the decoder is 12 bytes, so that the first total amount of data is 20 bytes +10 bytes +12 bytes, which is 42 bytes.
In another example, the first total data volume at the current time may be further determined according to the second total data volume cached in each target plug-in at the previous query time, the second data volume cached in the cache queue at the previous query time, the first data volume cached in the cache queue at the current time, and the playing state of the player at the current time.
For example, the second total data amount cached in the at least one plug-in the cache queue at the previous query time and downstream of the cache queue is 40Byte, the second data amount cached in the cache queue at the previous query time is 10Byte, the first data amount cached in the cache queue at the current time is 20Byte, the playing state of the player at the current time is playing, and the data amount played by the player from the previous query time to the current time is 5Byte, then the first total data amount is 40Byte + (20Byte-10Byte) -5Byte ═ 45 Byte.
Optionally, when the playing status of the player at the current time is stop, the first total data amount is 40Byte + (20Byte-10Byte) ═ 50 Byte.
The present embodiment may also determine, according to other methods, the first total data amount cached in each target plugin at the current time, which is not limited in the present embodiment.
And S102, if the first total data volume is smaller than a preset cache threshold value, sending a pause playing message to a playing control unit in the player so that the playing control unit controls the player to pause playing.
The play control unit of the present embodiment is a user interface layer belonging to the player, and is a unit directly operated by the user, for example, receives operations of play, pause, fast forward, and the like of the user, and controls the player to enter states of play, pause, fast forward, and the like according to the operations of the user. That is, the playing control unit of this embodiment is the upper level of each plug-in the player shown in fig. 2, and does not perform data buffering, which is not shown in fig. 2.
Specifically, according to the above steps, after determining the first total data volume in the pipeline at the current time, the size of the first total data volume is determined, when the first total data volume is smaller than a preset buffer threshold, a pause playing message is sent to the play control unit, and after receiving the pause playing message, the play control unit controls the player to pause playing to buffer the data.
And when the first total data volume is larger than a preset playing threshold value, no message is sent to the playing control unit, and the playing control unit controls the player to play normally. Optionally, when the first total data amount is greater than the preset play threshold, a play message may also be sent to the play control unit, so that the play control unit knows that the currently cached data amount can meet a normal play requirement, and the play control unit controls the player to play normally.
In a possible implementation manner of this embodiment, if the player is in a pause state at the current time and the first total data amount is greater than a preset playing threshold, the player is instructed to switch from the pause state to a playing state.
In order to improve the smoothness of playing, it is generally desirable that the player buffer a certain amount of data and then play the data. Specifically, if it is determined that the player is paused and in a data buffering state at the current time and the first total data amount at the current time is greater than the preset play threshold, the play message is sent to the control unit, so that the play control unit controls the player to switch from the pause state to the play state after receiving the play message, and performs normal audio and/or video play.
The playing threshold of this embodiment is greater than the buffering threshold.
In the technical solution of this embodiment, the method is not limited to a single buffer queue, but the whole pipeline is taken as a focused object, and the available buffer data (i.e. the data buffered by each target plug-in) in the whole pipeline is calculated and counted, and a notification message is not sent to the play control unit until the amount of the available buffer data in the whole pipeline is lower than the buffer threshold, so that the player suspends playing for data buffering. Therefore, the problems of frequent pause, buffering and replay of the player caused by short-time missing of data in the buffer queue can be effectively avoided, the playing process is smoother, and the user experience is improved.
In the play control method of the player provided by the embodiment of the present invention, by determining the first total data amount cached in each target plug-in the player at the current time, if the first total data amount is smaller than the preset cache threshold, a play pause message is sent to the play control unit in the player, so that the play control unit controls the player to pause playing, and perform data buffering. That is, in this embodiment, the whole pipeline of the player is taken as a focus object, and data buffering is not performed until the amount of available buffer data in the whole pipeline is lower than the buffer threshold, so that the number of times of stopping playing of the player is effectively reduced, and user experience is improved.
Fig. 3 is a flowchart of a playing control method of a player according to a second embodiment of the present invention, where on the basis of the above-mentioned embodiments, this embodiment relates to a specific process for determining a first total data size cached by each target plug-in the player at the current time. As shown in fig. 3, the S101 may specifically include:
s201, obtaining second total data volume cached in each target plug-in at the previous query time and second data volume cached in the cache queue at the previous query time.
In this embodiment, the total data amount of the cache in the pipeline obtained by each query is stored, and the cache data amount in the cache queue of each query is stored as the basis of the next query. Therefore, when the next query is carried out, the total data amount cached in the last stored pipeline and the data amount cached in the cache queue can be directly obtained.
For example, when the first total data volume at the current time is to be determined, the second total data volume cached in the cache queue at the previous query time and at least one plug-in unit downstream of the cache queue may be directly obtained, and the second data volume cached in the cache queue at the previous query time may be obtained.
Optionally, in order to reduce the amount of data saved, the amount of data obtained by the next query replaces the amount of data obtained by the previous query.
S202, obtaining the first data amount cached in the cache queue at the current moment and the playing state of the player at the current moment.
In this embodiment, the electronic device may directly obtain the first data amount cached by the cache queue at the current time, and directly obtain the playing state of the player at the current time. The specific method for obtaining the first data amount buffered by the buffer queue is the same as that in the prior art, and is not described herein again.
S203, determining the first total data volume according to the second total data volume, the first data volume, the second data volume and the playing state.
Specifically, according to the above steps, a second total data amount available in the pipeline at the previous query time and a second data amount cached in the cache queue are obtained, and a first data amount cached in the cache queue at the current time and a playing state of the player are obtained. Then, the first total data amount is determined according to the second total data amount, the first data amount and the second data amount and the playing state of the player.
The above S203 may be implemented by:
in an example, if the first data amount is greater than the second data amount and the playing status is playing, the second data amount and the playing amount are subtracted from the sum of the second total data amount and the first data amount to obtain the first total data amount.
And the playing amount is the data amount played by the player between the previous query time and the current time.
It should be noted that, in this embodiment, since the data amount cached in each plug-in downstream of the cache queue at the current time cannot be determined, at this time, when the first data amount is greater than the second data amount, it may be determined that the data amount cached in each plug-in downstream of the cache queue is at least not less than the data amount cached in each plug-in at the previous query time, and therefore, it may be determined that the first total data amount is at least equal to the sum of the second total data amount and the first data amount minus the second data amount and the play amount at the current time.
For example, the first data amount is V2, the second data amount is V1, the second total data amount is Vt1, and the data amount played by the player from the previous query time to the current time is Vc. At this time, the first total data amount Vt2 ═ Vt1+ (V2-V1) -Vc.
In another example, if the first data amount is greater than the second data amount and the playing status is stop playing, the second data amount is subtracted from the sum of the second total data amount and the first data amount to obtain the first total data amount.
At this time, referring to the above description, if the first data amount is larger than the second data amount, it may be determined that the amount of data entering the pipeline is increased from the previous query time to the current time, so that the amount of data buffered in each plug-in at the downstream of the buffer queue is at least equal to the amount of data buffered at the previous query time. Meanwhile, the player at the current moment is in a pause state, and no data is consumed. Therefore, it can be determined that the first total data at this time is at least the sum of the second total data amount and the first data amount minus the second data amount.
For example, the first data amount is V2, the second data amount is V1, and the second total data amount is Vt1, where the first total data amount Vt2 is Vt1+ (V2-V1).
In another example, if the first data amount is smaller than or equal to the second data amount and the playing status is stop playing, the second total data amount is taken as the first total data amount.
It should be noted that, in this embodiment, since the data amount cached in each plug-in unit downstream of the cache queue at the current time cannot be determined, when the first data amount is smaller than the second data amount, and if the player plays normally, it cannot be determined whether the data amount cached in each plug-in unit downstream of the cache queue increases, decreases, or does not change. At this time, it is assumed that the player is paused from the previous query time to the current time, so that it can be determined that the data in the whole pipeline is not decreased, and the first data amount in the buffer queue is smaller than the second data amount, which indicates that the data in the buffer queue flows into the downstream plug-in, so that the data amount in the plug-in is increased.
For example, at the previous query time, the second data amount cached in the cache queue is 20 bytes, the sum of the data amounts cached in the respective cards is 10 bytes, and the first data amount cached in the cache queue at the current query time is 10 bytes, at this time, it may be determined that the reduced 10 bytes data in the cache queue flows to each downstream card, and at this time, the sum of the data amounts in the cards should be 20 bytes, so that it may be determined that the first total data amount cached in the cache queue at the current time and each downstream card in the cache queue is at least 10 bytes +20 bytes, which is 30 bytes, that is, the first total data amount is at least equal to the second total data amount.
For example, the second total data amount is Vt1, and at this time, the first total data amount Vt2 is Vt 1.
In another example, if the first data amount is smaller than or equal to the second data amount and the playing status is playing, the second total data amount minus the playing amount is used as the first total data amount.
Referring to the above example, when the first data amount is less than or equal to the second data amount and the player is in the pause state, it may be determined that the first total data amount is equal to the second total data amount, and when the player is in the play state, the play amount from the previous query time to the current time needs to be subtracted from the second total data amount.
For example, the second total data amount is Vt1, and the data amount played by the player from the previous query time to the current time is Vc. At this time, the first total data amount Vt2 is Vt 1-Vc.
Optionally, in this embodiment, after the first total data amount at the current time is determined, error correction needs to be performed on the first total data amount, so as to avoid error control on the player due to the error of the first total data amount determined according to the above step, where the specific error correction process is step S204:
s204, if the first total data volume is smaller than the first data volume, taking the first data volume as the first total data volume.
It should be noted that the first total data size determined through the above steps is data buffered in the entire pipeline (specifically, data buffered by the buffer queue and each plug-in downstream of the buffer queue), and the first data size is data buffered by the buffer queue at the current time, that is, the first data size is a part of the first total data size, and therefore, the first data size should be smaller than the first total data size. If the first data volume is larger than the first total data volume, it indicates that an error occurs in the determining process, and the first total data volume needs to be determined again.
Specifically, the size relationship between the first total data volume and the first data volume is judged, and if the first total data volume is smaller than the first data volume, it is indicated that the query is wrong, and the first data volume is obtained by directly querying the cache queue, which is more accurate.
And if the first total data size is larger than or equal to the first data size, the first total data size of the query is correct.
Then, the error-corrected first total data amount is used to determine whether the player needs to pause for buffering, for example, when the first total data amount is smaller than a buffer threshold, a pause playing message is sent to the play control unit, so that the play control unit controls the player to pause for data buffering.
To further explain the play control method of the present embodiment, as shown in fig. 4, a specific flow process of the present embodiment may include:
a1, querying a first data volume V2 cached in a current instance cache queue;
a2, judging whether the first data volume V2 is larger than the second data volume (namely the data volume cached in the cache queue at the previous query moment) V1;
a3, if V2> V1, making the first total data size at the current time equal to the second data size at the previous query time plus the difference between the first data size and the second data size, i.e. Vt ═ Vt + (V2-V1);
a4, if V2 is less than or equal to V1, making the first total data size at the current moment equal to the second data size at the previous inquiry moment, namely Vt is equal to Vt;
a5, judging the playing state of the player at the current moment;
a6, if the playing status is playing, subtracting the playing amount of the player from the previous query time to the current time from the first total data amount determined in the step A3 or a4, that is, Vt-Vc;
a7, if the playing status is pause, setting the first total data size determined in the step A3 or a4 as the first total data size at the current time, that is, Vt ═ Vt;
a8, judging whether the first total data volume determined in the step A6 or A7 is less than the first data volume;
a9, if Vt < V2 indicates that the queried Vt is incorrect, re-determining Vt, i.e. making Vt equal to V2;
a10, if Vt is larger than or equal to V2, making Vt equal to Vt;
a11, judging whether the first total number is smaller than a cache threshold value;
a12, if Vt < VL, sending pause playing message to the playing unit, executing A14;
a12, if Vt is larger than or equal to VL, judging whether the playing state of the player is a pause state, if so, executing A13, and if not, executing A14;
a13, judging whether the first total quantity is larger than a playing threshold value, if so, executing A15, and if not, executing A14;
a14, save Vt and V2, return A1;
a15, sending the play message to the play unit, and executing A14.
Through the process, each query cycle can calculate to obtain a total buffer data, the total buffer data is compared with a preset upper threshold and a preset lower threshold, if the total buffer data is lower than a buffer threshold VL, the total buffer data in the pipeline is almost exhausted, the playing needs to be paused, and more data are sent by a data source unit; if the playback threshold VH is higher and the player is in a pause state, a playback message is sent to the playback unit to cause the player to restart playback.
In practical application, the total buffer data in the pipeline is larger than the buffer data in the buffer queue obtained by query, and the total buffer data belongs to the data available for the player, so that the total buffer data is used as the standard for judging whether the playing needs to be paused, and compared with the mode that the buffer data of the buffer queue is used as the judgment standard alone, the method is more reasonable and accurate, and the frequent pausing of the player can be effectively reduced.
Optionally, if the multimedia stream includes multiple paths of data, such as multiple paths of audio and video, the method of this embodiment may be used to perform query and calculation statistics on each path of data separately, and then comprehensively consider the result of the multiple paths of data (generally taking the minimum value) to obtain a final data, which is used as a standard for determining whether to pause playing for buffering.
According to the playing control method of the player provided by the embodiment of the invention, the second total data amount cached in each target plug-in unit at the previous query time and the second data amount cached in the cache queue at the previous query time are obtained; acquiring a first data volume cached in a cache queue at the current moment and the playing state of a player at the current moment; and then, determining the first total data volume according to the second total data volume, the first data volume, the second data volume and the playing state, so as to realize accurate determination of the first total data volume, and further realize accurate and reasonable control of the playing state of the player based on the accurate first total data volume.
Fig. 5 is a schematic structural diagram of a play control apparatus of a player according to a first embodiment of the present invention, and as shown in fig. 5, the play control apparatus 100 of the player according to the present embodiment may include:
a determining module 110, configured to determine a first total data amount cached by each target plug-in a player at a current time, where each target plug-in includes a cache queue and at least one plug-in downstream of the cache queue;
a sending module 120, configured to send a pause playing message to a playing control unit in the player if the first total data amount is smaller than a preset cache threshold, so that the playing control unit controls the player to pause playing.
Fig. 6 is a schematic structural diagram of a play control apparatus of a player according to a second embodiment of the present invention. On the basis of the foregoing embodiment, the determining module 110 of the present embodiment may include:
a first obtaining unit 111, configured to obtain a second total data amount cached in each target plugin at a previous query time and a second data amount cached in the cache queue at the previous query time;
a second obtaining unit 112, configured to obtain a first data amount cached in the cache queue at the current time and a playing state of the player at the current time;
a determining unit 113, configured to determine the first total data volume according to the second total data volume, the first data volume, the second data volume, and the playing status.
In a possible implementation manner of this embodiment, the determining unit 113 is specifically configured to subtract the second data amount and a playing amount from a sum of the second total data amount and the first data amount as the first total data amount if the first data amount is greater than the second data amount and the playing state is playing, where the playing amount is a data amount played by the player from the previous query time to the current time;
if the first data volume is larger than the second data volume and the playing state is stop playing, subtracting the second data volume from the sum of the second total data volume and the first data volume to obtain a first total data volume;
if the first data volume is smaller than or equal to the second data volume and the playing state is playing, subtracting the playing volume from the second total data volume to obtain the first total data volume;
and if the first data volume is smaller than or equal to the second data volume and the playing state is stop playing, taking the second total data volume as the first total data volume.
In another possible implementation manner of this embodiment, the determining unit 113 is further configured to take the first data amount as the first total data amount if the first total data amount is smaller than the first data amount.
In another possible implementation manner of this embodiment, the determining module 113 is further configured to send a play message to the play control unit if the player is in a pause state at the current time and the first total data amount is greater than a preset play threshold, so that the play control unit controls the player to switch from the pause state to a play state.
It should be noted that: in the playing control device of the player provided in the above embodiment, when the playing control processing of the player is performed, only the division of the above functional modules is illustrated, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the embodiments of the playing control device of the player and the playing control method of the player provided in the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the embodiments of the methods and will not be described herein again.
Fig. 7 is a schematic structural diagram of a player according to an embodiment of the present invention, and as shown in fig. 7, the player 200 includes:
a data source element 210 for acquiring data to be played.
A separator 220 for separating the raw data into audio data and video data.
And a buffer queue 230 for buffering the audio data and the video data.
A decoder 240 for decrypting the buffered audio data and video data.
And the audio and video synchronization terminal 250 is used for synchronously outputting the decoded audio data and video data.
A statistical unit 260 for executing the play control method of the player shown in fig. 1 or fig. 2.
As shown in fig. 7, the data source element 210, the splitter 220, the buffer queue 230, the decoder 240, and the audio and video synchronization terminal 250 in the player are connected to each other in a plug-in manner to form a pipeline in which data to be played is streamed and processed.
Specifically, in practical application, besides the data to be played is cached in the cache queue 230, the data to be played is also cached in the decoder 240 and the audio and video synchronization terminal 250, so that the counting unit obtains the first total data amount cached in the pipeline at the current time by counting the cache data in the pipeline. Then, the first total data volume is used as a standard for judging whether the player pauses or not, so that frequent pausing of the player is effectively reduced, and user experience is improved.
Optionally, the statistical unit 260 of this embodiment runs on a single thread, and does not affect pipeline formed by the data source element 210, the splitter 220, the buffer queue 230, the decoder 240, and the audio and video synchronization terminal 250, thereby ensuring reliable operation of the player.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 8, an electronic device 300 according to the embodiment includes:
a memory 310 for storing a computer program;
the processor 320 is configured to execute the computer program to implement the playing control method of the player, which has similar implementation principles and technical effects and is not described herein again.
Fig. 9 is a schematic diagram of a playing system according to an embodiment of the present invention, and as shown in fig. 9, the playing system 400 of the embodiment includes: the electronic device 300, the player 200 and the server 410 are connected in a communication mode, and the player 200 is the player 200 shown in fig. 7.
Specifically, as shown in fig. 9, the electronic device 300, the player 200, and the server 410 in the playing system 400 are communicatively connected to each other, so as to perform data transmission. In actual use, a user clicks the player 200 on the electronic device 300 (which may be different from the electronic device in fig. 8), and the player 200 obtains the original data to be played from the server 410, performs corresponding processing on the original data, and finally performs playing on the electronic device 300. When the player 200 performs corresponding processing on the original data, the player 200 performs the play control method, queries the first total data size in the pipeline, and determines whether the player 200 needs to pause to perform data caching according to the first total data size.
Optionally, the playing system 400 of this embodiment may be a streaming media playing system, the corresponding player 200 is a streaming media player, and the server 410 is a streaming media server.
Optionally, the player 200 of the present embodiment is included in the electronic device 300.
Further, when at least a part of the functions of the scene scale estimation method in the embodiment of the present invention are implemented by software, the embodiment of the present invention further provides a computer storage medium, which is used to store computer software instructions for the binocular camera-based scene scale estimation, and when the computer storage medium runs on a computer, the computer storage medium enables the computer to execute various possible scene scale estimation methods in the above method embodiments. The processes or functions described in accordance with the embodiments of the present invention may be generated in whole or in part when the computer-executable instructions are loaded and executed on a computer. The computer instructions may be stored on a computer storage medium or transmitted from one computer storage medium to another via wireless (e.g., cellular, infrared, short-range wireless, microwave, etc.) to another website site, computer, server 410, or data center. The computer storage media may be any available media that can be accessed by a computer or a data storage device, such as server 410, a data center, etc., that includes an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SSD), among others.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A playing control method of a player is characterized by comprising the following steps:
determining a first total data volume cached by each target plug-in a player at the current moment, wherein each target plug-in comprises a cache queue and at least one plug-in at the downstream of the cache queue;
if the first total data volume is smaller than a preset cache threshold value, sending a pause playing message to a playing control unit in the player so that the playing control unit controls the player to pause playing;
the determining the first total data size cached by each target plug-in the player at the current moment specifically includes:
acquiring a second total data volume cached in each target plug-in at the previous query time and a second data volume cached in the cache queue at the previous query time;
acquiring a first data volume cached in the cache queue at the current moment and a playing state of the player at the current moment;
and determining the first total data volume according to the second total data volume, the first data volume, the second data volume and the playing state.
2. The method according to claim 1, wherein the determining the first total data volume according to the second total data volume, the first data volume, the second data volume, and the play status specifically includes:
if the first data volume is larger than the second data volume and the playing state is playing, subtracting the second data volume and a playing volume from the sum of the second total data volume and the first data volume to serve as the first total data volume, wherein the playing volume is the data volume played by the player from the previous query time to the current time;
if the first data volume is larger than the second data volume and the playing state is stop playing, subtracting the second data volume from the sum of the second total data volume and the first data volume to obtain a first total data volume;
if the first data volume is smaller than or equal to the second data volume and the playing state is playing, subtracting the playing volume from the second total data volume to obtain the first total data volume;
and if the first data volume is smaller than or equal to the second data volume and the playing state is stop playing, taking the second total data volume as the first total data volume.
3. The method according to claim 1 or 2, wherein after determining the first total data amount buffered by each target plug-in the player at the current moment, the method further comprises:
and if the first total data volume is smaller than the first data volume, taking the first data volume as the first total data volume.
4. The method of claim 1, further comprising:
and if the player is in a pause state at the current moment and the first total data volume is greater than a preset playing threshold value, sending a playing message to the playing control unit so that the playing control unit controls the player to be switched from the pause state to a playing state.
5. A playback control apparatus of a player, comprising:
the determining module is used for determining a first total data volume cached by each target plug-in the player at the current moment, wherein each target plug-in comprises a cache queue and at least one plug-in at the downstream of the cache queue;
a sending module, configured to send a pause playing message to a playing control unit in the player if the first total data amount is smaller than a preset cache threshold, so that the playing control unit controls the player to pause playing;
wherein the determining module is specifically configured to:
acquiring a second total data volume cached in each target plug-in at the previous query time and a second data volume cached in the cache queue at the previous query time;
acquiring a first data volume cached in the cache queue at the current moment and a playing state of the player at the current moment;
and determining the first total data volume according to the second total data volume, the first data volume, the second data volume and the playing state.
6. A player, comprising:
the data source element is used for acquiring original data to be played;
a separator for separating the raw data into audio data and/or video data;
the buffer queue is used for buffering the audio data and/or the video data;
a decoder for decrypting the buffered audio data and/or video data;
the audio and video synchronization terminal is used for synchronously outputting the decoded audio data and video data;
a statistical unit for performing the play control method of the player according to any one of claims 1-4.
7. The player of claim 6, wherein the statistical unit runs in a separate thread.
8. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the play control method of the player according to any one of claims 1 to 4.
9. A playback system, comprising: the electronic equipment, the player and the server which are connected in a communication mode, wherein the player is arranged on the electronic equipment, and the player is the player according to claim 6 or 7.
10. A computer storage medium, characterized in that the storage medium has stored therein a computer program which, when executed, implements a play control method of the player of any one of claims 1-4.
CN201810171871.8A 2018-03-01 2018-03-01 Player, play control method and device, electronic equipment and play system Active CN108259998B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810171871.8A CN108259998B (en) 2018-03-01 2018-03-01 Player, play control method and device, electronic equipment and play system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810171871.8A CN108259998B (en) 2018-03-01 2018-03-01 Player, play control method and device, electronic equipment and play system

Publications (2)

Publication Number Publication Date
CN108259998A CN108259998A (en) 2018-07-06
CN108259998B true CN108259998B (en) 2021-01-22

Family

ID=62744546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810171871.8A Active CN108259998B (en) 2018-03-01 2018-03-01 Player, play control method and device, electronic equipment and play system

Country Status (1)

Country Link
CN (1) CN108259998B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194698A (en) * 2018-11-01 2019-01-11 浩云科技股份有限公司 A kind of Real-time Video Processing System and method based on GStreamer frame
CN110324760B (en) * 2019-06-28 2020-10-27 安徽威斯贝尔智能科技有限公司 Audio processor and control method thereof
CN112911392B (en) * 2021-01-14 2022-06-10 海信视像科技股份有限公司 Audio and video playing control method and display device
CN113453064B (en) * 2021-06-18 2023-02-24 Vidaa(荷兰)国际控股有限公司 Resource playing method and display equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120000125A (en) * 2010-06-25 2012-01-02 주식회사 셀런 Method of controlling buffer according to network and buffer states in vod player
CN102970579A (en) * 2012-11-28 2013-03-13 四川长虹电器股份有限公司 Method and device for monitoring video buffer area
CN104244110A (en) * 2013-06-18 2014-12-24 好看科技(深圳)有限公司 Play control method and module, terminal and system
CN104244033A (en) * 2014-09-03 2014-12-24 乐视致新电子科技(天津)有限公司 Video playing method and device and intelligent terminal
CN105979345A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video data processing method and device
CN105979344A (en) * 2015-11-27 2016-09-28 乐视致新电子科技(天津)有限公司 Multimedia play method and player
CN105992043A (en) * 2015-10-15 2016-10-05 乐视致新电子科技(天津)有限公司 Data processing method and device
CN107087210A (en) * 2017-03-30 2017-08-22 青岛海信电器股份有限公司 The method and terminal of video broadcasting condition are judged based on cache-time

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7987510B2 (en) * 2001-03-28 2011-07-26 Rovi Solutions Corporation Self-protecting digital content
KR100546640B1 (en) * 2003-03-11 2006-01-26 엘지전자 주식회사 Digital Video record/playback system and trick playback method
US20150201230A1 (en) * 2004-05-19 2015-07-16 Philip Drope Using Personal Video Recorder Functionality in a Placeshifting System with Secure Handling of Media Content
US8352996B2 (en) * 2008-06-27 2013-01-08 Microsoft Corporation Adaptive video switching for variable network conditions
US9697865B2 (en) * 2011-12-13 2017-07-04 Thomson Licensing Dtv Method and system for providing universal follow-me functionality
CN102802075B (en) * 2012-08-24 2015-05-20 乐视致新电子科技(天津)有限公司 Online play buffering system and method
CN106792109B (en) * 2016-12-06 2021-02-26 海信视像科技股份有限公司 Video playing method and device and terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120000125A (en) * 2010-06-25 2012-01-02 주식회사 셀런 Method of controlling buffer according to network and buffer states in vod player
CN102970579A (en) * 2012-11-28 2013-03-13 四川长虹电器股份有限公司 Method and device for monitoring video buffer area
CN104244110A (en) * 2013-06-18 2014-12-24 好看科技(深圳)有限公司 Play control method and module, terminal and system
CN104244033A (en) * 2014-09-03 2014-12-24 乐视致新电子科技(天津)有限公司 Video playing method and device and intelligent terminal
CN105992043A (en) * 2015-10-15 2016-10-05 乐视致新电子科技(天津)有限公司 Data processing method and device
CN105979344A (en) * 2015-11-27 2016-09-28 乐视致新电子科技(天津)有限公司 Multimedia play method and player
CN105979345A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video data processing method and device
CN107087210A (en) * 2017-03-30 2017-08-22 青岛海信电器股份有限公司 The method and terminal of video broadcasting condition are judged based on cache-time

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于G/G/1排队系统的播放缓冲控制机制》;陈俊杰;《网络新媒体技术》;20120515;第1卷(第3期);全文 *

Also Published As

Publication number Publication date
CN108259998A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
CN111135569B (en) Cloud game processing method and device, storage medium and electronic equipment
CN108259998B (en) Player, play control method and device, electronic equipment and play system
CN110636346B (en) Code rate self-adaptive switching method and device, electronic equipment and storage medium
US8947596B2 (en) Alignment of closed captions
CN110430457B (en) Method and device for playing different-end audio and video and audio playing system
JP6105717B2 (en) Improved block request streaming system for handling low latency streaming
EP2649792B1 (en) Pre-buffering audio/video stream pairs
US20140109156A1 (en) Method, terminal, server and system for playing media file
US11563992B2 (en) Video playback quality detection method and apparatus
US20140297881A1 (en) Downloading and adaptive streaming of multimedia content to a device with cache assist
CN101364941A (en) Content playback device, content playback method, computer-readable storage medium, and content playback system
CN111182322B (en) Director control method and device, electronic equipment and storage medium
CN111404882B (en) Media stream processing method and device
CN113141522B (en) Resource transmission method, device, computer equipment and storage medium
WO2018028547A1 (en) Channel switching method and device
CN109756749A (en) Video data handling procedure, device, server and storage medium
US11729439B2 (en) Methods and systems configured to manage video transcoder latencies
CN114363715A (en) Video playing method and related equipment
CN107690093B (en) Video playing method and device
CN113852824A (en) Video transcoding method and device, electronic equipment and storage medium
CN113225585A (en) Video definition switching method and device, electronic equipment and storage medium
CN107872716B (en) post-packaged streaming data analysis method and device and electronic equipment
US8881213B2 (en) Alignment of video frames
CN112911390B (en) Video data playing method and terminal equipment
CN111836071B (en) Multimedia processing method and device based on cloud conference and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Video Technology Co., Ltd

Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant before: HISENSE ELECTRIC Co.,Ltd.

GR01 Patent grant
GR01 Patent grant