Skip to content

Commit

Permalink
Consistent capitalisation of "QuickTime".
Browse files Browse the repository at this point in the history
  • Loading branch information
drewnoakes committed Sep 13, 2016
1 parent 94ce467 commit c95d647
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
namespace MetadataExtractor.Formats.QuickTime
{
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
public sealed class QuicktimeFileTypeDirectory : Directory
public sealed class QuickTimeFileTypeDirectory : Directory
{
public const int TagMajorBrand = 1;
public const int TagMinorVersion = 2;
public const int TagCompatibleBrands = 3;

public override string Name { get; } = "Quicktime File Type";
public override string Name { get; } = "QuickTime File Type";

private static readonly Dictionary<int, string> _tagNameMap = new Dictionary<int, string>
{
Expand All @@ -42,9 +42,9 @@ public sealed class QuicktimeFileTypeDirectory : Directory
{ TagCompatibleBrands, "Compatible Brands" }
};

public QuicktimeFileTypeDirectory()
public QuickTimeFileTypeDirectory()
{
SetDescriptor(new TagDescriptor<QuicktimeFileTypeDirectory>(this));
SetDescriptor(new TagDescriptor<QuickTimeFileTypeDirectory>(this));
}

protected override bool TryGetTagName(int tagType, out string tagName)
Expand Down
44 changes: 22 additions & 22 deletions MetadataExtractor/Formats/QuickTime/QuickTimeMetadataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace MetadataExtractor.Formats.QuickTime
{
public static class QuicktimeMetadataReader
public static class QuickTimeMetadataReader
{
private static readonly DateTime _epoch = new DateTime(1904, 1, 1);

Expand Down Expand Up @@ -83,25 +83,25 @@ public static
{
case "mvhd":
{
var directory = new QuicktimeMovieHeaderDirectory();
directory.Set(QuicktimeMovieHeaderDirectory.TagVersion, a.Reader.GetByte());
directory.Set(QuicktimeMovieHeaderDirectory.TagFlags, a.Reader.GetBytes(3));
directory.Set(QuicktimeMovieHeaderDirectory.TagCreated, _epoch.AddTicks(TimeSpan.TicksPerSecond*a.Reader.GetUInt32()));
directory.Set(QuicktimeMovieHeaderDirectory.TagModified, _epoch.AddTicks(TimeSpan.TicksPerSecond*a.Reader.GetUInt32()));
var directory = new QuickTimeMovieHeaderDirectory();
directory.Set(QuickTimeMovieHeaderDirectory.TagVersion, a.Reader.GetByte());
directory.Set(QuickTimeMovieHeaderDirectory.TagFlags, a.Reader.GetBytes(3));
directory.Set(QuickTimeMovieHeaderDirectory.TagCreated, _epoch.AddTicks(TimeSpan.TicksPerSecond*a.Reader.GetUInt32()));
directory.Set(QuickTimeMovieHeaderDirectory.TagModified, _epoch.AddTicks(TimeSpan.TicksPerSecond*a.Reader.GetUInt32()));
var timeScale = a.Reader.GetUInt32();
directory.Set(QuicktimeMovieHeaderDirectory.TagTimeScale, timeScale);
directory.Set(QuicktimeMovieHeaderDirectory.TagDuration, TimeSpan.FromSeconds(a.Reader.GetUInt32()/(double) timeScale));
directory.Set(QuicktimeMovieHeaderDirectory.TagPreferredRate, a.Reader.Get32BitFixedPoint());
directory.Set(QuicktimeMovieHeaderDirectory.TagPreferredVolume, a.Reader.Get16BitFixedPoint());
directory.Set(QuickTimeMovieHeaderDirectory.TagTimeScale, timeScale);
directory.Set(QuickTimeMovieHeaderDirectory.TagDuration, TimeSpan.FromSeconds(a.Reader.GetUInt32()/(double) timeScale));
directory.Set(QuickTimeMovieHeaderDirectory.TagPreferredRate, a.Reader.Get32BitFixedPoint());
directory.Set(QuickTimeMovieHeaderDirectory.TagPreferredVolume, a.Reader.Get16BitFixedPoint());
a.Reader.Skip(10);
directory.Set(QuicktimeMovieHeaderDirectory.TagMatrix, a.Reader.GetBytes(36));
directory.Set(QuicktimeMovieHeaderDirectory.TagPreviewTime, a.Reader.GetUInt32());
directory.Set(QuicktimeMovieHeaderDirectory.TagPreviewDuration, a.Reader.GetUInt32());
directory.Set(QuicktimeMovieHeaderDirectory.TagPosterTime, a.Reader.GetUInt32());
directory.Set(QuicktimeMovieHeaderDirectory.TagSelectionTime, a.Reader.GetUInt32());
directory.Set(QuicktimeMovieHeaderDirectory.TagSelectionDuration, a.Reader.GetUInt32());
directory.Set(QuicktimeMovieHeaderDirectory.TagCurrentTime, a.Reader.GetUInt32());
directory.Set(QuicktimeMovieHeaderDirectory.TagNextTrackId, a.Reader.GetUInt32());
directory.Set(QuickTimeMovieHeaderDirectory.TagMatrix, a.Reader.GetBytes(36));
directory.Set(QuickTimeMovieHeaderDirectory.TagPreviewTime, a.Reader.GetUInt32());
directory.Set(QuickTimeMovieHeaderDirectory.TagPreviewDuration, a.Reader.GetUInt32());
directory.Set(QuickTimeMovieHeaderDirectory.TagPosterTime, a.Reader.GetUInt32());
directory.Set(QuickTimeMovieHeaderDirectory.TagSelectionTime, a.Reader.GetUInt32());
directory.Set(QuickTimeMovieHeaderDirectory.TagSelectionDuration, a.Reader.GetUInt32());
directory.Set(QuickTimeMovieHeaderDirectory.TagCurrentTime, a.Reader.GetUInt32());
directory.Set(QuickTimeMovieHeaderDirectory.TagNextTrackId, a.Reader.GetUInt32());
directories.Add(directory);
break;
}
Expand Down Expand Up @@ -140,13 +140,13 @@ public static
}
case "ftyp":
{
var directory = new QuicktimeFileTypeDirectory();
directory.Set(QuicktimeFileTypeDirectory.TagMajorBrand, a.Reader.Get4ccString());
directory.Set(QuicktimeFileTypeDirectory.TagMinorVersion, a.Reader.GetUInt32());
var directory = new QuickTimeFileTypeDirectory();
directory.Set(QuickTimeFileTypeDirectory.TagMajorBrand, a.Reader.Get4ccString());
directory.Set(QuickTimeFileTypeDirectory.TagMinorVersion, a.Reader.GetUInt32());
var compatibleBrands = new List<string>();
while (a.BytesLeft >= 4)
compatibleBrands.Add(a.Reader.Get4ccString());
directory.Set(QuicktimeFileTypeDirectory.TagCompatibleBrands, compatibleBrands);
directory.Set(QuickTimeFileTypeDirectory.TagCompatibleBrands, compatibleBrands);
directories.Add(directory);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace MetadataExtractor.Formats.QuickTime
{
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
public sealed class QuicktimeMovieHeaderDirectory : Directory
public sealed class QuickTimeMovieHeaderDirectory : Directory
{
public const int TagVersion = 1;
public const int TagFlags = 2;
Expand All @@ -46,7 +46,7 @@ public sealed class QuicktimeMovieHeaderDirectory : Directory
public const int TagCurrentTime = 15;
public const int TagNextTrackId = 16;

public override string Name { get; } = "Quicktime Movie Header";
public override string Name { get; } = "QuickTime Movie Header";

private static readonly Dictionary<int, string> _tagNameMap = new Dictionary<int, string>
{
Expand All @@ -68,9 +68,9 @@ public sealed class QuicktimeMovieHeaderDirectory : Directory
{ TagNextTrackId, "Next Track Id" }
};

public QuicktimeMovieHeaderDirectory()
public QuickTimeMovieHeaderDirectory()
{
SetDescriptor(new TagDescriptor<QuicktimeMovieHeaderDirectory>(this));
SetDescriptor(new TagDescriptor<QuickTimeMovieHeaderDirectory>(this));
}

protected override bool TryGetTagName(int tagType, out string tagName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public sealed class QuickTimeTrackHeaderDirectory : Directory
public const int TagWidth = 10;
public const int TagHeight = 11;

public override string Name { get; } = "Quicktime Track Header";
public override string Name { get; } = "QuickTime Track Header";

private static readonly Dictionary<int, string> _tagNameMap = new Dictionary<int, string>
{
Expand Down
4 changes: 2 additions & 2 deletions MetadataExtractor/ImageMetadataReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace MetadataExtractor
/// <item><see cref="PcxMetadataReader"/> for PCX files</item>
/// <item><see cref="WebPMetadataReader"/> for WebP files</item>
/// <item><see cref="RafMetadataReader"/> for RAF files</item>
/// <item><see cref="QuicktimeMetadataReader"/> for Quicktime files</item>
/// <item><see cref="QuickTimeMetadataReader"/> for QuickTime files</item>
/// </list>
///
/// If you know the file type you're working with, you may use one of the above processors directly.
Expand Down Expand Up @@ -116,7 +116,7 @@ public static
case FileType.Raf:
return RafMetadataReader.ReadMetadata(stream);
case FileType.QuickTime:
return QuicktimeMetadataReader.ReadMetadata(stream);
return QuickTimeMetadataReader.ReadMetadata(stream);
}

throw new ImageProcessingException("File format is not supported");
Expand Down

0 comments on commit c95d647

Please sign in to comment.