Skip to content

Commit 9ec25dc

Browse files
committed
TIKA-4838 - wording: drms/enca/encv/drmi are protected sample entry formats, not protection schemes
1 parent 957f037 commit 9ec25dc

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

tika-core/src/main/java/org/apache/tika/metadata/Audio.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ public interface Audio {
8686

8787
/**
8888
* The audio track's four-character codec identifier from the MP4/QuickTime
89-
* sample description (e.g. "mp4a" for AAC, "alac", "ac-3"), or the protection
90-
* scheme ("drms"/"enca") for protected streams, where {@link #HAS_DRM} is also
91-
* set. A per-stream value: with several audio tracks it reflects the last one.
89+
* sample description (e.g. "mp4a" for AAC, "alac", "ac-3"), or the protected
90+
* sample entry format ("drms"/"enca") for protected streams, where {@link #HAS_DRM}
91+
* is also set. A per-stream value: with several audio tracks it reflects the last one.
9292
* Distinct from {@link XMPDM#AUDIO_COMPRESSOR}, the human-readable codec name.
9393
*/
9494
Property FORMAT = Property.internalText("audio:format");

tika-core/src/main/java/org/apache/tika/metadata/Video.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public interface Video {
4141
/**
4242
* The video track's four-character codec identifier from the MP4/QuickTime
4343
* sample description (e.g. "avc1" for H.264, "hvc1"/"hev1" for HEVC), or the
44-
* protection scheme ("encv"/"drmi") for protected streams. A per-stream value:
44+
* protected sample entry format ("encv"/"drmi") for protected streams. A per-stream value:
4545
* with several video tracks it reflects the last one. Distinct from
4646
* {@link XMPDM#VIDEO_COMPRESSOR}, the human-readable compressor name.
4747
*/

tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-audiovideo-module/src/main/java/org/apache/tika/parser/mp4/TikaMp4SoundHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ private void extractFromSampleDescriptions(byte[] b) {
7070
}
7171
int end = pos + (int) size;
7272
String format = fourCc(b, pos + 4);
73-
//protected streams carry a protection scheme fourcc as the format:
74-
//'drms' (FairPlay) or 'enca' (ISO common encryption)
73+
//protected streams carry a protected sample entry format as the fourcc:
74+
//'drms' (FairPlay) or 'enca' (generic protected audio)
7575
if ("drms".equals(format) || "enca".equals(format)) {
7676
tikaMetadata.set(Audio.HAS_DRM, true);
7777
}

tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-audiovideo-module/src/main/java/org/apache/tika/parser/mp4/TikaMp4VideoHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private void extractFromSampleDescriptions(byte[] b) {
7777
}
7878
int end = pos + (int) size;
7979
//the format fourcc is the video codec ('avc1', 'hev1', ...) or, for
80-
//protected streams, the protection scheme ('encv'/'drmi')
80+
//protected streams, the protected sample entry format ('encv'/'drmi')
8181
tikaMetadata.set(Video.FORMAT, fourCc(b, pos + 4));
8282
int bitRate = findBtrtAverageBitRate(b, pos + VISUAL_ENTRY_SIZE, end);
8383
if (bitRate > 0) {

0 commit comments

Comments
 (0)