mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-11-30 02:56:42 -08:00
## Link to GitHub Issue or related Pull Request, if one exists fixes #875 ## Description of change Adds `-apistream`, an optional HTTP video stream of the mirrored screen. It listens on the API port +2. Two endpoints, sharing the same `screen`, `fps` and `q` parameters: /stream.mjpg JPEG frames, for clients with no container support /stream.h264 H.264 annex-b, for an app driving MediaCodec or VideoToolbox itself One encoder per connection, fed by a per-screen pump that always hands over the newest frame, so a slow reader drops frames instead of building a backlog. `capture.get_jpg` behaviour is unchanged. Additional documentation for developers: https://github.com/spice2x/spice2x.github.io/wiki/Video-Stream ## Testing
12 lines
216 B
C++
12 lines
216 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include "stream_format.h"
|
|
|
|
namespace api {
|
|
|
|
// bare annex-b H.264; null when the build has no encoder
|
|
std::unique_ptr<StreamWriter> make_h264_writer(int quality, int fps);
|
|
}
|