diff options
Diffstat (limited to 'pica-client/videodevice.h')
| -rw-r--r-- | pica-client/videodevice.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/pica-client/videodevice.h b/pica-client/videodevice.h index 2724d63..50f8684 100644 --- a/pica-client/videodevice.h +++ b/pica-client/videodevice.h @@ -294,6 +294,16 @@ public slots: // Close() is called. virtual void Capture() override; + // Blocking camera preview loop, for looking at what the camera sees rather + // than sending it anywhere - the QR code scanner. Opens the camera + // configureCapture() named, at the size and frame rate given there or the + // nearest the camera offers, and emits frameReady() for every frame at the + // camera's own resolution, with nothing encoded. Of configureCapture()'s + // other parameters only the session ids apply. Emits captureStarted() once + // the camera is open, with the codec the camera itself delivers in - empty + // for uncompressed. Returns once Close() is called. + void Preview(); + // Blocking decode loop: decodes frames pulled from the internal queue // (see enqueueFrame()) and emits frameReady() for each decoded picture. // Returns once Close() is called. @@ -325,7 +335,8 @@ signals: // One decoded picture from the remote side, ready to be displayed, as a // Format_RGB32 image - the format a widget draws without converting it - // first. + // first. Preview() emits its camera frames through here as well, at the + // camera's resolution, which the rest of this description is not about. // // Already scaled to fit the area last given to setDisplaySize(), keeping // its aspect ratio, so the receiver can draw it as it stands. At the @@ -344,6 +355,14 @@ signals: void errorOccurred(QString message); + // Emitted by Preview() instead of errorOccurred() when the camera could not + // be opened because something else is capturing from it - a call, or + // another application - so that the caller can say so in plain words + // rather than pass on an error code. Only where the platform tells this + // apart from other failures: v4l2 reports EBUSY, DirectShow reports an + // I/O error like any other and ends up in errorOccurred(). + void cameraBusy(); + // Says in plain words which path capture or playback actually settled on, // for the settings dialog to show. A request for GPU work can silently // come back as software, and forwarding a compressed camera stream skips |
