@@ -160,33 +160,13 @@ class VideoDecoder {
160
160
// Calling getNextFrameOutputNoDemuxInternal() will return the first frame at
161
161
// or after this position.
162
162
void setCursorPtsInSeconds (double seconds);
163
- // This is an internal structure that is used to store the decoded output
164
- // from decoding a frame through color conversion. Example usage is:
165
- //
166
- // RawDecodedOutput rawOutput = getDecodedOutputWithFilter();
167
- // // Now allocate a single tensor or a batch tensor.
168
- // torch::Tensor userOutput = torch::empty(...);
169
- // // Now fill in `data` and `size`.
170
- // rawOutput.data = userOutput.data_ptr();
171
- // // Now run the color conversion.
172
- // convertFrameToBufferUsingSwsScale(rawOutput);
173
- //
174
- // This structure ensures we always keep the streamIndex and frame together
175
- // with the data output. Note that AVFrame itself doesn't retain the
176
- // streamIndex.
163
+ // This structure ensures we always keep the streamIndex and AVFrame together
164
+ // Note that AVFrame itself doesn't retain the streamIndex.
177
165
struct RawDecodedOutput {
178
166
// The actual decoded output as a unique pointer to an AVFrame.
179
167
UniqueAVFrame frame;
180
168
// The stream index of the decoded frame.
181
169
int streamIndex;
182
- // This is an unowned pointer that we copy the frame data to after color
183
- // conversion.
184
- // For a single tensor this points to the start of data_ptr. For a batch
185
- // tensor it may point to the middle of the allocated batch tensor.
186
- void * data = nullptr ;
187
- // We carry around the size to ensure we don't stomp on memory while doing
188
- // color conversion.
189
- size_t size = 0 ;
190
170
};
191
171
struct DecodedOutput {
192
172
// The actual decoded output as a Tensor.
0 commit comments