コード例 #1
0
        private IList <VariantInfo> GetAdaptiveVariants()
        {
            List <VariantInfo> adaptiveVariants = new List <VariantInfo>();

            NativePlayer.AdaptiveVariantCallback callback = (int bandwidth, int width, int height, IntPtr userData) =>
            {
                adaptiveVariants.Add(new VariantInfo(bandwidth, width, height));
                return(true);
            };

            NativePlayer.ForeachAdaptiveVariants(Player.Handle, callback, IntPtr.Zero).
            ThrowIfFailed(Player, "Failed to get the information of adaptive variants");

            return(adaptiveVariants.AsReadOnly());
        }