[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN104394305A - Compatibility method for supporting external mobile camera and built-in camera of mobile equipment in Android system - Google Patents

Compatibility method for supporting external mobile camera and built-in camera of mobile equipment in Android system Download PDF

Info

Publication number
CN104394305A
CN104394305A CN201410677884.4A CN201410677884A CN104394305A CN 104394305 A CN104394305 A CN 104394305A CN 201410677884 A CN201410677884 A CN 201410677884A CN 104394305 A CN104394305 A CN 104394305A
Authority
CN
China
Prior art keywords
camera
outside
dollying head
head
softcam
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
CN201410677884.4A
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.)
SHANGHAI INFOTM MICROELECTRONICS CO Ltd
Original Assignee
SHANGHAI INFOTM MICROELECTRONICS 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 SHANGHAI INFOTM MICROELECTRONICS CO Ltd filed Critical SHANGHAI INFOTM MICROELECTRONICS CO Ltd
Priority to CN201410677884.4A priority Critical patent/CN104394305A/en
Publication of CN104394305A publication Critical patent/CN104394305A/en
Pending legal-status Critical Current

Links

Landscapes

  • Studio Devices (AREA)

Abstract

The invention relates to the technical field of cameras on mobile equipment, in particular to a compatibility method for supporting an external mobile camera and a built-in camera of mobile equipment in an Android system. The compatibility method for supporting the external mobile camera and the built-in camera of the mobile equipment in the Android system includes that (1) before the camera service acquires camera number, one virtual camera is pre-added to the mobile equipment without a front-facing camera or without a camera (it means that the camera number is less than 2), when the external mobile camera is inserted in, the pre-added virtual camera can be converted into an actual camera to serve as the front-facing camera; (2) the virtual camera is not needed if the mobile equipment has the front-facing camera (it means that the camera number is larger than or equal to 2), when the external mobile camera is inserted in, the external mobile camera replaces the original built-in front-facing camera to use.

Description

A kind of compatibility method supporting built-in camera on outside dollying head and mobile device in Android system
Technical field
The present invention relates to the camera technical field on mobile device, in particular, is a kind of method based on the mobile device of Android system being supported on outside dollying head and mobile device, built-in camera compatibility uses.
Background technology
Mobile device comprises smart mobile phone, panel computer etc.Instantly mobile device use is in daily life more frequent, and the demand of user to mobile device functionality is also more and more higher.Camera function is exactly the important function of mobile device the next item up, and user can be used for making a video recording, take pictures, video calling etc.
Usual mobile device has built-in camera, and built-in camera generally includes front-facing camera and post-positioned pick-up head.Post-positioned pick-up head, also known as main camera, supports that the mobile device of camera function has post-positioned pick-up head usually.Front-facing camera, also known as secondary camera, is used for video calling.
Only have post-positioned pick-up head on some mobile devices, there is no front-facing camera, or both do not have.On the mobile device both had, the performance parameter of usual front-facing camera is lower than post-positioned pick-up head.Bring problem to be exactly do not have the mobile device of front-facing camera to use video call function, and the video calling effect that the lower front-facing camera of performance parameter brings may make user be unsatisfied with.
As shown in Figure 1, be the camera general frame figure based on Android system, be respectively camera application, camera service, camera virtual hardware (being called for short camera HAL), webcam driver and camera hardware from top to bottom.The present invention is mainly concerned with camera service and camera HAL.
Can open camera service when Android system starts, camera service is that camera application provides functional interface, and camera service is also mutual with camera HAL.The camera identification process figure of existing Android system and use flow chart are respectively as described in Fig. 2 and Fig. 3.Existing identification process specifically describes as follows:
When step S21, camera service start, camera HAL can be called to obtain the built-in camera number (abbreviation number) on mobile device;
Step S22, camera HAL can scan the camera hardware on mobile device and from the number calculating camera, then feed back to camera service;
After step S23, camera service acquisition to number, preserve number, this number only obtains once when camera service starts, and just no longer upgrades afterwards.
Existing use flow process specifically describes as follows:
After step 31, camera application start, camera application is to camera service acquisition number;
Step 32, camera service return number;
The application of step 33, camera, according to number, obtains the information (camera service can call camera HAL to obtain the task of camera information) of each camera successively to camera service;
Step 34, camera HAL inquire about camera information according to inquiry request, and feed back;
The application of step 35, camera gets the information of each camera successively, thus uses each camera further.
Visible, when outside dollying head inserts mobile device, camera service can not real-time update number, and also go out the outside dollying head just inserted with regard to None-identified, camera application also just can not use this outside dollying head.
 
