SLOGD(">>>>> msg cb: type[%d]", hal_message->type);
((hal_codec_message_cb)handle->msg_cb)(hal_message, handle->msg_cb_data);
SLOGD("<<<<< msg cb: type[%d]", hal_message->type);
+
+ g_mutex_unlock(&handle->msg_lock);
} else {
+ g_mutex_unlock(&handle->msg_lock);
+
SLOGW("no msg cb for handle[%p]", handle);
if (hal_message->type == HAL_CODEC_MESSAGE_TYPE_OUTPUT_BUFFER) {
}
}
- g_mutex_unlock(&handle->msg_lock);
-
_CODEC_IPC_MESSAGE_CB_DONE:
for (i = 0 ; i < fd_size && fd ; i++) {
/* error case */
{
static int dumpCount = 0;
- if (!buffer || !dumpPath) {
- cout << "DumpBuffer : buffer[" << buffer << "], path[" << dumpPath << "]" << endl;
+ if (!buffer) {
+ cout << "DumpBuffer : No buffer" << endl;
+ return;
+ }
+
+ if (!dumpPath) {
+ cout << "DumpBuffer : No path" << endl;
return;
}
int GetContents(const char *path)
{
- GError *error = nullptr;
-
if (mappedFile_)
g_mapped_file_unref(mappedFile_);
- mappedFile_ = g_mapped_file_new(path, FALSE, &error);
+ mappedFile_ = g_mapped_file_new(path, FALSE, nullptr);
if (!mappedFile_) {
cout << "Codec HAL : get contents[" << path << "] failed" << endl;
return -1;
ret = hal_codec_configure(gHalHandle, 1920, 1080, HAL_CODEC_FORMAT_H264, HAL_CODEC_FORMAT_NV12, false);
ASSERT_EQ(ret, HAL_CODEC_ERROR_NONE);
- ret = hal_codec_start(gHalHandle, CodecHalTest::MessageCb, NULL);
+ ret = hal_codec_start(gHalHandle, CodecHalTest::MessageCb, nullptr);
ASSERT_EQ(ret, HAL_CODEC_ERROR_NONE);
usleep(100000);
ret = GetContents(CONTENTS_H264_PATH);
ASSERT_EQ(ret, 0);
- mainLoop_ = g_main_loop_new(NULL, TRUE);
+ mainLoop_ = g_main_loop_new(nullptr, TRUE);
feedCount_ = 0;
decodedCount_ = 0;