Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
embodiment
Embodiment one
Fig. 1 shows the realization flow of the split screen method of the multi-medium information spreading system that the embodiment of the present invention provides, and details are as follows:
As Fig. 1, step S101 starts, and performs the viewable area that step S103 obtains multi-medium information spreading system after step S102 initialization.
In embodiments of the present invention, when obtaining the viewable area of multi-medium information spreading system, obtain the boundary parameter separatetop of viewable area, the type of separateleft, separateright, separatebottom and/or viewable area.Wherein separatetop represents viewable area analogy screen apical position, separateleft represents viewable area analogy screen left position, separateright represents viewable area analogy screen location right, and separatebottom represents viewable area analogy bottom of screen position.The type of viewable area includes but not limited to 16: 9 and 4: 3.
After acquisition monitor resolution, select the broadcasting type of play area, in viewable area, create play area, to carry out split screen configuration to viewable area by external opertaing device.
Step S104 drags mouse and creates play area, and wherein the broadcasting type of play area refers to the type of the multimedia messages can play in this play area, and the broadcasting type of selectable play area includes but not limited to video, audio frequency, picture or word etc.External opertaing device includes but not limited to mouse, keyboard or its combination.
The play area for creating in viewable area selects it to play type wherein to select the broadcasting type of play area to refer to.Its concrete implementation has multiple, and as exported selectable broadcasting list of types to user, user selects a kind of broadcasting type (as video) from this broadcasting list of types.
When selecting to create relevant play area type, system performs the ratio of S105 to play area and limits, and user adjusts the position of play area and size according to the prompting of restriction, the position of concrete refinement and the relevant play area of optimization, size, ratio.
The configuration completing relevant play area performs the size location dependent information that step S107 Using API Function calculates each play area afterwards, step S108 generates list related File to the configuration file of play area and preserves, and finally performs the configuration operation that step S109 terminates this.
Wherein in viewable area, create play area by external opertaing device, to carry out the process of split screen configuration as described in Figure 3 to viewable area, in this illustrates, be described in detail to create play area by mouse in viewable area, similar by the principle of other external opertaing device establishment play area in viewable area:
First system carries out by calling related resource the initialization that this creates region, in figure 301 starts to perform, the upper and lower, left and right of 302 system auto-initiation viewing areas in figure are the type of a limited boundary and obtain the boundary parameter separatetop of viewable area, separateleft, separateright, separatebottom.
In calling graph 303 selects the type of wearing part play area, and in execution figure 304 when user presses left mouse button, is obtained the position of mouse by left mouse button, and Systematic selection is by recording the reference position of mouse as initial position.In order to avoid the invalid operation of user, as pressed left mouse button outside the viewable area of multi-medium information spreading system, when recording mouse reference position, if if the starting X-coordinate of 305 mouses in figure is not in viewable area, then the X-coordinate of mouse reference position is set to separateleft, otherwise if if the starting Y-coordinate of 306 mouses in figure is not in viewable area, if X-coordinate equals the position of left limited boundary, perform 307 in figure, the play area selecting mouse drag to create afterwards is the play area of the establishment of this operation; If after in execution figure 306, Y-coordinate equals the position of left limited boundary as 308 in figure, the same position performing this play area of establishment and create.Then the Y-coordinate of mouse reference position is set to separatetop, the reference position of mouse can be recorded like this.
The mode creating play area as 309 in figure after selecting to judge origin coordinates by dragging mouse creates play area, as 310 in figure calls Create function creation play area, and the type of this play area is defined as the type of selected play area.The play area of more than one or one arbitrary shape can be created like this in the viewable area of multi-medium information spreading system by mouse, if the X-coordinate as 311 mouses in figure is greater than the right limited boundary of viewable area, as 312 in figure selects the right limited boundary of X-coordinate to be right boundary position, if the X-coordinate lower limit as 313 mouses in figure is greater than lower limit border, such as 314 in figure selects border to be lower limit, as 315 windows in figure redraw the position exporting play area, if 316 systems in figure are by checking whether that the then choosing needing to carry out the play area created position is moved the need of to the window's position, if if desired then 317 in execution figure need move, Using API Function, the movement of play area selected by being lost efficacy by mouse and keyboard and change size, change rear preservation relevant documentation, if 318 in figure terminates this time operation, if direct redirect such as 318 in figure mustn't be wanted to terminate.When creating multiple play area in the viewable area of multi-medium information spreading system, by selecting different broadcasting types for different play area, multiple play area with different broadcasting type can be created in this viewable area.
Can realize by the way carrying out split screen configuration to viewable area.
After having created play area, preserve to configure the split screen of viewable area and generate corresponding split screen configuration file and preserved.
In embodiments of the present invention, after realization carries out split screen configuration to viewable area, generate corresponding split screen configuration file, for the terminal of multi-medium information spreading system from server calls according to the configuration of this split screen.
Wherein split screen configuration file is used for the quantity of the play area in stored visualisation region and type, the position of each play area and size, the play content of each play area and play parameter etc.Its type can be ini file.
In embodiments of the present invention, adopt api function writePrivateProfileString to generate split screen configuration file, illustrate as follows:
WritePrivateProfileString(play0,″X″,m_videox,inifilepath)
Wherein, play0 represents first video playback area, X represents the X-coordinate key word of first video playback area in split screen configuration file, m_videox represents that the X-coordinate of first video playback area accounts for the ratio of viewable area, and inifilepath represents the storing path of the split screen configuration file of generation.
Owing to storing position and the size of each play area in split screen configuration file, therefore, in a preferred embodiment of the invention, before preserving according to the corresponding split screen configuration file of split screen configuration generation of viewable area, the method also comprises the steps:
Obtain position and the size of each play area in viewable area.In order to better understanding, below to obtain position and the size of video playback area in viewable area, be described in detail to acquisition process, the position of the play area of other type is identical therewith with the acquisition process of size, does not repeat them here:
Following computing formula can be adopted to obtain position and the size of video playback area in viewable area:
Framewidth=separateright-separateleft (formula 3.3.1)
Frameheight=separatebottom-separatetop (formula 3.3.2))
Winzescale=gvideowinsize/framewidth (formula 3.3.3)
Xscale=gvideopointx/framewidth (formula 3.3.4)
Yscale=gvideopointy/frameheight (formula 3.3.5)
Wherein framewidth plays the width arranging whole framework in dialog box; Frameheight plays the height arranging whole framework in dialog box; Separateleft is viewable area analogy screen left position; Separateright is viewable area analogy screen location right; Separatebottom is viewable area analogy bottom of screen position; Separatetop is viewable area analogy screen apical position; When winzescale is front end display, video playback area accounts for the ratio of whole screen; When xscale is front end display, video playback area X-coordinate accounts for the wide ratio of whole screen; When yscale is front end display, video playback area Y-coordinate accounts for the high ratio of whole screen; Gvideowinsize is the width of the video playback area created; The video playback area ratio on viewable area X-coordinate shared by of gvideopointx for creating; The video playback area ratio on viewable area Y-coordinate shared by of gvideopointy for creating.
In embodiments of the present invention, after getting the viewable area of multi-medium information spreading system, namely in this viewable area, create any amount, arbitrary shape by external opertaing device, there is the play area of identical or different broadcasting type, to carry out split screen configuration to viewable area, preserve by preserving to configure the split screen of viewable area and generate corresponding split screen configuration file, thus make the split screen mode of multi-medium information spreading system not by the restriction of template, add the dirigibility of split screen.
In a preferred embodiment of the invention, when creating video playback area by external opertaing device in viewable area, the method also comprises the steps:
The type arranging visualization interface as shown in Figure 2, as 201 in figure starts to perform, as 202 initialization correlation parameters in figure, obtains the type of viewable area, according to the Aspect Ratio of the Type Control video playback area of viewable area.Wherein the type of viewable area includes but not limited to 16: 9 and 4: 3.Wherein the Aspect Ratio of video playback area includes but not limited to 16: 9 and 4: 3.
The detailed process wherein obtaining the type of viewable area is as follows:
Set three parameter cxScreen, cyScreen, pixel_rata, the first two parameter is X pixel and the Y pixel of screen, and the 3rd parameter is the wide and long ratio of screen.Windows api function GetSystemMetrics (SM_CXSCREEN) is called and GetSystemMetrics (SM_CYSCREEN) obtains cxScreen as 203 in figure, the value of cyScreen two parameters, adopts following algorithm to judge the type of screen:
As the 204pixel_rata=cyScreen/cxScreen in figure;
If if 205 pixel_rata in figure are between 0.50 and 0.65, type then as 206 screens in figure is 16: 9 and terminates this operation as 210 in figure, otherwise if if 207 pixel_rata in figure are between 0.70 and 0.80, type then as 208 screens in figure is 210 end operations performed after 4: 3 in figure, otherwise if 209 in figure is according to the type of the type Lookup protocol viewable area of screen, be 16: 9 to reach the whole type of the play area of establishment being carried out the self-adaptative adjustment visualization interface of optimal proportion and position and broadcasting of adaptive auxiliary tone and perform 210 end operations in figure.
Wherein as follows according to the detailed process of the Aspect Ratio of the Type Control video playback area of viewable area:
Define four variable d1, d2, d3, d4, when the type of viewable area is 16: 9, d1=16.00, d2=9.00, when the type of viewable area is 4: 3, d1=4.00, d2=3.00, obtain the value of d3 and d4 Two Variables by formula 3.4.1 and formula 3.4.2:
D3=pRect-> Width () (formula 3.4.1)
D4=(d2*d 3)/d1 (formula 3.4.2)
If the height of video playback area is greater than d4, then formula 3.4.3 is adopted to obtain the bottom position of video playback area:
PRect-> bottom=pRect-> top+d4 (formula 3.4.3)
If the height of video playback area is less than d4, then following three formula are adopted to obtain the right end position of video playback area and the height of video playback area and width:
D4=pRect-> Height () (formula 3.4.4)
D3=(d1*d4)/d2 (formula 3.4.5)
PRect-> right=pRect-> left+d3 (formula 3.4.6)
Wherein d3 represents the width of video playback area, and d4 represents the height of video playback area, and pRect is the video playback area object created.
In embodiments of the present invention, when creating video playback area by external opertaing device in viewable area, can according to the Aspect Ratio of video playback area automatically controlling for the type of the screen of issuing multimedia information in multi-medium information spreading system to create, thus make can Auto-matching for the screen of issuing multimedia information in the video playback area that creates and multi-medium information spreading system.
Embodiment two:
Show the realization flow of the split screen method of the multi-medium information spreading system that another embodiment of the present invention provides as Fig. 3, details are as follows:
Start, obtain the viewable area of multi-medium information spreading system.
Afterwards, select the broadcasting type of play area, in viewable area, create play area by external opertaing device.
After the broadcasting type selecting play area, by external opertaing device, typesetting and/or seamless link adjustment are carried out, to carry out split screen configuration to viewable area to the play area created.
Wherein by mouse or keyboard, typesetting and seamless link adjustment are carried out to the play area created, as follows with the detailed process of viewable area being carried out to split screen configuration: preferred mouse carries out typesetting here, keyboard combination key is adopted to carry out seamless link operation, the mode that typesetting is carried out in mouse concrete operations is, mouse is selected to need the play area of carrying out typesetting layout, this video playback area module is determined after being clicked by mouse after selected, then drag mouse and be dragged to the next band of position needing to adjust to by needing the play area of adjustment, position realizes by clicking the mouse after determining determining that this position is moved again, wherein pass through the mode of keyboard combination key as shown in Figure 4, Fig. 4 show adopt keyboard direction and keyboard function key combination carry out seamless link operating process and principle, wherein play area is according to pixels put to the mode preferred orientations bonding shift function key of adjustment, after performing 401 beginnings in figure, first in execution figure 402 select preferably by mouse mode the play area needing to carry out seamless link, in figure 403 clicks the play area needing to carry out movement, then select directionkeys to need the position, direction of carrying out the direction of movement to carry out position to move, in figure 404 is as selected upwarding key, select well, system can adhere to whether user continues choice for use function key and carry out continuation movement, if 411 users in figure continue to key in function key, the mode of carrying out installing pixel displacement movement in direction upwards just adds up and carries out we position upwards and move by 412 play area in figure, if user is to clicking once as 414 in figure moves with regard to the position of only carrying out a pixel, the position that the mode that 413 end users after we have moved up in figure preferably adopt mouse to click module terminates this is moved, then 408 in figure terminates this operation.Position as carried out other directions is moved, the position adopting aforesaid way to proceed other localities is moved, adopt mode that the mode of keyboard combination key adjusts module also in the operation that the manner is identical respectively, user can select according to pixels to put mobile or distance and position moves, move mode is identical with aforesaid way, be only 405 in figure, 406,404 steps in 407 replacement figure, select different directions to move, here repeat no more.
Wherein create play area first to perform S101 and start, perform S102 initialization split screen System configurations interface afterwards, S103 interface can obtain the resolution of display automatically according to the display parameter of related display.
System carries out the division of digital coordinate form according to dependent resolution to video playback area.
The present invention is in the broadcasting type with external equipment to preferred embodiment during multimedia information system split screen being the play area that user creates according to the needs definition needs of oneself, and selectable broadcasting type comprises video, audio frequency, picture and word.Then the mode that user's mouse drag or other external equipment can be selected to be applicable to divides the region on screen and adjusts, and obtains the size of relevant play area.User divides the region that is over and preferably adopts the mode of mouse drag to carry out size adjustment and typesetting to play area module later, by keyboard, play area is carried out to the adjustment of horizontal level, in the process all with the digitized forms of coordinate mark display size and position.
The present invention's preferred embodiment when arranging multimedia system split screen with external equipment is divide play area by mouse drag, define the location parameter up and down that four parameters represent visual play area respectively, coordinate position when mouse is initially clicked is recorded when pressing mouse, if not in viewable area, then automatically select initial coordinate position, when unclamping to mouse click, record position herein, thus determine the size location dependent information of the play area divided.
When wherein S104 creates play area determination play area border by mouse, define two CRect object tmpRect and wndRect, tmpRect is actual play section object, and wndRect is play area object when dragging or adjust size.TmpRect.right represents the right position of selected play area, wndRect.right represent adjustment size and position time selected play area right position, tmpRect.left represents the left position of selected play area.
If perform S105 wndRect.right to be afterwards greater than viewable area analogy screen location right separateright, then calculate the new position of selected play area by formula 3.2.1 and formula 3.2.2:
TmpRect.right=eparateright (formula 3.2.1)
TmpRect.left=tmpRect.right-wndRect.Width () (formula 3.2.2)
Wherein tmpRect.bottom represents the bottom position of selected play area, wndRect.bottom represent adjustment size and position time selected play area bottom position, tmpRect.top represents the apical position of selected play area;
Perform position and size that S105 limits video playback area, if need the position and the size execution S106 that adjust play area, if wndRect.bottom is greater than viewable area analogy bottom of screen position separatebottom, calculate the new position of selected play area by formula 3.2.3 and formula 3.2.4:
TtmpRect.bottom=separatebottom (formula 3.2.3)
TmpRect.top=tmpRect.bottom-wndRect.Height () (formula 3.2.4)
Wherein tmpRect.right represents the right position of selected play area, the width of selected play area when wndRect.Width () expression adjustment size and position, and tmpRect.left represents the left position of selected play area;
If wndRect.left is less than viewable area analogy screen left position separateleft, calculate the new position of selected play area by formula 3.2.5 and formula 3.2.6:
TmpRect.left=separateleft (formula 3.2.5)
TmpRect.right=tmpRect.left+wndRect.Width () (formula 3.2.6)
Wherein tmpRect.top represents the apical position of selected play area, the height of selected play area when wndRect.Height () expression adjustment size and position, and tmpRect.bottom represents the bottom position of selected play area;
If wndRect.top is less than visual district's analogy screen apical position separatetop, calculate the new position of selected play area by formula 3.2.7 and formula 3.2.8:
TmpRect.top=separatetop (formula 3.2.7)
TmpRect.bottom=tmpRect.top+wndRect.Height () (formula 3.2.8)
What the embodiment of the present invention provided carries out typesetting and seamless link adjustment by keyboard to the play area created, and to carry out the realization flow of split screen configuration to viewable area, details are as follows:
As Fig. 4 keyboard carries out in the process flow diagram initialization viewable area of displacement operation, under, left, the right side is the position of a limited boundary, a play area is selected wherein preferably by mouse way selection play area by external equipment, after mouse has selected corresponding play area, corresponding directionkeys is selected to determine the direction needing play area to be carried out to adjustment of displacement, after have selected corresponding moving direction, pass through function key, wherein preferred shift key is as function key, using function key is accumulated in the shift position that pixel is moved in the displacement that this side up, the number of times keyed in function key determines the number of the pixel of movement, if the wherein only key entry of nonfunctional key after key directionkeys, be defaulted as a mobile pixel on this sense of displacement, after having keyed in, confirm that this adjustment terminates by external equipment, click play area preferably by mouse and give tacit consent to this adjustment, then the adjustment of other displacement modes can be carried out by the way at this.
In the configuration completing play area, preserve to configure the split screen of viewable area and generate respective profiles and preserve.
If the broadcasting type of wherein S105 definition is video class play area, system is owing to defining 16: 9 or 4: 3 two kinds of video playback types, according to parameter preset, video class play area Aspect Ratio must meet predetermined Aspect Ratio restriction, system obtains the Aspect Ratio of play area according to the coordinate parameters of play area, when creating play area, system automatically select to determine while after compared with the type of definition, the judgement of ratio is made according to the another side of comparative information to system, according to judged result, pointed out by the ratio of mode to the play area that namely will create of Labeling Coordinate, the display adjustable video playback area of user, user is according to the adjustment of mark prompting to the size of play area, to reach adaptive adjustment mode, reach best broadcasting ratio better, realize better broadcast program and result of broadcast.
Computer system plays ratio according to the Aspect Ratio of broadcast interface to video class broadcast interface, inner setting three parameters represent the horizontal stroke of display, vertical pixel and Aspect Ratio parameter respectively, correlation proportion according to ordinate and horizontal ordinate obtains Aspect Ratio parameter, if parameter is between 0.50 and 0.65, then the type of screen is 16: 9; If between 0.70 and 0.80, then the type of screen is 4: 3 types, then according to the type of screen type Lookup protocol visualization interface.
After creating play area to the position of each play area and the adjustment mode of size be, define new parameter value when play area adjustment starts, according to the operation of mouse and keyboard, with coordinate information, digitizing display is carried out to the size of play area and mobile message change, Using API Function realizes the change to correlation parameter information, thus reaches relevant position and the change of size.
When the present invention carries out adjustment of displacement to module be first select need movement module after first press directionkeys with keyboard, come to change the in-plane displancement of module by the operation of shift key afterwards, this mode effectively can avoid the direct collision problem of keyboard in operation, for operational module is provided convenience more reliably, improve largely, security in operating process, after pressing directionkeys, by there being the continued operation of shift key, in order to be accumulated in, this side up moves, only press directionkeys, continue to be operating as the operation of single pixel displacement without shift key.Need after pressing directionkeys repeatedly to move, operated by shift, flow process as shown in Figure 4 again.Keyboard collision problem can well be avoided herein, the safety and reliability of operation is provided.
Because all modules all carry out optimum configurations in the mode of the information such as digital coordinate, when connecting between to different play area, just seamless link can be accomplished fast and easily.
Will generate split screen play list file after play area is provided with for multi-medium information spreading system terminal from server calls, the present invention adopts the Form generation split screen listing file generating ini file.Ini file mainly deposits the type of viewable area, the quantity of split screen play area and type, the position of each play area and size, the play content of each play area and the details of play parameter.Api function is adopted to generate play list file herein, and under file being saved in the introductory path of predetermined set.The file that this self-defined split screen is arranged directly can be carried out preview broadcasting by user, or is directly sent on advertisement screen display and shows.
The preferred embodiment of the present invention on point ping server is after preserving the play template set, this kind of play template can preserve by computer, during application afterwards, directly can call relevant ready-made template, applying or directly applying after the amendment make by a small margin to correlate template, thus avoid and repeatedly create, user makes an amendment to the template had the size that direct mouse carries out the typesetting part play area relevant with adjustment, with keyboard, play area is carried out to the seamless link process of horizontal level.
As shown in Figure 5, divide point screen device of screen system, first 501 in calling graph obtains the information of the resolution of associated video etc. by viewable area acquiring unit, then the information of acquisition is sent to 502 split screen dispensing units in figure, split screen unit is according to the resolution relevant information determination pixel of video and minimum mobile unit, and to the process of the information after the acquisition of information at associated video interface in subsequent operation, 502 split screen dispensing units in figure complete relevant configuration and the setting of information according to the operation of user to interface, finally the information configured is sent to 503 split screen configuration file generation units in figure, by 503 split screen configuration file generation units in figure, the information configured is stored.
As shown in Figure 6, multimedia information issuing device is that a point of ping server can control multiple distribution of multimedia information interface simultaneously, if 601 multi-medium information spreading system server controls multiple stage distribution of multimedia information platforms in figure are as 602 in figure, 603 and 604, the input of relevant device can be reduced like this and reduce the cost safeguarded, adopt a multiple distribution of multimedia information interface of split screen server controls, fast the scheme that split screen sets can be applied in different distribution of multimedia information interfaces, the speed of relevant information issue can be improved like this and upgrade labour intensity.Wherein the multi-medium information spreading system split screen set can be arranged on far-end on the server and carry out synchronous applications, or the setting of different split screens is applied in different far-end distribution of multimedia information interfaces, decrease the maintenance of relevant device and improve the operability of application, reduce the relevant cost of operation, complete at far-end one station server needs in the past to carry out repetitive operation trouble in the multiple place of multiple system.Reach quickly and efficiently by Information issued, reduce operation, reduce costs, raise the efficiency.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any amendments done within the spirit and principles in the present invention, equivalent replacement and improvement etc., all should be included within protection scope of the present invention.