[meego-commits] 15484: Changes to Trunk/pulseaudio-modules-mfld
Peter Zhu
no_reply at build.meego.com
Wed Mar 30 10:12:28 UTC 2011
Hi,
I have made the following changes to pulseaudio-modules-mfld in project Trunk. Please review and accept ASAP.
Thank You,
Peter Zhu
[This message was auto-generated]
---
Request #15484:
submit: Trunk:Testing/pulseaudio-modules-mfld(r2) -> Trunk/pulseaudio-modules-mfld
Message:
Move to Trunk
State: new 2011-03-30T03:12:04 peter
Comment: None
changes files:
--------------
--- pulseaudio-modules-mfld.changes
+++ pulseaudio-modules-mfld.changes
@@ -0,0 +1,6 @@
+* Fri Mar 25 2011 Fabien Barthes <fabienx.barthes at intel.com> - 1.0
+- New voice call record module (BMC#14916)
+ pa-0.9.19-mfld-first-version-of-voice-call-recording-module.patch
+ pa-0.9.19-mfld-Modification-for-volume-frequency-and-bug-fixes.patch
+ pa-0.9.19-mfld-Modifications-after-tests-on-board.patch
+
new:
----
pa-0.9.19-mfld-Modification-for-volume-frequency-and-bug-fixes.patch
pa-0.9.19-mfld-Modifications-after-tests-on-board.patch
pa-0.9.19-mfld-first-version-of-voice-call-recording-module.patch
spec files:
-----------
--- pulseaudio-modules-mfld.spec
+++ pulseaudio-modules-mfld.spec
@@ -9,7 +9,7 @@
Name: pulseaudio-modules-mfld
Summary: Pulseaudio modules
Version: 1.0
-Release: 3
+Release: 4
Group: System/Libraries
License: LGPLv2.1+
URL: http://meego.gitorious.org/meego-middleware/pa_voice_module
@@ -32,6 +32,9 @@
Patch15: pa-0.9.19-mfld-Use-PA-generic-SRC-insteas-of-resampler-factory-for-.patch
Patch16: pa-0.9.19-mfld-Add-SRC-8-16kHz-into-resampler-factory.patch
Patch17: pa-0.9.19-mfld-Reduce-log-priority-for-cmtspeech-ifx.patch
+Patch18: pa-0.9.19-mfld-first-version-of-voice-call-recording-module.patch
+Patch19: pa-0.9.19-mfld-Modification-for-volume-frequency-and-bug-fixes.patch
+Patch20: pa-0.9.19-mfld-Modifications-after-tests-on-board.patch
Source100: pulseaudio-modules-mfld.yaml
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@ -129,6 +132,17 @@
%description voice
This contains voice module for MeeGo Pulseaudio
+%package voice-call-record
+Summary: Voice-call-record module for pulseaudio
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-common = %{version}-%{release}
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+
+%description voice-call-record
+This contains voice call record module for MeeGo Pulseaudio
+
%prep
%setup -q -n %{name}-%{version}
@@ -169,6 +183,12 @@
%patch16 -p1
# pa-0.9.19-mfld-Reduce-log-priority-for-cmtspeech-ifx.patch
%patch17 -p1
+# pa-0.9.19-mfld-first-version-of-voice-call-recording-module.patch
+%patch18 -p1
+# pa-0.9.19-mfld-Modification-for-volume-frequency-and-bug-fixes.patch
+%patch19 -p1
+# pa-0.9.19-mfld-Modifications-after-tests-on-board.patch
+%patch20 -p1
# >> setup
# << setup
@@ -199,6 +219,7 @@
install -m 644 src/common/optimized.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/
install -m 644 src/common/pa-optimized.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/
install -m 644 src/common/parameter-hook.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/
+install -m 644 src/common/parameter-hook-implementor.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/
install -m 644 src/common/proplist-meego.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/
install -m 644 src/common/src-48-to-8.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/
install -m 644 src/common/src-8-to-48.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/
@@ -277,6 +298,17 @@
/sbin/ldconfig
# << postun voice
+%post voice-call-record
+# >> post voice-call-record
+/sbin/ldconfig
+# << post voice-call-record
+
+%postun voice-call-record
+# >> postun voice-call-record
+/sbin/ldconfig
+# << postun voice-call-record
+
+
%files
%defattr(-,root,root,-)
# >> files
@@ -327,3 +359,9 @@
%{_libdir}/pulse-0.9.19/modules/module-meego-voice.so
# << files voice
+%files voice-call-record
+%defattr(-,root,root,-)
+# >> files voice-call-record
+%{_libdir}/pulse-0.9.19/modules/module-meego-voice-call-record.so
+# << files voice-call-record
+
other changes:
--------------
++++++ pa-0.9.19-mfld-Modification-for-volume-frequency-and-bug-fixes.patch (new)
--- pa-0.9.19-mfld-Modification-for-volume-frequency-and-bug-fixes.patch
+++ pa-0.9.19-mfld-Modification-for-volume-frequency-and-bug-fixes.patch
+From b6630be3abe00d6fd9f2400310d2c81f27a827b4 Mon Sep 17 00:00:00 2001
+From: JQuintero <jorgex.quintero at intel.com>
+Date: Thu, 10 Feb 2011 17:14:29 +0100
+Subject: [PATCH 2/3] Added support to activate/deactivate recording beep sample
+
+This support is temporary as it shall be implemented using
+pulseaudio properties.
+
+Removed unnecessary dependency on link stage (libsndfile.so)
+
+Added support for beep recording logic
+
+Corrected bug related to call tracking stuff
+
+Added last modifications that handle beep volume and frequency
+Signed-off-by: JQuintero <jorgex.quintero at intel.com>
+---
+ src/voice-call-record/Makefile.am | 4 +-
+ .../module-meego-voice-call-record.c | 114 ++++++++++++--------
+ .../module-meego-voice-call-record.h | 23 +++-
+ .../voice-call-record-sink-input-dl.c | 18 +++-
+ .../voice-call-record-sink-input-ul.c | 22 +++-
+ .../voice-call-record-source-output-dl.c | 24 ++++-
+ .../voice-call-record-source-output-ul.c | 24 ++++-
+ .../voice-call-record-thread-operations.c | 96 ++++++++++++-----
+ .../voice-call-record-virtual-sink.c | 40 ++++++-
+ .../voice-call-record-virtual-source.c | 75 ++++++++++++-
+ 10 files changed, 334 insertions(+), 106 deletions(-)
+
+diff --git a/src/voice-call-record/Makefile.am b/src/voice-call-record/Makefile.am
+index a6a59de..b16538c 100755
+--- a/src/voice-call-record/Makefile.am
++++ b/src/voice-call-record/Makefile.am
+@@ -24,6 +24,6 @@ module_meego_voice_call_record_la_SOURCES = module-meego-voice-call-record.c \
+ voice-call-record-sink-input-dl.c \
+ voice-call-record-virtual-source.c
+
+-module_meego_voice_call_record_la_LDFLAGS = -module -avoid-version -Wl,-no-undefined -Wl,-z,noexecstack -lsndfile
++module_meego_voice_call_record_la_LDFLAGS = -module -avoid-version -Wl,-no-undefined -Wl,-z,noexecstack
+ module_meego_voice_call_record_la_LIBADD = $(AM_LIBADD)
+-module_meego_voice_call_record_la_CFLAGS = $(AM_CFLAGS) -g
+\ No newline at end of file
++module_meego_voice_call_record_la_CFLAGS = $(AM_CFLAGS) -g -DVOICE_CALL_RECORDING_DEBUG
+diff --git a/src/voice-call-record/module-meego-voice-call-record.c b/src/voice-call-record/module-meego-voice-call-record.c
+index de23b06..04f5539 100755
+--- a/src/voice-call-record/module-meego-voice-call-record.c
++++ b/src/voice-call-record/module-meego-voice-call-record.c
+@@ -34,6 +34,7 @@ PA_MODULE_USAGE("source_ul=<name of uplink source>"
+ "beep_period=<time to elapse before sending a recoding beep sample>"
+ "sample_sink=<name of sink where beep sample is sent>"
+ "beep_sample_name=<name of beep sample, as seen by pulseaudio cache>"
++ "beep_required=<sets whether we must play recording beep sample or not>"
+ );
+
+ PA_MODULE_VERSION(PACKAGE_VERSION) ;
+@@ -62,6 +63,7 @@ static const char* const valid_modargs[] = {
+ "beep_period",
+ "sample_sink",
+ "beep_sample_name",
++ "beep_required",
+ NULL,
+ };
+
+@@ -133,6 +135,8 @@ int pa__init(pa_module* m)
+ const char* rec_beep_period = NULL;
+ const char* source_dl_name = NULL;
+ const char* source_ul_name = NULL;
++ const char* beep_required = NULL;
++
+ pa_modargs* modargs = NULL;
+ struct userdata* u = NULL;
+ int beep_period = 0;
+@@ -141,16 +145,20 @@ int pa__init(pa_module* m)
+
+ pa_assert(m);
+
++ /* try to parse module arguments */
+ if( !(modargs = pa_modargs_new(m->argument, valid_modargs)) ){
+ pa_log_error("Failed to parse module arguments");
+ goto fail;
+ }
+
++ /* fetch all parameters needed by module */
+ source_ul_name = pa_modargs_get_value(modargs, "source_ul", NULL);
+ source_dl_name = pa_modargs_get_value(modargs, "source_dl", NULL);
+ sample_sink_name = pa_modargs_get_value(modargs, "sample_sink", NULL);
+ rec_beep_period = pa_modargs_get_value(modargs, "beep_period", NULL);
++ beep_required = pa_modargs_get_value(modargs, "beep_required", NO_BEEP_REQUIRED);
+
++ /* allocate memory for our userdata structure */
+ u = pa_xnew0(struct userdata, 1);
+
+ if( !(u->source_ul = pa_namereg_get(m->core, source_ul_name, PA_NAMEREG_SOURCE)) ){
+@@ -171,10 +179,20 @@ int pa__init(pa_module* m)
+ u->sample_data.sample_name = pa_modargs_get_value(modargs, "beep_sample_name", NULL);
+
+ if( u->sample_data.sample_name == (const char*)NULL ){
+- pa_log_error("Beep sample name parameter not valid");
++ pa_log_error("sample_name parameter not valid");
+ goto fail;
+ }
+
++ /* check whether recording beep sample is required or not */
++ if( strcmp(beep_required, BEEP_REQUIRED) == 0 ){
++ u->beep_required = (char*)BEEP_REQUIRED;
++ }else if( strcmp(beep_required, NO_BEEP_REQUIRED) == 0 ){
++ u->beep_required = (char*)NO_BEEP_REQUIRED;
++ }else{
++ pa_log_error("beep_required parameter not valid");
++ goto fail;
++ }
++
+ m->userdata = u;
+
+ u->core = m->core;
+@@ -220,12 +238,6 @@ int pa__init(pa_module* m)
+ goto fail;
+ }
+
+- /* create the virtual source */
+- res = voice_call_record_create_virtual_source(u);
+- if( res != 0 ){
+- goto fail;
+- }
+-
+ /* create the UL sink input */
+ res = voice_call_record_create_sink_input_ul(u);
+ if( res != 0 ){
+@@ -239,26 +251,32 @@ int pa__init(pa_module* m)
+ }
+
+ /* create the source output for UL direction (remote incoming voice) */
+- res = voice_record_create_source_output_ul(u);
+- if( res != 0 ){
+- goto fail;
+- }
++ res = voice_record_create_source_output_ul(u);
++ if( res != 0 ){
++ goto fail;
++ }
+
+- /* create the source output for DL direction (local incoming voice) */
+- res = voice_record_create_source_output_dl(u);
+- if( res != 0 ){
+- goto fail;
+- }
++ /* create the source output for DL direction (local incoming voice) */
++ res = voice_record_create_source_output_dl(u);
++ if( res != 0 ){
++ goto fail;
++ }
+
+- return 0;
++ /* create the virtual source */
++ res = voice_call_record_create_virtual_source(u);
++ if( res != 0 ){
++ goto fail;
++ }
++
++ return 0;
+
+ fail:
+ if(modargs){
+- pa_modargs_free(modargs);
+- }
++ pa_modargs_free(modargs);
++ }
+
+- pa__done(m);
+- return -1;
++ pa__done(m);
++ return -1;
+
+ }
+
+@@ -277,28 +295,6 @@ void pa__done(pa_module* m) {
+
+ u = m->userdata;
+
+- if(u->modargs){
+- pa_modargs_free(u->modargs);
+- }
+-
+- if( u->source_output_ul ){
+- pa_source_output_unlink(u->source_output_ul);
+- pa_source_output_unref(u->source_output_ul);
+- u->source_output_ul = NULL;
+- }
+-
+- if( u->source_output_dl ){
+- pa_source_output_unlink(u->source_output_dl);
+- pa_source_output_unref(u->source_output_dl);
+- u->source_output_dl = NULL;
+- }
+-
+- if( u->virtual_source ){
+- pa_source_unlink(u->virtual_source);
+- pa_source_unref(u->virtual_source);
(762 more lines skipped)
++++++ pa-0.9.19-mfld-Modifications-after-tests-on-board.patch (new)
--- pa-0.9.19-mfld-Modifications-after-tests-on-board.patch
+++ pa-0.9.19-mfld-Modifications-after-tests-on-board.patch
+From e617703ecda4025390071c94464c1dae33fb853b Mon Sep 17 00:00:00 2001
+From: JQuintero <jorgex.quintero at intel.com>
+Date: Tue, 22 Mar 2011 11:01:35 +0100
+Subject: [PATCH 3/3] Modifications after tests on board.
+
+---
+ src/voice-call-record/Makefile.am | 3 +-
+ .../module-meego-voice-call-record.c | 67 +++++++++++++++++---
+ .../module-meego-voice-call-record.h | 4 +-
+ .../voice-call-record-thread-operations.c | 12 +++-
+ .../voice-call-record-virtual-sink.c | 2 +-
+ .../voice-call-record-virtual-source.c | 46 +-------------
+ 6 files changed, 75 insertions(+), 59 deletions(-)
+
+diff --git a/src/voice-call-record/Makefile.am b/src/voice-call-record/Makefile.am
+index b16538c..908fb4d 100755
+--- a/src/voice-call-record/Makefile.am
++++ b/src/voice-call-record/Makefile.am
+@@ -26,4 +26,5 @@ module_meego_voice_call_record_la_SOURCES = module-meego-voice-call-record.c \
+
+ module_meego_voice_call_record_la_LDFLAGS = -module -avoid-version -Wl,-no-undefined -Wl,-z,noexecstack
+ module_meego_voice_call_record_la_LIBADD = $(AM_LIBADD)
+-module_meego_voice_call_record_la_CFLAGS = $(AM_CFLAGS) -g -DVOICE_CALL_RECORDING_DEBUG
++module_meego_voice_call_record_la_CFLAGS = $(AM_CFLAGS)
++#-g -DVOICE_CALL_RECORDING_DEBUG
+diff --git a/src/voice-call-record/module-meego-voice-call-record.c b/src/voice-call-record/module-meego-voice-call-record.c
+index 04f5539..041f175 100755
+--- a/src/voice-call-record/module-meego-voice-call-record.c
++++ b/src/voice-call-record/module-meego-voice-call-record.c
+@@ -67,6 +67,45 @@ static const char* const valid_modargs[] = {
+ NULL,
+ };
+
++static pa_hook_result_t call_state_callback(pa_call_state_tracker* t, void* active, struct userdata* u)
++{
++ unsigned long vsource_state = PA_SOURCE_INVALID_STATE;
++ pa_bool_t call_active = FALSE;
++ pa_bool_t to_cork = FALSE;
++
++
++#ifndef VOICE_CALL_RECORDING_DEBUG
++ /* Get state of call */
++ call_active = pa_call_state_tracker_get_active(t);
++#else /* VOICE_CALL_RECORDING_DEBUG */
++ call_active = ( pa_source_get_state(u->virtual_source) == PA_SOURCE_RUNNING ) ? TRUE : FALSE;
++#endif /* VOICE_CALL_RECORDING_DEBUG */
++
++ /* Get state of virtual source */
++ vsource_state = pa_source_get_state(u->virtual_source);
++
++ /* decide whether we start fetching data of not. For this
++ * a voice call must be active and the virtual source must
++ * have its state set to RUNNING
++ */
++ to_cork = ( ( call_active == TRUE ) && (vsource_state == PA_SOURCE_RUNNING) ) ? FALSE : TRUE;
++
++ /* set state of UL/DL sources to corked/uncorked depending of
++ * value of to_cork variable
++ */
++ pa_source_output_cork(u->source_output_ul, to_cork);
++ pa_source_output_cork(u->source_output_dl, to_cork);
++
++ pa_sink_input_cork(u->sink_input_ul, to_cork);
++ pa_sink_input_cork(u->sink_input_dl, to_cork);
++
++ if(vsource_state == PA_SOURCE_RUNNING){
++ pa_sink_suspend(u->virtual_sink, FALSE, PA_SUSPEND_IDLE);
++ }
++
++ return PA_HOOK_OK;
++}
++
+
+ /*
+ * Helper function: This procedure creates and initializes an "object"
+@@ -220,6 +259,18 @@ int pa__init(pa_module* m)
+ /* The result is rounded down incorrectly thus + 1 TODO: investigate why */
+ u->frame_size = pa_usec_to_bytes(VOICE_RECORDING_FRAMESIZE_IN_US + 1, &u->ss);
+
++ /* create a private instance of a call state tracker. This will be useful to
++ * control whether allowing recording or not.
++ */
++ u->call_state_tracker = pa_call_state_tracker_get(u->core);
++
++ u->call_state_tracker_slot = pa_hook_connect(
++ &pa_call_state_tracker_hooks(u->call_state_tracker)[PA_CALL_STATE_HOOK_CHANGED],
++ PA_HOOK_NORMAL,
++ (pa_hook_cb_t)call_state_callback,
++ u
++ );
++
+ /* Initialize UL voice recording block queue */
+ u->frame_queue_ul = helper_create_frame_queue(u);
+
+@@ -319,14 +370,6 @@ void pa__done(pa_module* m) {
+ u->virtual_source = NULL;
+ }
+
+- if( u->call_state_tracker_slot ){
+- pa_hook_slot_free(u->call_state_tracker_slot);
+- }
+-
+- if( u->call_state_tracker ){
+- pa_call_state_tracker_unref(u->call_state_tracker);
+- }
+-
+ if( u->source_output_ul ){
+ pa_source_output_unlink(u->source_output_ul);
+ pa_source_output_unref(u->source_output_ul);
+@@ -353,6 +396,14 @@ void pa__done(pa_module* m) {
+ u->frame_queue_dl = NULL;
+ }
+
++ if( u->call_state_tracker_slot ){
++ pa_hook_slot_free(u->call_state_tracker_slot);
++ }
++
++ if( u->call_state_tracker ){
++ pa_call_state_tracker_unref(u->call_state_tracker);
++ }
++
+ if( u->modargs ){
+ pa_modargs_free(u->modargs);
+ }
+diff --git a/src/voice-call-record/module-meego-voice-call-record.h b/src/voice-call-record/module-meego-voice-call-record.h
+index 466040d..0e1bbef 100755
+--- a/src/voice-call-record/module-meego-voice-call-record.h
++++ b/src/voice-call-record/module-meego-voice-call-record.h
+@@ -17,10 +17,10 @@
+ */
+ #ifdef VOICE_CALL_RECORDING_DEBUG
+ #define ENTER() pa_log_debug("%d: %s() called", __LINE__, __FUNCTION__)
+-#define GET_VOICE_CALL_STATE(s, r) ( (s) == (r) ) ? TRUE : FALSE
++#define GET_VOICE_CALL_STATE(s, r, t) ( (s) == (r) ) ? TRUE : FALSE
+ #else /* VOICE_CALL_RECORDING_DEBUG */
+ #define ENTER()
+-#define GET_VOICE_CALL_STATE(s, r) pa_call_state_tracker_get_active(t)
++#define GET_VOICE_CALL_STATE(s, r, t) pa_call_state_tracker_get_active(t)
+ #endif /* VOICE_CALL_RECORDING_DEBUG */
+
+ /*
+diff --git a/src/voice-call-record/voice-call-record-thread-operations.c b/src/voice-call-record/voice-call-record-thread-operations.c
+index 341a50b..2163267 100755
+--- a/src/voice-call-record/voice-call-record-thread-operations.c
++++ b/src/voice-call-record/voice-call-record-thread-operations.c
+@@ -16,6 +16,11 @@
+ #include "voice-call-record-thread-operations.h"
+ #include "memory.h"
+
++/* This macro defines the division factor to apply to volume of
++ * recording beep sample. This volume is based on UL volume.
++ */
++#define VOICE_CALL_RECORD_BEEP_VOLUME_DIVIDER 6
++
+
+ /* TODO: Get rid of this and use asyncmsgq instead. */
+ enum voice_record_thread_state {
+@@ -69,7 +74,7 @@ static void send_recording_beep_sample_cb(pa_mainloop_api* m, void* udata)
+
+ vol = pa_cvolume_max(&cvol);
+
+- sample_beep_vol = vol/2;
++ sample_beep_vol = vol / VOICE_CALL_RECORD_BEEP_VOLUME_DIVIDER;
+
+ /* call pa_scache_play_item in order to play beep sample stored in pa cache */
+ ret = pa_scache_play_item(u->core, sd->sample_name, sd->sample_sink, sample_beep_vol, NULL, NULL);
+@@ -360,7 +365,10 @@ static void voice_record_thread(void* udata)
+ if(pa_rtpoll_timer_elapsed(td->rtpoll)){
+
+ /* fetch state of voice call */
+- call_active = GET_VOICE_CALL_STATE( pa_source_get_state(u->virtual_source), PA_SOURCE_RUNNING );
++ call_active = GET_VOICE_CALL_STATE( pa_source_get_state(u->virtual_source),
++ PA_SOURCE_RUNNING,
++ call_tracker
++ );
+
+ /* do we have voice call active? */
+ if( call_active == TRUE ){
+diff --git a/src/voice-call-record/voice-call-record-virtual-sink.c b/src/voice-call-record/voice-call-record-virtual-sink.c
+index 9d8eff6..0d97227 100755
+--- a/src/voice-call-record/voice-call-record-virtual-sink.c
++++ b/src/voice-call-record/voice-call-record-virtual-sink.c
+@@ -35,7 +35,7 @@ static int voice_record_virtual_sink_set_state(pa_sink* s, pa_sink_state_t state
+ }
+
+ /* fetch state of voice call */
+- call_active = GET_VOICE_CALL_STATE(state, PA_SINK_RUNNING);
++ call_active = GET_VOICE_CALL_STATE(state, PA_SINK_RUNNING, u->call_state_tracker);
+
+ pa_log_debug("virtual sink set state to %d", state);
+
+diff --git a/src/voice-call-record/voice-call-record-virtual-source.c b/src/voice-call-record/voice-call-record-virtual-source.c
+index 2f3f38e..49d12bb 100755
+--- a/src/voice-call-record/voice-call-record-virtual-source.c
++++ b/src/voice-call-record/voice-call-record-virtual-source.c
+@@ -17,38 +17,6 @@
+ #define VOICE_CALL_RECORD_VIRTUAL_SOURCE_NAME "source.voicecall.record"
+
(67 more lines skipped)
++++++ pa-0.9.19-mfld-first-version-of-voice-call-recording-module.patch (new)
--- pa-0.9.19-mfld-first-version-of-voice-call-recording-module.patch
+++ pa-0.9.19-mfld-first-version-of-voice-call-recording-module.patch
+From 7ab0916f670e964fa54ddf9a15ce59bb1302f957 Mon Sep 17 00:00:00 2001
+From: jorge <jorge at tldlabaudio1.(none)>
+Date: Wed, 9 Feb 2011 11:11:09 +0100
+Subject: [PATCH 1/3] first version of voice call recording module for pulseaudio 0.9.19
+ HSD = 3669360
+
+deleted unnecesary files from repo
+---
+ configure.ac | 1 +
+ src/Makefile.am | 2 +-
+ src/voice-call-record/Makefile.am | 29 ++
+ .../module-meego-voice-call-record-symdef.h | 25 ++
+ .../module-meego-voice-call-record.c | 334 +++++++++++++++++++
+ .../module-meego-voice-call-record.h | 121 +++++++
+ .../voice-call-record-sink-input-dl.c | 149 +++++++++
+ .../voice-call-record-sink-input-dl.h | 6 +
+ .../voice-call-record-sink-input-ul.c | 149 +++++++++
+ .../voice-call-record-sink-input-ul.h | 6 +
+ .../voice-call-record-source-output-dl.c | 159 +++++++++
+ .../voice-call-record-source-output-dl.h | 6 +
+ .../voice-call-record-source-output-ul.c | 162 +++++++++
+ .../voice-call-record-source-output-ul.h | 6 +
+ .../voice-call-record-thread-operations.c | 345 ++++++++++++++++++++
+ .../voice-call-record-thread-operations.h | 7 +
+ .../voice-call-record-virtual-sink.c | 83 +++++
+ .../voice-call-record-virtual-sink.h | 7 +
+ .../voice-call-record-virtual-source.c | 93 ++++++
+ .../voice-call-record-virtual-source.h | 6 +
+ 20 files changed, 1695 insertions(+), 1 deletions(-)
+ create mode 100755 src/voice-call-record/Makefile.am
+ create mode 100755 src/voice-call-record/module-meego-voice-call-record-symdef.h
+ create mode 100755 src/voice-call-record/module-meego-voice-call-record.c
+ create mode 100755 src/voice-call-record/module-meego-voice-call-record.h
+ create mode 100755 src/voice-call-record/voice-call-record-sink-input-dl.c
+ create mode 100755 src/voice-call-record/voice-call-record-sink-input-dl.h
+ create mode 100755 src/voice-call-record/voice-call-record-sink-input-ul.c
+ create mode 100755 src/voice-call-record/voice-call-record-sink-input-ul.h
+ create mode 100755 src/voice-call-record/voice-call-record-source-output-dl.c
+ create mode 100755 src/voice-call-record/voice-call-record-source-output-dl.h
+ create mode 100755 src/voice-call-record/voice-call-record-source-output-ul.c
+ create mode 100755 src/voice-call-record/voice-call-record-source-output-ul.h
+ create mode 100755 src/voice-call-record/voice-call-record-thread-operations.c
+ create mode 100755 src/voice-call-record/voice-call-record-thread-operations.h
+ create mode 100755 src/voice-call-record/voice-call-record-virtual-sink.c
+ create mode 100755 src/voice-call-record/voice-call-record-virtual-sink.h
+ create mode 100755 src/voice-call-record/voice-call-record-virtual-source.c
+ create mode 100755 src/voice-call-record/voice-call-record-virtual-source.h
+
+diff --git a/configure.ac b/configure.ac
+index 6d1ce14..1fda067 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -296,6 +296,7 @@ src/cmtspeech/Makefile
+ src/cmtspeech-ifx/Makefile
+ src/mainvolume/Makefile
+ src/mainvolume/tests/Makefile
++src/voice-call-record/Makefile
+ ])
+
+ SHAVE_INIT
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 621eade..1a2ada5 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS = common voice music record test mainvolume
++SUBDIRS = common voice music record test mainvolume voice-call-record
+
+ if HAVE_LIBCMTSPEECHDATA
+ SUBDIRS += cmtspeech
+diff --git a/src/voice-call-record/Makefile.am b/src/voice-call-record/Makefile.am
+new file mode 100755
+index 0000000..a6a59de
+--- /dev/null
++++ b/src/voice-call-record/Makefile.am
+@@ -0,0 +1,29 @@
++AM_LIBADD = \
++ $(PULSEAUDIO_LIBS) \
++ $(top_builddir)/src/common/libmeego-common.la
++
++AM_CFLAGS = \
++ $(PULSEAUDIO_CFLAGS) \
++ -I$(top_srcdir)/src/common
++
++VOICE_RECORD_LIB = -lvoice-call-record
++
++###################################
++# voice-record #
++###################################
++noinst_HEADERS = module-meego-voice-call-record-symdef.h
++
++modlibexec_LTLIBRARIES = module-meego-voice-call-record.la
++
++module_meego_voice_call_record_la_SOURCES = module-meego-voice-call-record.c \
++ voice-call-record-thread-operations.c \
++ voice-call-record-source-output-ul.c \
++ voice-call-record-source-output-dl.c \
++ voice-call-record-virtual-sink.c \
++ voice-call-record-sink-input-ul.c \
++ voice-call-record-sink-input-dl.c \
++ voice-call-record-virtual-source.c
++
++module_meego_voice_call_record_la_LDFLAGS = -module -avoid-version -Wl,-no-undefined -Wl,-z,noexecstack -lsndfile
++module_meego_voice_call_record_la_LIBADD = $(AM_LIBADD)
++module_meego_voice_call_record_la_CFLAGS = $(AM_CFLAGS) -g
+\ No newline at end of file
+diff --git a/src/voice-call-record/module-meego-voice-call-record-symdef.h b/src/voice-call-record/module-meego-voice-call-record-symdef.h
+new file mode 100755
+index 0000000..b896503
+--- /dev/null
++++ b/src/voice-call-record/module-meego-voice-call-record-symdef.h
+@@ -0,0 +1,25 @@
++#ifndef foomodulevoicerecordsymdeffoo
++#define foomodulevoicerecordsymdeffoo
++
++#include <pulsecore/core.h>
++#include <pulsecore/module.h>
++
++#define pa__init module_meego_voice_call_record_LTX_pa__init
++#define pa__done module_meego_voice_call_record_LTX_pa__done
++#define pa__get_author module_meego_voice_call_record_LTX_pa__get_author
++#define pa__get_description module_meego_voice_call_record_LTX_pa__get_description
++#define pa__get_usage module_meego_voice_call_record_LTX_pa__get_usage
++#define pa__get_version module_meego_voice_call_record_LTX_pa__get_version
++
++
++int pa__init(struct pa_module*m);
++void pa__done(struct pa_module*m);
++
++
++const char* pa__get_author(void);
++const char* pa__get_description(void);
++const char* pa__get_usage(void);
++const char* pa__get_version(void);
++
++
++#endif /* foomodulevoicerecordsymdeffoo */
+diff --git a/src/voice-call-record/module-meego-voice-call-record.c b/src/voice-call-record/module-meego-voice-call-record.c
+new file mode 100755
+index 0000000..de23b06
+--- /dev/null
++++ b/src/voice-call-record/module-meego-voice-call-record.c
+@@ -0,0 +1,334 @@
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif /* HAVE_CONFIG_H */
++
++#include <stdio.h>
++#include <math.h>
++
++#include <pulse/xmalloc.h>
++
++#include <pulsecore/modargs.h>
++#include <pulsecore/namereg.h>
++#include <pulsecore/log.h>
++#include <pulsecore/core-util.h>
++
++#include <pulse/rtclock.h>
++#include <pulse/timeval.h>
++
++#include "module-meego-voice-call-record.h"
++#include "module-meego-voice-call-record-symdef.h"
++#include "voice-call-record-thread-operations.h"
++
++#include "voice-call-record-virtual-sink.h"
++#include "voice-call-record-virtual-source.h"
++
++#include "voice-call-record-source-output-ul.h"
++#include "voice-call-record-source-output-dl.h"
++#include "voice-call-record-sink-input-ul.h"
++#include "voice-call-record-sink-input-dl.h"
++
++PA_MODULE_AUTHOR("Jorge Quintero");
++PA_MODULE_DESCRIPTION("Voice Call Recording Module");
++PA_MODULE_USAGE("source_ul=<name of uplink source>"
++ "source_dl=<name of downlink source>"
++ "beep_period=<time to elapse before sending a recoding beep sample>"
++ "sample_sink=<name of sink where beep sample is sent>"
++ "beep_sample_name=<name of beep sample, as seen by pulseaudio cache>"
++ );
++
++PA_MODULE_VERSION(PACKAGE_VERSION) ;
++
++
++
++/* This define holds the default sample rate of voice call recording module */
++#define VOICERECORDING_SAMPLERATE 16000
++
++/**
++ * This define holds the size of a memblockq frame in µs. Frame size
++ * In our case we need frames capable of holding up to 20000 microseconds
++ * of voice.
++ */
++#define VOICE_RECORDING_FRAMESIZE_IN_US 20000
++
++/**
++ * This define holds max period (in milliseconds) of beep occurrence during recording
++ */
(1677 more lines skipped)
++++++ pulseaudio-modules-mfld.yaml
--- pulseaudio-modules-mfld.yaml
+++ pulseaudio-modules-mfld.yaml
@@ -1,7 +1,7 @@
Name: pulseaudio-modules-mfld
Summary: Pulseaudio modules for handset
Version: 1.0
-Release: 3
+Release: 4
Group: System/Libraries
License: LGPLv2.1+
URL: http://meego.gitorious.org/meego-middleware/pa_voice_module
@@ -26,6 +26,9 @@
- pa-0.9.19-mfld-Use-PA-generic-SRC-insteas-of-resampler-factory-for-.patch
- pa-0.9.19-mfld-Add-SRC-8-16kHz-into-resampler-factory.patch
- pa-0.9.19-mfld-Reduce-log-priority-for-cmtspeech-ifx.patch
+ - pa-0.9.19-mfld-first-version-of-voice-call-recording-module.patch
+ - pa-0.9.19-mfld-Modification-for-volume-frequency-and-bug-fixes.patch
+ - pa-0.9.19-mfld-Modifications-after-tests-on-board.patch
Description: pulseaudio modules for handset image
@@ -61,12 +64,13 @@
Group: Development/Libraries
Description: This package contains development headers for pulseaudio-modules-mfld
Requires:
- - "%{name}-common = %{version}-%{release}"
- - "%{name}-voice = %{version}-%{release}"
- - "%{name}-cmtspeech = %{version}-%{release}"
- - "%{name}-cmtspeech-ifx = %{version}-%{release}"
- - "%{name}-music = %{version}-%{release}"
- - "%{name}-record = %{version}-%{release}"
+ - "%{name}-common = %{version}-%{release}"
+ - "%{name}-voice = %{version}-%{release}"
+ - "%{name}-cmtspeech = %{version}-%{release}"
+ - "%{name}-cmtspeech-ifx = %{version}-%{release}"
+ - "%{name}-music = %{version}-%{release}"
+ - "%{name}-record = %{version}-%{release}"
+ - "%{name}-voice-call-record = %{version}-%{release}"
- Name: record
Summary: Record module for pulseaudio
@@ -122,3 +126,13 @@
RequiresPostUn:
- /sbin/ldconfig
+ - Name: voice-call-record
+ Summary: Voice call record module for pulseaudio
+ Group: Development/Libraries
+ Description: This contains voice call record module for MeeGo Pulseaudio
+ Requires:
+ - "%{name}-common = %{version}-%{release}"
+ RequiresPost:
+ - /sbin/ldconfig
+ RequiresPostUn:
+ - /sbin/ldconfig
More information about the MeeGo-commits
mailing list