internal MediaControlMetadata(IntPtr handle) { Debug.Assert(handle != IntPtr.Zero); Title = Native.GetMetadata(handle, MediaControllerNativeAttribute.Title); Artist = Native.GetMetadata(handle, MediaControllerNativeAttribute.Artist); Album = Native.GetMetadata(handle, MediaControllerNativeAttribute.Album); Author = Native.GetMetadata(handle, MediaControllerNativeAttribute.Author); Genre = Native.GetMetadata(handle, MediaControllerNativeAttribute.Genre); Duration = Native.GetMetadata(handle, MediaControllerNativeAttribute.Duration); Date = Native.GetMetadata(handle, MediaControllerNativeAttribute.Date); Copyright = Native.GetMetadata(handle, MediaControllerNativeAttribute.Copyright); Description = Native.GetMetadata(handle, MediaControllerNativeAttribute.Description); TrackNumber = Native.GetMetadata(handle, MediaControllerNativeAttribute.TrackNumber); AlbumArtPath = Native.GetMetadata(handle, MediaControllerNativeAttribute.Picture); EncodedSeason = Native.GetMetadata(handle, MediaControllerNativeAttribute.Season); Season = DecodeSeason(EncodedSeason); EncodedEpisode = Native.GetMetadata(handle, MediaControllerNativeAttribute.Episode); Episode = DecodeEpisode(EncodedEpisode); EncodedResolution = Native.GetMetadata(handle, MediaControllerNativeAttribute.Resolution); Resolution = DecodeResolution(EncodedResolution); }
internal MediaControlMetadata(IntPtr handle) { // If native framework return null handle, // it means server doesn't set metadata yet and it's not error. // So we need to return empty metadata instance as native framework does. if (handle == IntPtr.Zero) { return; } Title = Native.GetMetadata(handle, MediaControllerNativeAttribute.Title); Artist = Native.GetMetadata(handle, MediaControllerNativeAttribute.Artist); Album = Native.GetMetadata(handle, MediaControllerNativeAttribute.Album); Author = Native.GetMetadata(handle, MediaControllerNativeAttribute.Author); Genre = Native.GetMetadata(handle, MediaControllerNativeAttribute.Genre); Duration = Native.GetMetadata(handle, MediaControllerNativeAttribute.Duration); Date = Native.GetMetadata(handle, MediaControllerNativeAttribute.Date); Copyright = Native.GetMetadata(handle, MediaControllerNativeAttribute.Copyright); Description = Native.GetMetadata(handle, MediaControllerNativeAttribute.Description); TrackNumber = Native.GetMetadata(handle, MediaControllerNativeAttribute.TrackNumber); AlbumArtPath = Native.GetMetadata(handle, MediaControllerNativeAttribute.Picture); EncodedSeason = Native.GetMetadata(handle, MediaControllerNativeAttribute.Season); EncodedEpisode = Native.GetMetadata(handle, MediaControllerNativeAttribute.Episode); EncodedResolution = Native.GetMetadata(handle, MediaControllerNativeAttribute.Resolution); }
internal MediaControlMetadata(IntPtr handle) { Debug.Assert(handle != IntPtr.Zero); Title = Native.GetMetadata(handle, MediaControllerNativeAttribute.Title); Artist = Native.GetMetadata(handle, MediaControllerNativeAttribute.Artist); Album = Native.GetMetadata(handle, MediaControllerNativeAttribute.Album); Author = Native.GetMetadata(handle, MediaControllerNativeAttribute.Author); Genre = Native.GetMetadata(handle, MediaControllerNativeAttribute.Genre); Duration = Native.GetMetadata(handle, MediaControllerNativeAttribute.Duration); Date = Native.GetMetadata(handle, MediaControllerNativeAttribute.Date); Copyright = Native.GetMetadata(handle, MediaControllerNativeAttribute.Copyright); Description = Native.GetMetadata(handle, MediaControllerNativeAttribute.Description); TrackNumber = Native.GetMetadata(handle, MediaControllerNativeAttribute.TrackNumber); AlbumArtPath = Native.GetMetadata(handle, MediaControllerNativeAttribute.Picture); }