Exemplo n.º 1
0
        public DlnaProtocolInfo GetProtocolInfo(DlnaMediaItem item, ProtocolInfoFormat infoLevel)
        {
            if (item.DlnaMime == null)
            {
                return(null);
            }

            var info = new DlnaProtocolInfo
            {
                Protocol       = "http-get",
                Network        = "*",
                MediaType      = item.DlnaMime,
                AdditionalInfo = new DlnaForthField()
            };
            bool live = false;

            if (item.TranscodingParameter is VideoTranscoding)
            {
                live = ((VideoTranscoding)item.TranscodingParameter).TargetIsLive;
            }
            else if (item.TranscodingParameter is AudioTranscoding)
            {
                live = ((AudioTranscoding)item.TranscodingParameter).TargetIsLive;
            }

            ConfigureProfile(info.AdditionalInfo, item, infoLevel, live);
            return(info);
        }
Exemplo n.º 2
0
        public DlnaProtocolInfo GetProtocolInfo(MediaItem item)
        {
            var info = new DlnaProtocolInfo
            {
                Protocol       = "http-get",
                Network        = "*",
                MediaType      = MediaLibraryHelper.GetOrGuessMimeType(item),
                AdditionalInfo = new DlnaForthField()
            };

            ConfigureProfile(info.AdditionalInfo, item, info.MediaType);
            return(info);
        }
Exemplo n.º 3
0
        public DlnaProtocolInfo GetThumbnailProtocolInfo(string dlnaMime, string dlnaProfile)
        {
            if (dlnaMime == null)
            {
                return(null);
            }

            var info = new DlnaProtocolInfo
            {
                Protocol       = "http-get",
                Network        = "*",
                MediaType      = dlnaMime,
                AdditionalInfo = new DlnaForthField()
            };

            info.AdditionalInfo.ConversionParameter.Show             = true;
            info.AdditionalInfo.ConversionParameter.ConvertedContent = true;

            info.AdditionalInfo.ProfileParameter.Show        = true;
            info.AdditionalInfo.ProfileParameter.ProfileName = dlnaProfile;

            info.AdditionalInfo.OperationsParameter.Show = true;
            info.AdditionalInfo.OperationsParameter.TimeSeekRangeSupport = false;
            info.AdditionalInfo.OperationsParameter.ByteSeekRangeSupport = false;

            info.AdditionalInfo.FlagsParameter.Show                      = true;
            info.AdditionalInfo.FlagsParameter.SenderPaced               = false;
            info.AdditionalInfo.FlagsParameter.TimeBasedSeek             = false;
            info.AdditionalInfo.FlagsParameter.ByteBasedSeek             = false;
            info.AdditionalInfo.FlagsParameter.PlayerContainer           = false;
            info.AdditionalInfo.FlagsParameter.UcdamS0Increasing         = false;
            info.AdditionalInfo.FlagsParameter.UcdamSnIncreasing         = false;
            info.AdditionalInfo.FlagsParameter.RtspPauseOperation        = false;
            info.AdditionalInfo.FlagsParameter.StreamingMode             = false;
            info.AdditionalInfo.FlagsParameter.InteractiveMode           = true;
            info.AdditionalInfo.FlagsParameter.BackgroundMode            = true;
            info.AdditionalInfo.FlagsParameter.HttpConnectionStalling    = false;
            info.AdditionalInfo.FlagsParameter.Dlna1Dot5Version          = true;
            info.AdditionalInfo.FlagsParameter.LinkProtectedContent      = false;
            info.AdditionalInfo.FlagsParameter.CleartextByteFullDataSeek = false;
            info.AdditionalInfo.FlagsParameter.CleartextLimitedDataSeek  = false;

            info.AdditionalInfo.PlaySpeedParameter.Show = false;

            return(info);
        }