[v0.1.11] apply tizen coding rule 88/95988/1 accepted/tizen/common/20161109.140252 accepted/tizen/ivi/20161109.002835 accepted/tizen/mobile/20161109.002521 accepted/tizen/tv/20161109.002659 accepted/tizen/wearable/20161109.002751 submit/tizen/20161108.054351
authorEunhae Choi <eunhae1.choi@samsung.com>
Mon, 7 Nov 2016 08:39:03 +0000 (17:39 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Mon, 7 Nov 2016 08:39:03 +0000 (17:39 +0900)
Change-Id: Ifcfe9918e54526716bcbebb2d45a25963cec555a

src/media_streamer_gst.c
src/media_streamer_node.c

index 6d16d1402306c7cc26510cdbfa57743882def734..39a1a14c4b6c0bad7681096bca3efa5ee5e13f45 100644 (file)
@@ -26,9 +26,9 @@
 #define MEDIASTREAMER_DECODEBIN_TYPE_DECODER "video_decoder"
 
 typedef enum {
-  MEDIA_STREAMER_SINK_BIN_NORMAL,
-  MEDIA_STREAMER_SINK_BIN_RTP_SERVER,
-  MEDIA_STREAMER_SINK_BIN_ADAPTIVE,
+       MEDIA_STREAMER_SINK_BIN_NORMAL,
+       MEDIA_STREAMER_SINK_BIN_RTP_SERVER,
+       MEDIA_STREAMER_SINK_BIN_ADAPTIVE,
 } media_streamer_sink_bin_type_e;
 
 static int __ms_adaptive_sink_prepare(media_streamer_s * ms_streamer);
@@ -719,7 +719,7 @@ GstElement *__ms_element_create(const char *plugin_name, const char *name)
 static void __hlsdemux_pad_added_cb(GstElement *demux, GstPad *pad, gpointer data)
 {
        GstPad *gp = GST_PAD(data);
-       gst_ghost_pad_set_target (GST_GHOST_PAD(gp), pad);
+       gst_ghost_pad_set_target(GST_GHOST_PAD(gp), pad);
 }
 
 static int __ms_adaptive_sink_prepare(media_streamer_s * ms_streamer)
@@ -852,7 +852,7 @@ int __ms_adaptive_element_prepare(media_streamer_node_s *ms_node, bool auto_plug
                                G_CALLBACK(__hlsdemux_pad_added_cb), gp, 0);
        } else {
                GstPad *manifest_src_pad = gst_element_get_static_pad(manifest_src, "src");
-               gst_ghost_pad_set_target (GST_GHOST_PAD(gp), manifest_src_pad);
+               gst_ghost_pad_set_target(GST_GHOST_PAD(gp), manifest_src_pad);
        }
 
        return MEDIA_STREAMER_ERROR_NONE;
@@ -1169,9 +1169,8 @@ GstElement *__ms_audio_encoder_element_create(node_plug_s *plug_info, media_stre
        if (!audio_encoder)
                audio_encoder = __ms_element_create_by_registry(&plug_info_encoder, type);
 
-       if (g_strrstr(gst_element_get_name(audio_encoder), "aac")) {
+       if (g_strrstr(gst_element_get_name(audio_encoder), "aac"))
                g_object_set(audio_encoder, "compliance", -2, NULL);
-       }
 
        /* Creating bin - Audio Encoder */
        GstElement *audio_enc_bin = gst_bin_new("audio_encoder");
@@ -2085,7 +2084,7 @@ static void __ms_typefound_cb(GstElement *typefind, guint probability, GstCaps *
        gchar *type;
        GstPad *src_pad = gst_element_get_static_pad(typefind, "src");
 
-       type = gst_caps_to_string (caps);
+       type = gst_caps_to_string(caps);
        if (g_strrstr(type, "video/mpegts") && adaptive_sink) {
                __ms_link_two_elements(typefind, src_pad, adaptive_sink->gst_element);
        } else {
@@ -2094,7 +2093,7 @@ static void __ms_typefound_cb(GstElement *typefind, guint probability, GstCaps *
        }
 
        MS_SAFE_UNREF(src_pad);
-       g_free (type);
+       g_free(type);
 }
 
 int __ms_find_type(media_streamer_s *ms_streamer, GstElement *src_element)
@@ -2102,14 +2101,14 @@ int __ms_find_type(media_streamer_s *ms_streamer, GstElement *src_element)
        GstElement *typefind = NULL;
        GstPad *src_pad = gst_element_get_static_pad(src_element, "src");
 
-       typefind = gst_element_factory_make ("typefind", "typefinder");
+       typefind = gst_element_factory_make("typefind", "typefinder");
        ms_retvm_if(typefind == NULL, MEDIA_STREAMER_ERROR_INVALID_OPERATION,
                        "Error creating element [typefind]");
 
        __ms_bin_add_element(ms_streamer->topology_bin, typefind, TRUE);
        gst_element_sync_state_with_parent(typefind);
 
-       g_signal_connect (typefind, "have-type", G_CALLBACK (__ms_typefound_cb), ms_streamer);
+       g_signal_connect(typefind, "have-type", G_CALLBACK(__ms_typefound_cb), ms_streamer);
 
        __ms_link_two_elements(src_element, src_pad, typefind);
 
index 9671e5c17fc1b7b76882068ac78499f4189d7a2f..ec58cf264be823bfd4f96da1d1fe42ca636c62ff 100644 (file)
@@ -762,7 +762,7 @@ static void _src_node_prepare(const GValue *item, gpointer user_data)
        GstElement *found_element = NULL;
 
        if (__ms_src_need_typefind(src_pad)) {
-               __ms_find_type(ms_streamer,src_element);
+               __ms_find_type(ms_streamer, src_element);
                MS_SAFE_UNREF(src_element);
        } else {
                /* Check the source element`s pad type */
@@ -795,7 +795,8 @@ static void _src_node_prepare(const GValue *item, gpointer user_data)
        MS_SAFE_UNREF(src_pad);
 }
 
-static gboolean demux_find(gpointer key, gpointer value, gpointer user_data) {
+static gboolean demux_find(gpointer key, gpointer value, gpointer user_data)
+{
        return g_strrstr((char *)key, "demux") != NULL;
 }