Skip to content

Commit 211ac09

Browse files
committed
libvncclient: add h264 support
1 parent 319f769 commit 211ac09

File tree

4 files changed

+455
-1
lines changed

4 files changed

+455
-1
lines changed

include/rfb/rfbclient.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@
5757
#include <rfb/keysym.h>
5858
#include <rfb/threading.h>
5959

60+
#ifdef LIBVNCSERVER_HAVE_LIBAVCODEC
61+
struct AVCodecContext;
62+
struct AVFrame;
63+
struct AVPacket;
64+
#ifdef LIBVNCSERVER_HAVE_LIBSWSCALE
65+
struct SwsContext;
66+
#endif
67+
#endif
68+
6069
#ifdef LIBVNCSERVER_HAVE_SASL
6170
#include <sasl/sasl.h>
6271
#endif /* LIBVNCSERVER_HAVE_SASL */
@@ -294,6 +303,20 @@ typedef struct _rfbClient {
294303
int raw_buffer_size;
295304
char *raw_buffer;
296305

306+
#ifdef LIBVNCSERVER_HAVE_LIBAVCODEC
307+
struct AVCodecContext *h264Decoder;
308+
struct AVFrame *h264Frame;
309+
struct AVPacket *h264Packet;
310+
#ifdef LIBVNCSERVER_HAVE_LIBSWSCALE
311+
struct SwsContext *h264SwsContext;
312+
#endif
313+
uint8_t *h264BgraBuffer;
314+
size_t h264BgraBufferSize;
315+
int h264CodecWidth;
316+
int h264CodecHeight;
317+
int h264LastFormat;
318+
#endif
319+
297320
#ifdef LIBVNCSERVER_HAVE_LIBZ
298321
z_stream decompStream;
299322
rfbBool decompStreamInited;
@@ -886,6 +909,10 @@ rfbBool rfbClientInitialise(rfbClient* client);
886909
*/
887910
void rfbClientCleanup(rfbClient* client);
888911

912+
#ifdef LIBVNCSERVER_HAVE_LIBAVCODEC
913+
void rfbClientH264ReleaseDecoder(rfbClient* client);
914+
#endif
915+
889916
#if(defined __cplusplus)
890917
}
891918
#endif

0 commit comments

Comments
 (0)