mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
mfaudioenc: Remove pointless enumerating for hardware audio encoder
Hardware audio encoder can exist in theory, but it's untested and we are not sure whether it can be preferred over software implementation which is implemented by MS Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2375>
This commit is contained in:
parent
812b9eae1d
commit
f9699b2444
2 changed files with 2 additions and 40 deletions
|
@ -715,29 +715,10 @@ gst_mf_aac_enc_plugin_init (GstPlugin * plugin, guint rank)
|
|||
output_type.guidSubtype = MFAudioFormat_AAC;
|
||||
|
||||
enum_params.category = MFT_CATEGORY_AUDIO_ENCODER;
|
||||
enum_params.enum_flags = (MFT_ENUM_FLAG_HARDWARE | MFT_ENUM_FLAG_ASYNCMFT |
|
||||
enum_params.enum_flags = (MFT_ENUM_FLAG_SYNCMFT |
|
||||
MFT_ENUM_FLAG_SORTANDFILTER | MFT_ENUM_FLAG_SORTANDFILTER_APPROVED_ONLY);
|
||||
enum_params.output_typeinfo = &output_type;
|
||||
|
||||
/* register hardware encoders first (likey no hardware audio encoder) */
|
||||
i = 0;
|
||||
do {
|
||||
enum_params.device_index = i++;
|
||||
transform = gst_mf_transform_new (&enum_params);
|
||||
do_next = TRUE;
|
||||
|
||||
if (!transform) {
|
||||
do_next = FALSE;
|
||||
} else {
|
||||
gst_mf_aac_enc_plugin_init_internal (plugin, rank, transform,
|
||||
enum_params.device_index, enum_params.enum_flags);
|
||||
gst_clear_object (&transform);
|
||||
}
|
||||
} while (do_next);
|
||||
|
||||
/* register software encoders */
|
||||
enum_params.enum_flags = (MFT_ENUM_FLAG_SYNCMFT |
|
||||
MFT_ENUM_FLAG_SORTANDFILTER | MFT_ENUM_FLAG_SORTANDFILTER_APPROVED_ONLY);
|
||||
i = 0;
|
||||
do {
|
||||
enum_params.device_index = i++;
|
||||
|
|
|
@ -729,29 +729,10 @@ gst_mf_mp3_enc_plugin_init (GstPlugin * plugin, guint rank)
|
|||
output_type.guidSubtype = MFAudioFormat_MP3;
|
||||
|
||||
enum_params.category = MFT_CATEGORY_AUDIO_ENCODER;
|
||||
enum_params.enum_flags = (MFT_ENUM_FLAG_HARDWARE | MFT_ENUM_FLAG_ASYNCMFT |
|
||||
enum_params.enum_flags = (MFT_ENUM_FLAG_SYNCMFT |
|
||||
MFT_ENUM_FLAG_SORTANDFILTER | MFT_ENUM_FLAG_SORTANDFILTER_APPROVED_ONLY);
|
||||
enum_params.output_typeinfo = &output_type;
|
||||
|
||||
/* register hardware encoders first (likey no hardware audio encoder) */
|
||||
i = 0;
|
||||
do {
|
||||
enum_params.device_index = i++;
|
||||
transform = gst_mf_transform_new (&enum_params);
|
||||
do_next = TRUE;
|
||||
|
||||
if (!transform) {
|
||||
do_next = FALSE;
|
||||
} else {
|
||||
gst_mf_mp3_enc_plugin_init_internal (plugin, rank, transform,
|
||||
enum_params.device_index, enum_params.enum_flags);
|
||||
gst_clear_object (&transform);
|
||||
}
|
||||
} while (do_next);
|
||||
|
||||
/* register software encoders */
|
||||
enum_params.enum_flags = (MFT_ENUM_FLAG_SYNCMFT |
|
||||
MFT_ENUM_FLAG_SORTANDFILTER | MFT_ENUM_FLAG_SORTANDFILTER_APPROVED_ONLY);
|
||||
i = 0;
|
||||
do {
|
||||
enum_params.device_index = i++;
|
||||
|
|
Loading…
Reference in a new issue