summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
diff options
context:
space:
mode:
authorSebastian Dransfeld <sd@tango.flipp.net>2008-07-06 09:39:08 +0000
committerSebastian Dransfeld <sd@tango.flipp.net>2008-07-06 09:39:08 +0000
commit10bac60aa1e04aa3c6ed0db040241c51e0a41651 (patch)
treef9e7ba44781ba0a75da7cf21c13b3e36ebf25a50 /legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
parenta5b61e7746e760e66923cd93aaf2541e4b8cca20 (diff)
remove trailing whitespace
SVN revision: 35010
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
index 70bbf53a1f..4bb63484eb 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
@@ -345,29 +345,29 @@ em_file_open(const char *file,
345 ev->obj = obj; 345 ev->obj = obj;
346 346
347 /* CD Audio */ 347 /* CD Audio */
348 if (strstr(file, "cdda://")) 348 if (strstr(file, "cdda://"))
349 { 349 {
350 const char *device = NULL; 350 const char *device = NULL;
351 unsigned int track = 1; 351 unsigned int track = 1;
352 352
353 device = file + strlen("cdda://"); 353 device = file + strlen("cdda://");
354 if (device[0] == '/') 354 if (device[0] == '/')
355 { 355 {
356 char *tmp; 356 char *tmp;
357 357
358 if ((tmp = strchr(device, '?')) || (tmp = strchr(device, '#'))) 358 if ((tmp = strchr(device, '?')) || (tmp = strchr(device, '#')))
359 { 359 {
360 sscanf(tmp + 1, "%d", &track); 360 sscanf(tmp + 1, "%d", &track);
361 tmp[0] = '\0'; 361 tmp[0] = '\0';
362 } 362 }
363 } 363 }
364 else 364 else
365 { 365 {
366 device = NULL; 366 device = NULL;
367 sscanf(file, "cdda://%d", &track); 367 sscanf(file, "cdda://%d", &track);
368 } 368 }
369 fprintf(stderr, "[Emotion] [gst] build CD Audio pipeline\n"); 369 fprintf(stderr, "[Emotion] [gst] build CD Audio pipeline\n");
370 if (!(emotion_pipeline_cdda_build(ev, device, track))) 370 if (!(emotion_pipeline_cdda_build(ev, device, track)))
371 { 371 {
372 fprintf(stderr, "[Emotion] [gst] error while building CD Audio pipeline\n"); 372 fprintf(stderr, "[Emotion] [gst] error while building CD Audio pipeline\n");
373 gst_object_unref(ev->pipeline); 373 gst_object_unref(ev->pipeline);
@@ -375,11 +375,11 @@ em_file_open(const char *file,
375 } 375 }
376 } 376 }
377 /* Dvd */ 377 /* Dvd */
378 else if (strstr(file, "dvd://")) 378 else if (strstr(file, "dvd://"))
379 { 379 {
380 380
381 fprintf(stderr, "[Emotion] [gst] build DVD pipeline\n"); 381 fprintf(stderr, "[Emotion] [gst] build DVD pipeline\n");
382 if (!(emotion_pipeline_dvd_build(ev, NULL))) 382 if (!(emotion_pipeline_dvd_build(ev, NULL)))
383 { 383 {
384 fprintf(stderr, "[Emotion] [gst] error while building DVD pipeline\n"); 384 fprintf(stderr, "[Emotion] [gst] error while building DVD pipeline\n");
385 gst_object_unref(ev->pipeline); 385 gst_object_unref(ev->pipeline);
@@ -387,10 +387,10 @@ em_file_open(const char *file,
387 } 387 }
388 } 388 }
389 /* http */ 389 /* http */
390 else if (strstr(file, "http://")) 390 else if (strstr(file, "http://"))
391 { 391 {
392 fprintf(stderr, "[Emotion] [gst] build URI pipeline\n"); 392 fprintf(stderr, "[Emotion] [gst] build URI pipeline\n");
393 if (!(emotion_pipeline_uri_build(ev, file))) 393 if (!(emotion_pipeline_uri_build(ev, file)))
394 { 394 {
395 fprintf(stderr, "[Emotion] [gst] error while building URI pipeline\n"); 395 fprintf(stderr, "[Emotion] [gst] error while building URI pipeline\n");
396 gst_object_unref(ev->pipeline); 396 gst_object_unref(ev->pipeline);
@@ -398,7 +398,7 @@ em_file_open(const char *file,
398 } 398 }
399 } 399 }
400 /* Normal media file */ 400 /* Normal media file */
401 else 401 else
402 { 402 {
403 const char *filename; 403 const char *filename;
404 404
@@ -407,7 +407,7 @@ em_file_open(const char *file,
407 : file; 407 : file;
408 408
409 fprintf(stderr, "[Emotion] [gst] build file pipeline\n"); 409 fprintf(stderr, "[Emotion] [gst] build file pipeline\n");
410 if (!(emotion_pipeline_file_build(ev, filename))) 410 if (!(emotion_pipeline_file_build(ev, filename)))
411 { 411 {
412 fprintf(stderr, "[Emotion] [gst] error while building File pipeline\n"); 412 fprintf(stderr, "[Emotion] [gst] error while building File pipeline\n");
413 gst_object_unref(ev->pipeline); 413 gst_object_unref(ev->pipeline);
@@ -423,7 +423,7 @@ em_file_open(const char *file,
423 Emotion_Audio_Sink *asink; 423 Emotion_Audio_Sink *asink;
424 424
425 vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks); 425 vsink = (Emotion_Video_Sink *)ecore_list_first_goto(ev->video_sinks);
426 if (vsink) 426 if (vsink)
427 { 427 {
428 fprintf(stderr, "video : \n"); 428 fprintf(stderr, "video : \n");
429 fprintf(stderr, " size : %dx%d\n", vsink->width, vsink->height); 429 fprintf(stderr, " size : %dx%d\n", vsink->width, vsink->height);
@@ -434,7 +434,7 @@ em_file_open(const char *file,
434 } 434 }
435 435
436 asink = (Emotion_Audio_Sink *)ecore_list_first_goto(ev->audio_sinks); 436 asink = (Emotion_Audio_Sink *)ecore_list_first_goto(ev->audio_sinks);
437 if (asink) 437 if (asink)
438 { 438 {
439 fprintf(stderr, "audio : \n"); 439 fprintf(stderr, "audio : \n");
440 fprintf(stderr, " chan : %d\n", asink->channels); 440 fprintf(stderr, " chan : %d\n", asink->channels);
@@ -467,7 +467,7 @@ em_file_close(void *video)
467 ecore_list_clear(ev->audio_sinks); 467 ecore_list_clear(ev->audio_sinks);
468 468
469 /* shutdown eos */ 469 /* shutdown eos */
470 if (ev->eos_timer) 470 if (ev->eos_timer)
471 { 471 {
472 ecore_timer_del(ev->eos_timer); 472 ecore_timer_del(ev->eos_timer);
473 ev->eos_timer = NULL; 473 ev->eos_timer = NULL;
@@ -515,7 +515,7 @@ em_stop(void *video)
515 ev = (Emotion_Gstreamer_Video *)video; 515 ev = (Emotion_Gstreamer_Video *)video;
516 516
517 /* shutdown eos */ 517 /* shutdown eos */
518 if (ev->eos_timer) 518 if (ev->eos_timer)
519 { 519 {
520 ecore_timer_del(ev->eos_timer); 520 ecore_timer_del(ev->eos_timer);
521 ev->eos_timer = NULL; 521 ev->eos_timer = NULL;
@@ -536,12 +536,12 @@ em_size_get(void *video,
536 ev = (Emotion_Gstreamer_Video *)video; 536 ev = (Emotion_Gstreamer_Video *)video;
537 537
538 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 538 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr);
539 if (vsink) 539 if (vsink)
540 { 540 {
541 if (width) *width = vsink->width; 541 if (width) *width = vsink->width;
542 if (height) *height = vsink->height; 542 if (height) *height = vsink->height;
543 } 543 }
544 else 544 else
545 { 545 {
546 if (width) *width = 0; 546 if (width) *width = 0;
547 if (height) *height = 0; 547 if (height) *height = 0;
@@ -563,7 +563,7 @@ em_pos_set(void *video,
563 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 563 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr);
564 asink = (Emotion_Audio_Sink *)ecore_list_index_goto(ev->video_sinks, ev->audio_sink_nbr); 564 asink = (Emotion_Audio_Sink *)ecore_list_index_goto(ev->video_sinks, ev->audio_sink_nbr);
565 565
566 if (vsink) 566 if (vsink)
567 { 567 {
568 gst_element_seek(vsink->sink, 1.0, 568 gst_element_seek(vsink->sink, 1.0,
569 GST_FORMAT_TIME, 569 GST_FORMAT_TIME,
@@ -572,7 +572,7 @@ em_pos_set(void *video,
572 (gint64)(pos * (double)GST_SECOND), 572 (gint64)(pos * (double)GST_SECOND),
573 GST_SEEK_TYPE_NONE, -1); 573 GST_SEEK_TYPE_NONE, -1);
574 } 574 }
575 if (asink) 575 if (asink)
576 { 576 {
577 gst_element_seek(asink->sink, 1.0, 577 gst_element_seek(asink->sink, 1.0,
578 GST_FORMAT_TIME, 578 GST_FORMAT_TIME,
@@ -739,9 +739,9 @@ em_format_get(void *video)
739 ev = (Emotion_Gstreamer_Video *)video; 739 ev = (Emotion_Gstreamer_Video *)video;
740 740
741 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 741 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr);
742 if (vsink) 742 if (vsink)
743 { 743 {
744 switch (vsink->fourcc) 744 switch (vsink->fourcc)
745 { 745 {
746 case GST_MAKE_FOURCC('I', '4', '2', '0'): 746 case GST_MAKE_FOURCC('I', '4', '2', '0'):
747 return EMOTION_FORMAT_I420; 747 return EMOTION_FORMAT_I420;
@@ -767,12 +767,12 @@ em_video_data_size_get(void *video, int *w, int *h)
767 ev = (Emotion_Gstreamer_Video *)video; 767 ev = (Emotion_Gstreamer_Video *)video;
768 768
769 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr); 769 vsink = (Emotion_Video_Sink *)ecore_list_index_goto(ev->video_sinks, ev->video_sink_nbr);
770 if (vsink) 770 if (vsink)
771 { 771 {
772 *w = vsink->width; 772 *w = vsink->width;
773 *h = vsink->height; 773 *h = vsink->height;
774 } 774 }
775 else 775 else
776 { 776 {
777 *w = 0; 777 *w = 0;
778 *h = 0; 778 *h = 0;
@@ -794,7 +794,7 @@ em_yuv_rows_get(void *video,
794 794
795 if (ev->obj_data) 795 if (ev->obj_data)
796 { 796 {
797 if (em_format_get(video) == EMOTION_FORMAT_I420) 797 if (em_format_get(video) == EMOTION_FORMAT_I420)
798 { 798 {
799 for (i = 0; i < h; i++) 799 for (i = 0; i < h; i++)
800 yrows[i] = &ev->obj_data[i * w]; 800 yrows[i] = &ev->obj_data[i * w];
@@ -805,7 +805,7 @@ em_yuv_rows_get(void *video,
805 for (i = 0; i < (h / 2); i++) 805 for (i = 0; i < (h / 2); i++)
806 vrows[i] = &ev->obj_data[h * w + h * (w /4) + i * (w / 2)]; 806 vrows[i] = &ev->obj_data[h * w + h * (w /4) + i * (w / 2)];
807 } 807 }
808 else if (em_format_get(video) == EMOTION_FORMAT_YV12) 808 else if (em_format_get(video) == EMOTION_FORMAT_YV12)
809 { 809 {
810 for (i = 0; i < h; i++) 810 for (i = 0; i < h; i++)
811 yrows[i] = &ev->obj_data[i * w]; 811 yrows[i] = &ev->obj_data[i * w];
@@ -832,7 +832,7 @@ em_bgra_data_get(void *video, unsigned char **bgra_data)
832 832
833 ev = (Emotion_Gstreamer_Video *)video; 833 ev = (Emotion_Gstreamer_Video *)video;
834 834
835 if (ev->obj_data && em_format_get(video) == EMOTION_FORMAT_BGRA) 835 if (ev->obj_data && em_format_get(video) == EMOTION_FORMAT_BGRA)
836 { 836 {
837 *bgra_data = ev->obj_data; 837 *bgra_data = ev->obj_data;
838 return 1; 838 return 1;
@@ -1393,11 +1393,11 @@ _eos_timer_fct(void *data)
1393 GstMessage *msg; 1393 GstMessage *msg;
1394 1394
1395 ev = (Emotion_Gstreamer_Video *)data; 1395 ev = (Emotion_Gstreamer_Video *)data;
1396 while ((msg = gst_bus_poll(ev->eos_bus, GST_MESSAGE_ERROR | GST_MESSAGE_EOS | GST_MESSAGE_TAG, 0))) 1396 while ((msg = gst_bus_poll(ev->eos_bus, GST_MESSAGE_ERROR | GST_MESSAGE_EOS | GST_MESSAGE_TAG, 0)))
1397 { 1397 {
1398 switch (GST_MESSAGE_TYPE(msg)) 1398 switch (GST_MESSAGE_TYPE(msg))
1399 { 1399 {
1400 case GST_MESSAGE_ERROR: 1400 case GST_MESSAGE_ERROR:
1401 { 1401 {
1402 gchar *debug; 1402 gchar *debug;
1403 GError *err; 1403 GError *err;