2_Concepts_and_Techniques/EGLStream_CUDA_Interop: Update types for CUDA consumer to use const char* to resolve build warnings

This commit is contained in:
Rob Armstrong 2025-02-11 17:41:59 -08:00
parent 5932d18738
commit 93f1c78c5b
2 changed files with 8 additions and 8 deletions

View File

@ -39,7 +39,7 @@ EXTENSION_LIST(EXTLST_EXTERN)
int checkbuf(FILE *fp1, FILE *fp2);
CUresult cudaConsumerTest(test_cuda_consumer_s *data, char *fileName) {
CUresult cudaConsumerTest(test_cuda_consumer_s *data, const char *fileName) {
CUresult cuStatus = CUDA_SUCCESS;
CUarray cudaArr = NULL;
CUeglFrame cudaEgl;
@ -309,8 +309,8 @@ void cuda_consumer_init(test_cuda_consumer_s *cudaConsumer, TestArgs *args) {
cudaConsumer->fileName1 = args->infile1;
cudaConsumer->fileName2 = args->infile2;
cudaConsumer->outFile1 = "cuda_out1.yuv";
cudaConsumer->outFile2 = "cuda_out2.yuv";
cudaConsumer->outFile1 = const_cast<char *>("cuda_out1.yuv");
cudaConsumer->outFile2 = const_cast<char *>("cuda_out2.yuv");
}
CUresult cuda_consumer_deinit(test_cuda_consumer_s *cudaConsumer) {

View File

@ -47,16 +47,16 @@ typedef struct _test_cuda_consumer_s {
bool pitchLinearOutput;
unsigned int width;
unsigned int height;
char *fileName1;
char *fileName2;
char *outFile1;
char *outFile2;
const char *fileName1;
const char *fileName2;
const char *outFile1;
const char *outFile2;
unsigned int frameCount;
} test_cuda_consumer_s;
void cuda_consumer_init(test_cuda_consumer_s *cudaConsumer, TestArgs *args);
CUresult cuda_consumer_deinit(test_cuda_consumer_s *cudaConsumer);
CUresult cudaConsumerTest(test_cuda_consumer_s *data, char *outFile);
CUresult cudaConsumerTest(test_cuda_consumer_s *data, const char *outFile);
CUresult cudaDeviceCreateConsumer(test_cuda_consumer_s *cudaConsumer,
CUdevice device);
#endif