Movatterモバイル変換


[0]ホーム

URL:


CN107168691A - A kind of video screen spinning solution and device - Google Patents

A kind of video screen spinning solution and device
Download PDF

Info

Publication number
CN107168691A
CN107168691ACN201710203392.5ACN201710203392ACN107168691ACN 107168691 ACN107168691 ACN 107168691ACN 201710203392 ACN201710203392 ACN 201710203392ACN 107168691 ACN107168691 ACN 107168691A
Authority
CN
China
Prior art keywords
screen
current
towards
dimensional data
absolute value
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
CN201710203392.5A
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.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network 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 Wuhan Douyu Network Technology Co LtdfiledCriticalWuhan Douyu Network Technology Co Ltd
Priority to CN201710203392.5ApriorityCriticalpatent/CN107168691A/en
Publication of CN107168691ApublicationCriticalpatent/CN107168691A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention belongs to communication technical field, it is related to a kind of video screen spinning solution and device.Method includes:Applied to mobile terminal, including:Obtain screen three-dimensional data when current video is played;Screen three-dimensional data when being played according to the current video, calculates and obtains current screen direction;According to the current screen towards Rotation screen.Device includes on-screen data acquiring unit, screen towards computing unit and screen rotation unit.Thus solve mobile terminal in the prior art only have by system operatio could rotating mobile screen technical problem, the technique effect of the automatic rotating mobile screen of system setting need not be carried out by having reached.

Description

A kind of video screen spinning solution and device
Technical field
The invention belongs to communication technical field, more particularly to a kind of video screen spinning solution and device.
Background technology
With flourishing for mobile Internet industry, increasing user replaces computer with mobile phone, wherein very big by oneGroups of people like seeing video with mobile phone, seen a film.But it is due to the limitation of mobile terminal, video can not be seen as computerSee, so by serial of methods, allowing user to have more preferable experience, just become the problem of developer.
Although the app of some present main flows has the function of played in full screen, but is all based on the vertical setting of types direction-locking of systemFunction, and sometimes user only want to watch the app when can be by screen transverse screen played in full screen, when mobile phone falls back on backstageWhen, other application is not influenceed, this is unable to handle, because this function is system level, thus have impact on itHe is app.There are following two defects in it:
1st, only set, screen transverse screen could be played, it is impossible to accurately know the current screen court of mobile phone by systemTo automatic Rotation screen;
2nd, in said system application, if exiting current video playback, the setting that screen transverse screen is played also exists, ifInto other app, it is not necessary to which screen transverse screen is played, it is necessary to which change system is set again, and progress vertical setting of types direction-locking causes userOperational inconvenience.
The content of the invention
In order to solve the above mentioned problem of prior art presence, the invention provides a kind of video screen spinning solution and dressPut, there was only the technical problem that ability rotating mobile screen is set by system to solve mobile terminal in the prior art.
The technical solution adopted in the present invention is:A kind of video screen spinning solution is provided, including:Current video is obtained to broadcastScreen three-dimensional data when putting;Screen three-dimensional data when being played according to the current video, calculates and obtains current screen direction;According to the current screen towards Rotation screen.
Preferably, the screen three-dimensional data during acquisition current video broadcasting is:Obtained using 3-axis acceleration sensorAcceleration of the screen on three-dimensional when taking the current video to play.
Preferably, the screen three-dimensional data obtained when current video is played, to call the mobile terminal systemScreen three-dimensional data.
Preferably, screen three-dimensional data when being played according to the current video, calculates and obtains current screen direction,Including:Give tacit consent to the current screen and be oriented portrait layout upward, three-dimensional data is respectively x, y, z;When z absolute value is less than critical valueWhen, start to calculate, and make the following judgment:If y absolute value is more than x absolute value, it is perpendicular in z directions to judge current screen, if now y values are more than 0, represent that current screen is directed downward, y values are less than 0, represent current screen direction upward;IfY absolute value is less than x absolute value, judges that current screen, towards being horizontal, if now x values are more than 0, represents current in zScreen orientation is less than 0 towards a left side, x values, represents current screen direction towards the right side.
Preferably, it is described to be towards Rotation screen according to the current screen:Call the screen of the mobile terminal systemControl interface, according to the current screen towards Rotation screen.
The present invention also provides a kind of video screen rotating device, applied to mobile terminal, including:On-screen data obtains singleMember, for obtaining screen three-dimensional data when current video is played;Screen is towards computing unit, for according to the current videoScreen three-dimensional data during broadcasting, calculates and obtains current screen direction;Screen rotation unit, for according to the current screen courtTo Rotation screen.
Preferably, the on-screen data acquiring unit is:When obtaining current video broadcasting using 3-axis acceleration sensorAcceleration of the screen on three-dimensional.
Preferably, the 3-axis acceleration sensor is gyroscope.
Preferably, the screen is towards computing unit, including:Initialization module, for setting the current screen directionAcquiescence is oriented portrait layout upward, and three-dimensional data is respectively x, y, z;Screen is towards computing unit, for facing when z absolute value is less thanDuring dividing value, start to calculate, and make the following judgment:If y absolute value is more than x absolute value, judge current screen in z directionsIt is endways, if now y values are more than 0, represent that current screen is directed downward, y values are less than 0, represent current screen direction upward;If y absolute value is less than x absolute value, judge that current screen, towards being horizontal, if now x values are more than 0, is represented in zCurrent screen direction is less than 0 towards a left side, x values, represents current screen direction towards the right side.
Preferably, the screen rotation unit, including:Calling module, the screen for connecting the mobile terminal systemControl interface;Rotary module, for by calling module, Rotation screen to be carried out according to current screen direction.
Therefore, using technical solution of the present invention, screen three-dimensional data during due to being played by obtaining current videoCurrent screen direction is obtained to calculate, the current screen direction of mobile phone can be accurately known;Rotated according to current screen directionScreen, it is not necessary to set by system, can equally obtain the effect of transverse screen broadcasting, and when exiting video playback, also notNeed to change system setting again, the technique effect of automatic Rotation screen can be reached.Therefore, screen when current video is played is obtainedCurtain three-dimensional data;Screen three-dimensional data when being played according to current video, calculates and obtains current screen direction;According to current screenTowards Rotation screen, the demand for experience of user is more adapted to, more hommization meets practical application.
Brief description of the drawings
Fig. 1 shows the flow chart of video screen spinning solution according to an embodiment of the invention;
Fig. 2 shows the structure chart of video screen rotating device according to an embodiment of the invention.
Embodiment
The present invention provides a kind of method and apparatus, and hand could be rotated to solve of the prior art only set by systemThe technical problem of machine screen.
Technical scheme in the embodiment of the present application is solves above-mentioned technical problem, and general thought is as follows:Not by beingIn the case of level operations of uniting, mobile phone direction, and automatic rotating mobile screen are calculated according to gyroscope.
In order to be better understood from above-mentioned technical proposal, below by accompanying drawing and specific embodiment to technical solution of the present inventionIt is described in detail, it should be understood that the specific features in the embodiment of the present invention and embodiment are to the detailed of technical solution of the present inventionThin explanation, rather than the restriction to technical solution of the present invention, in the case where not conflicting, the embodiment of the present invention and embodimentIn technical characteristic can be mutually combined.
Embodiment 1
As shown in figure 1, the present embodiment provides a kind of method video screen spinning solution, applied to mobile phone, including following stepSuddenly:
Screen three-dimensional data when S1, acquisition current video broadcasting;
S2, screen three-dimensional data when being played according to the current video, calculate and obtain current screen direction;
S3, according to the current screen towards Rotation screen.
Being only wanted in view of user can be by screen transverse screen played in full screen when app videos are watched, therefore the present embodimentScreen three-dimensional data is only just obtained in video playback;Acquisition current screen direction is calculated according to screen three-dimensional data, can be withAccurately know the current screen direction of mobile phone;According to current screen towards Rotation screen, it is not necessary to set by system, equallyThe effect of transverse screen broadcasting can be obtained, and when exiting video playback, it is not required that system setting is changed again, can be reached certainlyThe technique effect of dynamic Rotation screen.
As a kind of preferred scheme of above-described embodiment, step S1 can be obtained using 3-axis acceleration sensor works as forward sightAcceleration of the screen on three-dimensional when frequency is played.3-axis acceleration sensor is such as gyroscope.
As another preferred scheme of above-described embodiment, step S1 can be the dimension of screen three of calling mobile phone systemAccording to.
Found in further investigation of the present inventor in the research present invention, some that can be carried by calling mobile phone systemMethod persistently obtains the data of gyroscope.For example, iPhone system carries gyroscope, three dimensions of mobile phone can be knownAccording to, that is to say, that we can be according to the x in its coordinate system, y, tri- values of z, to judge the direction of equipment.
The main function of gyroscope, is to be based on conservation of angular momentum principle, along some specific reference axis measurement rotation speedRate.In use, the rotor of gyroscope points to a fixed direction, when the motion of moving object all the time when telling rotationWhen predetermined direction is deviateed in direction, gyroscope can just be felt out.
That is, we can by force be drawn by a global variable by Video Controller to screen three-dimensional dataWith, it is possible to ensure that the data of gyroscope can be continuously obtained during app is run.So it is also an advantage that, allows videoController strongly reference he, when we exit video playback interface, Video Controller can be destroyed, then his institute's strongly referenceAll objects can all destroy, can so save many memory headrooms, allow app more lightweights, processing speed is faster.
Preferably, screen three-dimensional data when being played according to the current video, calculates and obtains current screen direction,Including:When entering new app video playbacks every time, give tacit consent to the current screen and be oriented portrait layout upward, three-dimensional data is respectivelyx、y、z;Three-dimensional data is persistently obtained, when z absolute value is less than critical value, starts to calculate, and make the following judgment:If yAbsolute value be more than x absolute value, judge that current screen towards being endways, if now y values are more than 0, represents currently to shield in zCurtain is directed downward, and y values are less than 0, represents current screen direction upward;If y absolute value is less than x absolute value, judge currentScreen, towards being horizontal, if now x values are more than 0, represent current screen direction towards a left side, x values are less than 0, represents current screen in zCurtain direction is towards the right side.
Specific algorithm is as follows:
A. the value of an enumeration type is defined:Value, carrys out recording equipment direction, the value acquiescence be portrait layout upward;
B. start to calculate (0.5 is critical value, represents equipment and starts rotation) when z absolute value is less than 0.5
C. judge, if y absolute value is more than x absolute value, then it is endways to prove equipment, now only needs to compareIf whether y values are more than 0. y values and are more than 0, device orientation is represented down, y values are less than 0, represent device orientation upward;
If d. y absolute value is less than x absolute value, then it is horizontal to prove equipment, now needs whether to compare x valuesIf being more than 0 more than 0. x values, device orientation is represented towards a left side, x values are less than 0, represent device orientation towards the right side.
Preferably, it is towards Rotation screen according to current screen:Call the screen control interface of the mobile terminal system, rootAccording to the current screen towards Rotation screen.Found by the further investigation of the present inventor, carry gyroscope for cell phone system, obtainKnow that cell phone apparatus after, can pass through [[UIDevicecurrentDevice] setValue:valueforKey:@"Orientation "] method carrys out Rotation screen.
It is emphasized that above method step is not necessarily performed according to number order, why it is intended merely to numberingThe convenience of statement, as long as the purpose of the present invention can be realized, changing in any step should all be protected in the claim of the present inventionIn the range of.
Embodiment 2
As shown in Fig. 2 the present embodiment provides a kind of video screen rotating device of the application above method, applied to mobile wholeEnd, including:On-screen data acquiring unit 10, for obtaining screen three-dimensional data when current video is played;Screen direction is calculatedUnit 20, screen three-dimensional data during for being played according to the current video calculates and obtains current screen direction;Screen rotationUnit 30, for according to the current screen towards Rotation screen.
Preferably, on-screen data acquiring unit 10 is:Obtained using 3-axis acceleration sensor when current video is playedAcceleration of the screen on three-dimensional.
Preferably, 3-axis acceleration sensor is gyroscope.
Preferably, screen is towards computing unit 20, including:Initialization module, for setting the current screen direction silentRecognize and be oriented portrait layout upward, three-dimensional data is respectively x, y, z;Screen is towards computing unit, for the absolute value as z less than criticalDuring value, start to calculate, and make the following judgment:If y absolute value is more than x absolute value, judge that current screen is in z directionsEndways, if now y values are more than 0, represent that current screen is directed downward, y values are less than 0, represent current screen direction upward;Such asFruit y absolute value is less than x absolute value, judges that current screen, towards being horizontal, if now x values are more than 0, represents to work as in zForth screen direction is less than 0 towards a left side, x values, represents current screen direction towards the right side.
Preferably, screen rotation unit 30, including:Calling module, the screen control for connecting the mobile terminal systemInterface processed;Rotary module, for by calling module, Rotation screen to be carried out according to current screen direction.
Its concrete operating principle specifically can be, but not limited to referring to the corresponding description in embodiment 1.
As seen from the above-described embodiment, the beneficial effect comprise that:During due to being played by obtaining current videoScreen three-dimensional data obtains current screen direction to calculate, and can accurately know the current screen direction of mobile phone;According to currentScreen is towards Rotation screen, it is not necessary to set by system, can equally obtain the effect of transverse screen broadcasting, and is exiting videoDuring broadcasting, it is not required that change system setting again, the technique effect of automatic Rotation screen can be reached.Therefore, obtain and work as forward sightScreen three-dimensional data when frequency is played;Screen three-dimensional data when being played according to current video, calculates and obtains current screen direction;According to current screen towards Rotation screen, the demand for experience of user is more adapted to, more hommization meets practical application.
, but those skilled in the art once know basic creation although preferred embodiments of the present invention have been describedProperty concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to include excellentSelect embodiment and fall into having altered and changing for the scope of the invention.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present inventionGod and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologiesWithin, then the present invention is also intended to comprising including these changes and modification.

