summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/gstreamer
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2009-02-25 10:44:13 +0000
committerCedric BAIL <cedric.bail@free.fr>2009-02-25 10:44:13 +0000
commite6065f6c1ce9e00d8ba8671f85093456be8170fa (patch)
tree3dd9e3328981ba10c0e38be75d137534fc43aab0 /legacy/emotion/src/modules/gstreamer
parent725d8b4bfb4240416c9f861f92109d8cd8849058 (diff)
* emotion/src/modules/gstreamer: Move from Ecore_List to Eina_List.
SVN revision: 39195
Diffstat (limited to 'legacy/emotion/src/modules/gstreamer')
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c71
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h4
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c42
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c8
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c21
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_file.c2
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c2
7 files changed, 86 insertions, 64 deletions
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
index 1516bd357f..888b202c92 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
@@ -4,6 +4,8 @@
4#include <unistd.h> 4#include <unistd.h>
5#include <fcntl.h> 5#include <fcntl.h>
6 6
7#include <Eina.h>
8
7#include "Emotion.h" 9#include "Emotion.h"
8#include "emotion_private.h" 10#include "emotion_private.h"
9#include "emotion_gstreamer.h" 11#include "emotion_gstreamer.h"
@@ -238,6 +240,8 @@ em_init(Evas_Object *obj,
238 Emotion_Module_Options *opt) 240 Emotion_Module_Options *opt)
239{ 241{
240 Emotion_Gstreamer_Video *ev; 242 Emotion_Gstreamer_Video *ev;
243 Emotion_Audio_Sink *asink;
244 Emotion_Video_Sink *vsink;
241 GError *error; 245 GError *error;
242 int fds[2]; 246 int fds[2];
243 247
@@ -255,14 +259,10 @@ em_init(Evas_Object *obj,
255 goto failure_gstreamer; 259 goto failure_gstreamer;
256 260
257 /* We allocate the sinks lists */ 261 /* We allocate the sinks lists */
258 ev->video_sinks = ecore_list_new();
259 if (!ev->video_sinks) 262 if (!ev->video_sinks)
260 goto failure_video_sinks; 263 goto failure_video_sinks;
261 ecore_list_free_cb_set(ev->video_sinks, ECORE_FREE_CB(free));
262 ev->audio_sinks = ecore_list_new();
263 if (!ev->audio_sinks) 264 if (!ev->audio_sinks)
264 goto failure_audio_sinks; 265 goto failure_audio_sinks;
265 ecore_list_free_cb_set(ev->audio_sinks, ECORE_FREE_CB(free));
266 266
267 *emotion_video = ev; 267 *emotion_video = ev;
268 268
@@ -281,9 +281,11 @@ em_init(Evas_Object *obj,
281 return 1; 281 return 1;
282 282
283failure_pipe: 283failure_pipe:
284 ecore_list_destroy(ev->audio_sinks); 284 EINA_LIST_FREE(ev->audio_sinks, asink)
285 free(asink);
285failure_audio_sinks: 286failure_audio_sinks:
286 ecore_list_destroy(ev->video_sinks); 287 EINA_LIST_FREE(ev->video_sinks, vsink)
288 free(vsink);
287failure_video_sinks: 289failure_video_sinks:
288failure_gstreamer: 290failure_gstreamer:
289 free(ev); 291 free(ev);
@@ -295,6 +297,8 @@ static int
295em_shutdown(void *video) 297em_shutdown(void *video)
296{ 298{
297 Emotion_Gstreamer_Video *ev; 299 Emotion_Gstreamer_Video *ev;
300 Emotion_Audio_Sink *asink;
301 Emotion_Video_Sink *vsink;
298 302
299 ev = (Emotion_Gstreamer_Video *)video; 303 ev = (Emotion_Gstreamer_Video *)video;
300 if (!ev) 304 if (!ev)
@@ -305,8 +309,10 @@ em_shutdown(void *video)
305 /* FIXME: and the evas object ? */ 309 /* FIXME: and the evas object ? */
306 if (ev->obj_data) free(ev->obj_data); 310 if (ev->obj_data) free(ev->obj_data);
307 311
308 ecore_list_destroy(ev->video_sinks); 312 EINA_LIST_FREE(ev->audio_sinks, asink)
309 ecore_list_destroy(ev->audio_sinks); 313 free(asink);
314 EINA_LIST_FREE(ev->video_sinks, vsink)
315 free(vsink);
310 316
311 free(ev); 317 free(ev);
312 318
@@ -426,7 +432,7 @@ em_file_open(const char *file,
426 Emotion_Video_Sink *vsink; 432 Emotion_Video_Sink *vsink;
427 Emotion_Audio_Sink *asink; 433 Emotion_Audio_Sink *asink;
428 434
429 vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks); 435 vsink = (Emotion_Video_Sink *)eina_list_data_get(ev->video_sinks);
430 if (vsink) 436 if (vsink)
431 { 437 {
432 fprintf(stderr, "video : \n"); 438 fprintf(stderr, "video : \n");
@@ -437,7 +443,7 @@ em_file_open(const char *file,
437 GST_TIME_ARGS((guint64)(vsink->length_time * GST_SECOND))); 443 GST_TIME_ARGS((guint64)(vsink->length_time * GST_SECOND)));
438 } 444 }
439 445
440 asink = (Emotion_Audio_Sink *)ecore_list_first_goto(ev->audio_sinks); 446 asink = (Emotion_Audio_Sink *)eina_list_data_get(ev->audio_sinks);
441 if (asink) 447 if (asink)
442 { 448 {
443 fprintf(stderr, "audio : \n"); 449 fprintf(stderr, "audio : \n");
@@ -463,14 +469,18 @@ static void
463em_file_close(void *video) 469em_file_close(void *video)
464{ 470{
465 Emotion_Gstreamer_Video *ev; 471 Emotion_Gstreamer_Video *ev;
472 Emotion_Audio_Sink *asink;
473 Emotion_Video_Sink *vsink;
466 474
467 ev = (Emotion_Gstreamer_Video *)video; 475 ev = (Emotion_Gstreamer_Video *)video;
468 if (!ev) 476 if (!ev)
469 return; 477 return;
470 478
471 /* we clear the sink lists */ 479 /* we clear the sink lists */
472 ecore_list_clear(ev->video_sinks); 480 EINA_LIST_FREE(ev->audio_sinks, asink)
473 ecore_list_clear(ev->audio_sinks); 481 free(asink);
482 EINA_LIST_FREE(ev->video_sinks, vsink)
483 free(vsink);
474 484
475 /* shutdown eos */ 485 /* shutdown eos */
476 if (ev->eos_timer) 486 if (ev->eos_timer)
@@ -541,7 +551,7 @@ em_size_get(void *video,
541 551
542 ev = (Emotion_Gstreamer_Video *)video; 552 ev = (Emotion_Gstreamer_Video *)video;
543 553
544 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 554 vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
545 if (vsink) 555 if (vsink)
546 { 556 {
547 if (width) *width = vsink->width; 557 if (width) *width = vsink->width;
@@ -564,8 +574,8 @@ em_pos_set(void *video,
564 574
565 ev = (Emotion_Gstreamer_Video *)video; 575 ev = (Emotion_Gstreamer_Video *)video;
566 576
567 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 577 vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
568 asink = (Emotion_Audio_Sink *)ecore_list_index_goto(ev->video_sinks, ev->audio_sink_nbr); 578 asink = (Emotion_Audio_Sink *)eina_list_nth(ev->video_sinks, ev->audio_sink_nbr);
569 579
570 if (vsink) 580 if (vsink)
571 { 581 {
@@ -593,6 +603,7 @@ em_len_get(void *video)
593 Emotion_Gstreamer_Video *ev; 603 Emotion_Gstreamer_Video *ev;
594 Emotion_Video_Sink *vsink; 604 Emotion_Video_Sink *vsink;
595 Emotion_Audio_Sink *asink; 605 Emotion_Audio_Sink *asink;
606 Eina_List *l;
596 GstFormat fmt; 607 GstFormat fmt;
597 gint64 val; 608 gint64 val;
598 gboolean ret; 609 gboolean ret;
@@ -616,13 +627,13 @@ em_len_get(void *video)
616 return val / 1000000000.0; 627 return val / 1000000000.0;
617 628
618 fallback: 629 fallback:
619 ecore_list_first_goto(ev->audio_sinks); 630 fputs("Gstreamer reported no length, try existing sinks...\n", stderr);
620 while ((asink = ecore_list_next(ev->audio_sinks)) != NULL) 631
632 EINA_LIST_FOREACH(ev->audio_sinks, l, asink)
621 if (asink->length_time >= 0) 633 if (asink->length_time >= 0)
622 return asink->length_time; 634 return asink->length_time;
623 635
624 ecore_list_first_goto(ev->video_sinks); 636 EINA_LIST_FOREACH(ev->video_sinks, l, vsink)
625 while ((vsink = ecore_list_next(ev->video_sinks)) != NULL)
626 if (vsink->length_time >= 0) 637 if (vsink->length_time >= 0)
627 return vsink->length_time; 638 return vsink->length_time;
628 639
@@ -637,7 +648,7 @@ em_fps_num_get(void *video)
637 648
638 ev = (Emotion_Gstreamer_Video *)video; 649 ev = (Emotion_Gstreamer_Video *)video;
639 650
640 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 651 vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
641 if (vsink) 652 if (vsink)
642 return vsink->fps_num; 653 return vsink->fps_num;
643 654
@@ -652,7 +663,7 @@ em_fps_den_get(void *video)
652 663
653 ev = (Emotion_Gstreamer_Video *)video; 664 ev = (Emotion_Gstreamer_Video *)video;
654 665
655 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 666 vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
656 if (vsink) 667 if (vsink)
657 return vsink->fps_den; 668 return vsink->fps_den;
658 669
@@ -667,7 +678,7 @@ em_fps_get(void *video)
667 678
668 ev = (Emotion_Gstreamer_Video *)video; 679 ev = (Emotion_Gstreamer_Video *)video;
669 680
670 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 681 vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
671 if (vsink) 682 if (vsink)
672 return (double)vsink->fps_num / (double)vsink->fps_den; 683 return (double)vsink->fps_num / (double)vsink->fps_den;
673 684
@@ -759,7 +770,7 @@ em_video_handled(void *video)
759 770
760 ev = (Emotion_Gstreamer_Video *)video; 771 ev = (Emotion_Gstreamer_Video *)video;
761 772
762 if (ecore_list_empty_is(ev->video_sinks)) 773 if (!eina_list_count(ev->video_sinks))
763 return 0; 774 return 0;
764 775
765 return 1; 776 return 1;
@@ -772,7 +783,7 @@ em_audio_handled(void *video)
772 783
773 ev = (Emotion_Gstreamer_Video *)video; 784 ev = (Emotion_Gstreamer_Video *)video;
774 785
775 if (ecore_list_empty_is(ev->audio_sinks)) 786 if (!eina_list_count(ev->audio_sinks))
776 return 0; 787 return 0;
777 788
778 return 1; 789 return 1;
@@ -804,7 +815,7 @@ em_format_get(void *video)
804 815
805 ev = (Emotion_Gstreamer_Video *)video; 816 ev = (Emotion_Gstreamer_Video *)video;
806 817
807 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 818 vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
808 if (vsink) 819 if (vsink)
809 { 820 {
810 switch (vsink->fourcc) 821 switch (vsink->fourcc)
@@ -832,7 +843,7 @@ em_video_data_size_get(void *video, int *w, int *h)
832 843
833 ev = (Emotion_Gstreamer_Video *)video; 844 ev = (Emotion_Gstreamer_Video *)video;
834 845
835 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 846 vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
836 if (vsink) 847 if (vsink)
837 { 848 {
838 *w = vsink->width; 849 *w = vsink->width;
@@ -938,7 +949,7 @@ em_video_channel_count(void *video)
938 949
939 ev = (Emotion_Gstreamer_Video *)video; 950 ev = (Emotion_Gstreamer_Video *)video;
940 951
941 return ecore_list_count(ev->video_sinks); 952 return eina_list_count(ev->video_sinks);
942} 953}
943 954
944static void 955static void
@@ -1004,7 +1015,7 @@ em_audio_channel_count(void *video)
1004 1015
1005 ev = (Emotion_Gstreamer_Video *)video; 1016 ev = (Emotion_Gstreamer_Video *)video;
1006 1017
1007 return ecore_list_count(ev->audio_sinks); 1018 return eina_list_count(ev->audio_sinks);
1008} 1019}
1009 1020
1010static void 1021static void
@@ -1230,7 +1241,7 @@ static const char *
1230em_meta_get(void *video, int meta) 1241em_meta_get(void *video, int meta)
1231{ 1242{
1232 Emotion_Gstreamer_Video *ev; 1243 Emotion_Gstreamer_Video *ev;
1233 const char *str; 1244 const char *str = NULL;
1234 1245
1235 ev = (Emotion_Gstreamer_Video *)video; 1246 ev = (Emotion_Gstreamer_Video *)video;
1236 1247
@@ -1432,7 +1443,7 @@ _em_buffer_read(void *data, void *buf, unsigned int nbyte)
1432 ev = (Emotion_Gstreamer_Video *)data; 1443 ev = (Emotion_Gstreamer_Video *)data;
1433 buffer = *((GstBuffer **)buf); 1444 buffer = *((GstBuffer **)buf);
1434 _emotion_frame_new(ev->obj); 1445 _emotion_frame_new(ev->obj);
1435 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 1446 vsink = (Emotion_Video_Sink *)eina_list_nth(ev->video_sinks, ev->video_sink_nbr);
1436 if (vsink) _emotion_video_pos_update(ev->obj, ev->position, vsink->length_time); 1447 if (vsink) _emotion_video_pos_update(ev->obj, ev->position, vsink->length_time);
1437} 1448}
1438 1449
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h
index 39845a2de4..35814307df 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h
@@ -66,8 +66,8 @@ struct _Emotion_Gstreamer_Video
66 Ecore_Timer *eos_timer; 66 Ecore_Timer *eos_timer;
67 67
68 /* Sinks */ 68 /* Sinks */
69 Ecore_List *video_sinks; 69 Eina_List *video_sinks;
70 Ecore_List *audio_sinks; 70 Eina_List *audio_sinks;
71 71
72 int video_sink_nbr; 72 int video_sink_nbr;
73 int audio_sink_nbr; 73 int audio_sink_nbr;
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c
index 5fcd742043..e8f5bbf9d7 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline.c
@@ -58,7 +58,7 @@ cb_handoff(GstElement *fakesrc,
58 else 58 else
59 { 59 {
60 Emotion_Audio_Sink *asink; 60 Emotion_Audio_Sink *asink;
61 asink = (Emotion_Audio_Sink *)ecore_list_index_goto(ev->audio_sinks, ev->audio_sink_nbr); 61 asink = (Emotion_Audio_Sink *)eina_list_nth(ev->audio_sinks, ev->audio_sink_nbr);
62 _emotion_video_pos_update(ev->obj, ev->position, asink->length_time); 62 _emotion_video_pos_update(ev->obj, ev->position, asink->length_time);
63 } 63 }
64 64
@@ -82,6 +82,7 @@ file_new_decoded_pad_cb(GstElement *decodebin,
82 Emotion_Gstreamer_Video *ev; 82 Emotion_Gstreamer_Video *ev;
83 GstCaps *caps; 83 GstCaps *caps;
84 gchar *str; 84 gchar *str;
85 unsigned int index;
85 86
86 ev = (Emotion_Gstreamer_Video *)user_data; 87 ev = (Emotion_Gstreamer_Video *)user_data;
87 caps = gst_pad_get_caps(new_pad); 88 caps = gst_pad_get_caps(new_pad);
@@ -95,7 +96,8 @@ file_new_decoded_pad_cb(GstElement *decodebin,
95 96
96 vsink = (Emotion_Video_Sink *)calloc(1, sizeof(Emotion_Video_Sink)); 97 vsink = (Emotion_Video_Sink *)calloc(1, sizeof(Emotion_Video_Sink));
97 if (!vsink) return; 98 if (!vsink) return;
98 if (!ecore_list_append(ev->video_sinks, vsink)) 99 ev->video_sinks = eina_list_append(ev->video_sinks, vsink);
100 if (!eina_list_data_find(ev->video_sinks, vsink))
99 { 101 {
100 free(vsink); 102 free(vsink);
101 return; 103 return;
@@ -108,7 +110,7 @@ file_new_decoded_pad_cb(GstElement *decodebin,
108 videopad = gst_element_get_pad(queue, "sink"); 110 videopad = gst_element_get_pad(queue, "sink");
109 gst_pad_link(new_pad, videopad); 111 gst_pad_link(new_pad, videopad);
110 gst_object_unref(videopad); 112 gst_object_unref(videopad);
111 if (ecore_list_count(ev->video_sinks) == 1) 113 if (eina_list_count(ev->video_sinks) == 1)
112 { 114 {
113 ev->ratio = (double)vsink->width / (double)vsink->height; 115 ev->ratio = (double)vsink->width / (double)vsink->height;
114 } 116 }
@@ -123,13 +125,16 @@ file_new_decoded_pad_cb(GstElement *decodebin,
123 125
124 asink = (Emotion_Audio_Sink *)calloc(1, sizeof(Emotion_Audio_Sink)); 126 asink = (Emotion_Audio_Sink *)calloc(1, sizeof(Emotion_Audio_Sink));
125 if (!asink) return; 127 if (!asink) return;
126 if (!ecore_list_append(ev->audio_sinks, asink)) 128 ev->audio_sinks = eina_list_append(ev->audio_sinks, asink);
129 if (!eina_list_data_find(ev->audio_sinks, asink))
127 { 130 {
128 free(asink); 131 free(asink);
129 return; 132 return;
130 } 133 }
131 134
132 asink->sink = emotion_audio_sink_create(ev, ecore_list_index(ev->audio_sinks)); 135 for (index = 0; asink != eina_list_nth(ev->audio_sinks, index); index++)
136 ;
137 asink->sink = emotion_audio_sink_create(ev, index);
133 gst_bin_add(GST_BIN(ev->pipeline), asink->sink); 138 gst_bin_add(GST_BIN(ev->pipeline), asink->sink);
134 audiopad = gst_element_get_pad(asink->sink, "sink"); 139 audiopad = gst_element_get_pad(asink->sink, "sink");
135 gst_pad_link(new_pad, audiopad); 140 gst_pad_link(new_pad, audiopad);
@@ -149,7 +154,8 @@ emotion_video_sink_new(Emotion_Gstreamer_Video *ev)
149 vsink = (Emotion_Video_Sink *)calloc(1, sizeof(Emotion_Video_Sink)); 154 vsink = (Emotion_Video_Sink *)calloc(1, sizeof(Emotion_Video_Sink));
150 if (!vsink) return NULL; 155 if (!vsink) return NULL;
151 156
152 if (!ecore_list_append(ev->video_sinks, vsink)) 157 ev->video_sinks = eina_list_append(ev->video_sinks, vsink);
158 if (!eina_list_data_find(ev->video_sinks, vsink))
153 { 159 {
154 free(vsink); 160 free(vsink);
155 return NULL; 161 return NULL;
@@ -162,11 +168,8 @@ emotion_video_sink_free(Emotion_Gstreamer_Video *ev, Emotion_Video_Sink *vsink)
162{ 168{
163 if (!ev || !vsink) return; 169 if (!ev || !vsink) return;
164 170
165 if (ecore_list_goto(ev->video_sinks, vsink)) 171 ev->video_sinks = eina_list_remove(ev->video_sinks, vsink);
166 {
167 ecore_list_remove(ev->video_sinks);
168 free(vsink); 172 free(vsink);
169 }
170} 173}
171 174
172Emotion_Video_Sink * 175Emotion_Video_Sink *
@@ -470,10 +473,12 @@ void
470emotion_streams_sinks_get(Emotion_Gstreamer_Video *ev, GstElement *decoder) 473emotion_streams_sinks_get(Emotion_Gstreamer_Video *ev, GstElement *decoder)
471{ 474{
472 GstIterator *it; 475 GstIterator *it;
476 Eina_List *alist;
477 Eina_List *vlist;
473 gpointer data; 478 gpointer data;
474 479
475 ecore_list_first_goto(ev->video_sinks); 480 alist = ev->audio_sinks;
476 ecore_list_first_goto(ev->audio_sinks); 481 vlist = ev->video_sinks;
477 482
478 it = gst_element_iterate_src_pads(decoder); 483 it = gst_element_iterate_src_pads(decoder);
479 while (gst_iterator_next(it, &data) == GST_ITERATOR_OK) 484 while (gst_iterator_next(it, &data) == GST_ITERATOR_OK)
@@ -493,7 +498,8 @@ emotion_streams_sinks_get(Emotion_Gstreamer_Video *ev, GstElement *decoder)
493 { 498 {
494 Emotion_Video_Sink *vsink; 499 Emotion_Video_Sink *vsink;
495 500
496 vsink = (Emotion_Video_Sink *)ecore_list_next(ev->video_sinks); 501 vsink = (Emotion_Video_Sink *)eina_list_data_get(vlist);
502 vlist = eina_list_next(vlist);
497 503
498 emotion_video_sink_fill(vsink, pad, caps); 504 emotion_video_sink_fill(vsink, pad, caps);
499 } 505 }
@@ -501,15 +507,17 @@ emotion_streams_sinks_get(Emotion_Gstreamer_Video *ev, GstElement *decoder)
501 else if (g_str_has_prefix(str, "audio/")) 507 else if (g_str_has_prefix(str, "audio/"))
502 { 508 {
503 Emotion_Audio_Sink *asink; 509 Emotion_Audio_Sink *asink;
504 gint index; 510 unsigned int index;
505 511
506 asink = (Emotion_Audio_Sink *)ecore_list_next(ev->audio_sinks); 512 asink = (Emotion_Audio_Sink *)eina_list_data_get(alist);
513 alist = eina_list_next(alist);
507 514
508 emotion_audio_sink_fill(asink, pad, caps); 515 emotion_audio_sink_fill(asink, pad, caps);
509 516
510 index = ecore_list_index(ev->audio_sinks); 517 for (index = 0; asink != eina_list_nth(ev->audio_sinks, index) ; index++)
518 ;
511 519
512 if (ecore_list_count(ev->video_sinks) == 0) 520 if (eina_list_count(ev->video_sinks) == 0)
513 { 521 {
514 if (index == 1) 522 if (index == 1)
515 { 523 {
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c
index 5083f29ff9..655252a1a2 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_cdda.c
@@ -107,7 +107,8 @@ _emotion_audio_sink_new(Emotion_Gstreamer_Video *ev)
107 asink = (Emotion_Audio_Sink *)malloc(sizeof(Emotion_Audio_Sink)); 107 asink = (Emotion_Audio_Sink *)malloc(sizeof(Emotion_Audio_Sink));
108 if (!asink) return NULL; 108 if (!asink) return NULL;
109 109
110 if (!ecore_list_append(ev->audio_sinks, asink)) 110 ev->audio_sinks = eina_list_append(ev->audio_sinks, asink);
111 if (!eina_list_data_find(ev->audio_sinks, asink))
111 { 112 {
112 free(asink); 113 free(asink);
113 return NULL; 114 return NULL;
@@ -120,9 +121,6 @@ _emotion_audio_sink_free(Emotion_Gstreamer_Video *ev, Emotion_Audio_Sink *asink)
120{ 121{
121 if (!ev || !asink) return; 122 if (!ev || !asink) return;
122 123
123 if (ecore_list_goto(ev->audio_sinks, asink)) 124 ev->audio_sinks = eina_list_remove(ev->audio_sinks, asink);
124 {
125 ecore_list_remove(ev->audio_sinks);
126 free(asink); 125 free(asink);
127 }
128} 126}
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c
index 2292707e50..ea8a6f26f1 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_dvd.c
@@ -21,6 +21,8 @@ emotion_pipeline_dvd_build(void *video, const char *device)
21 GstElement *dvdreadsrc; 21 GstElement *dvdreadsrc;
22 GstElement *dvddemux; 22 GstElement *dvddemux;
23 Emotion_Gstreamer_Video *ev; 23 Emotion_Gstreamer_Video *ev;
24 Eina_List *alist;
25 Eina_List *vlist;
24 26
25 ev = (Emotion_Gstreamer_Video *)video; 27 ev = (Emotion_Gstreamer_Video *)video;
26 if (!ev) return 0; 28 if (!ev) return 0;
@@ -53,8 +55,8 @@ emotion_pipeline_dvd_build(void *video, const char *device)
53 no_more_pads = 0; 55 no_more_pads = 0;
54 56
55 /* We get the informations of streams */ 57 /* We get the informations of streams */
56 ecore_list_first_goto(ev->video_sinks); 58 alist = ev->audio_sinks;
57 ecore_list_first_goto(ev->audio_sinks); 59 vlist = ev->video_sinks;
58 60
59 { 61 {
60 GstIterator *it; 62 GstIterator *it;
@@ -79,7 +81,8 @@ emotion_pipeline_dvd_build(void *video, const char *device)
79 GstPad *sink_pad; 81 GstPad *sink_pad;
80 GstCaps *sink_caps; 82 GstCaps *sink_caps;
81 83
82 vsink = (Emotion_Video_Sink *)ecore_list_next(ev->video_sinks); 84 vsink = (Emotion_Video_Sink *)eina_list_data_get(vlist);
85 vlist = eina_list_next(vlist);
83 sink_pad = gst_element_get_pad(gst_bin_get_by_name(GST_BIN(ev->pipeline), "mpeg2dec"), "src"); 86 sink_pad = gst_element_get_pad(gst_bin_get_by_name(GST_BIN(ev->pipeline), "mpeg2dec"), "src");
84 sink_caps = gst_pad_get_caps(sink_pad); 87 sink_caps = gst_pad_get_caps(sink_pad);
85 str = gst_caps_to_string(sink_caps); 88 str = gst_caps_to_string(sink_caps);
@@ -97,7 +100,7 @@ emotion_pipeline_dvd_build(void *video, const char *device)
97 GstPad *sink_pad; 100 GstPad *sink_pad;
98 GstCaps *sink_caps; 101 GstCaps *sink_caps;
99 102
100 asink = (Emotion_Audio_Sink *)ecore_list_next(ev->audio_sinks); 103 asink = (Emotion_Audio_Sink *)eina_list_data_get(alist);
101 sink_pad = gst_element_get_pad(gst_bin_get_by_name(GST_BIN(ev->pipeline), "a52dec"), "src"); 104 sink_pad = gst_element_get_pad(gst_bin_get_by_name(GST_BIN(ev->pipeline), "a52dec"), "src");
102 sink_caps = gst_pad_get_caps(sink_pad); 105 sink_caps = gst_pad_get_caps(sink_pad);
103 106
@@ -115,7 +118,7 @@ emotion_pipeline_dvd_build(void *video, const char *device)
115 { 118 {
116 Emotion_Video_Sink *vsink; 119 Emotion_Video_Sink *vsink;
117 120
118 vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks); 121 vsink = (Emotion_Video_Sink *)eina_list_data_get(ev->video_sinks);
119 if (vsink && vsink->sink) 122 if (vsink && vsink->sink)
120 { 123 {
121 g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL); 124 g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL);
@@ -161,7 +164,8 @@ dvd_pad_added_cb(GstElement *dvddemuxer,
161 164
162 vsink = (Emotion_Video_Sink *)malloc(sizeof(Emotion_Video_Sink)); 165 vsink = (Emotion_Video_Sink *)malloc(sizeof(Emotion_Video_Sink));
163 if (!vsink) return; 166 if (!vsink) return;
164 if (!ecore_list_append(ev->video_sinks, vsink)) 167 ev->video_sinks = eina_list_append(ev->video_sinks, vsink);
168 if (!eina_list_data_find(ev->video_sinks, vsink))
165 { 169 {
166 free(vsink); 170 free(vsink);
167 return; 171 return;
@@ -176,7 +180,7 @@ dvd_pad_added_cb(GstElement *dvddemuxer,
176 videopad = gst_element_get_pad(queue, "sink"); 180 videopad = gst_element_get_pad(queue, "sink");
177 gst_pad_link(GST_PAD(new_pad), videopad); 181 gst_pad_link(GST_PAD(new_pad), videopad);
178 gst_object_unref(videopad); 182 gst_object_unref(videopad);
179 if (ecore_list_count(ev->video_sinks) == 1) 183 if (eina_list_count(ev->video_sinks) == 1)
180 { 184 {
181 ev->ratio = (double)vsink->width / (double)vsink->height; 185 ev->ratio = (double)vsink->width / (double)vsink->height;
182 } 186 }
@@ -198,7 +202,8 @@ dvd_pad_added_cb(GstElement *dvddemuxer,
198 202
199 asink = (Emotion_Audio_Sink *)malloc(sizeof(Emotion_Audio_Sink)); 203 asink = (Emotion_Audio_Sink *)malloc(sizeof(Emotion_Audio_Sink));
200 if (!asink) return; 204 if (!asink) return;
201 if (!ecore_list_append(ev->audio_sinks, asink)) 205 ev->audio_sinks = eina_list_append(ev->audio_sinks, asink);
206 if (!eina_list_data_find(ev->audio_sinks, asink))
202 { 207 {
203 free(asink); 208 free(asink);
204 return; 209 return;
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_file.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_file.c
index 393855d823..4c905750b8 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_file.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_file.c
@@ -39,7 +39,7 @@ emotion_pipeline_file_build(void *video, const char *file)
39 { 39 {
40 Emotion_Video_Sink *vsink; 40 Emotion_Video_Sink *vsink;
41 41
42 vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks); 42 vsink = (Emotion_Video_Sink *)eina_list_data_get(ev->video_sinks);
43 if (vsink && vsink->sink) 43 if (vsink && vsink->sink)
44 { 44 {
45 g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL); 45 g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL);
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c
index d6a1c00609..4f3bf6e70a 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer_pipeline_uri.c
@@ -41,7 +41,7 @@ emotion_pipeline_uri_build(void *video, const char *uri)
41 { 41 {
42 Emotion_Video_Sink *vsink; 42 Emotion_Video_Sink *vsink;
43 43
44 vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks); 44 vsink = (Emotion_Video_Sink *)eina_list_data_get(ev->video_sinks);
45 if (vsink && vsink->sink) 45 if (vsink && vsink->sink)
46 { 46 {
47 g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL); 47 g_object_set(G_OBJECT(vsink->sink), "sync", TRUE, NULL);