After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 744459 - opensles: Allow setting stream type
opensles: Allow setting stream type
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal enhancement
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-13 09:43 UTC by Arun Raghavan
Modified: 2015-06-13 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
openslessrc: Implement recording presets (9.53 KB, patch)
2015-02-13 09:45 UTC, Arun Raghavan
reviewed Details | Review
openslessink: Allow setting the stream type via a property (8.00 KB, patch)
2015-02-13 09:45 UTC, Arun Raghavan
reviewed Details | Review
opensles: Fix build with Android API level < 14 (1.29 KB, patch)
2015-06-13 10:34 UTC, Arun Raghavan
none Details | Review
openslessink: Allow setting the stream type via a property (9.08 KB, patch)
2015-06-13 10:34 UTC, Arun Raghavan
none Details | Review
openslessrc: Implement recording presets (12.30 KB, patch)
2015-06-13 10:34 UTC, Arun Raghavan
none Details | Review

Description Arun Raghavan 2015-02-13 09:43:45 UTC
Attaching patches to set the recording preset / stream type on openslessrc and openslessink.
Comment 1 Arun Raghavan 2015-02-13 09:45:17 UTC
Created attachment 296757 [details] [review]
openslessrc: Implement recording presets
Comment 2 Arun Raghavan 2015-02-13 09:45:46 UTC
Created attachment 296758 [details] [review]
openslessink: Allow setting the stream type via a property
Comment 3 Sebastian Dröge (slomo) 2015-02-13 10:21:40 UTC
Review of attachment 296757 [details] [review]:

::: sys/opensles/openslescommon.h
@@ +39,3 @@
+  GST_OPENSLES_RECORDING_PRESET_VOICE_COMMUNICATION =
+    SL_ANDROID_RECORDING_PRESET_VOICE_COMMUNICATION,
+} GstOpenSLESRecordingPreset;

Why do you define your own enum here that directly maps to the Android enum? Either we should have our own enum with our own values and map that internally (to ensure API compatibility), or just use the Android enum (assuming API compatibility by them).

::: sys/opensles/openslessrc.c
@@ +69,3 @@
+
+GType
+gst_opensles_recording_preset_get_type (void)

This should probably be in openslescommon.c then
Comment 4 Sebastian Dröge (slomo) 2015-02-13 10:22:50 UTC
Review of attachment 296758 [details] [review]:

Same comments about the enums here :)
Comment 5 Sebastian Dröge (slomo) 2015-02-13 10:24:29 UTC
Otherwise good to be merged
Comment 6 Arun Raghavan 2015-06-13 10:33:59 UTC
The following fixes have been pushed:
c7eb883 opensles: Fix build with Android API level < 14
e3ed00e openslessink: Allow setting the stream type via a property
6b728f1 openslessrc: Implement recording presets
Comment 7 Arun Raghavan 2015-06-13 10:34:15 UTC
Created attachment 305193 [details] [review]
opensles: Fix build with Android API level < 14

Headers were broken on older Android versions, apparently.
Comment 8 Arun Raghavan 2015-06-13 10:34:23 UTC
Created attachment 305194 [details] [review]
openslessink: Allow setting the stream type via a property
Comment 9 Arun Raghavan 2015-06-13 10:34:30 UTC
Created attachment 305195 [details] [review]
openslessrc: Implement recording presets

This allows us to signal what kind of audio we are expecting to record,
which should tell the system to apply filters (such as echo
cancellation, noise suppression, etc.) if required.