Skip to content

Commit

Permalink
add explicit playback information from media
Browse files Browse the repository at this point in the history
  • Loading branch information
LePips committed Oct 11, 2022
1 parent 5e1a021 commit 1f05c08
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
16 changes: 15 additions & 1 deletion Sources/VLCUI/UIVLCVideoPlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,21 @@ extension UIVLCVideoPlayerView: VLCMediaPlayerDelegate {
currentAudioTrack: currentAudioTrack,
subtitleTracks: zippedSubtitleTracks,
audioTracks: zippedAudioTracks,
stats: media.stats ?? [:]
numberOfReadBytesOnInput: media.numberOfReadBytesOnInput,
inputBitrate: media.inputBitrate,
numberOfReadBytesOnDemux: media.numberOfReadBytesOnDemux,
demuxBitrate: media.demuxBitrate,
numberOfDecodedVideoBlocks: media.numberOfDecodedVideoBlocks,
numberOfDecodedAudioBlocks: media.numberOfDecodedAudioBlocks,
numberOfDisplayedPictures: media.numberOfDisplayedPictures,
numberOfLostPictures: media.numberOfLostPictures,
numberOfPlayedAudioBuffers: media.numberOfPlayedAudioBuffers,
numberOfLostAudioBuffers: media.numberOfLostAudioBuffers,
numberOfSentPackets: media.numberOfSentBytes,
numberOfSentBytes: media.numberOfSentBytes,
streamOutputBitrate: media.streamOutputBitrate,
numberOfCorruptedDataPackets: media.numberOfCorruptedDataPackets,
numberOfDiscontinuties: media.numberOfDiscontinuties
)
}

Expand Down
16 changes: 15 additions & 1 deletion Sources/VLCUI/VLCVideoPlayer/PlaybackInformation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ public extension VLCVideoPlayer {
public let subtitleTracks: [Int32: String]
public let audioTracks: [Int32: String]

public let stats: [AnyHashable: Any]
public let numberOfReadBytesOnInput: Int
public let inputBitrate: Float
public let numberOfReadBytesOnDemux: Int
public let demuxBitrate: Float
public let numberOfDecodedVideoBlocks: Int
public let numberOfDecodedAudioBlocks: Int
public let numberOfDisplayedPictures: Int
public let numberOfLostPictures: Int
public let numberOfPlayedAudioBuffers: Int
public let numberOfLostAudioBuffers: Int
public let numberOfSentPackets: Int
public let numberOfSentBytes: Int
public let streamOutputBitrate: Float
public let numberOfCorruptedDataPackets: Int
public let numberOfDiscontinuties: Int
}
}

0 comments on commit 1f05c08

Please # to comment.