[PATCH v3 01/12] winegstreamer: Utilize gst_audio_info_to_caps for media type translation.

Zebediah Figura (she/her) zfigura at codeweavers.com
Wed Dec 2 14:54:56 CST 2020


On 12/2/20 2:49 PM, Derek Lesho wrote:
> 
> 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?

Those statements shouldn't be present in this patch, no.

>>
>>
>>> -        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.
> 

I don't think there's any point; I haven't seen any plugins that care
about a "bitrate" member for PCM audio.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x0D9D358A07A17840.asc
Type: application/pgp-keys
Size: 1769 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20201202/89176aa8/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20201202/89176aa8/attachment.sig>


More information about the wine-devel mailing list