New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stop capture #105

Closed
waveform80 opened this Issue Jun 8, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@waveform80
Owner

waveform80 commented Jun 8, 2014

Just discovered an issue with multi-res record: if recording is started on (for example) port 1, then another is started on port 2, the recording on port 1 must be stopped last. The started_capture attribute in the encoder tracks which encoder started the recording, but it shouldn't - instead we should be disabling the capture in the last active active encoder rather than simply in the one that started capture. Unfortunately, fixing this is tricky. Only the PiCamera class has knowledge of which other encoders exist and what ports they use so we probably need to shift start/stop capture code back into PiCamera and call it from the encoder's start and stop methods (and I bet there'll be a few race conditions to deal with there too)

@waveform80 waveform80 added this to the 1.5 milestone Jun 8, 2014

@waveform80 waveform80 added the bug label Jun 8, 2014

@waveform80 waveform80 self-assigned this Jun 8, 2014

waveform80 added a commit that referenced this issue Jun 9, 2014

Fix #104 and #105
Refactor how we go about allocating, deallocating, starting and stopping
decoders. This introduces some violation of encapsulation (just think of
PiEncoder as a friend class of PiCamera), but there's not much I can do
about that: the camera class has to be the one to start and stop the
video port as it's the only thing that "knows" about how many encoders
are attached to the splitter.

@waveform80 waveform80 closed this Jun 9, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment