private void ValidateMediaInfo(MediaInfo mediaInfo) { // Use a specialized Media info validator // throw a specialized Exception if the media info is not valid }
protected abstract Image GenerateThumbnail(MediaInfo mediaInfo, MediaMetadata mediaMetadata);
protected abstract MediaMetadata ExtractMetadata(MediaInfo mediaInfo);
protected override MediaMetadata ExtractMetadata(MediaInfo mediaInfo) { Console.WriteLine("MediaThumbnailerAudio.ExtractMetadata"); return(new MediaMetadata(MediaType.Video, 1920, 1080, "video/mp4", 3000, 4096000)); }
protected override Image GenerateThumbnail(MediaInfo mediaInfo, MediaMetadata mediaMetadata) { Console.WriteLine("MediaThumbnailerVideo.GenerateThumbnail"); return(CreateImage(480, 270, Color.DarkBlue, Color.WhiteSmoke, "I am a Video Thumbnail")); }
protected override MediaMetadata ExtractMetadata(MediaInfo mediaInfo) { return(new MediaMetadata(MediaType.Image, 400, 300, "image/png", 0, 16297984)); }
protected override MediaMetadata ExtractMetadata(MediaInfo mediaInfo) { Console.WriteLine("MediaThumbnailerAudio.ExtractMetadata"); return(new MediaMetadata(MediaType.Audio, 0, 0, "audio/mp3", 320, 1024000)); }
protected override Image GenerateThumbnail(MediaInfo mediaInfo, MediaMetadata mediaMetadata) { Console.WriteLine("MediaThumbnailerAudio.GenerateThumbnail"); return(CreateImage(300, 300, Color.DarkOliveGreen, Color.White, "I am an Audio Thumbnail")); }