totem r5566 - in trunk: . src/backend
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5566 - in trunk: . src/backend
- Date: Mon, 18 Aug 2008 14:40:51 +0000 (UTC)
Author: hadess
Date: Mon Aug 18 14:40:51 2008
New Revision: 5566
URL: http://svn.gnome.org/viewvc/totem?rev=5566&view=rev
Log:
2008-08-18 Bastien Nocera <hadess hadess net>
* src/backend/bvw-test.c (on_got_metadata), (on_title_changed),
(main): Listen to got-metadata and title-change signals
Modified:
trunk/ChangeLog
trunk/src/backend/bvw-test.c
Modified: trunk/src/backend/bvw-test.c
==============================================================================
--- trunk/src/backend/bvw-test.c (original)
+++ trunk/src/backend/bvw-test.c Mon Aug 18 14:40:51 2008
@@ -38,6 +38,31 @@
}
static void
+on_got_metadata (BaconVideoWidget *bvw, gpointer data)
+{
+ GValue value = { 0, };
+ char *title, *artist;
+
+ bacon_video_widget_get_metadata (BACON_VIDEO_WIDGET (bvw),
+ BVW_INFO_TITLE, &value);
+ title = g_value_dup_string (&value);
+ g_value_unset (&value);
+
+ bacon_video_widget_get_metadata (BACON_VIDEO_WIDGET (bvw),
+ BVW_INFO_ARTIST, &value);
+ artist = g_value_dup_string (&value);
+ g_value_unset (&value);
+
+ g_message ("Got metadata: title = %s artist = %s", title, artist);
+}
+
+static void
+on_title_changed (BaconVideoWidget *bvw, const char *title, gpointer data)
+{
+ g_message ("Got title change signal: %s", title);
+}
+
+static void
error_cb (GtkWidget *bvw, const char *message,
gboolean playback_stopped, gboolean fatal)
{
@@ -72,7 +97,9 @@
bvw = bacon_video_widget_new (width, height,
BVW_USE_TYPE_VIDEO, NULL);
- g_signal_connect (G_OBJECT (bvw),"eos",G_CALLBACK (on_eos_event),NULL);
+ g_signal_connect (G_OBJECT (bvw), "eos", G_CALLBACK (on_eos_event), NULL);
+ g_signal_connect (G_OBJECT (bvw), "got-metadata", G_CALLBACK (on_got_metadata), NULL);
+ g_signal_connect (G_OBJECT (bvw), "title-change", G_CALLBACK (on_title_changed), NULL);
g_signal_connect (G_OBJECT (bvw), "got-redirect", G_CALLBACK (on_redirect), NULL);
g_signal_connect (G_OBJECT (bvw), "error", G_CALLBACK (error_cb), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]