コード例 #1
0
        public TranscodeVideoFileBuilder WithDefaults(
            HwAccelDeviceType hwAccelDeviceType = HwAccelDeviceType.None,
            VideoScaleType scaleType            = VideoScaleType.Original,
            string withXHeight = null)
        {
            File.HwAccelDeviceType   = hwAccelDeviceType;
            File.VideoScaleType      = scaleType;
            File.VideoWidthAndHeight = withXHeight;

            return(this);
        }
コード例 #2
0
ファイル: BaseWebServer.cs プロジェクト: Wolfteam/CastIt
        public string GetMediaUrl(
            string filePath,
            int videoStreamIndex,
            int audioStreamIndex,
            double seconds,
            bool videoNeedsTranscode,
            bool audioNeedsTranscode,
            HwAccelDeviceType hwAccelToUse,
            VideoScaleType videoScale,
            string videoWidthAndHeight = null)
        {
            var baseUrl = GetBaseUrl();

            return($"{baseUrl}{AppWebServerConstants.MediaPath}?" +
                   $"{AppWebServerConstants.VideoStreamIndexParameter}={videoStreamIndex}" +
                   $"&{AppWebServerConstants.AudioStreamIndexParameter}={audioStreamIndex}" +
                   $"&{AppWebServerConstants.SecondsQueryParameter}={seconds}" +
                   $"&{AppWebServerConstants.FileQueryParameter}={Uri.EscapeDataString(filePath)}" +
                   $"&{AppWebServerConstants.VideoNeedsTranscode}={videoNeedsTranscode}" +
                   $"&{AppWebServerConstants.AudioNeedsTranscode}={audioNeedsTranscode}" +
                   $"&{AppWebServerConstants.HwAccelTypeToUse}={hwAccelToUse}" +
                   $"&{AppWebServerConstants.VideoWidthAndHeight}={videoWidthAndHeight}" +
                   $"&{AppWebServerConstants.VideoScaleParameter}={videoScale}");
        }