[totem] Bug 573912 – Add properties for PulseAudio
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Subject: [totem] Bug 573912 – Add properties for PulseAudio
- Date: Sun, 19 Jul 2009 22:51:02 +0000 (UTC)
commit 1a7943b9a8608e63986b0a32f069f8c9f4f0a4c8
Author: Bastien Nocera <hadess hadess net>
Date: Sun Jul 19 23:50:33 2009 +0100
Bug 573912 â?? Add properties for PulseAudio
2009-07-19 Bastien Nocera <hadess hadess net>
* browser-plugin/totem-plugin-viewer.c (main):
Add PA properties to the binary (Closes: #573912)
ChangeLog | 5 ++
browser-plugin/totem-plugin-viewer.c | 72 +++++++++++++++++++---------------
2 files changed, 45 insertions(+), 32 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e4963de..fff3596 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-07-19 Bastien Nocera <hadess hadess net>
+ * browser-plugin/totem-plugin-viewer.c (main):
+ Add PA properties to the binary (Closes: #573912)
+
+2009-07-19 Bastien Nocera <hadess hadess net>
+
* src/totem-audio-preview.c (main): Add PA properties
to the binary (Closes: #573912)
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index 64f6a7a..f1809f5 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -2190,6 +2190,9 @@ int main (int argc, char **argv)
g_thread_init (NULL);
+ g_set_application_name (_("Movie browser plugin"));
+ gtk_window_set_default_icon_name ("totem");
+
#ifdef GNOME_ENABLE_DEBUG
{
int i;
@@ -2209,40 +2212,40 @@ int main (int argc, char **argv)
dbus_g_thread_init ();
#ifdef GNOME_ENABLE_DEBUG
-{
- const char *env;
-
- env = g_getenv ("TOTEM_EMBEDDED_GDB");
- if (env && g_ascii_strtoull (env, NULL, 10) == 1) {
- char *gdbargv[6];
- char pid[32];
- GError *gdberr = NULL;
- int gdbargc = 0;
-
- g_snprintf (pid, sizeof (pid), "%d", getpid ());
-
- gdbargv[gdbargc++] = "/usr/bin/xterm";
- gdbargv[gdbargc++] = "-e";
- gdbargv[gdbargc++] = "gdb";
- gdbargv[gdbargc++] = argv[0];
- gdbargv[gdbargc++] = pid;
- gdbargv[gdbargc++] = NULL;
-
- if (!g_spawn_async (NULL,
- gdbargv,
- NULL /* env */,
- 0,
- NULL, NULL,
- NULL,
- &gdberr)) {
- g_warning ("Failed to spawn debugger: %s", gdberr->message);
- g_error_free (gdberr);
- } else {
- g_print ("Sleeping....\n");
- g_usleep (10* 1000 * 1000); /* 10s */
+ {
+ const char *env;
+
+ env = g_getenv ("TOTEM_EMBEDDED_GDB");
+ if (env && g_ascii_strtoull (env, NULL, 10) == 1) {
+ char *gdbargv[6];
+ char pid[32];
+ GError *gdberr = NULL;
+ int gdbargc = 0;
+
+ g_snprintf (pid, sizeof (pid), "%d", getpid ());
+
+ gdbargv[gdbargc++] = "/usr/bin/xterm";
+ gdbargv[gdbargc++] = "-e";
+ gdbargv[gdbargc++] = "gdb";
+ gdbargv[gdbargc++] = argv[0];
+ gdbargv[gdbargc++] = pid;
+ gdbargv[gdbargc++] = NULL;
+
+ if (!g_spawn_async (NULL,
+ gdbargv,
+ NULL /* env */,
+ 0,
+ NULL, NULL,
+ NULL,
+ &gdberr)) {
+ g_warning ("Failed to spawn debugger: %s", gdberr->message);
+ g_error_free (gdberr);
+ } else {
+ g_print ("Sleeping....\n");
+ g_usleep (10* 1000 * 1000); /* 10s */
+ }
}
}
-}
#endif
if (!gtk_init_with_args (&argc, &argv, NULL, option_entries, GETTEXT_PACKAGE, &e))
@@ -2252,6 +2255,11 @@ int main (int argc, char **argv)
exit (1);
}
+ if (arg_audioonly != FALSE)
+ g_setenv("PULSE_PROP_media.role", "video", TRUE);
+ else
+ g_setenv("PULSE_PROP_media.role", "audio", TRUE);
+
// FIXME check that ALL necessary params were given!
if (arg_plugin_type == TOTEM_PLUGIN_TYPE_LAST) {
g_warning ("Plugin type is required\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]