From 2562e41c07a6139dfce22adb89c8f093aa200a80 Mon Sep 17 00:00:00 2001 From: SeokHoon Lee Date: Tue, 12 Sep 2017 11:10:57 +0900 Subject: [PATCH] Tzien coding convention Signed-off-by: SeokHoon Lee Change-Id: I74b5ead5426707fa121e08c1ea0ecf17d8d48c79 --- packaging/libmm-wfd.spec | 2 +- src/include/mm_wfd_sink_attrs.h | 2 +- src/include/mm_wfd_sink_manager.h | 12 ++++++------ src/include/mm_wfd_sink_util.h | 10 ++++++---- src/mm_wfd_sink.c | 6 +++--- src/mm_wfd_sink_config.c | 36 ++++++++++++++++++------------------ src/mm_wfd_sink_priv.c | 9 ++++----- 7 files changed, 39 insertions(+), 38 deletions(-) mode change 100755 => 100644 src/include/mm_wfd_sink_attrs.h mode change 100755 => 100644 src/include/mm_wfd_sink_manager.h diff --git a/packaging/libmm-wfd.spec b/packaging/libmm-wfd.spec index e650f00..34bd2e8 100644 --- a/packaging/libmm-wfd.spec +++ b/packaging/libmm-wfd.spec @@ -1,6 +1,6 @@ Name: libmm-wfd Summary: Multimedia Framework Wifi-Display Library -Version: 0.2.227 +Version: 0.2.228 Release: 0 Group: System/Libraries License: Apache-2.0 diff --git a/src/include/mm_wfd_sink_attrs.h b/src/include/mm_wfd_sink_attrs.h old mode 100755 new mode 100644 index 1c6fc48..9fdf484 --- a/src/include/mm_wfd_sink_attrs.h +++ b/src/include/mm_wfd_sink_attrs.h @@ -129,4 +129,4 @@ void _mmwfd_deconstruct_attribute(MMHandleType hwfd); int _mmwfd_set_attribute(MMHandleType hwfd, char **err_atr_name, const char *attribute_name, va_list args_list); int _mmwfd_get_attributes_info(MMHandleType handle, const char *attribute_name, MMWfdAttrsInfo *dst_info); int _mmwfd_get_attribute(MMHandleType handle, char **err_attr_name, const char *attribute_name, va_list args_list); -#endif /* __MM_WFD_ATTRS_H__ */ \ No newline at end of file +#endif /* __MM_WFD_ATTRS_H__ */ diff --git a/src/include/mm_wfd_sink_manager.h b/src/include/mm_wfd_sink_manager.h old mode 100755 new mode 100644 index 47309e3..cd472c9 --- a/src/include/mm_wfd_sink_manager.h +++ b/src/include/mm_wfd_sink_manager.h @@ -37,14 +37,14 @@ extern "C" { do {\ if (wfd_sink) {\ g_mutex_lock(&((wfd_sink)->manager_thread_mutex));\ - }\ + } \ } while (0); #define WFD_SINK_MANAGER_UNLOCK(wfd_sink) \ do {\ if (wfd_sink) {\ g_mutex_unlock(&((wfd_sink)->manager_thread_mutex));\ - }\ + } \ } while (0); #define WFD_SINK_MANAGER_WAIT_CMD(wfd_sink) \ @@ -56,7 +56,7 @@ extern "C" { wfd_sink->waiting_cmd = FALSE; \ } else {\ wfd_sink_debug("manager thread is stopped, don't need to wait for command signal");\ - }\ + } \ } while (0); #define WFD_SINK_MANAGER_APPEND_CMD(wfd_sink, cmd) \ @@ -66,7 +66,7 @@ extern "C" { g_list_free(wfd_sink->manager_thread_cmd);\ wfd_sink->manager_thread_cmd = NULL;\ wfd_sink->manager_thread_exit = TRUE;\ - }\ + } \ wfd_sink->manager_thread_cmd = g_list_append(wfd_sink->manager_thread_cmd, GINT_TO_POINTER(cmd)); \ WFD_SINK_MANAGER_UNLOCK(wfd_sink);\ } while (0); @@ -78,8 +78,8 @@ extern "C" { if (wfd_sink->manager_thread_cmd) {\ wfd_sink_debug("send command signal to manager thread");\ g_cond_signal(&((wfd_sink)->manager_thread_cond));\ - }\ - }\ + } \ + } \ WFD_SINK_MANAGER_UNLOCK(wfd_sink);\ } while (0); diff --git a/src/include/mm_wfd_sink_util.h b/src/include/mm_wfd_sink_util.h index 3501e2b..3dfaa8f 100644 --- a/src/include/mm_wfd_sink_util.h +++ b/src/include/mm_wfd_sink_util.h @@ -64,11 +64,13 @@ /* generating dot */ #define MMWFDSINK_GENERATE_DOT_IF_ENABLED(x_wfd_sink, x_name) \ - if (x_wfd_sink->ini.generate_dot) { \ - wfd_sink_debug("create dot file : %s.dot", x_name);\ - GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(x_wfd_sink->pipeline->mainbin[WFD_SINK_M_PIPE].gst), \ + do { \ + if (x_wfd_sink->ini.generate_dot) { \ + wfd_sink_debug("create dot file : %s.dot", x_name);\ + GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(x_wfd_sink->pipeline->mainbin[WFD_SINK_M_PIPE].gst), \ GST_DEBUG_GRAPH_SHOW_ALL, x_name); \ - } + } \ + } while (0) /* postint message */ #define MMWFDSINK_POST_MESSAGE(x_wfd_sink, x_error_type, x_state_type) \ diff --git a/src/mm_wfd_sink.c b/src/mm_wfd_sink.c index 80f6d4d..00eaf5e 100644 --- a/src/mm_wfd_sink.c +++ b/src/mm_wfd_sink.c @@ -503,8 +503,8 @@ int mm_wfd_sink_get_state(MMHandleType wfd_sink_handle, gint *state) *state = MMWFDSINK_CURRENT_STATE(wfd_sink); wfd_sink_debug("mm_wfd_sink_get_current_state [%d] ", *state); - if (*state < MM_WFD_SINK_STATE_NONE || *state >= MM_WFD_SINK_STATE_NUM){ - wfd_sink_error("Wrong state is returned. State [%d]",*state); + if (*state < MM_WFD_SINK_STATE_NONE || *state >= MM_WFD_SINK_STATE_NUM) { + wfd_sink_error("Wrong state is returned. State [%d]", *state); result = MM_ERROR_WFD_INVALID_STATE; } else { result = MM_ERROR_NONE; @@ -513,4 +513,4 @@ int mm_wfd_sink_get_state(MMHandleType wfd_sink_handle, gint *state) wfd_sink_debug_fleave(); return result; -} \ No newline at end of file +} diff --git a/src/mm_wfd_sink_config.c b/src/mm_wfd_sink_config.c index 24e134d..247d302 100644 --- a/src/mm_wfd_sink_config.c +++ b/src/mm_wfd_sink_config.c @@ -32,24 +32,24 @@ tizen_profile_t _get_tizen_profile() char *profileName; system_info_get_platform_string("http://tizen.org/feature/profile", &profileName); switch (*profileName) { - case 'm': - case 'M': - profile = __TIZEN_PROFILE_MOBILE; - break; - case 'w': - case 'W': - profile = __TIZEN_PROFILE_WEARABLE; - break; - case 't': - case 'T': - profile = __TIZEN_PROFILE_TV; - break; - case 'i': - case 'I': - profile = __TIZEN_PROFILE_IVI; - break; - default: // common or unknown ==> ALL ARE COMMON. - profile = __TIZEN_PROFILE_COMMON; + case 'm': + case 'M': + profile = __TIZEN_PROFILE_MOBILE; + break; + case 'w': + case 'W': + profile = __TIZEN_PROFILE_WEARABLE; + break; + case 't': + case 'T': + profile = __TIZEN_PROFILE_TV; + break; + case 'i': + case 'I': + profile = __TIZEN_PROFILE_IVI; + break; + default: // common or unknown ==> ALL ARE COMMON. + profile = __TIZEN_PROFILE_COMMON; } free(profileName); diff --git a/src/mm_wfd_sink_priv.c b/src/mm_wfd_sink_priv.c index 0da778f..cb05745 100644 --- a/src/mm_wfd_sink_priv.c +++ b/src/mm_wfd_sink_priv.c @@ -2550,11 +2550,10 @@ __mm_wfd_sink_demux_pad_added(GstElement *demux, GstPad *pad, gpointer data) goto ERROR; } - if (name[0] == 'v') { + if (name[0] == 'v') MMWFDSINK_GENERATE_DOT_IF_ENABLED(wfd_sink, "video-pad-added-pipeline"); - } else if (name[0] == 'a') { + else if (name[0] == 'a') MMWFDSINK_GENERATE_DOT_IF_ENABLED(wfd_sink, "audio-pad-added-pipeline"); - } done: MMWFDSINK_FREEIF(name); @@ -2650,7 +2649,7 @@ __mm_wfd_sink_update_stream_info(GstElement *wfdsrc, GstStructure *str, gpointer stream_info->audio_stream_info.bitwidth); } - g_free (audio_format); + g_free(audio_format); } if (gst_structure_has_field(str, "video_format")) { is_valid_video_format = TRUE; @@ -2681,7 +2680,7 @@ __mm_wfd_sink_update_stream_info(GstElement *wfdsrc, GstStructure *str, gpointer stream_info->video_stream_info.frame_rate); } - g_free (video_format); + g_free(video_format); } WFD_SINK_MANAGER_SIGNAL_CMD(wfd_sink); -- 2.7.4