Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from goprocam import GoProCamera
from goprocam import constants
gpCam = GoProCamera.GoPro(constants.auth)
gpCam.infoCamera("model_name")
print(gpCam.getStatus(constants.Hero3Status.SpotMeter))
print(gpCam.getStatus(constants.Hero3Status.TimeLapseInterval))
print(gpCam.getStatus(constants.Hero3Status.FOV))
print(gpCam.getStatus(constants.Hero3Status.Beep))
print(gpCam.getStatus(constants.Hero3Status.LED))
print(gpCam.getStatus(constants.Hero3Status.AutoOff))
print(gpCam.getStatus(constants.Hero3Status.VideoRes))
print(gpCam.getStatus(constants.Hero3Status.FPS))
print(gpCam.getStatus(constants.Hero3Status.Loop))
print(gpCam.getStatus(constants.Hero3Status.WhiteBalance))
print(gpCam.getStatus(constants.Hero3Status.IsRecording))
print(gpCam.getStatus(constants.Hero3Status.PicRes))
print(gpCam.getStatus(constants.Hero3Status.TimeRecordedMins))
print(gpCam.getStatus(constants.Hero3Status.TimeRecordedSecs))
from goprocam import GoProCamera, constants
import json
gpCam = GoProCamera.GoPro(constants.gpcontrol)
## This script will download videos from the camera that have hilight tags in them and create a json file containing the tag location in milliseconds with each video
media = gpCam.listMedia(True, True)
for i in media:
folder= i[0]
filename = i[1]
if filename.endswith('MP4'):
tags_in_video=gpCam.getVideoInfo("tags", filename, folder)
if not tags_in_video == []:
gpCam.downloadMedia(folder,filename)
filename_tags=filename.replace('MP4','json')
hs = open(filename_tags,"a")
hs.write(str(tags_in_video))
hs.close()
from goprocam import GoProCamera
from goprocam import constants
import time
gpCam = GoProCamera.GoPro(constants.auth)
gpCam.overview()
gpCam.listMedia(True)
def release():
cv2.destroyAllWindows()
cam.release()
gpCam.shutter(constants.stop)
if args.take_photo:
self.power_on(self._mac_address)
time.sleep(5)
response = self._request("camera/cv")
if b"Hero3" in response:
self._camera = constants.Camera.Interface.Auth
else:
self._prepare_gpcontrol()
except http.client.HTTPException as httperror:
print(httperror)
self.power_on_auth()
# Definitively HERO3+ and below.
time.sleep(2)
response = self._request("camera/cv")
if b"Hero3" in response:
print("HERO3/3+")
self._camera = constants.Camera.Interface.Auth
return self._camera