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 invention
Formula 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 embodiment
Including:
101st, during desktop live broadcast, when detecting the operation of the adjustment to current live region, to current desktop
Sectional 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 should
Live 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 region
For 640x480,1024x768.Wherein, the live transmission resolution ratio is the maximum number of pixels that can be transmitted that the terminal is configured, should
Live transmission resolution ratio can also represent that such as live transmission resolution ratio can be 640x480,1024x768, thus may be used with pixel
Know, 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 transmission
Magnitude relationship between rate, the preview image in the live region after display adjustment, during whole adjustment, terminal shows in real time
Show 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 beholder
The 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 and
The 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 adjustment
Scope, 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 adjustment
Region 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 and
After 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, get
Up to live region during preset duration;Or,
In the adjustment operating process, whenever the displacement for detecting adjustment operation reaches pre-determined distance, get
Up to live region during pre-determined distance;Or,
In the adjustment operating process, paused whenever detecting adjustment operation, obtain live when pausing
Region.
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 straight
Broadcast, when the adjustment operates the live region after terminating and detecting based on adjustment to carry out live instruction, after adjustment
Live 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 straight
Broadcast, when the adjustment operates the live region after terminating and detecting based on adjustment to carry out live instruction, after adjustment
Live 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 invention
Body is terminal, and the terminal can be fixed terminal or mobile terminal, and fixed terminal can be PC(Personal Computer, it is individual
People's computer)Or display device, mobile terminal can be smart mobile phone, tablet personal computer, PDA(Personal Digital
Assistant, 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 desktop
Covered with suspended frame on preceding live region, and the current live region, the suspended frame is used to point out live region, should by adjustment
The 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 specifically
Limit.
Alternatively, the current live region can be shown with pellucidity, the pellucidity refer to by this adjust after it is live
The suspended frame transparency covered on region is set to 100% so that the desktop in live region after the adjustment is shown as transparence
State, 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 adopted
After the image of collection is handled, send to direct broadcast server so that direct broadcast server carries out transfer to vision signal so that viewing
Person 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, obtains
Desktop sectional drawing.
Wherein, adjustment operation can be the drag operation to the current live region.The drag operation can be terminal
Detect 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 direction
Mobile, 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 desktop
Not only include desktop background in sectional drawing, when further comprises image of the video played on current desktop in sectional drawing, sectional drawing
Operation 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 this
The shape of suspended frame adjusting, is pressed when terminal detects left mouse button, and to suspended frame outside or inside move when, eventually
The 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 frame
In 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 live
Region, 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 whole
Desktop 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 sat
Mark.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 invention
In, terminal is operated according to the adjustment, the coordinate on live each summit of region after the adjustment can be recorded, after the adjustment
The 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, obtains
Get 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 process
In, the live region after adjustment now is obtained every 2 seconds terminals, if entirely the adjustment operating process time is longer, Ke Yi
The live region corresponding to adjustment different phase is got during adjustment in real time, and by setting preset duration, can be kept away
Exempt 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, obtains
Get 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 adjustment
Cheng Zhong, the live region after the adjustment that 1 centimetre of terminal is obtained herein, can if entirely adjustment operating process distance is longer
Get the live region corresponding to adjustment different phase in real time to be in course of adjustment, and by setting pre-determined distance, can
To 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 pausing
Live 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 time
Pause and be used as a stage, then, if entirely adjustment operation pause is multiple in adjustment operating process, terminal can be in adjustment process
In 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 point
Resolution.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 is
540x480, 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 this
Live 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 adjustment
The 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, eventually
The 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 drawing
Picture.
206th, first image down to the live transmission resolution ratio is obtained the pre- of the live region after the adjustment by terminal
Look at image.
Wherein, the image that terminal where the size of the preview image in the live region after the adjustment is beholder is shown
Size.
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 ratio
When, when carrying out desktop live broadcast, terminal is needed the image down in the live region after the adjustment of collection to live transmission
It is transmitted again after resolution ratio, correspondingly, live transmission resolution ratio has been contracted to for this shown by terminal where beholder
Image.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, base
In 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 table
Predeterminable 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 adjusted
The 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 partly
Pellucidity is shown.When detecting adjustment end operation, based on the desktop, the live region after adjusting is shown as by terminal
Pellucidity.Wherein, the adjustment end operation can be the operation that user clicks on a certain acknowledgement key by operation interface, can also
It 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 is
Left 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 image
Region is shown with translucent.Wherein, the translucent refers to the suspended frame covered on the live region after adjusting is saturating
Lightness is set to preset value so that the desktop in live region after the adjustment is shown as translucent, translucent by this
The 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 limit
It 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 live
When 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 shown
Together.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 shows
When showing preview image, without being compressed processing to preview image, terminal can the scope based on the live region after adjustment, from
The 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, terminal
Desktop 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 user
End 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 live
Instruction when, terminal gathers the image in the live region on desktop after the adjustment in real time, and by the image of the collection
After reason, send to direct broadcast server so that direct broadcast server carries out transfer to vision signal so that beholder can see the end
The 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 straight
The 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 on
What 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 adjustment
When carrying out live instruction, desktop live broadcast is proceeded according to the live region after adjustment.And in another embodiment of the present invention
In, 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 as
The 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 step
Suddenly, 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 out
During 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 transmission
Magnitude relationship between rate, the preview image in the live region after display adjustment, during whole adjustment, terminal shows in real time
Show 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 beholder
The 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 dress
Put 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 region
During 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 adjustment
Acquisition module 602 is connected, and live region acquisition module 602 is used to be operated according to the adjustment after adjustment, obtains live after adjustment
Region;Live region acquisition module 602 is connected with preview image generation module 603 after adjustment, and preview image generation module 603 is used
In 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 point
Resolution, generates the preview image in the live region after the adjustment;Preview image generation module 603 and preview image display module
604, 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 adjustment
When 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 drawing
The image in the live region after the adjustment is intercepted, the first image is obtained;Preview image generation unit, for first image to be contracted
As 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 adjustment
Region 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 used
In in the adjustment operating process, whenever the execution duration for detecting adjustment operation reaches preset duration, get up to default
Live region during duration;Or, the second live area acquisition unit after adjustment, in the adjustment operating process, Mei Dangjian
The displacement for measuring adjustment operation reaches pre-determined distance, gets up to live region during pre-determined distance;Or, the 3rd adjustment
Live area acquisition unit afterwards, in the adjustment operating process, being paused whenever detecting adjustment operation, obtaining hair
Live region during raw pause.
Alternatively, the device also includes:First desktop live broadcast module, the adjustment to current live region is detected for working as
During 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 adjustment
Live region when carrying out live instruction, desktop live broadcast is proceeded according to the live region after adjustment;Or, second desktop it is straight
Broadcasting module, for when detecting the operation of the adjustment to current live region, keeping the desktop carried out based on current live region
It is live, when the adjustment operates the live region after terminating and detecting based on adjustment to carry out live instruction, after adjustment
Live 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 transmission
Magnitude relationship between rate, the preview image in the live region after display adjustment, during whole adjustment, terminal shows in real time
Show 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 beholder
The 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 at
Distribute and completed by different functional modules, i.e., the internal structure of device is divided into different functional modules, retouched with completing the above
The 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 desktop
The 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 hardware
To complete, the hardware of correlation can also be instructed to complete by program, described program can be stored in a kind of computer-readable
In 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 and
Within principle, any modification, equivalent substitution and improvements made etc. should be included in the scope of the protection.