CN107801085A - A kind of video playing control method and device - Google Patents

A kind of video playing control method and device Download PDF

Info

Publication number
CN107801085A
CN107801085A CN201710927309.9A CN201710927309A CN107801085A CN 107801085 A CN107801085 A CN 107801085A CN 201710927309 A CN201710927309 A CN 201710927309A CN 107801085 A CN107801085 A CN 107801085A
Authority
CN
China
Prior art keywords
video
frame
pause
play
time out
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
CN201710927309.9A
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.)
Koubei Shanghai Information Technology Co Ltd
Original Assignee
Koubei Shanghai Information 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 Koubei Shanghai Information Technology Co Ltd filed Critical Koubei Shanghai Information Technology Co Ltd
Priority to CN201710927309.9A priority Critical patent/CN107801085A/en
Publication of CN107801085A publication Critical patent/CN107801085A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4333Processing operations in response to a pause request
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/764Media network packet handling at the destination 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • 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

Abstract

This application discloses a kind of video playing control method, including:Suspend the broadcasting of the video;Frame of video when pause plays is rendered in the play area of the video;Judge whether the time out of the video is less than time out threshold value, if so, hiding the frame of video;Play the video.The video playing control method is during video playback is carried out, all broadcasting work are not stopped completely when video playback is suspended, video recovery can be carried out when playing on the basis of work is played before, so as to shorten video playback preparation, accelerate video playback;In addition, frame of video when methods described is played by rendering frequency pause, so that continuity of the video playback picture after video recovery broadcasting with keeping continuously, improving video playback picture before pause.

Description

