summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/bin
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2004-06-24 10:55:43 +0000
committerCarsten Haitzler <raster@rasterman.com>2004-06-24 10:55:43 +0000
commit2505c9ec3c6f174d9293181609b1478a6f50ad36 (patch)
tree44b362dec08de0165c97973853436e6d66d31be0 /legacy/emotion/src/bin
parentb97f6616289f206d70b8eb351ae0a1a6d013fcca (diff)
support events coming from xine a lot better...
still need to support title, artist etc. for mp3's and such... SVN revision: 10579
Diffstat (limited to 'legacy/emotion/src/bin')
-rw-r--r--legacy/emotion/src/bin/emotion_test_main.c106
1 files changed, 81 insertions, 25 deletions
diff --git a/legacy/emotion/src/bin/emotion_test_main.c b/legacy/emotion/src/bin/emotion_test_main.c
index fe1096a265..266d662614 100644
--- a/legacy/emotion/src/bin/emotion_test_main.c
+++ b/legacy/emotion/src/bin/emotion_test_main.c
@@ -474,6 +474,77 @@ video_obj_length_change_cb(void *data, Evas_Object *obj, void *event_info)
474 edje_object_part_text_set(oe, "video_progress_txt", buf); 474 edje_object_part_text_set(oe, "video_progress_txt", buf);
475} 475}
476 476
477static void
478video_obj_stopped_cb(void *data, Evas_Object *obj, void *event_info)
479{
480 Evas_Object *oe;
481
482 oe = data;
483 printf("video stopped!\n");
484}
485
486static void
487video_obj_channels_cb(void *data, Evas_Object *obj, void *event_info)
488{
489 Evas_Object *oe;
490
491 oe = data;
492 printf("channels changed: [AUD %i][VID %i][SPU %i]\n",
493 emotion_object_audio_channel_count(obj),
494 emotion_object_video_channel_count(obj),
495 emotion_object_spu_channel_count(obj));
496}
497
498static void
499video_obj_title_cb(void *data, Evas_Object *obj, void *event_info)
500{
501 Evas_Object *oe;
502
503 oe = data;
504 printf("video title to: \"%s\"\n", emotion_object_title_get(obj));
505}
506
507static void
508video_obj_progress_cb(void *data, Evas_Object *obj, void *event_info)
509{
510 Evas_Object *oe;
511
512 oe = data;
513 printf("progress: \"%s\" %3.3f\n",
514 emotion_object_progress_info_get(obj),
515 emotion_object_progress_status_get(obj));
516}
517
518static void
519video_obj_ref_cb(void *data, Evas_Object *obj, void *event_info)
520{
521 Evas_Object *oe;
522
523 oe = data;
524 printf("video ref to: \"%s\" %i\n",
525 emotion_object_ref_file_get(obj),
526 emotion_object_ref_num_get(obj));
527}
528
529static void
530video_obj_button_num_cb(void *data, Evas_Object *obj, void *event_info)
531{
532 Evas_Object *oe;
533
534 oe = data;
535 printf("video spu buttons to: %i\n",
536 emotion_object_spu_button_count_get(obj));
537}
538
539static void
540video_obj_button_cb(void *data, Evas_Object *obj, void *event_info)
541{
542 Evas_Object *oe;
543
544 oe = data;
545 printf("video selected spu button: %i\n",
546 emotion_object_spu_button_get(obj));
547}
477 548
478 549
479 550
@@ -621,18 +692,6 @@ init_video_object(char *file)
621 Frame_Data *fd; 692 Frame_Data *fd;
622 693
623 694
624
625
626
627
628
629
630
631
632
633
634
635
636/* basic video object setup */ 695/* basic video object setup */
637 o = emotion_object_add(evas); 696 o = emotion_object_add(evas);
638 emotion_object_file_set(o, file); 697 emotion_object_file_set(o, file);
@@ -642,18 +701,7 @@ init_video_object(char *file)
642 emotion_object_smooth_scale_set(o, 1); 701 emotion_object_smooth_scale_set(o, 1);
643 evas_object_show(o); 702 evas_object_show(o);
644/* end basic video setup. all the rest here is just to be fancy */ 703/* end basic video setup. all the rest here is just to be fancy */
645 704
646
647
648
649
650
651
652
653
654
655
656
657 705
658 video_objs = evas_list_append(video_objs, o); 706 video_objs = evas_list_append(video_objs, o);
659 707
@@ -677,7 +725,15 @@ init_video_object(char *file)
677 evas_object_smart_callback_add(o, "frame_decode", video_obj_frame_decode_cb, oe); 725 evas_object_smart_callback_add(o, "frame_decode", video_obj_frame_decode_cb, oe);
678 evas_object_smart_callback_add(o, "frame_resize", video_obj_frame_resize_cb, oe); 726 evas_object_smart_callback_add(o, "frame_resize", video_obj_frame_resize_cb, oe);
679 evas_object_smart_callback_add(o, "length_change", video_obj_length_change_cb, oe); 727 evas_object_smart_callback_add(o, "length_change", video_obj_length_change_cb, oe);
680 728
729 evas_object_smart_callback_add(o, "decode_stop", video_obj_stopped_cb, oe);
730 evas_object_smart_callback_add(o, "channels_change", video_obj_channels_cb, oe);
731 evas_object_smart_callback_add(o, "title_change", video_obj_title_cb, oe);
732 evas_object_smart_callback_add(o, "progress_change", video_obj_progress_cb, oe);
733 evas_object_smart_callback_add(o, "ref_change", video_obj_ref_cb, oe);
734 evas_object_smart_callback_add(o, "button_num_change", video_obj_button_num_cb, oe);
735 evas_object_smart_callback_add(o, "button_change", video_obj_button_cb, oe);
736
681 edje_object_signal_callback_add(oe, "video_control", "play", video_obj_signal_play_cb, o); 737 edje_object_signal_callback_add(oe, "video_control", "play", video_obj_signal_play_cb, o);
682 edje_object_signal_callback_add(oe, "video_control", "pause", video_obj_signal_pause_cb, o); 738 edje_object_signal_callback_add(oe, "video_control", "pause", video_obj_signal_pause_cb, o);
683 edje_object_signal_callback_add(oe, "video_control", "stop", video_obj_signal_stop_cb, o); 739 edje_object_signal_callback_add(oe, "video_control", "stop", video_obj_signal_stop_cb, o);