Claims (10)

CN201710203392.5A2017-03-302017-03-30A kind of video screen spinning solution and devicePendingCN107168691A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710203392.5ACN107168691A (en)2017-03-302017-03-30A kind of video screen spinning solution and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710203392.5ACN107168691A (en)2017-03-302017-03-30A kind of video screen spinning solution and device

Publications (1)

Publication NumberPublication Date
CN107168691Atrue CN107168691A (en)2017-09-15

Family

ID=59848936

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710203392.5APendingCN107168691A (en)2017-03-302017-03-30A kind of video screen spinning solution and device

Country Status (1)

CountryLink
CN (1)CN107168691A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109547650A (en)*2019-02-022019-03-29京东方科技集团股份有限公司A kind of method and device and electronic equipment controlling image rotation
CN111273810A (en)*2020-01-092020-06-12RealMe重庆移动通信有限公司Device control method, device, storage medium and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105260093A (en)*2015-09-152016-01-20广东欧珀移动通信有限公司Method and device for intelligently setting screen rotation and mobile terminal
US20160055623A1 (en)*2013-05-172016-02-25Xiaomi Inc.Method and device for controlling screen rotation
CN105955603A (en)*2016-04-202016-09-21乐视控股(北京)有限公司Panorama video playing direction adjusting method and device
CN105975172A (en)*2015-12-112016-09-28乐视网信息技术(北京)股份有限公司Method and device for adjustment of panoramic video and mobile terminal
CN106325492A (en)*2015-10-302017-01-11北京智谷睿拓技术服务有限公司Facing direction regulating method, facing direction regulating device and electronic equipment
CN106371691A (en)*2015-10-302017-02-01北京智谷睿拓技术服务有限公司Orientation adjustment method and apparatus, and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20160055623A1 (en)*2013-05-172016-02-25Xiaomi Inc.Method and device for controlling screen rotation
CN105260093A (en)*2015-09-152016-01-20广东欧珀移动通信有限公司Method and device for intelligently setting screen rotation and mobile terminal
CN106325492A (en)*2015-10-302017-01-11北京智谷睿拓技术服务有限公司Facing direction regulating method, facing direction regulating device and electronic equipment
CN106371691A (en)*2015-10-302017-02-01北京智谷睿拓技术服务有限公司Orientation adjustment method and apparatus, and electronic device
CN105975172A (en)*2015-12-112016-09-28乐视网信息技术(北京)股份有限公司Method and device for adjustment of panoramic video and mobile terminal
CN105955603A (en)*2016-04-202016-09-21乐视控股(北京)有限公司Panorama video playing direction adjusting method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109547650A (en)*2019-02-022019-03-29京东方科技集团股份有限公司A kind of method and device and electronic equipment controlling image rotation
CN109547650B (en)*2019-02-022020-07-03京东方科技集团股份有限公司 A method, device and electronic device for controlling image rotation
US11561627B2 (en)2019-02-022023-01-24Boe Technology Group Co., Ltd.Method and apparatus for controlling rotation of displayed image, display apparatus, and computer-program product
CN111273810A (en)*2020-01-092020-06-12RealMe重庆移动通信有限公司Device control method, device, storage medium and electronic device

