diff --git a/src/torchcodec/decoders/_core/VideoDecoderOps.cpp b/src/torchcodec/decoders/_core/VideoDecoderOps.cpp index 7117ccab..7f6bd3b3 100644 --- a/src/torchcodec/decoders/_core/VideoDecoderOps.cpp +++ b/src/torchcodec/decoders/_core/VideoDecoderOps.cpp @@ -94,7 +94,7 @@ OpsBatchDecodedOutput makeOpsBatchDecodedOutput( // Implementations for the operators // ============================== -at::Tensor create_from_file(c10::string_view filename) { +at::Tensor create_from_file(std::string_view filename) { std::string filenameStr(filename); std::unique_ptr uniqueDecoder = VideoDecoder::createFromFilePath(filenameStr); @@ -121,9 +121,9 @@ void add_video_stream( std::optional width, std::optional height, std::optional num_threads, - std::optional dimension_order, + std::optional dimension_order, std::optional stream_index, - std::optional device) { + std::optional device) { _add_video_stream( decoder, width, @@ -139,10 +139,10 @@ void _add_video_stream( std::optional width, std::optional height, std::optional num_threads, - std::optional dimension_order, + std::optional dimension_order, std::optional stream_index, - std::optional device, - std::optional color_conversion_library) { + std::optional device, + std::optional color_conversion_library) { VideoDecoder::VideoStreamDecoderOptions options; options.width = width; options.height = height; diff --git a/src/torchcodec/decoders/_core/VideoDecoderOps.h b/src/torchcodec/decoders/_core/VideoDecoderOps.h index eac489ce..7717a48b 100644 --- a/src/torchcodec/decoders/_core/VideoDecoderOps.h +++ b/src/torchcodec/decoders/_core/VideoDecoderOps.h @@ -20,7 +20,7 @@ namespace facebook::torchcodec { // auto decoderTensor = createDecoderOp.call(videoPath); // Create a VideoDecoder from file and wrap the pointer in a tensor. -at::Tensor create_from_file(c10::string_view filename); +at::Tensor create_from_file(std::string_view filename); at::Tensor create_from_tensor(at::Tensor video_tensor); @@ -34,19 +34,19 @@ void add_video_stream( std::optional width = std::nullopt, std::optional height = std::nullopt, std::optional num_threads = std::nullopt, - std::optional dimension_order = std::nullopt, + std::optional dimension_order = std::nullopt, std::optional stream_index = std::nullopt, - std::optional device = std::nullopt); + std::optional device = std::nullopt); void _add_video_stream( at::Tensor& decoder, std::optional width = std::nullopt, std::optional height = std::nullopt, std::optional num_threads = std::nullopt, - std::optional dimension_order = std::nullopt, + std::optional dimension_order = std::nullopt, std::optional stream_index = std::nullopt, - std::optional device = std::nullopt, - std::optional color_conversion_library = std::nullopt); + std::optional device = std::nullopt, + std::optional color_conversion_library = std::nullopt); // Seek to a particular presentation timestamp in the video in seconds. void seek_to_pts(at::Tensor& decoder, double seconds);