A kind of video playing control method and device
Technical field
The application is related to video technique field, and in particular to a kind of video playing control method.The application is related to one simultaneously Kind video playback control device, and a kind of electronic equipment.
Background technology
In android system, the general video player MediaPlay carried using system is carried out video decoding and broadcast Put, and use the carrier (painting canvas) of SurfaceView or TextureView as video playback.Due to newly-built video player It is larger with the overhead needed for painting canvas, therefore often reuse video player and painting canvas in the same page.But During reusing video player and painting canvas, if the shutoff operation of video player is more frequent, it can cause to broadcast next time It is more long to put the stand-by period;In addition, painting canvas when reusing, can trigger, painting canvas frames out indication range and painting canvas rejoins screen Indication range, causes the discontinuous or even interim card of screen-picture, and Consumer's Experience is poor.
At present, the problem of existing in face of reuse video player and painting canvas, is mainly carried using following two implementations Consumer's Experience is risen, first, by detecting painting canvas whether in the range of screen display, is closed testing result as video player With the foundation restarted, if detecting that painting canvas frames out indication range, video player is closed;If detect painting canvas again Add in the range of screen display, then restart video player.But the shortcomings that this implementation is that video player restarts consumption When it is longer, meanwhile, the discontinuous defect of video playback picture also be present.
Second, by detecting painting canvas whether in the range of screen display, using testing result as video playback foundation, if Detect that painting canvas frames out indication range, does not close video player;When detecting that painting canvas rejoins screen display scope It is interior, then continue to play based on the video player being not turned off before.But the shortcomings that this implementation is that painting canvas rejoins , it is necessary to wait painting canvas just to be played out after initializing in the range of screen display, it is discontinuous to also result in video playback picture.
The content of the invention
The application provides a kind of video playing control method, discontinuous to solve video playback picture existing for prior art The problem of.The application is related to a kind of video playback control device, and a kind of electronic equipment simultaneously.
The application provides a kind of video playing control method, including:
Suspend the broadcasting of the video;
Frame of video when pause plays is rendered in the play area of the video;
Judge whether the time out of the video is less than time out threshold value, if so, hiding the frame of video;
Play the video.
Optionally, before the broadcasting step of the pause video performs, following step is performed:
Whether the pause playing condition for detecting the video is triggered, if so, performing the broadcasting of the pause video Step;The step if it is not, whether the pause playing condition for returning to the execution detection video is triggered;
Wherein, the pause playing condition of stating is including at least one of following:Receive the pause instruction for the video Or out code, the play area of the video are in outside screen display scope, the video is hidden on its affiliated page Hide or close, the affiliated page of video is closed, refreshes or hidden, and the video player for playing the video goes out Now abnormal, code check, resolution ratio or the frame frequency of the video change.
Optionally, before whether the time out for judging the video is less than the execution of time out threshold step, perform Following step:
Whether the playing condition for detecting the video is triggered, if so, performing the time out for judging the video Whether time out threshold step is less than;The step if it is not, whether the playing condition for returning to the execution detection video is triggered Suddenly;
Wherein, the playing condition includes at least one of following:The play instruction for the video is received, it is described to broadcast Region is put to be in the range of the screen display.
Optionally, after the broadcasting step of the pause video performs, and the play area wash with watercolours in the video Before frame of video step when dye pause plays performs, following step is performed:
Extract the frame of video when video pause plays;
The frame of video is stored by the way of bitmap and/or data matrix.
Optionally, the frame of video when extraction video pause plays, is realized in the following way:
The view approach for calling the video playback to use obtains the frame of video;
The video playback passage of video player based on the video extracts the frame of video;
And/or the image interface in underlying graphics storehouse is called to obtain the frame of video.
Optionally, the play area in the video renders frame of video when pause plays, real in the following way It is existing:
View corresponding to the frame of video is created based on the bitmap and/or the data matrix;
View corresponding to the frame of video is rendered in the play area;
Accordingly, it is described to hide the frame of video, realize in the following way:The hiding play area renders described View corresponding to frame of video.
Optionally, the play area in the video renders frame of video step when pause plays, by calling bottom The image interface in layer pattern storehouse operates display caching corresponding to the frame of video and realized;
Accordingly, it is described to hide the frame of video step, it is corresponding by calling described image interface to clear up the frame of video Display caching realize.
Optionally, it is described to play the video, realize in the following way:
Establish the video playback passage of the video player of the video;
The video playback passage based on foundation, using the video player since the next frame of the frame of video Play the video.
Optionally, after the broadcasting step of the pause video performs, and the time out for judging the video Before whether being less than the execution of time out threshold step, following step is performed:
Generate the time-delay closing message for closing the video;
Wherein, the time out threshold value is recorded in the time-delay closing message, after the time-delay closing message generation It is triggered after continuing the time out threshold value for the video player for closing the video.
Optionally, if whether the time out for judging the video is less than the judged result of time out threshold step It is yes, performs following step:
Reclaim the time-delay closing message.
Optionally, if whether the time out for judging the video is less than the judged result of time out threshold step It is no, performs following step:
The time-delay closing message is triggered, and closes the video player.
Optionally, after the time-delay closing messages step generated for closing the video performs, following step is performed:
The time-delay closing message is added in message queue and handled;
And/or poll sub-line journey is created, and detect whether the time-delay closing message is touched by the poll sub-line journey Hair, if so, closing the video player;If it is not, reclaim the time-delay closing message.
Optionally, the recovery time-delay closing message, is realized in the following way:
The time-delay closing message is deleted from the message queue;
And/or record message corresponding to the time-delay closing message and mark;If detecting, the message mark is cancelled, Then reclaim the time-delay closing message.
Optionally, the video playing control method, including:
Suspend mark according to corresponding to the pause playing condition of the video determines it;
Search and/view elements corresponding to the establishment pause mark;
The view elements are rendered in the play area and/or the frame of video.
The application also provides a kind of video playback control device, including:
Suspend broadcast unit, for suspending the broadcasting of the video;
Frame of video rendering unit, for rendering frame of video when pause plays in the play area of the video;
Time out judging unit, for judging whether the time out of the video is less than time out threshold value, if so, Run frame of video hidden unit and broadcast unit;
Wherein, the frame of video hidden unit, for hiding the frame of video;
The broadcast unit, for playing the video.
The application also provides a kind of electronic equipment, including:
Memory and processor;
The memory is used to store computer executable instructions, and the processor can perform for performing the computer Instruction:
Suspend the broadcasting of the video;
Frame of video when pause plays is rendered in the play area of the video;
Judge whether the time out of the video is less than time out threshold value, if so, hiding the frame of video;
Play the video.
The video playing control method that the application provides, including:Suspend the broadcasting of the video;In the video Play area renders frame of video when pause plays;Judge whether the time out of the video is less than time out threshold value, if It is to hide the frame of video;Play the video.
The video playing control method, during video playback is carried out, after the broadcasting of the video is suspended, Frame of video when being not that the resource for taking current video broadcasting is whole to discharge, but the video pause being played renders The play area of the video, when the video recovery plays, if the time out of the video is in the time model of permission In enclosing, then the frame of video rendered is hidden, and recover the broadcasting of the video on this basis.The video playback control Method does not stop all broadcasting work when video playback is suspended completely during video playback is carried out, and video is extensive Replay can be carried out when putting on the basis of work is played before, so as to shorten video playback preparation, accelerate video playback;This Outside, methods described by render frequency pause play when frame of video so that video recovery play after video playback picture with Keep continuous before pause, improve the continuity of video playback picture.
Brief description of the drawings
Accompanying drawing 1 is a kind of process chart for video playing control method embodiment that the application provides;
Accompanying drawing 2 is a kind of schematic diagram for video playback control that the application provides;
Accompanying drawing 3 is a kind of schematic diagram for video playback control device embodiment that the application provides;
Accompanying drawing 4 is the schematic diagram for a kind of electronic equipment embodiment that the application provides.
Embodiment
Many details are elaborated in the following description in order to fully understand the application.But the application can be with Much it is different from other modes described here to implement, those skilled in the art can be in the situation without prejudice to the application intension Under do similar popularization, therefore the application is not limited by following public specific implementation.
The application provides a kind of video playing control method, and the application also provides a kind of video playback control device, and A kind of electronic equipment.The accompanying drawing of the embodiment provided below in conjunction with the application is described in detail one by one, and to method Each step illustrate.
A kind of video playing control method embodiment that the application provides is as follows:
Referring to the drawings 1, a kind of process chart of the video playing control method embodiment provided it illustrates the application, Referring to the drawings 2, a kind of schematic diagram of video playback control provided it illustrates the application.
Step S101, suspend the broadcasting of the video.
The present embodiment illustrates by taking the video playing control method under android system as an example, but not limited to this, other The video playing control method equally can be achieved under operating system, realization mechanism is similar, is provided with reference to the present embodiment Following implementations of the video playing control method.In android system, application program uses Android systems The video player (MediaPlay) carried of uniting carries out video decoding and broadcasting, while uses SurfaceView (surface view) Or carriers (painting canvas) of the TextureView (Texture View) as video playback, it is initial that the two is successfully completed video playback Change and play out.It should be noted that the video player for carrying out video playback regarding of being not limited to that android system carries Frequency player, can also be increased income using other or third party's video player are played out.
In a kind of preferred embodiment that the application provides, detected first in playing process on current screen in broadcasting Whether the pause playing condition of the video of state is triggered, if the pause playing condition of the video is triggered, suspends institute State the broadcasting of video;If the pause playing condition of the video is not triggered, continue the broadcasting of the video, rear Continue the detection of above-mentioned pause playing condition in continuous playing process.Wherein, under the pause playing condition can be State any one or multinomial combination:The pause playing condition of stating is including at least one of following:Receive and regarded for described The pause instruction or out code of frequency, the play area of the video are in outside screen display scope, and the video is in its institute It is hidden or closes on the category page, the affiliated page of video is closed, refreshes or hidden, for playing the video There is exception in video player, and code check, resolution ratio or the frame frequency of the video change.
For example in actual applications, during application program plays video, receive user and inputted for current video Pause instruction, then suspend current video broadcasting.For another example in user's input after sliding touch or downslide touch, Once making the play area of current video be moved to outside screen display scope, then suspend the broadcasting of current video.Similar, currently There are multiple videos on the video playback page where video, only current video is in broadcast state, if user is in current video Click on other videos during broadcasting to play out, then the broadcasting of current video is suspended;Practical situation is also possible to be current The video playback page where video is closed, refreshes or hidden based on the operational order that user inputs, in a similar situation, when The broadcasting of preceding video is suspended.In addition, receiving the out code that user is directed to application program input, current video can not continue Play, broadcasting is suspended.Or it can not continue to play caused broadcasting because the video player of current video occurs abnormal Pause.
Step S102, frame of video when pause plays is rendered in the play area of the video.
In a kind of preferred embodiment that the application provides, rendered in the play area of the video when pause plays Before frame of video, the extraction operation of frame of video can also be carried out when the video pause plays, and on this basis for carrying The frame of video got carries out storage operation.In the specific implementation, the extraction operation of the frame of video when video pause plays, can By using following offers any one in a manner of or the combinations of various ways realize:Mode one, call the video playback The view approach used obtains the frame of video.Such as call TextureView method come obtain pause play when video Frame.Mode two, the video playback passage of the video player based on the video extract the frame of video.For example using use During MediaPlay plays video, pause is extracted by MediaPlay video playback passage SurfaceTexture Frame of video during broadcasting.Mode three, the image interface in underlying graphics storehouse is called to obtain the present frame.For example call Android Regarding when the underlying graphics storehouse OpenGL that system carries directly manipulates the Surface of broadcast window on screen to obtain pause broadcasting Frequency frame.The frame of video extracted after frame of video when playing is suspended, can be used position by said extracted to the video The mode for the data matrix that figure Bitmap or OpenGL receives is stored.
Suspending frame of video when playing in said extracted to the video, and store the frame of video extracted it Afterwards, on this basis, a kind of preferred embodiment is that the frame of video when pause extracted is played is rendered described The play area of video.If described regard is stored by the way of the above-mentioned data matrix received using bitmap Bitmap or OpenGL Frequency frame, accordingly, this step can by view (View) corresponding to the newly-built frame of video of system interface of android system, And by play area of the current newly-built view rendering in frame of video when screen plays, make the position of the view and shown video Play area position overlap so that the view can just cover the play area of the video.It is in addition, another excellent The embodiment of choosing is by calling the image interface in underlying graphics storehouse to operate display caching corresponding to the frame of video, so that will Frame of video when pause plays renders the play area in the video;For example directly operated using OpenGL image interfaces Display caching corresponding to the frame of video, the frame of video is rendered to the play area of the video on screen, made on screen The broadcast area of the video can just show the frame of video.
As described above, the pause playing condition of the video has many kinds, in order to improve perception of the user to video playback, The reason for lifting the Consumer's Experience in video display process, the video pause can also will be caused to play show or notify to User, in a kind of preferred embodiment that the application provides, determine that its is right according to the pause playing condition of the video first The pause mark answered, view elements corresponding to the pause mark are searched in the material database pre-set, or create pause View elements corresponding to mark, most view elements corresponding to the pause mark are rendered in the play area and/or institute at last State in frame of video.For example, pause playing condition is the pause playback action of user's input, the pause broadcasting of active user's input is dynamic Make pause corresponding to this pause playing condition and be identified as " user suspends playback action ", then can be for " user, which suspends, to play View elements corresponding to action " establishment:The button control of " pause ", or " pause plays " this text information are shown, most " suspend " button control at last or " pause plays " text information is rendered on the upper strata of frame of video, the effect of embodiment is frame of video Central area show " pause " button control or " pause play " text information.
Step S103, judges whether the time out of the video is less than time out threshold value.
In the present embodiment, after the broadcasting of the video is suspended, i.e.,:Suspend broadcasting for the video player of the video After putting work, and the non-immediate closing video player, but closed afterwards continuing for some time (i.e. time out threshold value) The video player, in order to avoid in a short time if it is desired to continuing to play the video, video player is restarted Shi Chongxin decoding videos it is time-consuming long, cause screen-picture discontinuous;Meanwhile painting canvas triggering painting canvas when reusing is avoided to leave Window and window is rejoined, cause the discontinuous even interim card of screen-picture.As shown in Figure 2, video A mistake is being played Cheng Zhong, video A skid off screen display scope due to sliding touch on user, then video A broadcasting is suspended;Hereafter if with Family wants to continue to watch video A, is moved to video A in the range of screen display by downslide touch, due to video A video Player is not closed, therefore need not restart video player, continues recovery video A broadcasting i.e. based on the video player Can.
In the specific implementation, after the broadcasting that above-mentioned steps S101 suspends the video, above-mentioned steps S102 broadcasts pause Frame of video when putting is rendered after the play area of the video, and a kind of preferred embodiment is generation time-delay closing message, Record has the time out threshold value in the time-delay closing message, and the time-delay closing message continues for some time after generation It is triggered after (time out threshold value), when the time-delay closing message is triggered, the video player of the video is closed. Time out threshold value described in the embodiment of the present application, refer to that the video pause allows the video player of the video to deposit after playing Maximum time living, once reaching or more than the time out threshold value, then the video player of the video is closed. When it is implemented, the time out threshold value can determine according to practical application scene, the side of Remote configuration can also be passed through Formula sets the time out threshold value, or when being suspended by user's open interface, being set by User Defined needed for it Between threshold value, this is not limited.
It is similar with the detection mode whether above-mentioned detection pause playing condition is triggered, herein, what the application provided In a kind of preferred embodiment, whether the playing condition that can detect the video first is triggered, if the playing condition quilt of the video Triggering, then perform this step, judge whether the time out of the video is less than time out threshold value;If the broadcasting of the video Condition is not triggered, then repeats above-mentioned detection process.Wherein, the playing condition includes at least one of following:Receive pin To the play instruction of the video, the play area is in the range of the screen display.
Specifically, this step judges whether the time out of the video is less than time out threshold value, if the video Time out is less than the time out threshold value, when showing that the video pause plays duration without departing from the pause Between threshold value, i.e., the time-to-live of the video player of described video is without departing from the time out threshold value, the institute of above-mentioned generation Stating time-delay closing message will not be triggered, and therefore, a kind of preferred embodiment is the recovery time-delay closing message, and is recovered The normal play of the video, following step S104 and step S105, the frame of video rendered on screen-concealing are performed, and broadcast Put the video.If the time out of the video is more than or equal to the time out threshold value, show regarding for the video The time-to-live of frequency player exceeds the time out threshold value, and a kind of preferred embodiment is the described of above-mentioned generation Time-delay closing message is triggered, and the video player of the video is closed.It can be seen that the present embodiment is broadcast by closing the video Device is put, the resource that recovery video player takes, optimizes systematic function.
In actual applications, after the above-mentioned generation time-delay closing message, a kind of preferred embodiment is by generation The time-delay closing message, which is sent to the message queue of system, to be handled.Accordingly, if during the pause of video described above Between be less than the time out threshold value, a kind of preferred embodiment is closed by deleting the delay from the message queue Message is closed to reclaim the time-delay closing message.In addition, after the above-mentioned generation time-delay closing message, a wheel can also be created The sub-line journey waited is ask, whether the time out for detecting the video by taking turns by the sub-line journey exceeds the time out threshold Value, if polling result exceeds the time out threshold value for the time out of the video, trigger the time-delay closing and disappear Breath, and close the video player of the video;If polling result is the time out of the video without departing from described temporary Stop time threshold, then reclaim the time-delay closing message.Further, the time-delay closing message pair can also be recorded in internal memory The message mark answered, the state of the time-delay closing message is determined by the message identifier, if the time-delay closing disappears The message mark of breath is normal, shows the video also in halted state;If the message mark quilt of the time-delay closing message Cancel, then reclaim the time-delay closing message.
Step S104, hide the frame of video.
The premise that this step and following step S105 are carried out is that the pause of the video is judged in above-mentioned steps S103 The judged result whether time is less than time out threshold value is yes, in the case where the judgment result is yes, reclaims the delay and closes Message is closed, and hides the frame of video on this basis.If as described above, pass through android system in above-mentioned steps S102 The newly-built frame of video of system interface corresponding to view (View), and current newly-built view rendering is being shielded in the video Play area on curtain;Accordingly, in this step, can be regarded by hiding corresponding to the frame of video that render of the play area Figure hides the frame of video.In addition, if above-mentioned steps S102 is by calling the image interface in underlying graphics storehouse to operate Display caching corresponding to the frame of video, so as to which the frame of video to be rendered to the play area in the video on screen;Phase Answer, this step can be by calling described image interface to clear up display caching corresponding to the frame of video to hide the video Frame.
Step S105, play the video.
The frame of video that above-mentioned steps S104 renders the play area of the video is hidden, and after this, can recover The broadcasting of the video, because the video player of the video is not off, therefore restarting for video player need not be carried out Operation, a kind of preferred embodiment that the application provides is to establish the video playback passage of the video, the video of the video Play passage to complete after establishing, the video player is based on the video playback passage, from the next frame of the frame of video Commence play out the video.
For example, as shown in Figure 2, when user is in sliding touch in input on screen, regarding in video application Frequency play the page can with this sliding touch move, video A therein may proceed to broadcast during video playback page movement Put, while video A broadcast window (play area) can also move up therewith, when the broadcast window for detecting video A is complete After the indication range that frames out, video A pause playing condition is triggered, now, pause video A broadcasting, but video A is regarded Frequency player is not closed.After video A broadcasting is suspended, the frame of video when A pauses of extraction video play, and will extraction Frame of video be shown on video A broadcast window, it is just covered video A broadcast window;Hereafter, video is generated A time-delay closing message, record has the video A video player pent time out after 10s in time-delay closing message Threshold value, it is medium pending that the time-delay closing message is added into system message queue.In the state of video A is in pause broadcasting, When user is inputting downslide touch on screen, the video playback page can move down therewith, when detecting broadcasting for video A After window is put completely into screen display scope, video A playing condition is triggered, now, if video A time out is small In 10s, then recover video A broadcasting, specifically include the time-delay closing message for reclaiming video A, and what is shown on screen-concealing regards Frequency A frame of video, video A is commenced play out from the next frame of current video frame.
Among reality, the continuous broadcasting of video is realized, it is (FPS) per second that the frame frequency of video playback preferably must be held in 16 frames On, between generally lying in 30-60FPS, between the time needed for one frame of broadcasting is about 33-16ms, and system carries out a machine The time of device instruction processing is typically below ms ranks, or even the update with processor, carries out at a machine instruction The time of reason can foreshorten to microsecond rank once, it is seen then that in the present embodiment, system is corresponding to above-mentioned steps S101 to step S105 Executable instruction when being handled, the time required to required processing time plays a frame much smaller than video player, i.e.,:Less than regarding The time required to frame of video described in frequency player plays.If after the broadcasting of video is suspended, if pause not played temporarily When frame of video be fixed to the video play area, when video recovery plays, due to temporarily broadcasting when frame of video Through completing to play, therefore the next frame of current video frame is played, need to carry out before the next frame of the frame of video plays Play preparation, observed by the naked eyes of user, may on screen observe occur flashy " blank screen " or " screen flicker " phenomenon, or even video playback picture interim card can be observed.And the video controlling party for using the application to provide Method, after the broadcasting of the video is suspended, by the way that the frame of video suspended when playing to be rendered to the play area in the video, After the video recovery plays, the frame of video that the play area of the video is rendered is hidden, and from the frame of video Next frame commence play out the video, for the macroscopic angle of user, it is seen that video playback is continuous, Bu Hui " blank screen " or " screen flicker " phenomenon is observed on screen, the picture continuity in video display process is improved, improves Consumer's Experience.
In summary, the video playing control method, during video playback is carried out, when the broadcasting of the video It is not that current video is played to the resource taken all to discharge after being suspended, but the regarding when video pause is played Frequency frame renders the play area in the video, when the video recovery plays, if the time out of the video is being permitted Perhaps in time range, then the frame of video rendered is hidden, and recover the broadcasting of the video on this basis.It is described to regard Frequency control method for playing back does not stop all broadcasting works when video playback is suspended completely during video playback is carried out Make, can be carried out when video recovery plays on the basis of work is played before, so as to shorten video playback preparation, accelerate to regard Frequency plays;In addition, frame of video when methods described is played by rendering frequency pause, so that the video after video recovery plays is broadcast Picture is put with keeping continuous before pause, improves the continuity of video playback picture.
A kind of video playback control device embodiment that the application provides is as follows:
In the above-described embodiment, there is provided a kind of video playing control method, corresponding, the application also provides A kind of video playback control device, is illustrated below in conjunction with the accompanying drawings.
Referring to the drawings 3, a kind of schematic diagram of the video playback control device embodiment provided it illustrates the application.
Because device embodiment is substantially similar to embodiment of the method, so describing fairly simple, related part please join The corresponding explanation of the embodiment of the method for above-mentioned offer is provided.Device embodiment described below is only schematical.
The application provides a kind of video playback control device, including:
Suspend broadcast unit 301, for suspending the broadcasting of the video;
Frame of video rendering unit 302, for rendering frame of video when pause plays in the play area of the video;
Time out judging unit 303, for judging whether the time out of the video is less than time out threshold value, if It is operation frame of video hidden unit 304 and broadcast unit 305;
Wherein, the frame of video hidden unit 304, for hiding the frame of video;
The broadcast unit 305, for playing the video.
Optionally, the video playback control device, including:
Suspend playing condition detection unit, whether the pause playing condition for detecting the video is triggered, if so, fortune The row pause broadcast unit 301;If it is not, the operation pause playing condition detection unit;
Wherein, the pause playing condition of stating is including at least one of following:Receive the pause instruction for the video Or out code, the play area of the video are in outside screen display scope, the video is hidden on its affiliated page Hide or close, the affiliated page of video is closed, refreshes or hidden, and the video player for playing the video goes out Now abnormal, code check, resolution ratio or the frame frequency of the video change.
Optionally, the video playback control device, including:
Whether playing condition detection unit, the playing condition for detecting the video are triggered, if so, operation is described temporarily Judging unit 303 between stopping time;If it is not, run the playing condition detection unit;
Wherein, the playing condition includes at least one of following:The play instruction for the video is received, it is described to broadcast Region is put to be in the range of the screen display.
Optionally, the video playback control device, including:
Video frame extraction unit, for extracting the frame of video when video pause plays;
Frame of video memory cell, for storing the frame of video by the way of bitmap and/or data matrix.
Optionally, the video frame extraction unit, including:
First extraction subelement, the view approach for calling the video playback to use obtain the frame of video;
Second extraction subelement, the video playback passage for the video player based on the video extract the video Frame;
3rd extraction subelement, for calling the image interface in underlying graphics storehouse to obtain the frame of video.
Optionally, the frame of video rendering unit 302, including:
View creates subelement, for being created based on the bitmap and/or the data matrix corresponding to the frame of video View;
View rendering subelement, for rendering view corresponding to the frame of video in the play area;
Accordingly, the frame of video hidden unit 304, including:View hides subelement, for hiding the play area View corresponding to the frame of video rendered.
Optionally, the frame of video rendering unit 302, by calling the image interface in underlying graphics storehouse to operate the video Display caching corresponding to frame is realized;
Accordingly, the frame of video hidden unit 304, by calling described image interface to clear up corresponding to the frame of video Display caching is realized.
Optionally, the broadcast unit 305, including:
Video playback Path Setup subelement, the video playback passage of the video player for establishing the video;
Subelement is played, for the video playback passage based on foundation, is regarded using the video player from described The next frame of frequency frame commences play out the video.
Optionally, the video playback control device, including:
Time-delay closing message generation unit, for generating the time-delay closing message for being used for closing the video;
Wherein, the time out threshold value is recorded in the time-delay closing message, after the time-delay closing message generation It is triggered after continuing the time out threshold value for the video player for closing the video.
Optionally, if the judged result of the time out judging unit 303 output is small for the time out of the video In the time out threshold value, time-delay closing message recovery unit is run;The time-delay closing message recovery unit, for reclaiming The time-delay closing message.
Optionally, if the time out judging unit 303 output judged result for the video time out not Less than the time out threshold value, time-delay closing message trigger unit is run;The time-delay closing message trigger unit, for touching Send out time-delay closing message described, and close the video player.
Optionally, the video playback control device, including:
Time-delay closing message processing unit, handled for the time-delay closing message to be added in message queue;
Poll units, the time-delay closing message is detected for creating poll sub-line journey, and by the poll sub-line journey Whether it is triggered, if so, closing the video player;If it is not, reclaim the time-delay closing message.
Optionally, the time-delay closing message recovery unit, including:
Message deletes subelement, for deleting the time-delay closing message from the message queue;
Message mark record subelement, is marked for recording message corresponding to the time-delay closing message;If detect institute State message mark to be cancelled, then reclaim the time-delay closing message.
Optionally, the video playback control device, including:
Pause mark determining unit, is identified for pause corresponding to determining it according to the pause playing condition of the video;
View elements creating unit, for searching and/view elements corresponding to the establishment pause mark;
View elements rendering unit, for rendering the view elements in the play area and/or the frame of video.
The a kind of electronic equipment embodiment that the application provides is as follows:
In the above-described embodiment, there is provided a kind of video playing control method, to be used in addition, present invention also provides one kind In the electronic equipment for realizing the video playing control method, illustrate below in conjunction with the accompanying drawings.
Referring to the drawings 4, the schematic diagram of a kind of electronic equipment provided it illustrates the present embodiment.
The electronic equipment embodiment that the application provides describes fairly simple, and related part refers to above-mentioned offer The video playing control method embodiment corresponding explanation.Embodiment described below is only schematical.
The application provides a kind of electronic equipment, including:
Memory 401 and processor 402;
The memory 401 is used to store computer executable instructions, and machine is calculated as below for execution in the processor 402 Executable instruction:
Suspend the broadcasting of the video;
Frame of video when pause plays is rendered in the play area of the video;
Judge whether the time out of the video is less than time out threshold value, if so, hiding the frame of video;
Play the video.
Optionally, before the play instruction of the pause video performs, the processor 402 is additionally operable to perform following meter Calculation machine executable instruction:
Whether the pause playing condition for detecting the video is triggered, if so, performing the broadcasting of the pause video Instruction;The instruction if it is not, whether the pause playing condition for returning to the execution detection video is triggered;
Wherein, the pause playing condition of stating is including at least one of following:Receive the pause instruction for the video Or out code, the play area of the video are in outside screen display scope, the video is hidden on its affiliated page Hide or close, the affiliated page of video is closed, refreshes or hidden, and the video player for playing the video goes out Now abnormal, code check, resolution ratio or the frame frequency of the video change.
Optionally, it is described before whether the time out for judging the video is less than the instruction execution of time out threshold value Processor 402 is additionally operable to execution and machine executable instruction is calculated as below:
Whether the playing condition for detecting the video is triggered, if so, performing the time out for judging the video Whether it is less than time out threshold value to instruct;The finger if it is not, whether the playing condition for returning to the execution detection video is triggered Order;
Wherein, the playing condition includes at least one of following:The play instruction for the video is received, it is described to broadcast Region is put to be in the range of the screen display.
Optionally, after the play instruction of the pause video performs, and the play area wash with watercolours in the video Before frame of video instruction when dye pause plays performs, the processor 402 is additionally operable to execution and machine executable instruction is calculated as below:
Extract the frame of video when video pause plays;
The frame of video is stored by the way of bitmap and/or data matrix.
Optionally, the frame of video when extraction video pause plays, is realized in the following way:
The view approach for calling the video playback to use obtains the frame of video;
The video playback passage of video player based on the video extracts the frame of video;
And/or the image interface in underlying graphics storehouse is called to obtain the frame of video.
Optionally, the play area in the video renders frame of video when pause plays, real in the following way It is existing:
View corresponding to the frame of video is created based on the bitmap and/or the data matrix;
View corresponding to the frame of video is rendered in the play area;
Accordingly, it is described to hide the frame of video, realize in the following way:The hiding play area renders described View corresponding to frame of video.
Optionally, when the frame of video when performing the play area in the video and rendering pause broadcasting instructs, lead to Cross and call the image interface in underlying graphics storehouse to operate display caching corresponding to the frame of video to perform;
Accordingly, when performing the hiding frame of video instruction, regarded by calling described in the cleaning of described image interface Display caching corresponding to frequency frame performs.
Optionally, it is described to play the video, realize in the following way:
Establish the video playback passage of the video player of the video;
The video playback passage based on foundation, using the video player since the next frame of the frame of video Play the video.
Optionally, after the play instruction of the pause video performs, and the time out for judging the video Before whether being less than the instruction execution of time out threshold value, the processor 402 is additionally operable to execution and machine executable instruction is calculated as below:
Generate the time-delay closing message for closing the video;
Wherein, the time out threshold value is recorded in the time-delay closing message, after the time-delay closing message generation It is triggered after continuing the time out threshold value for the video player for closing the video.
Optionally, if whether the time out for judging the video is less than the implementing result of time out threshold value instruction It is yes, the processor 402 is additionally operable to execution and machine executable instruction is calculated as below:
Reclaim the time-delay closing message.
Optionally, if whether the time out for judging the video is less than the implementing result of time out threshold value instruction It is no, the processor 402 is additionally operable to execution and machine executable instruction is calculated as below:
The time-delay closing message is triggered, and closes the video player.
Optionally, after the time-delay closing message generated for closing the video instructs execution, the processor 402 It is additionally operable to execution and machine executable instruction is calculated as below:
The time-delay closing message is added in message queue and handled;
And/or poll sub-line journey is created, and detect whether the time-delay closing message is touched by the poll sub-line journey Hair, if so, closing the video player;If it is not, reclaim the time-delay closing message.
Optionally, the recovery time-delay closing message, is realized in the following way:
The time-delay closing message is deleted from the message queue;
And/or record message corresponding to the time-delay closing message and mark;If detecting, the message mark is cancelled, Then reclaim the time-delay closing message.
Optionally, the processor 402 is additionally operable to execution and machine executable instruction is calculated as below:
Suspend mark according to corresponding to the pause playing condition of the video determines it;
Search and/view elements corresponding to the establishment pause mark;
The view elements are rendered in the play area and/or the frame of video.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this area skill Art personnel are not being departed from spirit and scope, can make possible variation and modification, therefore the guarantor of the application Shield scope should be defined by the scope that the application claim is defined.
In a typical configuration, computing device includes one or more processors, input/output interface, network and connect Mouth and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein Machine computer-readable recording medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.

Claims (10)

  1. A kind of 1. video playing control method, it is characterised in that including:
    Suspend the broadcasting of the video;
    Frame of video when pause plays is rendered in the play area of the video;
    Judge whether the time out of the video is less than time out threshold value, if so, hiding the frame of video;
    Play the video.
  2. 2. video playing control method according to claim 1, it is characterised in that the broadcasting step of the pause video Before rapid execution, following step is performed:
    Whether the pause playing condition for detecting the video is triggered, if so, performing the broadcasting step of the pause video; The step if it is not, whether the pause playing condition for returning to the execution detection video is triggered;
    Wherein, the pause playing condition of stating is including at least one of following:Receive for the video pause instruction or Out code, the play area of the video are in outside screen display scope, the video be hidden on its affiliated page or Person closes, and the affiliated page of video is closed, refreshes or hidden, and the video player for playing the video occurs different Often, the code check of the video, resolution ratio or frame frequency change.
  3. 3. video playing control method according to claim 2, it is characterised in that during the pause of the judgement video Between whether be less than time out threshold step perform before, perform following step:
    Whether the playing condition for detecting the video is triggered, if so, whether performing the time out for judging the video Less than time out threshold step;The step if it is not, whether the playing condition for returning to the execution detection video is triggered;
    Wherein, the playing condition includes at least one of following:Receive the play instruction for the video, the broadcast area Domain is in the range of the screen display.
  4. 4. according to the video playing control method described in claim 1,2 or 3, it is characterised in that the pause video Play step perform after, and the play area in the video render pause play when frame of video step perform before, hold Row following step:
    Extract the frame of video when video pause plays;
    The frame of video is stored by the way of bitmap and/or data matrix.
  5. 5. video playing control method according to claim 4, it is characterised in that the extraction video pause plays When frame of video, realize in the following way:
    The view approach for calling the video playback to use obtains the frame of video;
    The video playback passage of video player based on the video extracts the frame of video;
    And/or the image interface in underlying graphics storehouse is called to obtain the frame of video.
  6. 6. video playing control method according to claim 4, it is characterised in that the play area in the video Frame of video when pause plays is rendered, is realized in the following way:
    View corresponding to the frame of video is created based on the bitmap and/or the data matrix;
    View corresponding to the frame of video is rendered in the play area;
    Accordingly, it is described to hide the frame of video, realize in the following way:Hide the video that the play area renders View corresponding to frame.
  7. 7. according to the video playing control method described in claim 1,2 or 3, it is characterised in that it is described to play the video, adopt Realized with following manner:
    Establish the video playback passage of the video player of the video;
    The video playback passage based on foundation, commenced play out using the video player from the next frame of the frame of video The video.
  8. 8. according to the video playing control method described in claim 1,2 or 3, it is characterised in that the pause video Play step perform after, and the time out for judging the video whether be less than time out threshold step execution before, hold Row following step:
    Generate the time-delay closing message for closing the video;
    Wherein, the time out threshold value is recorded in the time-delay closing message, is continued after the time-delay closing message generation It is triggered after the time out threshold value for the video player for closing the video.
  9. A kind of 9. video playback control device, it is characterised in that including:
    Suspend broadcast unit, for suspending the broadcasting of the video;
    Frame of video rendering unit, for rendering frame of video when pause plays in the play area of the video;
    Time out judging unit, for judging whether the time out of the video is less than time out threshold value, if so, operation Frame of video hidden unit and broadcast unit;
    Wherein, the frame of video hidden unit, for hiding the frame of video;
    The broadcast unit, for playing the video.
  10. 10. a kind of electronic equipment, it is characterised in that including:
    Memory and processor;
    The memory is used to store computer executable instructions, and the processor is used to perform the executable finger of the computer Order:
    Suspend the broadcasting of the video;
    Frame of video when pause plays is rendered in the play area of the video;
    Judge whether the time out of the video is less than time out threshold value, if so, hiding the frame of video;
    Play the video.
