summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/generic/emotion_generic.c
diff options
context:
space:
mode:
authorRafael Antognolli <antognolli@gmail.com>2011-10-03 18:39:20 +0000
committerRafael Antognolli <antognolli@gmail.com>2011-10-03 18:39:20 +0000
commitb437af7bd519d62d8fc4eb4fc403132099189aaa (patch)
treee2cf4488987d4c41ab50cf83abe3ad043fb97dac /legacy/emotion/src/modules/generic/emotion_generic.c
parent923afe9503b97da9a1580cc3244238247f890bfe (diff)
emotion/generic: Remove warnings.
Remove unused functions, variables and fix a "return" on a non-void returning function. SVN revision: 63780
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/modules/generic/emotion_generic.c80
1 files changed, 1 insertions, 79 deletions
diff --git a/legacy/emotion/src/modules/generic/emotion_generic.c b/legacy/emotion/src/modules/generic/emotion_generic.c
index 6f497d470a..364ff8ce03 100644
--- a/legacy/emotion/src/modules/generic/emotion_generic.c
+++ b/legacy/emotion/src/modules/generic/emotion_generic.c
@@ -238,42 +238,6 @@ _player_ready(Emotion_Generic_Video *ev)
238 _file_open(ev); 238 _file_open(ev);
239} 239}
240 240
241static int
242_em_read_safe(int fd, void *buf, ssize_t size)
243{
244 ssize_t todo;
245 char *p;
246
247 todo = size;
248 p = buf;
249
250 while (todo > 0)
251 {
252 ssize_t r;
253
254 r = read(fd, p, todo);
255 if (r > 0)
256 {
257 todo -= r;
258 p += r;
259 }
260 else if (r == 0)
261 return 0;
262 else
263 {
264 if (errno == EINTR || errno == EAGAIN)
265 return size - todo;
266 else
267 {
268 ERR("could not read from fd %d: %s", fd, strerror(errno));
269 return -1;
270 }
271 }
272 }
273
274 return size;
275}
276
277static Eina_Bool 241static Eina_Bool
278_player_cmd_param_read(Emotion_Generic_Video *ev, void *param, size_t size) 242_player_cmd_param_read(Emotion_Generic_Video *ev, void *param, size_t size)
279{ 243{
@@ -321,38 +285,6 @@ _player_cmd_param_read(Emotion_Generic_Video *ev, void *param, size_t size)
321 return EINA_FALSE; 285 return EINA_FALSE;
322} 286}
323 287
324static Eina_Bool
325_player_int_read(Emotion_Generic_Video *ev, int *i)
326{
327 int n;
328 n = _em_read_safe(ev->fd_read, i, sizeof(*i));
329 if (n <= 0)
330 {
331 ERR("could not read int from fd_read %d\n", ev->fd_read);
332 return EINA_FALSE;
333 }
334
335 return EINA_TRUE;
336}
337
338static Eina_Bool
339_player_str_read(Emotion_Generic_Video *ev, char *str, int *len)
340{
341 int n;
342
343 if (!_player_int_read(ev, len))
344 return EINA_FALSE;
345
346 n = _em_read_safe(ev->fd_read, str, *len);
347 if (n <= 0)
348 {
349 ERR("could not read string from fd_read %d\n", ev->fd_read);
350 return EINA_FALSE;
351 }
352
353 return EINA_TRUE;
354}
355
356static void 288static void
357_player_frame_resize(Emotion_Generic_Video *ev) 289_player_frame_resize(Emotion_Generic_Video *ev)
358{ 290{
@@ -498,15 +430,6 @@ _player_spu_tracks_info(Emotion_Generic_Video *ev)
498} 430}
499 431
500static void 432static void
501_player_helper_str_read(Emotion_Generic_Video *ev, const char **pstr)
502{
503 int len;
504 char buf[PATH_MAX];
505 if (_player_str_read(ev, buf, &len))
506 *pstr = eina_stringshare_add_length(buf, len);
507}
508
509static void
510_player_meta_info_free(Emotion_Generic_Video *ev) 433_player_meta_info_free(Emotion_Generic_Video *ev)
511{ 434{
512 eina_stringshare_replace(&ev->meta.title, NULL); 435 eina_stringshare_replace(&ev->meta.title, NULL);
@@ -708,7 +631,6 @@ static void
708_player_cmd_track_info(Emotion_Generic_Video *ev) 631_player_cmd_track_info(Emotion_Generic_Video *ev)
709{ 632{
710 int param; 633 int param;
711 Eina_Bool r;
712 int i; 634 int i;
713 635
714 if (ev->cmd.num_params == 0) 636 if (ev->cmd.num_params == 0)
@@ -1319,7 +1241,7 @@ em_bgra_data_get(void *data, unsigned char **bgra_data)
1319 Emotion_Generic_Video *ev = data; 1241 Emotion_Generic_Video *ev = data;
1320 1242
1321 if (!ev || !ev->file_ready) 1243 if (!ev || !ev->file_ready)
1322 return; 1244 return 0;
1323 1245
1324 // lock frame here 1246 // lock frame here
1325 sem_wait(&ev->shared->lock); 1247 sem_wait(&ev->shared->lock);