[Bug 771761] GstPlayer: add equalizer support [API]

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Sep 22 05:25:54 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=771761

--- Comment #2 from Sachin Kumar Chauhan <sachin.kc at samsung.com> ---
OK. We can limit ourselves to 3 and 10 band equalizers for now. These
equalizers have their bands at fixed frequency. 3 band @ 100 Hz, 1100 Hz and
11KHz, and 10 band @ 29, 59, 119, 237, 474, 947, 1889, 3770, 7523, 15011 Hz. So
its not possible to set the center freq. We can add an API for getting center
freq. For 3 band its 1100 Hz, and for 10 bands it will be the average of 5th
and 6th bands.

Below is the modified interface.

typedef enum
{
  GST_PLAYER_EQUALIZER_NONE,
  GST_PLAYER_EQUALIZER_3BANDS,
  GST_PLAYER_EQUALIZER_10BANDS,
} GstPlayerEqualizerType;

struct _GstPlayer
{
  .
  .
  .
  GstPlayerEqualizerType equalizer_type; // default: GST_PLAYER_EQUALIZER_NONE
};

/* If GST_PLAYER_EQUALIZER_NONE is returned, there is no equalizer element in
pipeline */
GstPlayerEqualizerType gst_player_equalizer_get ( GstPlayer * player);

/* passing GST_PLAYER_EQUALIZER_NONE will remove existing equalizer element. */
void gst_player_equalizer_set (GstPlayer * player, GstPlayerEqualizerType
type);

double gst_player_equalizer_get_band_gain ( GstPlayer * player, int
band_index);

void gst_player_equalizer_set_band_gain ( GstPlayer * player, int band_index,
double gain);

int gst_player_equalizer_get_center_freq ( GstPlayer * player);


We can set the shape of equalizer by setting gains of each band individually,
or use an API like below to set it in one shot.

void gst_player_equalizer_set_shape ( GstPlayer * player, int num_bands,
double* gains);

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list