Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions src/torchcodec/decoders/_core/VideoDecoderOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,6 @@ at::Tensor create_from_tensor(
return wrapDecoderPointerToTensor(std::move(uniqueDecoder));
}

at::Tensor create_from_buffer(
const void* buffer,
size_t length,
std::optional<std::string_view> seek_mode) {
VideoDecoder::SeekMode realSeek = VideoDecoder::SeekMode::exact;
if (seek_mode.has_value()) {
realSeek = seekModeFromString(seek_mode.value());
}

std::unique_ptr<VideoDecoder> uniqueDecoder =
std::make_unique<VideoDecoder>(buffer, length, realSeek);
return wrapDecoderPointerToTensor(std::move(uniqueDecoder));
}

void add_video_stream(
at::Tensor& decoder,
std::optional<int64_t> width,
Expand Down
7 changes: 0 additions & 7 deletions src/torchcodec/decoders/_core/VideoDecoderOps.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ at::Tensor create_from_tensor(
at::Tensor video_tensor,
std::optional<std::string_view> seek_mode = std::nullopt);

// This API is C++ only and will not be exposed via custom ops, use
// videodecoder_create_from_bytes in Python
at::Tensor create_from_buffer(
const void* buffer,
size_t length,
std::optional<std::string_view> seek_mode = std::nullopt);

// Add a new video stream at `stream_index` using the provided options.
void add_video_stream(
at::Tensor& decoder,
Expand Down
14 changes: 0 additions & 14 deletions test/decoders/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,14 @@ add_executable(
VideoDecoderTest.cpp
)

add_executable(
VideoDecoderOpsTest
VideoDecoderOpsTest.cpp
)

target_include_directories(VideoDecoderTest SYSTEM PRIVATE ${TORCH_INCLUDE_DIRS})
target_include_directories(VideoDecoderTest PRIVATE ../../)
target_include_directories(VideoDecoderOpsTest SYSTEM PRIVATE ${TORCH_INCLUDE_DIRS})
target_include_directories(VideoDecoderOpsTest PRIVATE ../../)

target_link_libraries(
VideoDecoderTest
${libtorchcodec_target_name}
GTest::gtest_main
)

target_link_libraries(
VideoDecoderOpsTest
${libtorchcodec_target_name}
GTest::gtest_main
)

include(GoogleTest)
gtest_discover_tests(VideoDecoderTest)
gtest_discover_tests(VideoDecoderOpsTest)
51 changes: 0 additions & 51 deletions test/decoders/VideoDecoderOpsTest.cpp

This file was deleted.

Loading