Skip to content

Commit

Permalink
Revert "More robust protocol to use Pi Camera"
Browse files Browse the repository at this point in the history
This reverts commit 2f78fc4.
  • Loading branch information
kennethjiang committed Sep 16, 2019
1 parent 6e01fbc commit a5661a5
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions octoprint_anywhere/message_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import json
import logging
import os
import tempfile
from raven import breadcrumbs

from .mjpeg_stream import MjpegStream
Expand All @@ -18,7 +17,6 @@
from .utils import ip_addr, ExpoBackoff, pi_version

_logger = logging.getLogger('octoprint.plugins.anywhere')
CAM_EXCLUSIVE_USE = os.path.join(tempfile.gettempdir(), '.using_picam')

class MessageLoop:

Expand All @@ -40,16 +38,9 @@ def run_until_quit(self):
stream_host = self.config['stream_host']
token = self.config['token']

try:
os.remove(CAM_EXCLUSIVE_USE)
except:
pass

if self.config.premium_video_eligible():
_logger.warn('Printer is eligible for premium video streaming.')
if pi_version() or os.environ.get('CAM_SIM', False):
open(CAM_EXCLUSIVE_USE, 'a').close() # touch CAM_EXCLUSIVE_USE to indicate the intention of exclusive use of pi camera

self.h264_stream = H264Streamer(stream_host, token, self.config.sentry)
h264_stream_thread = threading.Thread(target=self.h264_stream.start_hls_pipeline, args=(self.remote_status, self.plugin, self.config.dev_settings))
h264_stream_thread.daemon = True
Expand Down

0 comments on commit a5661a5

Please sign in to comment.