mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-18 06:41:06 +00:00
Cleanup a bunch of the code and the interface itself
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Platform.h"
|
||||
#include "PlatformSockets.h"
|
||||
#include "Video.h"
|
||||
#define IP_ADDRESS unsigned int
|
||||
|
||||
typedef struct _STREAM_CONFIGURATION {
|
||||
int width;
|
||||
@@ -10,11 +8,22 @@ typedef struct _STREAM_CONFIGURATION {
|
||||
int fps;
|
||||
} STREAM_CONFIGURATION, *PSTREAM_CONFIGURATION;
|
||||
|
||||
typedef void (*DecoderRendererSetup)(int width, int height, int redrawRate, void* context, int drFlags);
|
||||
typedef void (*DecoderRendererStart)(void);
|
||||
typedef void (*DecoderRendererStop)(void);
|
||||
typedef void (*DecoderRendererRelease)(void);
|
||||
typedef void (*DecoderRendererSubmitDecodeUnit)(PDECODE_UNIT decodeUnit);
|
||||
typedef struct _LENTRY {
|
||||
struct _LENTRY *next;
|
||||
char* data;
|
||||
int length;
|
||||
} LENTRY, *PLENTRY;
|
||||
|
||||
typedef struct _DECODE_UNIT {
|
||||
int fullLength;
|
||||
PLENTRY bufferList;
|
||||
} DECODE_UNIT, *PDECODE_UNIT;
|
||||
|
||||
typedef void(*DecoderRendererSetup)(int width, int height, int redrawRate, void* context, int drFlags);
|
||||
typedef void(*DecoderRendererStart)(void);
|
||||
typedef void(*DecoderRendererStop)(void);
|
||||
typedef void(*DecoderRendererRelease)(void);
|
||||
typedef void(*DecoderRendererSubmitDecodeUnit)(PDECODE_UNIT decodeUnit);
|
||||
|
||||
typedef struct _DECODER_RENDERER_CALLBACKS {
|
||||
DecoderRendererSetup setup;
|
||||
@@ -24,24 +33,5 @@ typedef struct _DECODER_RENDERER_CALLBACKS {
|
||||
DecoderRendererSubmitDecodeUnit submitDecodeUnit;
|
||||
} DECODER_RENDERER_CALLBACKS, *PDECODER_RENDERER_CALLBACKS;
|
||||
|
||||
#include <stdio.h>
|
||||
#define Limelog printf
|
||||
|
||||
char* allocateConfigDataForStreamConfig(PSTREAM_CONFIGURATION streamConfig);
|
||||
int getConfigDataSize(PSTREAM_CONFIGURATION streamConfig);
|
||||
|
||||
int initializeControlStream(IP_ADDRESS host, PSTREAM_CONFIGURATION streamConfig);
|
||||
int startControlStream(void);
|
||||
int stopControlStream(void);
|
||||
void requestIdrFrame(void);
|
||||
|
||||
int performHandshake(IP_ADDRESS host);
|
||||
|
||||
void initializeVideoDepacketizer(void);
|
||||
void processRtpPayload(PNV_VIDEO_PACKET videoPacket, int length);
|
||||
PDECODE_UNIT getNextDecodeUnit(void);
|
||||
void freeDecodeUnit(PDECODE_UNIT decodeUnit);
|
||||
void queueRtpPacket(PRTP_PACKET rtpPacket, int length);
|
||||
|
||||
void initializeVideoStream(IP_ADDRESS host, PSTREAM_CONFIGURATION streamConfig, PDECODER_RENDERER_CALLBACKS drCallbacks);
|
||||
int startVideoStream(void* rendererContext, int drFlags);
|
||||
int LiStartConnection(IP_ADDRESS host, PSTREAM_CONFIGURATION streamConfig, PDECODER_RENDERER_CALLBACKS drCallbacks);
|
||||
void LiStopConnection(void);
|
||||
Reference in New Issue
Block a user