Similar Documents

PublicationPublication DateTitle
EP3902278B1 (en)Music playing method, device, terminal and storage medium
US20210098022A1 (en)Method for generating video, and electronic device and readable storage medium thereof
EP3396511B1 (en)Information processing device and operation reception method
CN109754454B (en)Object model rendering method and device, storage medium and equipment
CN104571532B (en)A kind of method and device for realizing augmented reality or virtual reality
KR101608878B1 (en)Rest detection using accelerometer
CN112817453A (en)Virtual reality equipment and sight following method of object in virtual reality scene
CN111050189B (en) Live broadcast method, apparatus, device and storage medium
US20150062178A1 (en)Tilting to scroll
CN102609081A (en)Game picture adjusting system and game picture adjusting method
CN113409427B (en)Animation playing method and device, electronic equipment and computer readable storage medium
TWI496106B (en)Methods and systems for displaying interfaces
CN103076974B (en)A kind of unlock method of touch-screen, device and touch panel device
AU2014266178A1 (en)Method and apparatus for using electronic device
US20140089850A1 (en)Systems and Methods of Using Motion Control to Navigate Panoramas and Virtual Tours
CN107168691A (en)A kind of video screen spinning solution and device
CN106406678A (en)Method and system of displaying icon of mobile terminal dynamically
CN106445334A (en)Adjustment method and adjustment system for display interface
CN111459363A (en) Information display method, device, equipment and storage medium
CN113032590B (en)Special effect display method, device, computer equipment and computer readable storage medium
CN107197339B (en)Display control method and device of film bullet screen and head-mounted display equipment
CN105094332A (en)Information display method and electronic device
CN108007433A (en)A kind of terminal determines the method and terminal at inclination angle
CN108733902A (en)Method and device for determining permeability of oil reservoir and storage medium
US20160282949A1 (en)Method and system for detecting linear swipe gesture using accelerometer

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20170915


[8]ページ先頭

©2009-2025 Movatter.jp