break;
case HAL_CODEC_MESSAGE_TYPE_RESOLUTION_CHANGED:
+ SLOGD("[RESOLUTION_CHANGED] %dx%d", hal_message->resolution.width, hal_message->resolution.height);
break;
default:
g_cond_broadcast(&ipc_async_return->cond[type]);
g_mutex_unlock(&ipc_async_return->lock[type]);
+
+ SLOGD("type[%d]: ret[0x%x] - done", type, ret);
}
return HAL_CODEC_ERROR_NONE;
_INIT_FAILED:
- if (new_handle->rpc_handle) {
- __hal_codec_ipc_cb_handle_release(new_handle);
- rpc_port_proxy_codec_destroy(new_handle->rpc_handle);
- }
-
__hal_codec_ipc_context_release(new_handle);
g_free(new_handle);
static int __hal_codec_service_message_cb(hal_codec_message_s *message, void *user_data)
{
+ int dummy_fd[HAL_CODEC_BUFFER_PLANE_MAX] = {0, };
int ipc_ret = 0;
hal_codec_buffer_s *buffer = NULL;
bundle *b_msg = NULL;
rpc_port_stub_array_file_desc_set(fd_handle, (int *)buffer->memory.fd, buffer->memory.num_fd);
break;
+ case HAL_CODEC_MESSAGE_TYPE_RESOLUTION_CHANGED:
+ rpc_port_stub_array_file_desc_create(&fd_handle);
+ rpc_port_stub_array_file_desc_set(fd_handle, (int *)dummy_fd, 0);
+ break;
+
default:
break;
}
g_mutex_lock(&service_handle->cb_lock);
if (message->type == HAL_CODEC_MESSAGE_TYPE_OUTPUT_BUFFER &&
- service_handle->is_flushing) {
+ service_handle->is_flushing && !(buffer->meta.flags & HAL_CODEC_BUFFER_FLAG_EOS)) {
g_mutex_unlock(&service_handle->cb_lock);
HAL_CODEC_SERVICE_LOGW("[OUTPUT_BUFFER] flushing:release buffer[%d]", buffer->index);
hal_codec_passthrough_release_output_buffer(service_handle->codec_handle, buffer->index);
g_mutex_lock(&service_handle->cb_lock);
- HAL_CODEC_SERVICE_LOGE_CONTEXT("set flushing");
+ HAL_CODEC_SERVICE_LOGI_CONTEXT("set flushing");
service_handle->is_flushing = true;
g_mutex_unlock(&service_handle->cb_lock);