4using System.Threading.Tasks;
93 if (ContentType.StartsWith(
"video/"))
115 public Task<ContentResponse>
DecodeAsync(
string ContentType,
byte[] Data, Encoding Encoding,
116 KeyValuePair<string, string>[] Fields, Uri BaseUri,
ICodecProgress Progress)
129 switch (FileExtension.ToLower())
137 ContentType =
"video/mp4";
146 ContentType =
"video/mpeg";
150 ContentType =
"video/ogg";
155 ContentType =
"video/quicktime";
159 ContentType =
"video/webm";
164 ContentType =
"video/x-la-asf";
170 ContentType =
"video/x-ms-asf";
174 ContentType =
"video/x-msvideo";
178 ContentType =
"video/x-sgi-movie";
182 ContentType =
"video/3gpp";
186 ContentType =
"video/3gpp2";
190 ContentType =
"video/x-flv";
194 ContentType =
"video/x-wmv";
198 ContentType =
string.Empty;
211 switch (ContentType.ToLower())
214 FileExtension =
"mp4";
218 FileExtension =
"mpg";
222 FileExtension =
"ogv";
225 case "video/quicktime":
226 FileExtension =
"mov";
230 FileExtension =
"webm";
233 case "video/x-la-asf":
234 FileExtension =
"lsf";
237 case "video/x-ms-asf":
238 FileExtension =
"asf";
241 case "video/x-msvideo":
242 FileExtension =
"avi";
245 case "video/x-sgi-movie":
246 FileExtension =
"movie";
250 FileExtension =
"3gp";
254 FileExtension =
"3g2";
258 FileExtension =
"flv";
262 FileExtension =
"wmv";
266 FileExtension =
string.Empty;
Contains information about a response to a content request.
Binary video decoder. Is used to identify video content, but does not have actual decoding of corresp...
static readonly string[] VideoFileExtensions
Video content types.
bool Decodes(string ContentType, out Grade Grade)
If the decoder decodes an object with a given content type.
VideoDecoder()
Binary video decoder. Is used to identify video content, but does not have actual decoding of corresp...
static readonly string[] VideoContentTypes
Video content types.
bool TryGetContentType(string FileExtension, out string ContentType)
Tries to get the content type of an item, given its file extension.
Task< ContentResponse > DecodeAsync(string ContentType, byte[] Data, Encoding Encoding, KeyValuePair< string, string >[] Fields, Uri BaseUri, ICodecProgress Progress)
Decodes an object.
bool TryGetFileExtension(string ContentType, out string FileExtension)
Tries to get the file extension of an item, given its Content-Type.
string[] FileExtensions
Supported file extensions.
string[] ContentTypes
Supported content types.
Interface for reporting progress about an encoding or decoding.
Basic interface for Internet Content decoders. A class implementing this interface and having a defau...