File tree Expand file tree Collapse file tree 2 files changed +20
-21
lines changed
torchvision/csrc/cpu/video_reader Expand file tree Collapse file tree 2 files changed +20
-21
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ struct VideoFormat {
48
48
int timeBaseNum{0 };
49
49
int timeBaseDen{1 }; // numerator and denominator of time base
50
50
float fps{0.0 };
51
- int64_t duration{0 }; // duration of the stream, in stream time base
51
+ int64_t duration{0 }; // duration of the stream, in stream time base
52
52
};
53
53
54
54
struct AudioFormat {
@@ -61,7 +61,7 @@ struct AudioFormat {
61
61
int64_t startPts{0 }, endPts{0 }; // Start and end presentation timestamp
62
62
int timeBaseNum{0 };
63
63
int timeBaseDen{1 }; // numerator and denominator of time base
64
- int64_t duration{0 }; // duration of the stream, in stream time base
64
+ int64_t duration{0 }; // duration of the stream, in stream time base
65
65
};
66
66
67
67
union FormatUnion {
Original file line number Diff line number Diff line change @@ -387,26 +387,25 @@ torch::List<torch::Tensor> readVideoFromFile(
387
387
torch::List<torch::Tensor> probeVideo (
388
388
bool isReadFile,
389
389
const torch::Tensor& input_video,
390
- std::string videoPath)
391
- {
390
+ std::string videoPath) {
392
391
unique_ptr<DecoderParameters> params = util::getDecoderParams (
393
- 0 , // seekFrameMargin
394
- 0 , // getPtsOnly
395
- 1 , // readVideoStream
396
- 0 , // width
397
- 0 , // height
398
- 0 , // minDimension
399
- 0 , // videoStartPts
400
- 0 , // videoEndPts
401
- 0 , // videoTimeBaseNum
402
- 1 , // videoTimeBaseDen
403
- 1 , // readAudioStream
404
- 0 , // audioSamples
405
- 0 , // audioChannels
406
- 0 , // audioStartPts
407
- 0 , // audioEndPts
408
- 0 , // audioTimeBaseNum
409
- 1 // audioTimeBaseDen
392
+ 0 , // seekFrameMargin
393
+ 0 , // getPtsOnly
394
+ 1 , // readVideoStream
395
+ 0 , // width
396
+ 0 , // height
397
+ 0 , // minDimension
398
+ 0 , // videoStartPts
399
+ 0 , // videoEndPts
400
+ 0 , // videoTimeBaseNum
401
+ 1 , // videoTimeBaseDen
402
+ 1 , // readAudioStream
403
+ 0 , // audioSamples
404
+ 0 , // audioChannels
405
+ 0 , // audioStartPts
406
+ 0 , // audioEndPts
407
+ 0 , // audioTimeBaseNum
408
+ 1 // audioTimeBaseDen
410
409
);
411
410
412
411
FfmpegDecoder decoder;
You can’t perform that action at this time.
0 commit comments