@@ -66,6 +66,16 @@ typedef UINT32 in_addr_t;
6666
6767#include <rfb/threading.h>
6868
69+ #ifdef LIBVNCSERVER_HAVE_LIBAVCODEC
70+ struct AVCodecContext ;
71+ struct AVFrame ;
72+ struct AVPacket ;
73+ #ifdef LIBVNCSERVER_HAVE_LIBSWSCALE
74+ struct SwsContext ;
75+ #endif
76+ struct rfbH264EncoderContext ;
77+ #endif
78+
6979/* if you use pthreads, but don't define LIBVNCSERVER_HAVE_LIBPTHREAD, the structs
7080 get all mixed up. So this gives a linker error reminding you to compile
7181 the library and your application (at least the parts including rfb.h)
@@ -582,6 +592,15 @@ typedef struct _rfbClientRec {
582592 int rawBytesEquivalent ;
583593 int bytesSent ;
584594
595+ #ifdef LIBVNCSERVER_HAVE_LIBAVCODEC
596+ struct rfbH264EncoderContext * h264ContextsHead ;
597+ struct rfbH264EncoderContext * h264ContextsTail ;
598+ unsigned int h264ContextCount ;
599+ rfbBool h264ForceKeyframe ;
600+ rfbBool h264NeedsResetAll ;
601+ int64_t h264BitRate ;
602+ #endif
603+
585604#ifdef LIBVNCSERVER_HAVE_LIBZ
586605 /* zlib encoding -- necessary compression state info per client */
587606
@@ -824,6 +843,12 @@ extern void rfbClientConnFailed(rfbClientPtr cl, const char *reason);
824843extern void rfbNewUDPConnection (rfbScreenInfoPtr rfbScreen ,rfbSocket sock );
825844extern void rfbProcessUDPInput (rfbScreenInfoPtr rfbScreen );
826845extern rfbBool rfbSendFramebufferUpdate (rfbClientPtr cl , sraRegionPtr updateRegion );
846+ #ifdef LIBVNCSERVER_HAVE_LIBAVCODEC
847+ extern rfbBool rfbSendRectEncodingH264 (rfbClientPtr cl , int x , int y , int w , int h );
848+ extern void rfbClientH264SetBitrate (rfbClientPtr cl , int64_t bitRate );
849+ void rfbClientH264ReleaseEncoder (rfbClientPtr cl );
850+ #endif
851+
827852extern rfbBool rfbSendRectEncodingRaw (rfbClientPtr cl , int x ,int y ,int w ,int h );
828853extern rfbBool rfbSendUpdateBuf (rfbClientPtr cl );
829854extern void rfbSendServerCutText (rfbScreenInfoPtr rfbScreen ,char * str , int len );
0 commit comments