~audio-recorder/audio-recorder/trunk

1 by Osmo Antero Maatta
Initial import 17.jan.2011
1
To developers.
221 by osmoma at gmail
Fixed bug #1074928. Audio-recorder could not find configuration values (in dconf) and exited.
2
3
EDIT: Banshee now implements the MPRIS2-standard, so there is no need for the  
4
spesific dbus-banshee.c module. It has been removed from the source.
5
223 by Osmo Antero
Changed default filename pattern to %Y-%m-%d-%H:%M:%S
6
Audio-recorder can communicate with Banshee by using the dbus-mpris2.[ch] and dbus-player.[ch] modules.
221 by osmoma at gmail
Fixed bug #1074928. Audio-recorder could not find configuration values (in dconf) and exited.
7
---------------------------------
8
9
Older Banshee-interface:
10
1 by Osmo Antero Maatta
Initial import 17.jan.2011
11
Interacting with Banshee over DBus/GLib.
12
We need to create a marshalling function so we can receive correct data types from DBus/Banshee.
77 by Osmo Antero
Updated version (v0.7) for Fedora 16+ and Ubuntu 12.04.
13
This marshalling function is used in banshee_connect_dbus_signals().
1 by Osmo Antero Maatta
Initial import 17.jan.2011
14
15
Study: dbus-banshee.c
16
17
Step 0) Create a marshal.list file with correct data types (we receive these data types from Banshee/DBus).
18
19
$ echo "VOID:STRING,STRING,DOUBLE" > marshal.list
20
----
21
22
Step 1) Generate both banshee_body.c and banshee_body.h from the marshal.list.
23
24
$ glib-genmarshal --prefix=marshal marshal.list --header > banshee-body.h
25
$ glib-genmarshal --prefix=marshal marshal.list --body > banshee-body.c
26
----
27
28
Step 2) 
29
30
Copy & paste necessary parts of banshee-body.[ch] to our project (dbus-banshee.c)
31
We need the marshal_VOID__STRING_STRING_DOUBLE() function plus
32
some support functions which we write to dbus-marshall.h.
33
34
Study: 
35
src/dbus-marshall.h
36
src/dbus-banshee.c
37
----
38
39
Step 3) Register the notification methods and signals. 
40
41
Study: 
42
banshee_connect_dbus_signals() in src/dbus-banshee.c.
43
44
Call
45
dbus_g_object_register_marshaller(marshal_VOID__STRING_STRING_DOUBLE, G_TYPE_NONE, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_DOUBLE, G_TYPE_INVALID);
46
----
47
48