Screen image transmission uses H.264 compression #65
This commit is contained in:
35
client/X264Encoder.h
Normal file
35
client/X264Encoder.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
extern "C"{
|
||||
#include <libyuv\libyuv.h>
|
||||
#include <x264\x264.h>
|
||||
}
|
||||
|
||||
class CX264Encoder
|
||||
{
|
||||
private:
|
||||
x264_t* m_pCodec; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5>
|
||||
x264_picture_t *m_pPicIn;
|
||||
x264_picture_t *m_pPicOut;
|
||||
x264_param_t m_Param;
|
||||
public:
|
||||
bool open(int width, int height, int fps,int bitrate);
|
||||
bool open(x264_param_t * param);
|
||||
|
||||
void close();
|
||||
|
||||
int encode(
|
||||
uint8_t * rgb,
|
||||
uint8_t bpp,
|
||||
uint32_t stride,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
uint8_t ** lppData,
|
||||
uint32_t * lpSize,
|
||||
int direction = 1
|
||||
);
|
||||
|
||||
CX264Encoder();
|
||||
~CX264Encoder();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user