mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 12:05:58 +08:00
优化编解码相关代码
This commit is contained in:
@@ -7,13 +7,10 @@
|
||||
* LICENSE file in the root of the source tree. All contributing project authors
|
||||
* may be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CODEC_H264ENCODER_H_
|
||||
#define CODEC_H264ENCODER_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif //__cplusplus
|
||||
@@ -32,14 +29,16 @@ public:
|
||||
uint8_t *pucData;
|
||||
} H264Frame;
|
||||
|
||||
H264Encoder(void);
|
||||
virtual ~H264Encoder(void);
|
||||
bool init(int iWidth, int iHeight, int iFps);
|
||||
int inputData(char *apcYuv[3], int aiYuvLen[3], int64_t i64Pts, H264Frame **ppFrame);
|
||||
H264Encoder();
|
||||
~H264Encoder();
|
||||
|
||||
bool init(int iWidth, int iHeight, int iFps, int iBitRate);
|
||||
int inputData(char *yuv[3], int linesize[3], int64_t cts, H264Frame **out_frame);
|
||||
|
||||
private:
|
||||
x264_t* _pX264Handle = nullptr;
|
||||
x264_picture_t* _pPicIn = nullptr;
|
||||
x264_picture_t* _pPicOut = nullptr;
|
||||
x264_t *_pX264Handle = nullptr;
|
||||
x264_picture_t *_pPicIn = nullptr;
|
||||
x264_picture_t *_pPicOut = nullptr;
|
||||
H264Frame _aFrames[10];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user