コード例 #1
0
ファイル: DidlBuilder.cs プロジェクト: leaty/Emby
        private void AddSamsungBookmarkInfo(BaseItem item, User user, XmlWriter writer)
        {
            if (!item.SupportsPositionTicksResume || item is Folder)
            {
                return;
            }

            MediaBrowser.Model.Dlna.XmlAttribute secAttribute = null;
            foreach (var attribute in _profile.XmlRootAttributes)
            {
                if (string.Equals(attribute.Name, "xmlns:sec", StringComparison.OrdinalIgnoreCase))
                {
                    secAttribute = attribute;
                    break;
                }
            }

            // Not a samsung device
            if (secAttribute == null)
            {
                return;
            }

            var userdata = _userDataManager.GetUserData(user.Id, item);

            if (userdata.PlaybackPositionTicks > 0)
            {
                var elementValue = string.Format("BM={0}", Convert.ToInt32(TimeSpan.FromTicks(userdata.PlaybackPositionTicks).TotalSeconds).ToString(_usCulture));
                AddValue(writer, "sec", "dcmInfo", elementValue, secAttribute.Value);
            }
        }
コード例 #2
0
ファイル: DeviceProfile.cs プロジェクト: Ceten/MediaBrowser
 public DeviceProfile()
 {
     DirectPlayProfiles = new DirectPlayProfile[] { };
     TranscodingProfiles = new TranscodingProfile[] { };
     ResponseProfiles = new ResponseProfile[] { };
     CodecProfiles = new CodecProfile[] { };
     ContainerProfiles = new ContainerProfile[] { };
     SubtitleProfiles = new SubtitleProfile[] { };
  
     XmlRootAttributes = new XmlAttribute[] { };
     
     SupportedMediaTypes = "Audio,Photo,Video";
 }
コード例 #3
0
ファイル: DeviceProfile.cs プロジェクト: 7illusions/Emby
 public DeviceProfile()
 {
     DirectPlayProfiles = new DirectPlayProfile[] { };
     TranscodingProfiles = new TranscodingProfile[] { };
     ResponseProfiles = new ResponseProfile[] { };
     CodecProfiles = new CodecProfile[] { };
     ContainerProfiles = new ContainerProfile[] { };
     SubtitleProfiles = new SubtitleProfile[] { };
  
     XmlRootAttributes = new XmlAttribute[] { };
     
     SupportedMediaTypes = "Audio,Photo,Video";
     MaxStreamingBitrate = 8000000;
     MaxStaticBitrate = 8000000;
     MusicStreamingTranscodingBitrate = 128000;
 }