| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302 | 
							- using MediaBrowser.Model.Dlna;
 
- using System.Collections.Generic;
 
- namespace MediaBrowser.Server.Implementations.Sync
 
- {
 
-     public class CloudSyncProfile : DeviceProfile
 
-     {
 
-         public CloudSyncProfile(bool supportsAc3, bool supportsDca)
 
-         {
 
-             Name = "Cloud Sync";
 
-             MaxStreamingBitrate = 20000000;
 
-             MaxStaticBitrate = 20000000;
 
-             var mkvAudio = "aac,mp3";
 
-             var mp4Audio = "aac";
 
-             if (supportsAc3)
 
-             {
 
-                 mkvAudio += ",ac3";
 
-                 mp4Audio += ",ac3";
 
-             }
 
-             if (supportsDca)
 
-             {
 
-                 mkvAudio += ",dca";
 
-             }
 
-             var videoProfile = "high|main|baseline|constrained baseline";
 
-             var videoLevel = "40";
 
-             DirectPlayProfiles = new[]
 
-             {
 
-                 //new DirectPlayProfile
 
-                 //{
 
-                 //    Container = "mkv",
 
-                 //    VideoCodec = "h264,mpeg4",
 
-                 //    AudioCodec = mkvAudio,
 
-                 //    Type = DlnaProfileType.Video
 
-                 //},
 
-                 new DirectPlayProfile
 
-                 {
 
-                     Container = "mp4,mov,m4v",
 
-                     VideoCodec = "h264,mpeg4",
 
-                     AudioCodec = mp4Audio,
 
-                     Type = DlnaProfileType.Video
 
-                 },
 
-                 new DirectPlayProfile
 
-                 {
 
-                     Container = "mp3",
 
-                     Type = DlnaProfileType.Audio
 
-                 }
 
-             };
 
-             ContainerProfiles = new[]
 
-             {
 
-                 new ContainerProfile
 
-                 { 
 
-                     Type = DlnaProfileType.Video,
 
-                     Conditions = new []
 
-                     {
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.NotEquals,
 
-                             Property = ProfileConditionValue.NumAudioStreams,
 
-                             Value = "0",
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.EqualsAny,
 
-                             Property = ProfileConditionValue.NumVideoStreams,
 
-                             Value = "1",
 
-                             IsRequired = false
 
-                         }
 
-                     }
 
-                 }
 
-             };
 
-             var codecProfiles = new List<CodecProfile>
 
-             {
 
-                 new CodecProfile
 
-                 {
 
-                     Type = CodecType.Video,
 
-                     Codec = "h264",
 
-                     Conditions = new []
 
-                     {
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.VideoBitDepth,
 
-                             Value = "8",
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.Width,
 
-                             Value = "1920",
 
-                             IsRequired = true
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.Height,
 
-                             Value = "1080",
 
-                             IsRequired = true
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.RefFrames,
 
-                             Value = "4",
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.VideoFramerate,
 
-                             Value = "30",
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.Equals,
 
-                             Property = ProfileConditionValue.IsAnamorphic,
 
-                             Value = "false",
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.VideoLevel,
 
-                             Value = videoLevel,
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.EqualsAny,
 
-                             Property = ProfileConditionValue.VideoProfile,
 
-                             Value = videoProfile,
 
-                             IsRequired = false
 
-                         }
 
-                     }
 
-                 },
 
-                 new CodecProfile
 
-                 {
 
-                     Type = CodecType.Video,
 
-                     Codec = "mpeg4",
 
-                     Conditions = new []
 
-                     {
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.VideoBitDepth,
 
-                             Value = "8",
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.Width,
 
-                             Value = "1920",
 
-                             IsRequired = true
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.Height,
 
-                             Value = "1080",
 
-                             IsRequired = true
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.RefFrames,
 
-                             Value = "4",
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.VideoFramerate,
 
-                             Value = "30",
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.Equals,
 
-                             Property = ProfileConditionValue.IsAnamorphic,
 
-                             Value = "false",
 
-                             IsRequired = false
 
-                         }
 
-                     }
 
-                 }
 
-             };
 
-             codecProfiles.Add(new CodecProfile
 
-             {
 
-                 Type = CodecType.VideoAudio,
 
-                 Codec = "ac3",
 
-                 Conditions = new[]
 
-                     {
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.AudioChannels,
 
-                             Value = "6",
 
-                             IsRequired = false
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.AudioBitrate,
 
-                             Value = "320000",
 
-                             IsRequired = true
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.Equals,
 
-                             Property = ProfileConditionValue.IsSecondaryAudio,
 
-                             Value = "false",
 
-                             IsRequired = false
 
-                         }
 
-                     }
 
-             });
 
-             codecProfiles.Add(new CodecProfile
 
-             {
 
-                 Type = CodecType.VideoAudio,
 
-                 Codec = "aac,mp3",
 
-                 Conditions = new[]
 
-                     {
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.AudioChannels,
 
-                             Value = "2",
 
-                             IsRequired = true
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.LessThanEqual,
 
-                             Property = ProfileConditionValue.AudioBitrate,
 
-                             Value = "320000",
 
-                             IsRequired = true
 
-                         },
 
-                         new ProfileCondition
 
-                         {
 
-                             Condition = ProfileConditionType.Equals,
 
-                             Property = ProfileConditionValue.IsSecondaryAudio,
 
-                             Value = "false",
 
-                             IsRequired = false
 
-                         }
 
-                     }
 
-             });
 
-             CodecProfiles = codecProfiles.ToArray();
 
-             SubtitleProfiles = new[]
 
-             {
 
-                 new SubtitleProfile
 
-                 {
 
-                     Format = "srt",
 
-                     Method = SubtitleDeliveryMethod.External
 
-                 },
 
-                 new SubtitleProfile
 
-                 {
 
-                     Format = "vtt",
 
-                     Method = SubtitleDeliveryMethod.External
 
-                 }
 
-             };
 
-             TranscodingProfiles = new[]
 
-             {
 
-                 new TranscodingProfile
 
-                 {
 
-                     Container = "mp3",
 
-                     AudioCodec = "mp3",
 
-                     Type = DlnaProfileType.Audio,
 
-                     Context = EncodingContext.Static
 
-                 },
 
-                 new TranscodingProfile
 
-                 {
 
-                     Container = "mp4",
 
-                     Type = DlnaProfileType.Video,
 
-                     AudioCodec = "aac",
 
-                     VideoCodec = "h264",
 
-                     Context = EncodingContext.Static
 
-                 },
 
-                 new TranscodingProfile
 
-                 {
 
-                     Container = "jpeg",
 
-                     Type = DlnaProfileType.Photo,
 
-                     Context = EncodingContext.Static
 
-                 }
 
-             };
 
-         }
 
-     }
 
- }
 
 
  |