update for audio api change
This commit is contained in:
parent
e44df74eda
commit
f65495d405
@ -649,7 +649,7 @@ gst_flac_enc_getcaps (GstAudioEncoder * enc, GstCaps * filter)
|
|||||||
guint64 channel_mask;
|
guint64 channel_mask;
|
||||||
|
|
||||||
gst_audio_channel_positions_to_mask (channel_positions[i - 1], i,
|
gst_audio_channel_positions_to_mask (channel_positions[i - 1], i,
|
||||||
&channel_mask);
|
FALSE, &channel_mask);
|
||||||
gst_structure_set (s2, "channels", G_TYPE_INT, i, "channel-mask",
|
gst_structure_set (s2, "channels", G_TYPE_INT, i, "channel-mask",
|
||||||
GST_TYPE_BITMASK, channel_mask, NULL);
|
GST_TYPE_BITMASK, channel_mask, NULL);
|
||||||
}
|
}
|
||||||
|
@ -400,7 +400,7 @@ gst_wavpack_enc_set_format (GstAudioEncoder * benc, GstAudioInfo * info)
|
|||||||
enc->channel_mapping);
|
enc->channel_mapping);
|
||||||
|
|
||||||
/* wavpack caps hold gst mask, not wavpack mask */
|
/* wavpack caps hold gst mask, not wavpack mask */
|
||||||
gst_audio_channel_positions_to_mask (opos, enc->channels, &mask);
|
gst_audio_channel_positions_to_mask (opos, enc->channels, FALSE, &mask);
|
||||||
|
|
||||||
/* set fixed src pad caps now that we know what we will get */
|
/* set fixed src pad caps now that we know what we will get */
|
||||||
caps = gst_caps_new_simple ("audio/x-wavpack",
|
caps = gst_caps_new_simple ("audio/x-wavpack",
|
||||||
|
@ -565,7 +565,7 @@ gst_wavpack_parse_handle_frame (GstBaseParse * parse,
|
|||||||
if (!gst_wavpack_get_channel_positions (chans, mask, pos)) {
|
if (!gst_wavpack_get_channel_positions (chans, mask, pos)) {
|
||||||
GST_WARNING_OBJECT (wvparse, "Failed to determine channel layout");
|
GST_WARNING_OBJECT (wvparse, "Failed to determine channel layout");
|
||||||
} else {
|
} else {
|
||||||
gst_audio_channel_positions_to_mask (pos, chans, &gmask);
|
gst_audio_channel_positions_to_mask (pos, chans, FALSE, &gmask);
|
||||||
if (gmask)
|
if (gmask)
|
||||||
gst_caps_set_simple (caps,
|
gst_caps_set_simple (caps,
|
||||||
"channel-mask", GST_TYPE_BITMASK, gmask, NULL);
|
"channel-mask", GST_TYPE_BITMASK, gmask, NULL);
|
||||||
|
@ -309,7 +309,8 @@ gst_oss4_audio_add_channel_layout (GstObject * obj, guint64 layout,
|
|||||||
g_return_if_fail (num_channels <= G_N_ELEMENTS (ch_layout));
|
g_return_if_fail (num_channels <= G_N_ELEMENTS (ch_layout));
|
||||||
|
|
||||||
gst_oss4_audio_get_channel_layout (obj, layout, num_channels, ch_layout);
|
gst_oss4_audio_get_channel_layout (obj, layout, num_channels, ch_layout);
|
||||||
if (gst_audio_channel_positions_to_mask (ch_layout, num_channels, &mask))
|
if (gst_audio_channel_positions_to_mask (ch_layout, num_channels, FALSE,
|
||||||
|
&mask))
|
||||||
gst_structure_set (s, "channel-mask", GST_TYPE_BITMASK, mask, NULL);
|
gst_structure_set (s, "channel-mask", GST_TYPE_BITMASK, mask, NULL);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -456,17 +456,17 @@ sink_handoff_float32 (GstElement * element, GstBuffer * buffer, GstPad * pad,
|
|||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
GstAudioChannelPosition pos[2] =
|
GstAudioChannelPosition pos[2] =
|
||||||
{ GST_AUDIO_CHANNEL_POSITION_NONE, GST_AUDIO_CHANNEL_POSITION_NONE };
|
{ GST_AUDIO_CHANNEL_POSITION_NONE, GST_AUDIO_CHANNEL_POSITION_NONE };
|
||||||
gst_audio_channel_positions_to_mask (pos, 2, &mask);
|
gst_audio_channel_positions_to_mask (pos, 2, FALSE, &mask);
|
||||||
} else if (n == 1) {
|
} else if (n == 1) {
|
||||||
GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT
|
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT
|
||||||
};
|
};
|
||||||
gst_audio_channel_positions_to_mask (pos, 2, &mask);
|
gst_audio_channel_positions_to_mask (pos, 2, FALSE, &mask);
|
||||||
} else if (n == 2) {
|
} else if (n == 2) {
|
||||||
GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
GstAudioChannelPosition pos[2] = { GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER,
|
||||||
GST_AUDIO_CHANNEL_POSITION_REAR_CENTER
|
GST_AUDIO_CHANNEL_POSITION_REAR_CENTER
|
||||||
};
|
};
|
||||||
gst_audio_channel_positions_to_mask (pos, 2, &mask);
|
gst_audio_channel_positions_to_mask (pos, 2, FALSE, &mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
caps = gst_caps_new_simple ("audio/x-raw",
|
caps = gst_caps_new_simple ("audio/x-raw",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user