Name: capi-media-controller
Summary: A media controller library in Tizen Native API
-Version: 0.2.6
+Version: 0.2.7
Release: 1
Group: Multimedia/API
License: Apache-2.0
%setup -q
%build
-export CFLAGS+=" -Wextra -Wno-array-bounds"
+export CFLAGS+=" -Wextra -Wno-array-bounds -Wno-cast-function-type"
export CFLAGS+=" -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow"
export CFLAGS+=" -Wwrite-strings -Wswitch-default"
export CFLAGS+=" -DGST_EXT_TIME_ANALYSIS -include stdint.h"
GList *connected_apps;
} mc_service_t;
-gboolean mc_svc_thread(void *data);
+gpointer mc_svc_thread(void *data);
GMainLoop *mc_svc_get_main_loop(void);
int mc_svc_get_connection_cnt(void);
return TRUE;
}
-gboolean mc_svc_thread(void *data)
+gpointer mc_svc_thread(gpointer data)
{
int sockfd = -1;
int ret = MEDIA_CONTROLLER_ERROR_NONE;
}
}
-gboolean input(GIOChannel *channel)
+gboolean input(GIOChannel *channel, GIOCondition cond, gpointer data)
{
gchar buf[MAX_STRING_LEN];
gsize read;
GError *error = NULL;
+ GIOStatus status = G_IO_STATUS_NORMAL;
- g_io_channel_read_chars(channel, buf, MAX_STRING_LEN, &read, &error);
+ status = g_io_channel_read_chars(channel, buf, MAX_STRING_LEN, &read, &error);
+ if (status != G_IO_STATUS_NORMAL) {
+ g_print("g_io_channel_read_chars failed : %s", error ? error->message : "none");
+ if (error) g_error_free(error);
+ return FALSE;
+ }
buf[read] = '\0';
g_strstrip(buf);
}
g_print("recieved request_id:[%s] command:[%s] from [%s]\n", request_id, command, client_name);
- g_print("recieved bundle:[%s] from [%s]\n", bundle_data, client_name);
+ if (bundle_data)
+ g_print("recieved bundle:[%s] from [%s]\n", bundle_data, client_name);
+ else
+ g_print("recieved bundle:No bundle from [%s]\n", client_name);
bundle *bundle_reply = bundle_create();
bundle_add_str(bundle_reply, "key1", "result1_2");
}
}
-static gboolean __input(GIOChannel *channel)
+static gboolean __input(GIOChannel *channel, GIOCondition cond, gpointer data)
{
gchar buf[MAX_STRING_LEN];
gsize read;
GError *error = NULL;
+ GIOStatus status = G_IO_STATUS_NORMAL;
- g_io_channel_read_chars(channel, buf, MAX_STRING_LEN, &read, &error);
+ status = g_io_channel_read_chars(channel, buf, MAX_STRING_LEN, &read, &error);
+ if (status != G_IO_STATUS_NORMAL) {
+ g_print("g_io_channel_read_chars failed : %s", error ? error->message : "none");
+ if (error) g_error_free(error);
+ return FALSE;
+ }
buf[read] = '\0';
g_strstrip(buf);