Hi Dojo,
I have a Resource Pool containing different kind of encoders:
- SD encoders which can only be used for SD signals
- HD encoders which can be used for SD and HD signals
- UHD encoders which can be used for SD, HD and UHD signals
Each encoder resource has a capability Video Format in which the supported signals are filled in.
In a silent booking script I'm asking for the eligible resources based on the Video Format that I need.
Now I want that the resource selection happens with a priority based on the wanted video format:
- SD signals: Prio 1 > SD Encoder | Prio 2 > HD Encoder | Prio 3 > UHD Encoder
- HD signals: Prio 1 > HD Encoder | Prio 2 > UHD Encoder
How can I achieve this?
Hi Jens,
Maybe you can use Priority property in order to set a priority to each of your resources.
Documentation only mentions that this affects resource selection in Booking Wizard. Could be that this also affects silent booking call?
If yes, you can always define your SD encoders with highest priority, next to the HD and then UHD encoders.
If SD Video format is selected, SD encoders will be preferred.
If HD Video format is selected, SD won't be considered due to the missing capability, so it will only consider HD and UHD, giving preference to HD.
For UHD video format, only UHD decoders would be considered to the resource assignment.
Hope it helps!
hi Jens
It’s also possible to use the priority in a custom booking script. In the following snippet the resources will first be prioritized based on the property and then randomized if they’d have the same priority.
using Skyline.DataMiner.Library.Solutions.SRM;
var resourcePriorities = resources.Select(x => new ResourcePriority(bookingManager, x, false));
var prioritizedResources = SrmUtilities.OrderResources(resourcePriorities, OrderRule.Randomly);
Hi Bruno, it seems that this only works when using the Booking Wizard. But I’ll reuse the idea in my silent booking scripts. Thanks the guidance!