VLCMediaParsedStatus
Currently writing tests for VLCMedia and came across this in VLCMedia.h
typedef NS_ENUM(unsigned, VLCMediaParsedStatus)
{
VLCMediaParsedStatusInit = 0,
VLCMediaParsedStatusSkipped,
VLCMediaParsedStatusFailed,
VLCMediaParsedStatusDone
};
but in libvlc_media.h
typedef enum libvlc_media_parsed_status_t
{
libvlc_media_parsed_status_skipped = 1,
libvlc_media_parsed_status_failed,
libvlc_media_parsed_status_timeout,
libvlc_media_parsed_status_done,
} libvlc_media_parsed_status_t;
Are we missing a VLCMediaParsedStatusTimeout after VLCMediaParsedStatusFailed?
I came across this because while writing tests for VLCMedia
let media = VLCMedia(path: Video.test1.path)
let res = media.parse(withOptions: VLCMediaParsingOptions(VLCMediaParseLocal))
keyValueObservingExpectation(for: media, keyPath: "parsedStatus", expectedValue: VLCMediaParsedStatus.done.rawValue)
waitForExpectations(timeout: 10, handler: nil)
I kept getting a rawValue of 4 - which doesn't exist in the current VLCMediaParsedStatus enum - instead of the expected values. However, if VLCMediaParsedStatus was
typedef NS_ENUM(unsigned, VLCMediaParsedStatus)
{
VLCMediaParsedStatusInit = 0,
VLCMediaParsedStatusSkipped,
VLCMediaParsedStatusFailed,
VLCMediaParsedStatusTimeout,
VLCMediaParsedStatusDone
};
rawValue of 4 would indicate Done!
I have double checked that
Video.test1.pathis valid.