-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
571 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Constants.cs | ||
* | ||
* Created: 2023-10-10-02:59:41 | ||
* Modified: 2023-10-10-02:59:41 | ||
* | ||
* Author: David G. Moore, Jr. <david@dgmjr.io> | ||
* | ||
* Copyright © 2022 - 2023 David G. Moore, Jr., All Rights Reserved | ||
* License: MIT (https://opensource.org/licenses/MIT) | ||
*/ | ||
|
||
namespace Dgmjr.Mime; | ||
|
||
public static class Constants | ||
{ | ||
/// <value>https://www.iana.org/assignments/media-types/</value> | ||
public const string IanaMediaTypeUrlBase = "https://www.iana.org/assignments/media-types/"; | ||
|
||
/// <value>https://www.rfc-editor.org/rfc/</value> | ||
public const string RfcUrlBase = "https://www.rfc-editor.org/rfc/"; | ||
|
||
/// <value>urn:ietf:rfc</value> | ||
public const string IetfRfcUrnBase = "urn:ietf:rfc"; | ||
|
||
/// <value>urn:iana:mime</value> | ||
public const string MimeUrnBase = "urn:iana:mime"; | ||
|
||
/// <value>media-types.xhtml</value> | ||
public const string MediaTypes_xhtml = "media-types.xhtml"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* VideoMediaType.cs | ||
* | ||
* Created: 2023-03-18-07:00:15 | ||
* Modified: 2023-03-18-07:00:15 | ||
* | ||
* Author: David G. Moore, Jr. <david@dgmjr.io> | ||
* | ||
* Copyright © 2022-2023 David G. Moore, Jr., All Rights Reserved | ||
* License: MIT (https://opensource.org/licenses/MIT) | ||
*/ | ||
|
||
namespace Dgmjr.Mime.Enums; | ||
|
||
using static Dgmjr.Mime.Constants; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
|
||
[GenerateEnumerationRecordStruct("Video", "Dgmjr.Mime")] | ||
public enum VideoMediaTypes : int | ||
{ | ||
[Display(Name = VideoMediaTypeNames.Any, Description = nameof(Any))] | ||
[Uri(IanaMediaTypeUrlBase + "#video")] | ||
Any = int.MaxValue, | ||
|
||
[Display(Name = VideoMediaTypeNames.Base, Description = nameof(Base))] | ||
[Uri(IanaMediaTypeUrlBase + "#video-*")] | ||
Base = 0, | ||
|
||
[Display(Name = VideoMediaTypeNames.Mpeg, Description = nameof(Mpeg))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.Mpeg)] | ||
Mpeg, | ||
|
||
[Display(Name = VideoMediaTypeNames.Mpeg4, Description = nameof(Mpeg4))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.Mpeg4)] | ||
Mpeg4, | ||
|
||
[Display(Name = VideoMediaTypeNames.Mpeg4Generic, Description = nameof(Mpeg4Generic))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.Mpeg4Generic)] | ||
Mpeg4Generic, | ||
|
||
[Display(Name = VideoMediaTypeNames.Mp4, Description = nameof(Mp4))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.Mp4)] | ||
Mp4, | ||
|
||
[Display(Name = VideoMediaTypeNames.Ogg, Description = nameof(Ogg))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.Ogg)] | ||
Ogg, | ||
|
||
[Display(Name = VideoMediaTypeNames.QuickTime, Description = nameof(QuickTime))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.QuickTime)] | ||
QuickTime, | ||
|
||
[Display(Name = VideoMediaTypeNames.WebM, Description = nameof(WebM))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.WebM)] | ||
WebM, | ||
|
||
[Display(Name = VideoMediaTypeNames.H264, Description = nameof(H264))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.H264)] | ||
H264, | ||
|
||
[Display(Name = VideoMediaTypeNames.H265, Description = nameof(H265))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.H265)] | ||
H265, | ||
|
||
[Display(Name = VideoMediaTypeNames.Theora, Description = nameof(Theora))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.Theora)] | ||
Theora, | ||
|
||
[Display(Name = VideoMediaTypeNames.Vp8, Description = nameof(Vp8))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.Vp8)] | ||
Vp8, | ||
|
||
[Display(Name = VideoMediaTypeNames.Vp9, Description = nameof(Vp9))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.Vp9)] | ||
Vp9, | ||
|
||
[Display(Name = VideoMediaTypeNames.Vorbis, Description = nameof(Vorbis))] | ||
[Uri(IanaMediaTypeUrlBase + VideoMediaTypeNames.Vorbis)] | ||
Vorbis | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* VideoMediaTypeNames.cs | ||
* | ||
* Created: 2022-12-31-01:35:40 | ||
* Modified: 2022-12-31-01:35:40 | ||
* | ||
* Author: David G. Moore, Jr, <david@dgmjr.io> | ||
* | ||
* Copyright © 2022-2023 David G. Moore, Jr,, All Rights Reserved | ||
* License: MIT (https://opensource.org/licenses/MIT) | ||
*/ | ||
|
||
namespace Dgmjr.Mime; | ||
|
||
using System.Runtime.Serialization; | ||
|
||
public class Foo | ||
{ | ||
public static void Go() | ||
{ | ||
var mp4 = Mime.Video.Mp4.Instance; | ||
} | ||
} | ||
|
||
public static class VideoMediaTypeNames | ||
{ | ||
public const string Base = "video"; | ||
public const string Any = Base + "/" + "*"; | ||
public const string Mpeg = Base + "/" + "mpeg"; | ||
public const string Mpeg4 = Base + "/" + "mp4"; | ||
public const string Mpeg4Generic = Base + "/" + "mp4; codecs=avc1.42E01E, mp4a.40.2"; | ||
public const string Mp4 = Base + "/" + "mp4"; | ||
public const string Ogg = Base + "/" + "ogg"; | ||
public const string QuickTime = Base + "/" + "quicktime"; | ||
public const string WebM = Base + "/" + "webm"; | ||
public const string H264 = Base + "/" + "H264"; | ||
public const string H265 = Base + "/" + "H265"; | ||
public const string Theora = Base + "/" + "Theora"; | ||
public const string Vp8 = Base + "/" + "VP8"; | ||
public const string Vp9 = Base + "/" + "VP9"; | ||
public const string Vorbis = Base + "/" + "Vorbis"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
./clean.ps1 | ||
dotnet build ./src/*.csproj; | ||
dotnet build ./src/*.csproj; | ||
dotnet build ./Samples/*.csproj; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rm -rf **/obj | ||
rm -rf **/bin |
Oops, something went wrong.