[PATCH v3 01/12] winegstreamer: Utilize gst_audio_info_to_caps for media type translation.
Derek Lesho
dlesho at codeweavers.com
Wed Dec 2 14:49:18 CST 2020
On 12/2/20 3:39 PM, Zebediah Figura (she/her) wrote:
> "rate" and "channels" are already set by gst_audio_info_to_caps().
Yeah, the reason I have them here is that future patches I have convert
from compressed audio types, which I don't think can use
gst_audio_info_to_caps, so I reset it after the subtype specific section
of the function. Should I remove this until those patches?
>
>
>> - if (SUCCEEDED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_CHANNEL_MASK, &channel_mask)))
>> - {
>> + if (channel_mask != -1)
>> gst_caps_set_simple(output, "channel-mask", GST_TYPE_BITMASK, (guint64) channel_mask, NULL);
>> - }
>> -
>> - if (SUCCEEDED(IMFMediaType_GetUINT32(type, &MF_MT_AVG_BITRATE, &bitrate)))
>> - {
>> + if (bitrate != -1)
>> gst_caps_set_simple(output, "bitrate", G_TYPE_INT, bitrate, NULL);
>> - }
>>
>> return output;
>> }
>>
> I only just now notice this, but MF_MT_AVG_BITRATE is a video type
> attribute, not an audio type attribute; I suspect it should be removed
> from this function...
Good catch, if you think I should keep rate and channels manually set, I
guess I would just use MF_MT_AUDIO_AVG_BYTES_PER_SECOND instead. If
not, I'll just remove this one too.
More information about the wine-devel
mailing list