Summary of the invention
The invention provides a kind of method based on the mobile device of Android system being supported on outside dollying head (i.e. the dollying head of USB interface) and mobile device, built-in camera compatibility uses.On the mobile device not having front-facing camera, the outside dollying head of insertion can be used as front-facing camera and use; On the mobile device having front-facing camera, the outside dollying head of insertion is replaced originally built-in front-facing camera and is used.And user is in the process using above-mentioned functions, do not need any specifically extra application software is installed.
Concrete technical scheme of the present invention is as follows:
A kind of compatibility method supporting built-in camera on outside dollying head and mobile device in Android system, start in camera service, when obtaining number to camera virtual hardware, camera service and camera virtual hardware need amendment, revise in two kinds of situation:
(1) when number deficiency two, namely only have a post-positioned pick-up head or there is no camera, number increases by 1 virtual camera in advance; When dollying head does not insert, the Softcam of this increase does not act on, and camera application does not go to obtain this Softcam information; When dollying head inserts, this Softcam just can be converted to actual camera, and camera application just goes obtain its information and use;
(2) when camera number is no less than two, namely front-facing camera and post-positioned pick-up head all exist, number need not increase Softcam, when after outside dollying head insertion equipment, when camera application obtains the information of front-facing camera by camera service from camera virtual hardware, the camera virtual hardware information of outside dollying head replaces the information of front-facing camera originally, and feeds back; Like this, the actual use of camera application is exactly outside dollying head.
Because camera application is from camera service acquisition number, camera service also will be revised, to ensure when with the addition of Softcam, but when outside dollying head does not insert equipment, the number feeding back to camera application is the number (namely not adding 1) of necessary being actual on equipment; After outside dollying head insertion equipment, the number of feedback then includes Softcam (namely have and add 1).
beneficial effect
This invention allows user can utilize outside dollying head, does not have, on the mobile device of front-facing camera, to complete video call function at those; Do not have on the mobile device of built-in camera at those, complete shooting, take pictures, video call function; On the mobile device that those front-facing camera performance parameters are lower, user can improve the effect of video call function by the higher outside dollying head of utility parameter.These are successful implementation on panel computer product all.
Accompanying drawing explanation
Fig. 1 is based on the camera general frame figure of Android system.
Fig. 2 existing camera identification process figure.
The existing camera of Fig. 3 uses flow chart.
Fig. 4 camera identification process of the present invention figure.
Fig. 5 camera of the present invention uses flow chart.
Embodiment
The present invention is set forth further below in conjunction with accompanying drawing:
Fig. 4 is amended camera identification process.
When step 41, camera service start, camera virtual hardware (be called for short camera HAL) can be called and obtain built-in camera number (abbreviation number) on mobile device;
Step 42, camera HAL calculating number feeding back, specific as follows:
Step 421, camera HAL obtain actual number to device hardware after overscanning;
Step 422, directly this number can not be fed back to camera service, but judge whether to need interpolation 1 Softcam to the number of reality;
If the number of step 423 reality is 1 or 0, represent and need interpolation 1 Softcam (the outside dollying head for inserting in the future), be added on the last of existing camera list, number adds 1, arranges Softcam existence and is masked as true;
If the number of step 424 reality is no less than 2, illustrates and do not need to add on (the outside dollying head inserted in the future can front-facing camera on direct replacement equipment, so number does not need extra interpolation), and Softcam existence is set is masked as vacation;
Step 425, number is fed back to camera service.
After step 43, camera service acquisition to number, preserve number.When with the addition of Softcam, number is through and adds 1; When adding, number does not add 1.
Fig. 5 is that amended camera uses flow process.
When step 51, the application of use camera, camera application can from the camera number of camera service acquisition;
Step 52, the number that camera service feedback is suitable are given to camera application, specific as follows:
The number preserved before step 521, camera service feedback number can not directly feed back when applying to camera, needs the state confirming Softcam further to camera HAL.Because this number may be the result that with the addition of Softcam (namely adding 1).If number includes Softcam, and now outside dollying head does not insert, and the information that camera application now obtains Softcam is unsuccessful.
Whether step 522, camera HAL inquire about the state of Softcam, comprise inquiry Softcam and there is mark and currently have outside dollying head to insert.Four kinds of situations are divided into according to Query Result:
(1) there is dollying head to insert, and be masked as true;
(2) there is dollying head to insert, and be masked as vacation;
(3) insert without dollying head, and be masked as true;
(4) insert without dollying head, and be masked as vacation;
Step 523, judge 4 kinds of situations respectively;
When step 524, the 3rd kind of situation, belong to number exactly and add 1, but the situation that dollying head does not insert, now camera service feedback needs to subtract 1 process to the number that camera is applied.
Step 525, the 2nd, 4 kind of situation, because number does not add 1, without the need to subtracting 1 process; And the 1st kind of situation, belong to number and add 1, but have dollying head to insert, additional Softcam uses (being called that Softcam is converted to actual camera) just just to dollying head, so also without the need to subtracting 1 process.
The application of step 53, camera, according to number, obtains the information (camera service can call camera HAL to obtain the task of camera information) of each camera successively to camera service.
Step 54, camera HAL inquire about camera information according to inquiry request, and feed back suitable camera information.Specific as follows:
Step 541, camera HAL inquire about camera information according to inquiry request, but can not directly feed back, and need further to judge;
Step 542, determine whether front-facing camera according to camera information;
Step 543, inquire about and currently whether have outside dollying head to insert;
If the current camera information of step 544 is shown to be post-positioned pick-up head, directly feed back camera information; Be not post-positioned pick-up head if current, but outside dollying head does not insert, and also directly feeds back camera information;
If the current camera information of step 545 shows it is not post-positioned pick-up head, and currently there is outside dollying head to insert, then use outside dollying header to replace current camera information, and feed back.Can find out, the current camera be now replaced may be the original front-facing camera of equipment, also may be that Softcam added in advance.
The application of step 55, camera gets the information of each camera successively, thus uses each camera further.
After above-mentioned steps, outside dollying head just can employ with built-in camera compatibility.Concrete result of implementation is exactly:
(1), on the mobile device not having camera, after outside dollying head inserts, front-facing camera can be used as and use;
(2), on the mobile device only having post-positioned pick-up head, after outside dollying head inserts, front-facing camera can be used as and use;
(3), on the mobile device had at pre-post camera, outside dollying head can replace original front-facing camera to use after inserting.
It is more than the detailed description that embodiments of the invention are carried out, but those of ordinary skill in the art it is to be appreciated that, within the scope of the present invention, and guided by the spirit, various improvement, interpolation and replacement are all possible, such as, adjust the programming language (as C, C++, Java etc.) that outside camera replaces post-positioned pick-up head, adjustment interface interchange order, change message format and content, use different and realize.These are all in the protection range that claim of the present invention limits.

Claims (1)

1. in Android system, support a compatibility method for built-in camera on outside dollying head and mobile device, it is characterized in that, described method comprises:
Start in camera service, when obtaining number to camera camera virtual hardware, camera service and camera virtual hardware need amendment, revise in two kinds of situation:
(1) when number deficiency two, namely only have a post-positioned pick-up head or there is no camera, number increases by 1 virtual camera in advance; When dollying head does not insert, the Softcam of this increase does not act on, and camera application does not go to obtain this Softcam information; When dollying head inserts, this Softcam just can be converted to actual camera, and camera application just goes obtain its information and use;
(2) when camera number is no less than two, namely front-facing camera and post-positioned pick-up head all exist, number need not increase Softcam, when after outside dollying head insertion equipment, when camera application obtains the information of front-facing camera by camera service from camera virtual hardware, the camera virtual hardware information of outside dollying head replaces the information of front-facing camera originally, and feeds back; What such camera application reality used is exactly outside dollying head;
Camera is applied from camera service acquisition number, being amended as follows of camera service: when not inserting equipment at outside dollying head, and the number feeding back to camera application is the number of necessary being actual on equipment; When after outside dollying head insertion equipment, the number of feedback then includes Softcam.
CN201410677884.4A 2014-11-24 2014-11-24 Compatibility method for supporting external mobile camera and built-in camera of mobile equipment in Android system Pending CN104394305A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410677884.4A CN104394305A (en) 2014-11-24 2014-11-24 Compatibility method for supporting external mobile camera and built-in camera of mobile equipment in Android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410677884.4A CN104394305A (en) 2014-11-24 2014-11-24 Compatibility method for supporting external mobile camera and built-in camera of mobile equipment in Android system

Publications (1)

Publication Number Publication Date
CN104394305A true CN104394305A (en) 2015-03-04

Family

ID=52612135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410677884.4A Pending CN104394305A (en) 2014-11-24 2014-11-24 Compatibility method for supporting external mobile camera and built-in camera of mobile equipment in Android system

Country Status (1)

