Skip to content

Commit

Permalink
Add field codecTagString for differentiation of subcodecs (#11)
Browse files Browse the repository at this point in the history
* Add field codecTagString for differentiation of subcodecs

* codecTagString nullable
  • Loading branch information
Lunkers authored Apr 25, 2023
1 parent 6532473 commit 01496f0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/kotlin/se/svt/oss/mediaanalyzer/MediaAnalyzer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ class MediaAnalyzer
bitDepth = ffVideoStream.bits_per_raw_sample ?: videoTrack?.bitDepth,
numFrames = numFrames,
isInterlaced = interlaced,
transferCharacteristics = videoTrack?.transferCharacteristics
transferCharacteristics = videoTrack?.transferCharacteristics,
codecTagString = ffVideoStream.codec_tag_string
)
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/kotlin/se/svt/oss/mediaanalyzer/file/VideoStream.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ data class VideoStream(
val bitDepth: Int?,
val numFrames: Int,
val isInterlaced: Boolean,
val transferCharacteristics: String?
val transferCharacteristics: String?,
val codecTagString: String?
)
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class MediaAnalyzerIntegrationTest {
.hasBitDepth(10)
.hasNumFrames(250)
.hasTransferCharacteristics(null)
.hasCodecTagString("avc1")

assertThat(videoFile.audioStreams).hasSize(1)
assertThat(videoFile.audioStreams)
Expand Down

0 comments on commit 01496f0

Please sign in to comment.