@@ -148,7 +148,7 @@ TEST(VideoDecoderTest, RespectsWidthAndHeightFromOptions) {
148148 VideoDecoder::VideoStreamOptions videoStreamOptions;
149149 videoStreamOptions.width = 100 ;
150150 videoStreamOptions.height = 120 ;
151- decoder->addVideoStreamDecoder (-1 , videoStreamOptions);
151+ decoder->addVideoStream (-1 , videoStreamOptions);
152152 torch::Tensor tensor = decoder->getNextFrame ().data ;
153153 EXPECT_EQ (tensor.sizes (), std::vector<long >({3 , 120 , 100 }));
154154}
@@ -158,7 +158,7 @@ TEST(VideoDecoderTest, RespectsOutputTensorDimensionOrderFromOptions) {
158158 std::unique_ptr<VideoDecoder> decoder = std::make_unique<VideoDecoder>(path);
159159 VideoDecoder::VideoStreamOptions videoStreamOptions;
160160 videoStreamOptions.dimensionOrder = " NHWC" ;
161- decoder->addVideoStreamDecoder (-1 , videoStreamOptions);
161+ decoder->addVideoStream (-1 , videoStreamOptions);
162162 torch::Tensor tensor = decoder->getNextFrame ().data ;
163163 EXPECT_EQ (tensor.sizes (), std::vector<long >({270 , 480 , 3 }));
164164}
@@ -167,7 +167,7 @@ TEST_P(VideoDecoderTest, ReturnsFirstTwoFramesOfVideo) {
167167 std::string path = getResourcePath (" nasa_13013.mp4" );
168168 std::unique_ptr<VideoDecoder> ourDecoder =
169169 createDecoderFromPath (path, GetParam ());
170- ourDecoder->addVideoStreamDecoder (-1 );
170+ ourDecoder->addVideoStream (-1 );
171171 auto output = ourDecoder->getNextFrame ();
172172 torch::Tensor tensor0FromOurDecoder = output.data ;
173173 EXPECT_EQ (tensor0FromOurDecoder.sizes (), std::vector<long >({3 , 270 , 480 }));
@@ -206,7 +206,7 @@ TEST_P(VideoDecoderTest, DecodesFramesInABatchInNCHW) {
206206 ourDecoder->scanFileAndUpdateMetadataAndIndex ();
207207 int bestVideoStreamIndex =
208208 *ourDecoder->getContainerMetadata ().bestVideoStreamIndex ;
209- ourDecoder->addVideoStreamDecoder (bestVideoStreamIndex);
209+ ourDecoder->addVideoStream (bestVideoStreamIndex);
210210 // Frame with index 180 corresponds to timestamp 6.006.
211211 auto output = ourDecoder->getFramesAtIndices ({0 , 180 });
212212 auto tensor = output.data ;
@@ -228,7 +228,7 @@ TEST_P(VideoDecoderTest, DecodesFramesInABatchInNHWC) {
228228 ourDecoder->scanFileAndUpdateMetadataAndIndex ();
229229 int bestVideoStreamIndex =
230230 *ourDecoder->getContainerMetadata ().bestVideoStreamIndex ;
231- ourDecoder->addVideoStreamDecoder (
231+ ourDecoder->addVideoStream (
232232 bestVideoStreamIndex,
233233 VideoDecoder::VideoStreamOptions (" dimension_order=NHWC" ));
234234 // Frame with index 180 corresponds to timestamp 6.006.
@@ -250,7 +250,7 @@ TEST_P(VideoDecoderTest, SeeksCloseToEof) {
250250 std::string path = getResourcePath (" nasa_13013.mp4" );
251251 std::unique_ptr<VideoDecoder> ourDecoder =
252252 createDecoderFromPath (path, GetParam ());
253- ourDecoder->addVideoStreamDecoder (-1 );
253+ ourDecoder->addVideoStream (-1 );
254254 ourDecoder->setCursorPtsInSeconds (388388 . / 30'000 );
255255 auto output = ourDecoder->getNextFrame ();
256256 EXPECT_EQ (output.ptsSeconds , 388'388 . / 30'000 );
@@ -263,7 +263,7 @@ TEST_P(VideoDecoderTest, GetsFramePlayedAtTimestamp) {
263263 std::string path = getResourcePath (" nasa_13013.mp4" );
264264 std::unique_ptr<VideoDecoder> ourDecoder =
265265 createDecoderFromPath (path, GetParam ());
266- ourDecoder->addVideoStreamDecoder (-1 );
266+ ourDecoder->addVideoStream (-1 );
267267 auto output = ourDecoder->getFramePlayedAt (6.006 );
268268 EXPECT_EQ (output.ptsSeconds , 6.006 );
269269 // The frame's duration is 0.033367 according to ffprobe,
@@ -293,7 +293,7 @@ TEST_P(VideoDecoderTest, SeeksToFrameWithSpecificPts) {
293293 std::string path = getResourcePath (" nasa_13013.mp4" );
294294 std::unique_ptr<VideoDecoder> ourDecoder =
295295 createDecoderFromPath (path, GetParam ());
296- ourDecoder->addVideoStreamDecoder (-1 );
296+ ourDecoder->addVideoStream (-1 );
297297 ourDecoder->setCursorPtsInSeconds (6.0 );
298298 auto output = ourDecoder->getNextFrame ();
299299 torch::Tensor tensor6FromOurDecoder = output.data ;
@@ -393,7 +393,7 @@ TEST_P(VideoDecoderTest, PreAllocatedTensorFilterGraph) {
393393 ourDecoder->scanFileAndUpdateMetadataAndIndex ();
394394 int bestVideoStreamIndex =
395395 *ourDecoder->getContainerMetadata ().bestVideoStreamIndex ;
396- ourDecoder->addVideoStreamDecoder (
396+ ourDecoder->addVideoStream (
397397 bestVideoStreamIndex,
398398 VideoDecoder::VideoStreamOptions (" color_conversion_library=filtergraph" ));
399399 auto output =
@@ -410,7 +410,7 @@ TEST_P(VideoDecoderTest, PreAllocatedTensorSwscale) {
410410 ourDecoder->scanFileAndUpdateMetadataAndIndex ();
411411 int bestVideoStreamIndex =
412412 *ourDecoder->getContainerMetadata ().bestVideoStreamIndex ;
413- ourDecoder->addVideoStreamDecoder (
413+ ourDecoder->addVideoStream (
414414 bestVideoStreamIndex,
415415 VideoDecoder::VideoStreamOptions (" color_conversion_library=swscale" ));
416416 auto output =
0 commit comments