From: Jeongmo Yang Date: Tue, 8 Apr 2025 06:12:14 +0000 (+0900) Subject: TIDL: Support DRC from HAL backend X-Git-Tag: accepted/tizen/unified/20250530.090452~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c96501d5e70e871b8ac59b20b19dfd25067a496c;p=platform%2Fhal%2Fapi%2Fcodec.git TIDL: Support DRC from HAL backend [Version] 1.3.1 [Issue Type] Improvement Change-Id: I443d4f07d0d32218a82916af5d0ccc34bd2e4bbc Signed-off-by: Jeongmo Yang --- diff --git a/packaging/hal-api-codec.spec b/packaging/hal-api-codec.spec index 6970b9a..3e44768 100644 --- a/packaging/hal-api-codec.spec +++ b/packaging/hal-api-codec.spec @@ -6,7 +6,7 @@ ### main package ######### Name: %{name} Summary: %{name} interface -Version: 1.3.0 +Version: 1.3.1 Release: 0 Group: Development/Libraries License: Apache-2.0 diff --git a/src/hal-api-codec-ipc.c b/src/hal-api-codec-ipc.c index a46e384..2caa17a 100644 --- a/src/hal-api-codec-ipc.c +++ b/src/hal-api-codec-ipc.c @@ -321,6 +321,7 @@ static void __hal_codec_ipc_message_cb(void *user_data, bundle *b_msg, rpc_port_ break; case HAL_CODEC_MESSAGE_TYPE_RESOLUTION_CHANGED: + SLOGD("[RESOLUTION_CHANGED] %dx%d", hal_message->resolution.width, hal_message->resolution.height); break; default: @@ -378,6 +379,8 @@ static void __hal_codec_ipc_async_return_cb(void *user_data, 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); } @@ -685,11 +688,6 @@ int hal_codec_ipc_init(hal_codec_type_e type, void **codec_handle) 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); diff --git a/src/service_plugin/hal-backend-service-codec.c b/src/service_plugin/hal-backend-service-codec.c index e4c61b0..eaa4225 100644 --- a/src/service_plugin/hal-backend-service-codec.c +++ b/src/service_plugin/hal-backend-service-codec.c @@ -152,6 +152,7 @@ static hal_codec_service_s *__hal_codec_service_get_handle(rpc_port_stub_codec_c 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; @@ -220,6 +221,11 @@ static int __hal_codec_service_message_cb(hal_codec_message_s *message, void *us 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; } @@ -227,7 +233,7 @@ static int __hal_codec_service_message_cb(hal_codec_message_s *message, void *us 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); @@ -673,7 +679,7 @@ static int _hal_codec_service_backend_flush(rpc_port_stub_codec_context_h contex 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);