GNOME Bugzilla – Bug 744459
opensles: Allow setting stream type
Last modified: 2015-06-13 10:35:35 UTC
Attaching patches to set the recording preset / stream type on openslessrc and openslessink.
Created attachment 296757 [details] [review] openslessrc: Implement recording presets
Created attachment 296758 [details] [review] openslessink: Allow setting the stream type via a property
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
Review of attachment 296758 [details] [review]: Same comments about the enums here :)
Otherwise good to be merged
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
Created attachment 305193 [details] [review] opensles: Fix build with Android API level < 14 Headers were broken on older Android versions, apparently.
Created attachment 305194 [details] [review] openslessink: Allow setting the stream type via a property
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.