old-commit-hash: 06aef9edd3
06aef9edd3
@ -24,7 +24,8 @@ extern "C" {
const int env_debug_encoder = (getenv("DEBUG_ENCODER") != NULL) ? atoi(getenv("DEBUG_ENCODER")) : 0;
void FfmpegEncoder::encoder_init() {
FfmpegEncoder::FfmpegEncoder(const EncoderInfo &encoder_info, int in_width, int in_height)
: VideoEncoder(encoder_info, in_width, in_height) {
frame = av_frame_alloc();
assert(frame);
frame->format = AV_PIX_FMT_YUV420P;
@ -16,10 +16,8 @@ extern "C" {
class FfmpegEncoder : public VideoEncoder {
public:
FfmpegEncoder(const EncoderInfo &encoder_info, int in_width, int in_height)
: VideoEncoder(encoder_info, in_width, in_height) { encoder_init(); }
FfmpegEncoder(const EncoderInfo &encoder_info, int in_width, int in_height);
~FfmpegEncoder();
void encoder_init();
int encode_frame(VisionBuf* buf, VisionIpcBufExtra *extra);
void encoder_open(const char* path);
void encoder_close();
@ -131,7 +131,8 @@ void V4LEncoder::dequeue_handler(V4LEncoder *e) {
}
void V4LEncoder::encoder_init() {
V4LEncoder::V4LEncoder(const EncoderInfo &encoder_info, int in_width, int in_height)
fd = open("/dev/v4l/by-path/platform-aa00000.qcom_vidc-video-index1", O_RDWR|O_NONBLOCK);
assert(fd >= 0);
@ -8,10 +8,8 @@
class V4LEncoder : public VideoEncoder {
V4LEncoder(const EncoderInfo &encoder_info, int in_width, int in_height)
V4LEncoder(const EncoderInfo &encoder_info, int in_width, int in_height);
~V4LEncoder();