Country Link
CN (1) CN104394305A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791189A (en) * 2017-01-27 2017-05-31 北京黑米世纪网络科技有限公司 A kind of equipment cut-in method and system
CN107465870A (en) * 2017-07-31 2017-12-12 广东天波信息技术股份有限公司 The replacement method and system of external camera
WO2019119831A1 (en) * 2017-12-19 2019-06-27 华为技术有限公司 Method and apparatus for accessing camera, server, and readable storage medium
CN110816458A (en) * 2019-10-24 2020-02-21 上海势航网络科技有限公司 Vehicle blind area monitoring system, device and control method thereof
CN113448648A (en) * 2021-06-29 2021-09-28 技德技术研究所(武汉)有限公司 Linux-compatible Android camera access method and device
CN114025157A (en) * 2022-01-05 2022-02-08 广州朗国电子科技股份有限公司 Identification method and system of all-in-one machine camera and all-in-one machine
US11368628B2 (en) 2020-10-19 2022-06-21 Light Wave Technology Inc. System for tracking a user during a videotelephony session and method of use thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677848A (en) * 2013-12-27 2014-03-26 厦门雅迅网络股份有限公司 Camera control method based on Android
CN104133711A (en) * 2014-08-07 2014-11-05 深圳市元征科技股份有限公司 Camera safe switching method based on Android system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677848A (en) * 2013-12-27 2014-03-26 厦门雅迅网络股份有限公司 Camera control method based on Android
CN104133711A (en) * 2014-08-07 2014-11-05 深圳市元征科技股份有限公司 Camera safe switching method based on Android system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李鹏飞: "基于Android的USB图像传输系统的设计与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791189A (en) * 2017-01-27 2017-05-31 北京黑米世纪网络科技有限公司 A kind of equipment cut-in method and system
CN107465870A (en) * 2017-07-31 2017-12-12 广东天波信息技术股份有限公司 The replacement method and system of external camera
WO2019119831A1 (en) * 2017-12-19 2019-06-27 华为技术有限公司 Method and apparatus for accessing camera, server, and readable storage medium
CN110816458A (en) * 2019-10-24 2020-02-21 上海势航网络科技有限公司 Vehicle blind area monitoring system, device and control method thereof
US11368628B2 (en) 2020-10-19 2022-06-21 Light Wave Technology Inc. System for tracking a user during a videotelephony session and method of use thereof
CN113448648A (en) * 2021-06-29 2021-09-28 技德技术研究所(武汉)有限公司 Linux-compatible Android camera access method and device
CN114025157A (en) * 2022-01-05 2022-02-08 广州朗国电子科技股份有限公司 Identification method and system of all-in-one machine camera and all-in-one machine
CN114025157B (en) * 2022-01-05 2022-07-05 广州朗国电子科技股份有限公司 Identification method and system of all-in-one machine camera and all-in-one machine

Similar Documents

Publication Publication Date Title
CN104394305A (en) Compatibility method for supporting external mobile camera and built-in camera of mobile equipment in Android system
CN105825851B (en) Voice control method and system based on Android system
CN104850301A (en) Method and system for classifying application icons on system desktop
CN103916423A (en) Data synchronization method and device
CN103716308A (en) Multiprotocol platform communication method and multiprotocol platform
CN103546689A (en) Resolution ratio acquiring method and device of external camera of android system
CN108809800B (en) Multimedia data processing method, equipment and system thereof
CN105635835B (en) A kind of method that micro- class production storage plays
CN103530178B (en) The screen locking method of Android system intelligent device and device
US20150215399A1 (en) Terminal and server performing data synchronization
CN105007537A (en) Smart television booting animation control method and system
WO2017114169A1 (en) Link request processing method and apparatus
CN108804197B (en) Dynamic componentization implementation method, device, equipment and storage medium
CN105407202A (en) Method and terminal for remote query of contact information
CN103577238A (en) Augmented reality software updating method
CN102957958B (en) Set-top box upgrading method and set-top box terminal
KR20130103191A (en) Method and system for stroring and managing device control information to user terminal and method and user terminal for executing application using the same
US20240365106A1 (en) Flexible remote sim provisioning
CN105049735A (en) Control method and device of network camera
CN113190565B (en) Data updating method and device, storage medium and electronic device
CN105430535A (en) Output parameter regulating method and apparatus
JP5648273B2 (en) Storage system, access management device, data transfer method and program
CN104320695A (en) Method and system for family socializing of mobile device based on smart TV
CN104821979A (en) Telephone number identification processing method and device thereof
CN104079855A (en) Digital video device and method for reading EDID of HDMI

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20200407