Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present inventionFormula is described in further detail.
Fig. 1 is the method for previewing flow chart provided in an embodiment of the present invention based on desktop live broadcast.Referring to Fig. 1, the embodimentIncluding:
101st, during desktop live broadcast, when detecting the operation of the adjustment to current live region, to current desktopSectional drawing is carried out, desktop sectional drawing is obtained.
102nd, operated according to the adjustment, obtain the live region after adjustment.
103rd, when the live region after the adjustment size be more than live transmission resolution ratio when, according to the desktop sectional drawing and shouldLive transmission resolution ratio, generates the preview image in the live region after the adjustment.
Wherein, the size in the live region after the adjustment can be represented in the form of pixel.For example, when the size in live regionFor 640x480,1024x768.Wherein, the live transmission resolution ratio is the maximum number of pixels that can be transmitted that the terminal is configured, shouldLive transmission resolution ratio can also represent that such as live transmission resolution ratio can be 640x480,1024x768, thus may be used with pixelKnow, size can carry out size with live transmission resolution ratio and be compared.
104th, based on the desktop, the preview image is shown.
Method provided in an embodiment of the present invention, is differentiated by the size according to the live region after adjustment and live transmissionMagnitude relationship between rate, the preview image in the live region after display adjustment, during whole adjustment, terminal shows in real timeShow the preview image for being adjusted to the live region corresponding to different phase so that user can be real-time from the angle preview of beholderThe adjustment result in live region is watched, it is determined that suitable live region, it is ensured that the effect of desktop live broadcast.
Alternatively, when the live area size after the adjustment is more than live transmission resolution ratio, according to the desktop sectional drawing andThe live transmission resolution ratio, generating the preview image in the live region after the adjustment includes:
When the size in the live region after the adjustment is more than the live transmission resolution ratio, based on the live region after adjustmentScope, the image in the live region after the adjustment is intercepted from the desktop sectional drawing, the first image is obtained;
By first image down to the live transmission resolution ratio, the preview image in the live region after the adjustment is obtained.
Alternatively, the current live region is shown with pellucidity, the predeterminable area in the live region being in course of adjustmentRegion in interior display preview image, the live region after the adjustment in addition to predeterminable area is shown with translucent.
Alternatively, when the live area size after the adjustment is more than live transmission resolution ratio, according to the desktop sectional drawing andAfter the live transmission resolution ratio, the preview image for generating the live region after the adjustment, this method also includes:
When detecting adjustment end operation, based on the desktop, the live region after this is adjusted is shown as pellucidity.
Alternatively, operated according to the adjustment, obtaining the live region after adjustment includes:
In the adjustment operating process, whenever the execution duration for detecting adjustment operation reaches preset duration, getUp to live region during preset duration;Or,
In the adjustment operating process, whenever the displacement for detecting adjustment operation reaches pre-determined distance, getUp to live region during pre-determined distance;Or,
In the adjustment operating process, paused whenever detecting adjustment operation, obtain live when pausingRegion.
Alternatively, this method also includes:
When detecting the operation of the adjustment to current live region, stop the desktop based on the progress of current live region straightBroadcast, when the adjustment operates the live region after terminating and detecting based on adjustment to carry out live instruction, after adjustmentLive region proceeds desktop live broadcast;Or,
When detecting the operation of the adjustment to current live region, keep the desktop based on the progress of current live region straightBroadcast, when the adjustment operates the live region after terminating and detecting based on adjustment to carry out live instruction, after adjustmentLive region proceeds desktop live broadcast.
Fig. 2 is the method for previewing flow chart provided in an embodiment of the present invention based on desktop live broadcast.The master of the embodiment of the present inventionBody is terminal, and the terminal can be fixed terminal or mobile terminal, and fixed terminal can be PC(Personal Computer, it is individualPeople's computer)Or display device, mobile terminal can be smart mobile phone, tablet personal computer, PDA(Personal DigitalAssistant, personal digital assistant)Deng.Referring to Fig. 2, the embodiment includes:
201st, the current live region shown on terminal-pair desktop carries out desktop live broadcast.
In embodiments of the present invention, when terminal, which is detected, carries out the instruction of desktop live broadcast to desktop, show and work as in desktopCovered with suspended frame on preceding live region, and the current live region, the suspended frame is used to point out live region, should by adjustmentThe size of suspended frame can change the size in live region.As shown in figure 3, the live region is a certain region on desktop.Certainly,In another embodiment of the present invention, the current live region can also be whole desktop area, and the embodiment of the present invention is not made specificallyLimit.
Alternatively, the current live region can be shown with pellucidity, the pellucidity refer to by this adjust after it is liveThe suspended frame transparency covered on region is set to 100% so that the desktop in live region after the adjustment is shown as transparenceState, can be with desktop all in direct viewing to the region by the region of the pellucidity.
In embodiments of the present invention, when the live region of terminal-pair carry out it is live refer to the operant activity in live region,Video playback etc. it is live.
In embodiments of the present invention, the terminal gathers the image in the current live region on desktop in real time, and this is adoptedAfter the image of collection is handled, send to direct broadcast server so that direct broadcast server carries out transfer to vision signal so that viewingPerson can see the desktop in the live region that the terminal is played.
202nd, when detecting the operation of the adjustment to the current live region, terminal-pair current desktop carries out sectional drawing, obtainsDesktop sectional drawing.
Wherein, adjustment operation can be the drag operation to the current live region.The drag operation can be terminalDetect the LeftMouseDownAction of mouse(Left button is pressed)Event, then detects mouse and is moved along a direction,It can be that the terminal for being configured with touch-screen detects the touching instruction of user's finger, then detect user's finger along a directionMobile, the embodiment of the present invention is not especially limited.
Refer to integrally carry out sectional drawing to desktop it should be noted that this pair of current desktop carries out sectional drawing, in obtained desktopNot only include desktop background in sectional drawing, when further comprises image of the video played on current desktop in sectional drawing, sectional drawingOperation on desktop etc..
In embodiments of the present invention, the adjustment operation to the current live region can be realized by the following manner:
When the cursor that terminal detects mouse moves on to any summit on multiple summits of the suspended frame, cursor is become thisThe shape of suspended frame adjusting, is pressed when terminal detects left mouse button, and to suspended frame outside or inside move when, eventuallyThe live region that end display is zoomed in or out.As shown in figure 4, when the cursor that terminal detects mouse moves on to 4 of the suspended frameIn summit during any summit, terminal becomes cursor the shape of the suspended frame adjusting, adjusts as shown in dotted outline in FIG.Preceding live region.Pressed when terminal detects left mouse button, and to when moving outside suspended frame, terminal display amplification it is liveRegion, the live region after being adjusted as shown in solid box in figure.
In embodiments of the present invention, when detecting the operation of the adjustment to the current live region, terminal-pair is currently wholeDesktop carries out sectional drawing, the desktop sectional drawing is stored in internal memory, to read the desktop sectional drawing in subsequent step.
203rd, terminal is operated according to the adjustment, obtains the live region after adjustment.
In embodiments of the present invention, terminal is operated according to the adjustment, and each summit for obtaining the live region after adjustment is satMark.Wherein, the scope in the live region includes but is not limited to the positions and dimensions in the live region etc..In the embodiment of the present inventionIn, terminal is operated according to the adjustment, the coordinate on live each summit of region after the adjustment can be recorded, after the adjustmentThe coordinate on live each summit of region, determines the scope in the live region after the adjustment.
In embodiments of the present invention, step 203 includes following any embodiment:
In the adjustment operating process, terminal reaches preset duration whenever the execution duration for detecting adjustment operation, obtainsGet up to live region during preset duration.For example, being illustrated so that preset duration is 2 seconds as an example, in the adjustment operating processIn, the live region after adjustment now is obtained every 2 seconds terminals, if entirely the adjustment operating process time is longer, Ke YiThe live region corresponding to adjustment different phase is got during adjustment in real time, and by setting preset duration, can be kept awayExempt from the frequent processing to desktop sectional drawing, it is to avoid to the operation build-up of pressure of terminal.
In the adjustment operating process, terminal reaches pre-determined distance whenever the displacement for detecting adjustment operation, obtainsGet up to live region during pre-determined distance.For example, being illustrated so that pre-determined distance is 1 centimetre as an example, operated in the adjustmentCheng Zhong, the live region after the adjustment that 1 centimetre of terminal is obtained herein, can if entirely adjustment operating process distance is longerGet the live region corresponding to adjustment different phase in real time to be in course of adjustment, and by setting pre-determined distance, canTo avoid the frequent processing to desktop sectional drawing, it is to avoid to the operation build-up of pressure of terminal.
In the adjustment operating process, terminal is paused whenever detecting adjustment operation, is obtained when pausingLive region.It that is to say, in adjustment operating process, because the adjustment operation of user may be divided into multiple stages, to stop every timePause and be used as a stage, then, if entirely adjustment operation pause is multiple in adjustment operating process, terminal can be in adjustment processIn in real time get adjustment different phase corresponding to live region.
204th, terminal judges whether the size in the live region after the adjustment is more than live transmission resolution ratio;
If it is, performing step 205;
If not, terminating.
In embodiments of the present invention, terminal judges whether the size in the live region after the adjustment is more than the live transmission pointResolution.For example, the size in live region after the adjustment is 740x480, and the live transmission resolution ratio is when being 640x480,Then determine that the size in the live region after the adjustment is more than the live transmission resolution ratio;The size in live region after adjustment is540x480, and the live transmission resolution ratio be 640x480 when, it is determined that the size in the live region after the adjustment is not more than thisLive transmission resolution ratio.
205th, when the size in the live region after the adjustment is more than the live transmission resolution ratio, based on live after adjustmentThe scope in region, terminal intercepts the image in the live region after the adjustment from the desktop sectional drawing, obtains the first image.
In embodiments of the present invention, when the size in the live region after the adjustment is more than the live transmission resolution ratio, eventuallyThe desktop sectional drawing that is preserved in the read step 202 of end, according to the coordinate on live each summit of region after the adjustment of record,Interception and the scope identical image in the live region after the adjustment of the coordinate record, obtain the first figure in the desktop sectional drawingPicture.
206th, first image down to the live transmission resolution ratio is obtained the pre- of the live region after the adjustment by terminalLook at image.
Wherein, the image that terminal where the size of the preview image in the live region after the adjustment is beholder is shownSize.
It will be appreciated by those skilled in the art that the size in the live region after adjustment is more than the live transmission resolution ratioWhen, when carrying out desktop live broadcast, terminal is needed the image down in the live region after the adjustment of collection to live transmissionIt is transmitted again after resolution ratio, correspondingly, live transmission resolution ratio has been contracted to for this shown by terminal where beholderImage.The process for the picture size identical preview image that step 205- steps 206 show for generation with terminal where beholder,To reach the purpose from the live region of angle preview of beholder.
207th, based on the desktop, the preview image is shown.
In embodiments of the present invention, when the size in the live region after the adjustment is more than the live transmission resolution ratio, baseIn the desktop, the preview image is shown after the adjustment in the predeterminable area in the live region that terminal can be, can also be on the tablePredeterminable area in show the preview image, the embodiment of the present invention is not especially limited.
Alternatively, when the size in the live region after the adjustment is more than the live transmission resolution ratio, terminal can adjustedThe preview image is shown in the predeterminable area in the live region after whole, the region in live region in addition to predeterminable area can be partlyPellucidity is shown.When detecting adjustment end operation, based on the desktop, the live region after adjusting is shown as by terminalPellucidity.Wherein, the adjustment end operation can be the operation that user clicks on a certain acknowledgement key by operation interface, can alsoIt is the end operation for adjusting operation in step 202, the embodiment of the present invention is not specifically limited.For example, when adjustment operation isLeft mouse button is pressed, mouse is then pulled, then the adjustment end operation can be release left mouse button.
As shown in figure 5, in live region on the table, the centrally located region of preview image, and around preview imageRegion is shown with translucent.Wherein, the translucent refers to the suspended frame covered on the live region after adjusting is saturatingLightness is set to preset value so that the desktop in live region after the adjustment is shown as translucent, translucent by thisThe region of state can watch part desktop in the region.
In embodiments of the present invention, when the size in the live region after the adjustment is not more than the live transmission resolution ratio,Based on the desktop, terminal can show preview image, can not also show preview image, and the embodiment of the present invention does not make specific limitIt is fixed.
Alternatively, it will be appreciated by those skilled in the art that the size in the live region after adjustment to be not more than this liveWhen transmitting resolution ratio, the size and the size phase of the image in the live region after the adjustment of the image that terminal where beholder is shownTogether.Therefore, when the size in the live region after the adjustment is not more than the live transmission resolution ratio, based on the desktop, terminal showsWhen showing preview image, without being compressed processing to preview image, terminal can the scope based on the live region after adjustment, fromThe image in the live region after the adjustment is intercepted in the desktop sectional drawing, the preview image in the live region after the adjustment is obtained,The preview image is shown in live region after adjustment.
Alternatively, when the size in the live region after the adjustment is not more than the live transmission resolution ratio, based on the desktop,Terminal can not show preview image, and live region after adjustment is still shown with pellucidity.
208th, when the adjustment operates the live region after terminating and detecting based on adjustment to carry out live instruction, terminalDesktop live broadcast is proceeded according to the live region after adjustment.
Wherein, live instruction should be carried out based on the live region after adjustment can be triggered or whole by the userEnd is triggered automatically when detecting adjustment end operation triggering, and the present embodiment is not especially limited.
In embodiments of the present invention, the live region after adjustment, which is operated, to be terminated and detect based on adjustment carries out liveInstruction when, terminal gathers the image in the live region on desktop after the adjustment in real time, and by the image of the collectionAfter reason, send to direct broadcast server so that direct broadcast server carries out transfer to vision signal so that beholder can see the endThe desktop in live region after the played adjustment in end.
In embodiments of the present invention, during step 202- steps 208 are based on generation preview image, keep current straightThe desktop live broadcast execution of region progress is broadcast, that is to say when detecting the operation of the adjustment to current live region, keep being based onWhat the desktop live broadcast that current live region is carried out was performed, the live region after adjustment, which is operated, to be terminated and detect based on adjustmentWhen carrying out live instruction, desktop live broadcast is proceeded according to the live region after adjustment.And in another embodiment of the present inventionIn, step 202 can be replaced by following steps:When detecting the operation of the adjustment to current live region, terminal aborts are based on working asThe desktop live broadcast that preceding live region is carried out, and terminal-pair current desktop carries out sectional drawing, obtains desktop sectional drawing.Based on replacement stepSuddenly, step 208 can be replaced by the following manner:Live region after the adjustment, which is operated, to be terminated and detect based on adjustment is carried outDuring live instruction, desktop live broadcast is proceeded according to the live region after adjustment, the embodiment of the present invention is not especially limited.
Method provided in an embodiment of the present invention, is differentiated by the size according to the live region after adjustment and live transmissionMagnitude relationship between rate, the preview image in the live region after display adjustment, during whole adjustment, terminal shows in real timeShow the preview image for being adjusted to the live region corresponding to different phase so that user can be real-time from the angle preview of beholderThe adjustment result in live region is watched, it is determined that suitable live region, it is ensured that the effect of desktop live broadcast.
Fig. 6 is the pre-viewing device structural representation provided in an embodiment of the present invention based on desktop live broadcast.Referring to Fig. 6, the dressPut including:Live region acquisition module 602 after desktop sectional drawing acquisition module 601, adjustment, preview image generation module 603 and pre-Look at image display 604.
Desktop sectional drawing acquisition module 601 is used for during desktop live broadcast, when detecting the tune to current live regionDuring whole operation, sectional drawing is carried out to current desktop, desktop sectional drawing is obtained;Desktop sectional drawing acquisition module 601 and live region after adjustmentAcquisition module 602 is connected, and live region acquisition module 602 is used to be operated according to the adjustment after adjustment, obtains live after adjustmentRegion;Live region acquisition module 602 is connected with preview image generation module 603 after adjustment, and preview image generation module 603 is usedIn when the size in the live region after the adjustment is more than live transmission resolution ratio, according to the desktop sectional drawing and the live transmission pointResolution, generates the preview image in the live region after the adjustment;Preview image generation module 603 and preview image display module604, preview image display module 604 is used to be based on the desktop, shows the preview image.
Alternatively, the preview image generation module 603 includes:First image acquisition unit, for straight after the adjustmentWhen the size for broadcasting region is more than the live transmission resolution ratio, based on the scope in the live region after adjustment, from the desktop sectional drawingThe image in the live region after the adjustment is intercepted, the first image is obtained;Preview image generation unit, for first image to be contractedAs low as the live transmission resolution ratio, obtains the preview image in the live region after the adjustment.
Alternatively, the current live region is shown with pellucidity, the predeterminable area in the live region being in course of adjustmentRegion in interior display preview image, the live region after the adjustment in addition to predeterminable area is shown with translucent.
Alternatively, the device also includes:Second live region display module, for when detect adjustment end operation when,Based on the desktop, the live region after this is adjusted is shown as pellucidity.
Alternatively, live region acquisition module 602 includes after the adjustment:Live area acquisition unit after first adjustment, is usedIn in the adjustment operating process, whenever the execution duration for detecting adjustment operation reaches preset duration, get up to defaultLive region during duration;Or, the second live area acquisition unit after adjustment, in the adjustment operating process, Mei DangjianThe displacement for measuring adjustment operation reaches pre-determined distance, gets up to live region during pre-determined distance;Or, the 3rd adjustmentLive area acquisition unit afterwards, in the adjustment operating process, being paused whenever detecting adjustment operation, obtaining hairLive region during raw pause.
Alternatively, the device also includes:First desktop live broadcast module, the adjustment to current live region is detected for working asDuring operation, stop the desktop live broadcast carried out based on current live region, after the adjustment, which is operated, to be terminated and detect based on adjustmentLive region when carrying out live instruction, desktop live broadcast is proceeded according to the live region after adjustment;Or, second desktop it is straightBroadcasting module, for when detecting the operation of the adjustment to current live region, keeping the desktop carried out based on current live regionIt is live, when the adjustment operates the live region after terminating and detecting based on adjustment to carry out live instruction, after adjustmentLive region proceed desktop live broadcast.
Device provided in an embodiment of the present invention, is differentiated by the size according to the live region after adjustment and live transmissionMagnitude relationship between rate, the preview image in the live region after display adjustment, during whole adjustment, terminal shows in real timeShow the preview image for being adjusted to the live region corresponding to different phase so that user can be real-time from the angle preview of beholderThe adjustment result in live region is watched, it is determined that suitable live region, it is ensured that the effect of desktop live broadcast.
It should be noted that:The pre-viewing device based on desktop live broadcast that above-described embodiment is provided is based on the pre- of desktop live broadcast, can be as needed and by above-mentioned functions only with the division progress of above-mentioned each functional module for example, in practical application when looking atDistribute and completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, retouched with completing the aboveThe all or part of function of stating.In addition, the pre-viewing device based on desktop live broadcast that above-described embodiment is provided is straight with being based on desktopThe method for previewing embodiment broadcast belongs to same design, and it implements process and refers to embodiment of the method, repeats no more here.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can be by hardwareTo complete, the hardware of correlation can also be instructed to complete by program, described program can be stored in a kind of computer-readableIn storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit andWithin principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.