mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Write streamer header from ScreenEncoder
The screen encoder is responsible for writing data to the video streamer.
This commit is contained in:
parent
ae29e5b562
commit
51628201b7
3 changed files with 16 additions and 10 deletions
|
|
@ -104,10 +104,7 @@ public final class Server {
|
|||
|
||||
try {
|
||||
// synchronous
|
||||
VideoStreamer videoStreamer = new VideoStreamer(connection.getVideoFd(), options.getSendFrameMeta());
|
||||
if (options.getSendCodecId()) {
|
||||
videoStreamer.writeHeader(codec.getId());
|
||||
}
|
||||
VideoStreamer videoStreamer = new VideoStreamer(connection.getVideoFd(), codec, options.getSendCodecId(), options.getSendFrameMeta());
|
||||
screenEncoder.streamScreen(device, videoStreamer);
|
||||
} catch (IOException e) {
|
||||
// Broken pipe is expected on close, because the socket is closed by the client
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue