-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencamera_source.txt
More file actions
33 lines (19 loc) · 2.88 KB
/
opencamera_source.txt
File metadata and controls
33 lines (19 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Compiling
=========
Open Camera is compiled using Android Studio. (Versions 1.34 or earlier were compiled using Eclipse.)
Source Control
==============
The Git repository is available at https://sourceforge.net/p/opencamera/code/ . Note that I work with the auto crlf turned off (otherwise it converts all the Linux line endings into Windows format). If you want to work on the source, please check out the latest version from the repository.
General advice
==============
If you want to build an application using the Open Camera source code, there are various levels you might like to do this at.
CameraController: The classes in the CameraController/ folder encapsultate the Android camera API (both the original, and Android 5's Camera2 API). So one level is to use these classes, to build a new application. These classes are still fairly low level (and you'll still have to do work such as setting up things like the camera preview), but avoid having to deal with Android's camera API directly. They combine the 2 camera APIs under a single interface (though some features are Camera2 specific). They also encapsulate code that covers driver specific behaviours (or driver bug workarounds!), to hide this from the outside world.
Preview: At a higher level, you might want to take the classes in Preview/ as well as CameraController/. Note the Preview class is a bit of a misnomer - as well as the camera preview, it also includes much of the functionality required to operate the camera. This level would provide you with a camera, but still leave you to define all the higher level parts of the application, such as user-interface, preferences, image processing and saving. As well as controlling the Preview by calling its methods, an instance of ApplicationInterface must be supplied, to allow the Preview to communicate to the application. (As an alternative, you may prefer to start with Open Camera's MyApplicationInterface as a sample, and modify it to your needs.)
Application: You might prefer to use Open Camera in its entirety, as an Activity within your application (or possibly converting the MainActivity to a fragment). Consider whether Open Camera's Settings should be unified with the settings in your application. All accesses to SharedPreferences use the PreferencesKeys class to find the keys.
Licence
=======
This source is released under the GPL v3 or later. Please see the licence in gpl-3.0.txt (or http://www.gnu.org/copyleft/gpl.html ). If you would like to use the Open Camera in a closed source app, please contact me for a closed source commercial licence, with details on your company and app.
Please contact me if you have suggestions, bug fixes, or whatever: mark DOT harman DOT apps AT gmail DOT com .
Homepage: http://opencamera.org.uk/
Google Play download: https://play.google.com/store/apps/details?id=net.sourceforge.opencamera
Mark Harman 26 November 2016