Manages interfacing with the pi camera hardware.
More...
|
def | __init__ (self, scheduler=None, kbthread=None, notifier=None) |
|
def | initProfile (self) |
|
def | initInfo (self) |
|
def | initKb (self) |
|
def | isAvailable (self) |
|
def | isRunning (self) |
|
def | isPreviewing (self) |
|
def | isRecording (self) |
|
def | isStreaming (self) |
|
def | isServiceRunning (self) |
|
def | start (self) |
|
def | stop (self) |
|
def | toggleService (self) |
|
def | setStillMode (self) |
|
def | setVideoMode (self) |
|
def | startCam (self, profile=None) |
|
def | stopCam (self) |
|
def | stopPreview (self) |
|
def | updateProfile (self, profile=None) |
|
def | toggleCapture (self) |
|
def | capture (self, profile=None) |
|
def | stopCapture (self, profile=None) |
|
def | enableStream (self) |
|
def | disableStream (self) |
|
def | toggleStream (self) |
|
def | startStream (self) |
|
def | openStream (self) |
|
def | stopStream (self) |
|
def | enableViewfinder (self, window=(0, 0, 320, 240), fullscreen=False, element=None) |
|
def | disableViewfinder (self) |
|
def | getStreamUrls (self) |
|
def | camKb (self, hex=None, ascii=None) |
|
def | check (self) |
|
def | addCallback (self, name, callback) |
|
def | removeCallback (self, name) |
|
def | doCallbacks (self) |
|
def | listDir (self, path=None) |
|
|
| now |
|
| scheduler |
|
| kbthread |
|
| notifier |
|
| viewfinder |
|
| patterns |
|
| callbacks |
|
| cam_profile |
|
| info |
|
| cam |
|
| kbmap |
|
| server_socket |
|
| connection |
|
Manages interfacing with the pi camera hardware.
§ __init__()
def Camera.Camera.__init__ |
( |
|
self, |
|
|
|
scheduler = None , |
|
|
|
kbthread = None , |
|
|
|
notifier = None |
|
) |
| |
Initializes the camera object
@param scheduler
@param kbthread
@param notifier
§ addCallback()
def Camera.Camera.addCallback |
( |
|
self, |
|
|
|
name, |
|
|
|
callback |
|
) |
| |
Allows other modules to plug-in the camera schedule
§ camKb()
def Camera.Camera.camKb |
( |
|
self, |
|
|
|
hex = None , |
|
|
|
ascii = None |
|
) |
| |
§ capture()
def Camera.Camera.capture |
( |
|
self, |
|
|
|
profile = None |
|
) |
| |
Captures still / video based on the provided profile (or camera default)
@param profile
@return dict
§ check()
def Camera.Camera.check |
( |
|
self | ) |
|
Updates the camera state
cam_watcher task can run without starting the camera hardware.
allows the task to start and stop the camera as needed to save power during long running tasks like timelapse.
§ disableStream()
def Camera.Camera.disableStream |
( |
|
self | ) |
|
§ disableViewfinder()
def Camera.Camera.disableViewfinder |
( |
|
self | ) |
|
§ doCallbacks()
def Camera.Camera.doCallbacks |
( |
|
self | ) |
|
§ enableStream()
def Camera.Camera.enableStream |
( |
|
self | ) |
|
§ enableViewfinder()
def Camera.Camera.enableViewfinder |
( |
|
self, |
|
|
|
window = (0,0,320,240) , |
|
|
|
fullscreen = False , |
|
|
|
element = None |
|
) |
| |
Enables preview viewfinder (GUI only)
§ getStreamUrls()
def Camera.Camera.getStreamUrls |
( |
|
self | ) |
|
Lists available URLs
@return list
§ initInfo()
def Camera.Camera.initInfo |
( |
|
self | ) |
|
Establishes information for the camera
§ initKb()
def Camera.Camera.initKb |
( |
|
self | ) |
|
Initializes hex for keyboard events
§ initProfile()
def Camera.Camera.initProfile |
( |
|
self | ) |
|
Loads the current profile or sets up a default
§ isAvailable()
def Camera.Camera.isAvailable |
( |
|
self | ) |
|
Confirms camera is enabled in raspi-config and the hardware was detected
§ isPreviewing()
def Camera.Camera.isPreviewing |
( |
|
self | ) |
|
True if previewing
@return bool
§ isRecording()
def Camera.Camera.isRecording |
( |
|
self | ) |
|
True if recording
@return bool
§ isRunning()
def Camera.Camera.isRunning |
( |
|
self | ) |
|
True if either prviewing or recording
@return bool
§ isServiceRunning()
def Camera.Camera.isServiceRunning |
( |
|
self | ) |
|
True if camera service is running
@return bool
§ isStreaming()
def Camera.Camera.isStreaming |
( |
|
self | ) |
|
True if streaming
@return bool
§ listDir()
def Camera.Camera.listDir |
( |
|
self, |
|
|
|
path = None |
|
) |
| |
Lists camera media directory info
@param path list of sub directories
@return dict
§ openStream()
def Camera.Camera.openStream |
( |
|
self | ) |
|
Attempts to open stream connection
§ removeCallback()
def Camera.Camera.removeCallback |
( |
|
self, |
|
|
|
name |
|
) |
| |
Removes a plug-in from the camera schedule
§ setStillMode()
def Camera.Camera.setStillMode |
( |
|
self | ) |
|
Activates still capture mode
§ setVideoMode()
def Camera.Camera.setVideoMode |
( |
|
self | ) |
|
Activates video capture mode
§ start()
def Camera.Camera.start |
( |
|
self | ) |
|
Starts the camera service
§ startCam()
def Camera.Camera.startCam |
( |
|
self, |
|
|
|
profile = None |
|
) |
| |
Starts the camera hardware
§ startStream()
def Camera.Camera.startStream |
( |
|
self | ) |
|
§ stop()
def Camera.Camera.stop |
( |
|
self | ) |
|
§ stopCam()
def Camera.Camera.stopCam |
( |
|
self | ) |
|
Stops the camera hardware
§ stopCapture()
def Camera.Camera.stopCapture |
( |
|
self, |
|
|
|
profile = None |
|
) |
| |
§ stopPreview()
def Camera.Camera.stopPreview |
( |
|
self | ) |
|
§ stopStream()
def Camera.Camera.stopStream |
( |
|
self | ) |
|
§ toggleCapture()
def Camera.Camera.toggleCapture |
( |
|
self | ) |
|
Captures a still or starts / stops video recording
§ toggleService()
def Camera.Camera.toggleService |
( |
|
self | ) |
|
Toggle service
Used for the keyboard so one key can start and stop service
§ toggleStream()
def Camera.Camera.toggleStream |
( |
|
self | ) |
|
Enables / disables streaming
§ updateProfile()
def Camera.Camera.updateProfile |
( |
|
self, |
|
|
|
profile = None |
|
) |
| |
Applies camera profile settings
The documentation for this class was generated from the following file: