|
|
@ -184,7 +184,6 @@ OmxEncoder::OmxEncoder(const char* filename, int width, int height, int fps, int |
|
|
|
this->v_ptr2 = (uint8_t *)malloc(this->width*this->height/4); |
|
|
|
this->v_ptr2 = (uint8_t *)malloc(this->width*this->height/4); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
OMX_CHECK(OMX_Init()); |
|
|
|
|
|
|
|
auto component = (OMX_STRING)(h265 ? "OMX.qcom.video.encoder.hevc" : "OMX.qcom.video.encoder.avc"); |
|
|
|
auto component = (OMX_STRING)(h265 ? "OMX.qcom.video.encoder.hevc" : "OMX.qcom.video.encoder.avc"); |
|
|
|
int err = OMX_GetHandle(&this->handle, component, this, &omx_callbacks); |
|
|
|
int err = OMX_GetHandle(&this->handle, component, this, &omx_callbacks); |
|
|
|
if (err != OMX_ErrorNone) { |
|
|
|
if (err != OMX_ErrorNone) { |
|
|
@ -604,7 +603,6 @@ OmxEncoder::~OmxEncoder() { |
|
|
|
wait_for_state(OMX_StateLoaded); |
|
|
|
wait_for_state(OMX_StateLoaded); |
|
|
|
|
|
|
|
|
|
|
|
OMX_CHECK(OMX_FreeHandle(this->handle)); |
|
|
|
OMX_CHECK(OMX_FreeHandle(this->handle)); |
|
|
|
OMX_CHECK(OMX_Deinit()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (queue_try_pop(&this->free_in));
|
|
|
|
while (queue_try_pop(&this->free_in));
|
|
|
|
while (queue_try_pop(&this->done_out));
|
|
|
|
while (queue_try_pop(&this->done_out));
|
|
|
|