- /* Set up the sink's capabilities. */
- for(i = 0; i < N(widths); i++) {
- c = gst_caps_new_simple("audio/x-raw-int",
- "width", G_TYPE_INT, widths[i],
- "depth", G_TYPE_INT, widths[i],
- "channels", GST_TYPE_INT_RANGE, 1, 2,
- "signed", G_TYPE_BOOLEAN, TRUE,
- "rate", GST_TYPE_INT_RANGE, 100, 1000000,
- END);
- gst_caps_append(caps, c);
- }
+ /* Set up the sink's capabilities from the configuration. */
+ caps = gst_caps_new_simple("audio/x-raw-int",
+ "width", G_TYPE_INT, fmt->bits,
+ "depth", G_TYPE_INT, fmt->bits,
+ "channels", G_TYPE_INT, fmt->channels,
+ "signed", G_TYPE_BOOLEAN, TRUE,
+ "rate", G_TYPE_INT, fmt->rate,
+ "endianness", G_TYPE_INT,
+ fmt->endian == ENDIAN_BIG ?
+ G_BIG_ENDIAN : G_LITTLE_ENDIAN,
+ END);