Files
ce_cdm/cdm/test/test_version.cpp
2024-09-05 07:02:36 +00:00

27 lines
744 B
C++

// Copyright 2022 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine License
// Agreement.
#include <stdio.h>
#include "cdm.h"
#include "cdm_version.h"
int main(int argc, char** argv) {
if (argc != 2) {
fprintf(stderr, "Usage: %s <VERSION>\n", argv[0]);
return 1;
}
const char* bundle_version = argv[1];
fprintf(stderr, "Header: " CDM_VERSION "\n");
fprintf(stderr, "Library: %s\n", widevine::Cdm::version());
fprintf(stderr, "Bundle: %s\n", bundle_version);
if (strcmp(CDM_VERSION, widevine::Cdm::version()) ||
strcmp(CDM_VERSION, bundle_version)) {
fprintf(stderr, "ERROR: Mismatched version\n");
return 1;
}
return 0;
}