summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-05-23 20:24:46 +0900
committerHermet Park <hermetpark@gmail.com>2019-05-23 20:24:46 +0900
commitbaaa053659c1c92007d98546d2563481b4328c7b (patch)
tree79bc55c6db8c2132290d7778b936d86651694d7c
parent451959973ddb5e1723f8c26b22420b6566cea026 (diff)
Emotion gst1 module: remove whitespaces
Reviewers: zmike, cedric, raster, Hermet Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8938
-rw-r--r--src/modules/emotion/gstreamer1/emotion_gstreamer.c121
1 files changed, 60 insertions, 61 deletions
diff --git a/src/modules/emotion/gstreamer1/emotion_gstreamer.c b/src/modules/emotion/gstreamer1/emotion_gstreamer.c
index 700cf90ee9..f3118c7969 100644
--- a/src/modules/emotion/gstreamer1/emotion_gstreamer.c
+++ b/src/modules/emotion/gstreamer1/emotion_gstreamer.c
@@ -345,7 +345,7 @@ em_fps_num_get(void *video)
345 int num; 345 int num;
346 346
347 _em_fps_get(ev, &num, NULL); 347 _em_fps_get(ev, &num, NULL);
348 348
349 return num; 349 return num;
350} 350}
351 351
@@ -356,7 +356,7 @@ em_fps_den_get(void *video)
356 int den; 356 int den;
357 357
358 _em_fps_get(ev, NULL, &den); 358 _em_fps_get(ev, NULL, &den);
359 359
360 return den; 360 return den;
361} 361}
362 362
@@ -591,59 +591,59 @@ em_event_feed(void *video, int event)
591 switch (event) 591 switch (event)
592 { 592 {
593 case EMOTION_EVENT_MENU1: 593 case EMOTION_EVENT_MENU1:
594 command = GST_NAVIGATION_COMMAND_MENU1; 594 command = GST_NAVIGATION_COMMAND_MENU1;
595 break; 595 break;
596 case EMOTION_EVENT_MENU2: 596 case EMOTION_EVENT_MENU2:
597 command = GST_NAVIGATION_COMMAND_MENU2; 597 command = GST_NAVIGATION_COMMAND_MENU2;
598 break; 598 break;
599 case EMOTION_EVENT_MENU3: 599 case EMOTION_EVENT_MENU3:
600 command = GST_NAVIGATION_COMMAND_MENU3; 600 command = GST_NAVIGATION_COMMAND_MENU3;
601 break; 601 break;
602 case EMOTION_EVENT_MENU4: 602 case EMOTION_EVENT_MENU4:
603 command = GST_NAVIGATION_COMMAND_MENU4; 603 command = GST_NAVIGATION_COMMAND_MENU4;
604 break; 604 break;
605 case EMOTION_EVENT_MENU5: 605 case EMOTION_EVENT_MENU5:
606 command = GST_NAVIGATION_COMMAND_MENU5; 606 command = GST_NAVIGATION_COMMAND_MENU5;
607 break; 607 break;
608 case EMOTION_EVENT_MENU6: 608 case EMOTION_EVENT_MENU6:
609 command = GST_NAVIGATION_COMMAND_MENU6; 609 command = GST_NAVIGATION_COMMAND_MENU6;
610 break; 610 break;
611 case EMOTION_EVENT_MENU7: 611 case EMOTION_EVENT_MENU7:
612 command = GST_NAVIGATION_COMMAND_MENU7; 612 command = GST_NAVIGATION_COMMAND_MENU7;
613 break; 613 break;
614 case EMOTION_EVENT_UP: 614 case EMOTION_EVENT_UP:
615 command = GST_NAVIGATION_COMMAND_UP; 615 command = GST_NAVIGATION_COMMAND_UP;
616 break; 616 break;
617 case EMOTION_EVENT_DOWN: 617 case EMOTION_EVENT_DOWN:
618 command = GST_NAVIGATION_COMMAND_DOWN; 618 command = GST_NAVIGATION_COMMAND_DOWN;
619 break; 619 break;
620 case EMOTION_EVENT_LEFT: 620 case EMOTION_EVENT_LEFT:
621 command = GST_NAVIGATION_COMMAND_LEFT; 621 command = GST_NAVIGATION_COMMAND_LEFT;
622 break; 622 break;
623 case EMOTION_EVENT_RIGHT: 623 case EMOTION_EVENT_RIGHT:
624 command = GST_NAVIGATION_COMMAND_RIGHT; 624 command = GST_NAVIGATION_COMMAND_RIGHT;
625 break; 625 break;
626 case EMOTION_EVENT_SELECT: 626 case EMOTION_EVENT_SELECT:
627 command = GST_NAVIGATION_COMMAND_ACTIVATE; 627 command = GST_NAVIGATION_COMMAND_ACTIVATE;
628 break; 628 break;
629 case EMOTION_EVENT_NEXT: 629 case EMOTION_EVENT_NEXT:
630 /* FIXME */ 630 /* FIXME */
631 command = GST_NAVIGATION_COMMAND_RIGHT; 631 command = GST_NAVIGATION_COMMAND_RIGHT;
632 break; 632 break;
633 case EMOTION_EVENT_PREV: 633 case EMOTION_EVENT_PREV:
634 /* FIXME */ 634 /* FIXME */
635 command = GST_NAVIGATION_COMMAND_LEFT; 635 command = GST_NAVIGATION_COMMAND_LEFT;
636 break; 636 break;
637 case EMOTION_EVENT_ANGLE_NEXT: 637 case EMOTION_EVENT_ANGLE_NEXT:
638 command = GST_NAVIGATION_COMMAND_NEXT_ANGLE; 638 command = GST_NAVIGATION_COMMAND_NEXT_ANGLE;
639 break; 639 break;
640 case EMOTION_EVENT_ANGLE_PREV: 640 case EMOTION_EVENT_ANGLE_PREV:
641 command = GST_NAVIGATION_COMMAND_PREV_ANGLE; 641 command = GST_NAVIGATION_COMMAND_PREV_ANGLE;
642 break; 642 break;
643 case EMOTION_EVENT_FORCE: 643 case EMOTION_EVENT_FORCE:
644 /* FIXME */ 644 /* FIXME */
645 command = GST_NAVIGATION_COMMAND_ACTIVATE; 645 command = GST_NAVIGATION_COMMAND_ACTIVATE;
646 break; 646 break;
647 case EMOTION_EVENT_0: 647 case EMOTION_EVENT_0:
648 case EMOTION_EVENT_1: 648 case EMOTION_EVENT_1:
649 case EMOTION_EVENT_2: 649 case EMOTION_EVENT_2:
@@ -656,8 +656,8 @@ em_event_feed(void *video, int event)
656 case EMOTION_EVENT_9: 656 case EMOTION_EVENT_9:
657 case EMOTION_EVENT_10: 657 case EMOTION_EVENT_10:
658 default: 658 default:
659 return; 659 return;
660 break; 660 break;
661 } 661 }
662 662
663 gst_navigation_send_command (GST_NAVIGATION (ev->pipeline), command); 663 gst_navigation_send_command (GST_NAVIGATION (ev->pipeline), command);
@@ -1021,14 +1021,14 @@ em_meta_artwork_get(void *video, Evas_Object *img, const char *path, Emotion_Art
1021 GstSample *sample; 1021 GstSample *sample;
1022 GstBuffer *buffer; 1022 GstBuffer *buffer;
1023 GstMapInfo map; 1023 GstMapInfo map;
1024 1024
1025 const gchar *tag = GST_TAG_PREVIEW_IMAGE; 1025 const gchar *tag = GST_TAG_PREVIEW_IMAGE;
1026 if (type == EMOTION_ARTWORK_IMAGE) tag = GST_TAG_IMAGE; 1026 if (type == EMOTION_ARTWORK_IMAGE) tag = GST_TAG_IMAGE;
1027 1027
1028 if (gst_tag_list_get_sample(tags, tag, &sample)) 1028 if (gst_tag_list_get_sample(tags, tag, &sample))
1029 { 1029 {
1030 buffer = gst_sample_get_buffer(sample); 1030 buffer = gst_sample_get_buffer(sample);
1031 if (!buffer) 1031 if (!buffer)
1032 { 1032 {
1033 evas_object_del(img); 1033 evas_object_del(img);
1034 img = NULL; 1034 img = NULL;
@@ -1039,10 +1039,10 @@ em_meta_artwork_get(void *video, Evas_Object *img, const char *path, Emotion_Art
1039 { 1039 {
1040 evas_object_image_memfile_set(img, map.data, map.size, NULL, NULL); 1040 evas_object_image_memfile_set(img, map.data, map.size, NULL, NULL);
1041 evas_object_event_callback_add(img, EVAS_CALLBACK_DEL, _img_del_cb, buffer); 1041 evas_object_event_callback_add(img, EVAS_CALLBACK_DEL, _img_del_cb, buffer);
1042 } 1042 }
1043 gst_sample_unref(sample); 1043 gst_sample_unref(sample);
1044 } 1044 }
1045 else 1045 else
1046 { 1046 {
1047 evas_object_del(img); 1047 evas_object_del(img);
1048 img = NULL; 1048 img = NULL;
@@ -1515,7 +1515,7 @@ _bus_main_handler(void *data)
1515 gint n_audio, n_video; 1515 gint n_audio, n_video;
1516 1516
1517 ev->ready = EINA_TRUE; 1517 ev->ready = EINA_TRUE;
1518 1518
1519 g_object_get(G_OBJECT(ev->pipeline), 1519 g_object_get(G_OBJECT(ev->pipeline),
1520 "n-audio", &n_audio, 1520 "n-audio", &n_audio,
1521 "n-video", &n_video, 1521 "n-video", &n_video,
@@ -1523,15 +1523,15 @@ _bus_main_handler(void *data)
1523 1523
1524 if (n_audio == 0 && n_video == 0) 1524 if (n_audio == 0 && n_video == 0)
1525 ERR("No audio nor video stream found"); 1525 ERR("No audio nor video stream found");
1526 1526
1527 if (n_audio > 0 && n_video == 0) 1527 if (n_audio > 0 && n_video == 0)
1528 { 1528 {
1529 GstElement *vis = NULL; 1529 GstElement *vis = NULL;
1530 gint flags; 1530 gint flags;
1531 const char *vis_name; 1531 const char *vis_name;
1532 1532
1533 if ((vis_name = emotion_visualization_element_name_get(ev->vis))) 1533 if ((vis_name = emotion_visualization_element_name_get(ev->vis)))
1534 { 1534 {
1535 vis = gst_element_factory_make(vis_name, "vis"); 1535 vis = gst_element_factory_make(vis_name, "vis");
1536 g_object_set(G_OBJECT(ev->pipeline), "vis-plugin", vis, NULL); 1536 g_object_set(G_OBJECT(ev->pipeline), "vis-plugin", vis, NULL);
1537 g_object_get(G_OBJECT(ev->pipeline), "flags", &flags, NULL); 1537 g_object_get(G_OBJECT(ev->pipeline), "flags", &flags, NULL);
@@ -1557,7 +1557,7 @@ _bus_main_handler(void *data)
1557 { 1557 {
1558 /** NOTE: you need to set: GST_DEBUG_DUMP_DOT_DIR=/tmp EMOTION_ENGINE=gstreamer to save the $EMOTION_GSTREAMER_DOT file in '/tmp' */ 1558 /** NOTE: you need to set: GST_DEBUG_DUMP_DOT_DIR=/tmp EMOTION_ENGINE=gstreamer to save the $EMOTION_GSTREAMER_DOT file in '/tmp' */
1559 /** then call dot -Tpng -oemotion_pipeline.png /tmp/$TIMESTAMP-$EMOTION_GSTREAMER_DOT.dot */ 1559 /** then call dot -Tpng -oemotion_pipeline.png /tmp/$TIMESTAMP-$EMOTION_GSTREAMER_DOT.dot */
1560 1560
1561#if defined(HAVE_GETUID) && defined(HAVE_GETEUID) 1561#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
1562 if (getuid() == geteuid()) 1562 if (getuid() == geteuid())
1563#endif 1563#endif
@@ -1567,7 +1567,7 @@ _bus_main_handler(void *data)
1567 GST_DEBUG_GRAPH_SHOW_ALL, 1567 GST_DEBUG_GRAPH_SHOW_ALL,
1568 getenv("EMOTION_GSTREAMER_DOT")); 1568 getenv("EMOTION_GSTREAMER_DOT"));
1569 } 1569 }
1570 1570
1571 _emotion_open_done(ev->obj); 1571 _emotion_open_done(ev->obj);
1572 _emotion_playback_started(ev->obj); 1572 _emotion_playback_started(ev->obj);
1573 } 1573 }
@@ -1578,12 +1578,12 @@ _bus_main_handler(void *data)
1578 { 1578 {
1579 GError *err = NULL; 1579 GError *err = NULL;
1580 gchar *name, *debug = NULL; 1580 gchar *name, *debug = NULL;
1581 1581
1582 name = gst_object_get_path_string (msg->src); 1582 name = gst_object_get_path_string (msg->src);
1583 gst_message_parse_error (msg, &err, &debug); 1583 gst_message_parse_error (msg, &err, &debug);
1584 1584
1585 ERR("ERROR: from element %s: %s\nAdditional debug info:\n%s", name, err->message, debug); 1585 ERR("ERROR: from element %s: %s\nAdditional debug info:\n%s", name, err->message, debug);
1586 1586
1587 g_error_free (err); 1587 g_error_free (err);
1588 g_free (debug); 1588 g_free (debug);
1589 g_free (name); 1589 g_free (name);
@@ -1600,12 +1600,12 @@ _bus_main_handler(void *data)
1600 { 1600 {
1601 GError *err = NULL; 1601 GError *err = NULL;
1602 gchar *name, *debug = NULL; 1602 gchar *name, *debug = NULL;
1603 1603
1604 name = gst_object_get_path_string (msg->src); 1604 name = gst_object_get_path_string (msg->src);
1605 gst_message_parse_warning (msg, &err, &debug); 1605 gst_message_parse_warning (msg, &err, &debug);
1606 1606
1607 WRN("WARNING: from element %s: %s\nAdditional debug info:\n%s", name, err->message, debug); 1607 WRN("WARNING: from element %s: %s\nAdditional debug info:\n%s", name, err->message, debug);
1608 1608
1609 g_error_free (err); 1609 g_error_free (err);
1610 g_free (debug); 1610 g_free (debug);
1611 g_free (name); 1611 g_free (name);
@@ -1615,14 +1615,14 @@ _bus_main_handler(void *data)
1615 case GST_MESSAGE_BUFFERING: 1615 case GST_MESSAGE_BUFFERING:
1616 { 1616 {
1617 gint percent = 0; 1617 gint percent = 0;
1618 1618
1619 /* If the stream is live, we do not care about buffering. */ 1619 /* If the stream is live, we do not care about buffering. */
1620 if (ev->live) 1620 if (ev->live)
1621 { 1621 {
1622 ev->buffering = FALSE; 1622 ev->buffering = FALSE;
1623 break; 1623 break;
1624 } 1624 }
1625 1625
1626 gst_message_parse_buffering (msg, &percent); 1626 gst_message_parse_buffering (msg, &percent);
1627 1627
1628 /* Wait until buffering is complete before start/resume playing */ 1628 /* Wait until buffering is complete before start/resume playing */
@@ -1658,9 +1658,9 @@ _bus_sync_handler(GstBus *bus EINA_UNUSED, GstMessage *msg, gpointer data)
1658 INF("Message %s from %s", 1658 INF("Message %s from %s",
1659 GST_MESSAGE_TYPE_NAME(msg), 1659 GST_MESSAGE_TYPE_NAME(msg),
1660 GST_MESSAGE_SRC_NAME(msg)); 1660 GST_MESSAGE_SRC_NAME(msg));
1661 1661
1662 send = emotion_gstreamer_message_alloc(ev, msg); 1662 send = emotion_gstreamer_message_alloc(ev, msg);
1663 1663
1664 if (send) 1664 if (send)
1665 { 1665 {
1666 _emotion_pending_ecore_begin(); 1666 _emotion_pending_ecore_begin();
@@ -1686,7 +1686,7 @@ _emotion_gstreamer_pause(void *data, Ecore_Thread *thread)
1686 { 1686 {
1687 ev->live = EINA_TRUE; 1687 ev->live = EINA_TRUE;
1688 gst_element_set_state(ev->pipeline, GST_STATE_PLAYING); 1688 gst_element_set_state(ev->pipeline, GST_STATE_PLAYING);
1689 gst_element_get_state(ev->pipeline, NULL, NULL, GST_CLOCK_TIME_NONE); 1689 gst_element_get_state(ev->pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
1690 } 1690 }
1691} 1691}
1692 1692
@@ -1801,4 +1801,3 @@ _create_pipeline(Emotion_Gstreamer *ev,
1801 gst_object_unref(playbin); 1801 gst_object_unref(playbin);
1802 return NULL; 1802 return NULL;
1803} 1803}
1804