CN201710927309.9A 2017-09-30 2017-09-30 A kind of video playing control method and device Pending CN107801085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710927309.9A CN107801085A (en) 2017-09-30 2017-09-30 A kind of video playing control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710927309.9A CN107801085A (en) 2017-09-30 2017-09-30 A kind of video playing control method and device

Publications (1)

Publication Number Publication Date
CN107801085A true CN107801085A (en) 2018-03-13

Family

ID=61532900

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710927309.9A Pending CN107801085A (en) 2017-09-30 2017-09-30 A kind of video playing control method and device

Country Status (1)

Country Link
CN (1) CN107801085A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144611A (en) * 2018-09-03 2019-01-04 武汉斗鱼网络科技有限公司 Android clarity switching method, device, terminal and readable medium
CN109144612A (en) * 2018-09-03 2019-01-04 武汉斗鱼网络科技有限公司 Android clarity switching method, device, terminal and readable medium
CN109729417A (en) * 2019-03-28 2019-05-07 深圳市酷开网络科技有限公司 A kind of video-see play handling method, smart television and storage medium
CN110858910A (en) * 2018-08-23 2020-03-03 广州虎牙信息科技有限公司 Live video display method, device, equipment and storage medium
CN112511887A (en) * 2020-11-30 2021-03-16 京东方科技集团股份有限公司 Video playing control method and corresponding device, equipment, system and storage medium
CN114501110A (en) * 2022-04-13 2022-05-13 海看网络科技(山东)股份有限公司 Solution for playing ghost when HOME key exits in IPTV
CN115474086A (en) * 2022-09-14 2022-12-13 北京字跳网络技术有限公司 Play control method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307156A (en) * 2011-05-16 2012-01-04 北京奇艺世纪科技有限公司 Method and device for sharing video picture and returning to playing
CN103019563A (en) * 2012-12-11 2013-04-03 广东欧珀移动通信有限公司 Method or device for rapidly suspending or muting video player
US20150181301A1 (en) * 2013-12-24 2015-06-25 JBF Interlude 2009 LTD - ISRAEL Methods and systems for in-video library
CN105554575A (en) * 2015-12-11 2016-05-04 北京元心科技有限公司 Method and device for processing media playing function in multiple systems
CN105872802A (en) * 2015-12-30 2016-08-17 乐视网信息技术(北京)股份有限公司 Video playing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102307156A (en) * 2011-05-16 2012-01-04 北京奇艺世纪科技有限公司 Method and device for sharing video picture and returning to playing
CN103019563A (en) * 2012-12-11 2013-04-03 广东欧珀移动通信有限公司 Method or device for rapidly suspending or muting video player
US20150181301A1 (en) * 2013-12-24 2015-06-25 JBF Interlude 2009 LTD - ISRAEL Methods and systems for in-video library
CN105554575A (en) * 2015-12-11 2016-05-04 北京元心科技有限公司 Method and device for processing media playing function in multiple systems
CN105872802A (en) * 2015-12-30 2016-08-17 乐视网信息技术(北京)股份有限公司 Video playing method and device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110858910A (en) * 2018-08-23 2020-03-03 广州虎牙信息科技有限公司 Live video display method, device, equipment and storage medium
CN110858910B (en) * 2018-08-23 2022-05-27 广州虎牙信息科技有限公司 Live video display method, device, equipment and storage medium
CN109144611A (en) * 2018-09-03 2019-01-04 武汉斗鱼网络科技有限公司 Android clarity switching method, device, terminal and readable medium
CN109144612A (en) * 2018-09-03 2019-01-04 武汉斗鱼网络科技有限公司 Android clarity switching method, device, terminal and readable medium
CN109144612B (en) * 2018-09-03 2021-10-15 武汉斗鱼网络科技有限公司 Android definition switching method and device, terminal and readable medium
CN109729417A (en) * 2019-03-28 2019-05-07 深圳市酷开网络科技有限公司 A kind of video-see play handling method, smart television and storage medium
CN109729417B (en) * 2019-03-28 2019-09-10 深圳市酷开网络科技有限公司 A kind of video-see play handling method, smart television and storage medium
CN112511887A (en) * 2020-11-30 2021-03-16 京东方科技集团股份有限公司 Video playing control method and corresponding device, equipment, system and storage medium
CN112511887B (en) * 2020-11-30 2023-10-13 京东方科技集团股份有限公司 Video playing control method, corresponding device, equipment, system and storage medium
CN114501110A (en) * 2022-04-13 2022-05-13 海看网络科技(山东)股份有限公司 Solution for playing ghost when HOME key exits in IPTV
CN115474086A (en) * 2022-09-14 2022-12-13 北京字跳网络技术有限公司 Play control method and device, electronic equipment and storage medium
CN115474086B (en) * 2022-09-14 2023-07-18 北京字跳网络技术有限公司 Play control method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107801085A (en) A kind of video playing control method and device
US20210397309A1 (en) Interface display method and apparatus, and storage medium
US20190034042A1 (en) Screen control method and electronic device thereof
CN108829457A (en) Application program prediction model update method, device, storage medium and terminal
CN108337547B (en) Character animation realization method, device, terminal and storage medium
CN106547420A (en) A kind of page processing method and device
US10798363B2 (en) Video file processing method and apparatus
US11620784B2 (en) Virtual scene display method and apparatus, and storage medium
US9195364B2 (en) Method and apparatus for generating dynamic wallpaper
CN108635851B (en) Game picture processing method and device
CN107566579A (en) Image pickup method, device, terminal and storage medium
CN108762831A (en) Application program preloads method, apparatus, storage medium and terminal
CN111432276A (en) Game engine, interactive video interaction method and electronic equipment
CN105828195A (en) Suspending resuming method and apparatus of player
CN106293974A (en) A kind of terminal abnormal restoration methods and terminal
US11941728B2 (en) Previewing method and apparatus for effect application, and device, and storage medium
WO2017101414A1 (en) Android platform-based multimedia playing method and device, and mobile terminal device
CN107423095A (en) Data processing method, device, storage medium and the computer equipment of adaptive hardware
US9525854B2 (en) Information processing method and electronic device
CN107742077B (en) Method and device for preventing information leakage in live game
CN111314791B (en) Seamless jump method in video playing based on Android
CN109582187A (en) Document sending method, device, computer equipment and storage medium
CN105808629B (en) Webpage processing method and device
CN106507211A (en) Income prompting method and device
CN106792163A (en) The detection method and device of a kind of video broadcasting condition

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180313