Add some metadata keys that will be used in the future.
This commit is contained in:
1 parent
a98e085a9f
commit
9e4658acb2
6 files changed
+100
-8
No files matched your search
@@ -396,11 +396,12 @@
|
||||
MP42MetadataKeyAppleID, AVMetadataiTunesMetadataKeyAppleID,
|
||||
MP42MetadataKeyArtistID, AVMetadataiTunesMetadataKeyArtistID,
|
||||
MP42MetadataKeyContentID, AVMetadataiTunesMetadataKeySongID,
|
||||
@"Compilation", AVMetadataiTunesMetadataKeyDiscCompilation,
|
||||
MP42MetadataKeyDiscCompilation, AVMetadataiTunesMetadataKeyDiscCompilation,
|
||||
MP42MetadataKeyDiscNumber, AVMetadataiTunesMetadataKeyDiscNumber,
|
||||
MP42MetadataKeyGenreID, AVMetadataiTunesMetadataKeyGenreID,
|
||||
MP42MetadataKeyGrouping, AVMetadataiTunesMetadataKeyGrouping,
|
||||
MP42MetadataKeyPlaylistID, AVMetadataiTunesMetadataKeyPlaylistID,
|
||||
MP42MetadataKeyXID, @"xid ",
|
||||
MP42MetadataKeyContentRating, AVMetadataiTunesMetadataKeyContentRating,
|
||||
MP42MetadataKeyRating, @"com.apple.iTunes.iTunEXTC",
|
||||
MP42MetadataKeyBeatsPerMin, AVMetadataiTunesMetadataKeyBeatsPerMin,
|
||||
@@ -415,14 +416,14 @@
|
||||
MP42MetadataKeyDescription, @"desc",
|
||||
MP42MetadataKeyLongDescription, @"ldes",
|
||||
MP42MetadataKeySeriesDescription, @"sdes",
|
||||
@"Media Kind", @"stik",
|
||||
MP42MetadataKeyMediaKind, @"stik",
|
||||
MP42MetadataKeyTVShow, @"tvsh",
|
||||
MP42MetadataKeyTVEpisodeNumber, @"tves",
|
||||
MP42MetadataKeyTVNetwork, @"tvnn",
|
||||
MP42MetadataKeyTVEpisodeID, @"tven",
|
||||
MP42MetadataKeyTVSeason, @"tvsn",
|
||||
@"HD Video", @"hdvd",
|
||||
@"Gapless", @"pgap",
|
||||
MP42MetadataKeyHDVideo, @"hdvd",
|
||||
MP42MetadataKeyGapless, @"pgap",
|
||||
MP42MetadataKeySortName, @"sonm",
|
||||
MP42MetadataKeySortArtist, @"soar",
|
||||
MP42MetadataKeySortAlbumArtist, @"soaa",
|
||||
@@ -430,7 +431,7 @@
|
||||
MP42MetadataKeySortComposer, @"soco",
|
||||
MP42MetadataKeySortTVShow, @"sosn",
|
||||
MP42MetadataKeyCategory, @"catg",
|
||||
@"iTunes U", @"itnu",
|
||||
MP42MetadataKeyiTunesU, @"itnu",
|
||||
MP42MetadataKeyPurchasedDate, @"purd",
|
||||
MP42MetadataKeyDirector, AVMetadataiTunesMetadataKeyDirector,
|
||||
//AVMetadataiTunesMetadataKeyEQ,
|
||||
|
||||
+7
-2
@@ -49,6 +49,13 @@ extern NSString *const MP42MetadataKeyContentRating;
|
||||
extern NSString *const MP42MetadataKeyEncodedBy;
|
||||
extern NSString *const MP42MetadataKeyEncodingTool;
|
||||
|
||||
// TODO
|
||||
extern NSString *const MP42MetadataKeyCoverArt;
|
||||
extern NSString *const MP42MetadataKeyMediaKind;
|
||||
extern NSString *const MP42MetadataKeyGapless;
|
||||
extern NSString *const MP42MetadataKeyHDVideo;
|
||||
extern NSString *const MP42MetadataKeyiTunesU;
|
||||
|
||||
// Movie and TV Show Specific keys
|
||||
extern NSString *const MP42MetadataKeyStudio;
|
||||
extern NSString *const MP42MetadataKeyCast;
|
||||
@@ -104,8 +111,6 @@ extern NSString *const MP42MetadataKeyAccountCountry;
|
||||
extern NSString *const MP42MetadataKeyPurchasedDate;
|
||||
extern NSString *const MP42MetadataKeyOnlineExtras;
|
||||
|
||||
extern NSString *const MP42MetadataKeyCoverArt; // TO-DO
|
||||
|
||||
// Sort Metadata Keys
|
||||
extern NSString *const MP42MetadataKeySortName;
|
||||
extern NSString *const MP42MetadataKeySortArtist;
|
||||
|
||||
+7
-1
@@ -48,6 +48,12 @@ NSString *const MP42MetadataKeyContentRating = @"Content Rating";
|
||||
NSString *const MP42MetadataKeyEncodedBy = @"Encoded By";
|
||||
NSString *const MP42MetadataKeyEncodingTool = @"Encoding Tool";
|
||||
|
||||
NSString *const MP42MetadataKeyCoverArt = @"Cover Art";
|
||||
NSString *const MP42MetadataKeyMediaKind = @"Media Kind";
|
||||
NSString *const MP42MetadataKeyGapless = @"Gapless";
|
||||
NSString *const MP42MetadataKeyHDVideo = @"HD Video";
|
||||
NSString *const MP42MetadataKeyiTunesU = @"iTunes U";
|
||||
|
||||
NSString *const MP42MetadataKeyStudio = @"Studio";
|
||||
NSString *const MP42MetadataKeyCast = @"Cast";
|
||||
NSString *const MP42MetadataKeyDirector = @"Director";
|
||||
@@ -78,6 +84,7 @@ NSString *const MP42MetadataKeyPerformer = @"Performer";
|
||||
NSString *const MP42MetadataKeyPublisher = @"Publisher";
|
||||
NSString *const MP42MetadataKeySoundEngineer = @"Sound Engineer";
|
||||
NSString *const MP42MetadataKeySoloist = @"Soloist";
|
||||
NSString *const MP42MetadataKeyDiscCompilation = @"Compilation";
|
||||
|
||||
NSString *const MP42MetadataKeyWorkName = @"Work Name";
|
||||
NSString *const MP42MetadataKeyMovementName = @"Movement Name";
|
||||
@@ -1489,7 +1496,6 @@ static const genreType_t genreType_strings[] = {
|
||||
MP4TagsFree(tags);
|
||||
|
||||
// Rewrite extended metadata using the generic iTMF api
|
||||
|
||||
if (tagsDict[MP42MetadataKeyRating]) {
|
||||
|
||||
MP4ItmfItemList *list = MP4ItmfGetItemsByMeaning(fileHandle, "com.apple.iTunes", "iTunEXTC");
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// MP42MetadataItem.h
|
||||
// MP42Foundation
|
||||
//
|
||||
// Created by Damiano Galassi on 25/08/2016.
|
||||
// Copyright © 2016 Damiano Galassi. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
typedef NS_ENUM(NSUInteger, MP42MetadataItemDataType) {
|
||||
MP42MetadataItemDataTypeString,
|
||||
MP42MetadataItemDataTypeBool,
|
||||
MP42MetadataItemDataTypeInteger,
|
||||
MP42MetadataItemDataTypePlist,
|
||||
MP42MetadataItemDataTypeImage,
|
||||
};
|
||||
|
||||
@interface MP42MetadataItem : NSObject
|
||||
|
||||
/* Indicates the identifier of the metadata item. Publicly defined identifiers are declared in AVMetadataIdentifiers.h. */
|
||||
@property (nonatomic, readonly, copy) NSString *identifier;
|
||||
|
||||
/* indicates the IETF BCP 47 (RFC 4646) language identifier of the metadata item; may be nil if no language tag information is available */
|
||||
@property (nonatomic, readonly, copy, nullable) NSString *extendedLanguageTag;
|
||||
|
||||
/* provides the value of the metadata item */
|
||||
@property (nonatomic, readonly, copy, nullable) id<NSObject, NSCopying> value;
|
||||
|
||||
/* indicates the data type of the metadata item's value. */
|
||||
@property (nonatomic, readonly) MP42MetadataItemDataType dataType;
|
||||
|
||||
@end
|
||||
|
||||
@interface MP42MetadataItem (MP42MetadataItemTypeCoercion)
|
||||
|
||||
/* provides the value of the metadata item as a string; will be nil if the value cannot be represented as a string */
|
||||
@property (nonatomic, readonly, nullable) NSString *stringValue;
|
||||
|
||||
/* provides the value of the metadata item as an NSNumber. If the metadata item's value can't be coerced to a number, @"numberValue" will be nil. */
|
||||
@property (nonatomic, readonly, nullable) NSNumber *numberValue;
|
||||
|
||||
/* provides the value of the metadata item as an NSDate. If the metadata item's value can't be coerced to a date, @"dateValue" will be nil. */
|
||||
@property (nonatomic, readonly, nullable) NSDate *dateValue;
|
||||
|
||||
/* provides the raw bytes of the value of the metadata item */
|
||||
@property (nonatomic, readonly, nullable) NSData *dataValue;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// MP42MetadataItem.m
|
||||
// MP42Foundation
|
||||
//
|
||||
// Created by Damiano Galassi on 25/08/2016.
|
||||
// Copyright © 2016 Damiano Galassi. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MP42MetadataItem.h"
|
||||
|
||||
@implementation MP42MetadataItem
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user