@@ -38,7 +38,7 @@ class StreamingMediaEncoder {
38
38
// / @param format Specify output format.
39
39
explicit StreamingMediaEncoder (
40
40
AVIOContext* io_ctx,
41
- const std::optional<std::string>& format = c10 ::nullopt);
41
+ const std::optional<std::string>& format = std ::nullopt);
42
42
43
43
// / @endcond
44
44
@@ -50,7 +50,7 @@ class StreamingMediaEncoder {
50
50
// / ``dst``.
51
51
explicit StreamingMediaEncoder (
52
52
const std::string& dst,
53
- const std::optional<std::string>& format = c10 ::nullopt);
53
+ const std::optional<std::string>& format = std ::nullopt);
54
54
55
55
// Non-copyable
56
56
StreamingMediaEncoder (const StreamingMediaEncoder&) = delete ;
@@ -113,13 +113,13 @@ class StreamingMediaEncoder {
113
113
int sample_rate,
114
114
int num_channels,
115
115
const std::string& format,
116
- const std::optional<std::string>& encoder = c10 ::nullopt,
117
- const std::optional<OptionDict>& encoder_option = c10 ::nullopt,
118
- const std::optional<std::string>& encoder_format = c10 ::nullopt,
119
- const std::optional<int >& encoder_sample_rate = c10 ::nullopt,
120
- const std::optional<int >& encoder_num_channels = c10 ::nullopt,
121
- const std::optional<CodecConfig>& codec_config = c10 ::nullopt,
122
- const std::optional<std::string>& filter_desc = c10 ::nullopt);
116
+ const std::optional<std::string>& encoder = std ::nullopt,
117
+ const std::optional<OptionDict>& encoder_option = std ::nullopt,
118
+ const std::optional<std::string>& encoder_format = std ::nullopt,
119
+ const std::optional<int >& encoder_sample_rate = std ::nullopt,
120
+ const std::optional<int >& encoder_num_channels = std ::nullopt,
121
+ const std::optional<CodecConfig>& codec_config = std ::nullopt,
122
+ const std::optional<std::string>& filter_desc = std ::nullopt);
123
123
124
124
// / Add an output video stream.
125
125
// /
@@ -161,15 +161,15 @@ class StreamingMediaEncoder {
161
161
int width,
162
162
int height,
163
163
const std::string& format,
164
- const std::optional<std::string>& encoder = c10 ::nullopt,
165
- const std::optional<OptionDict>& encoder_option = c10 ::nullopt,
166
- const std::optional<std::string>& encoder_format = c10 ::nullopt,
167
- const std::optional<double >& encoder_frame_rate = c10 ::nullopt,
168
- const std::optional<int >& encoder_width = c10 ::nullopt,
169
- const std::optional<int >& encoder_height = c10 ::nullopt,
170
- const std::optional<std::string>& hw_accel = c10 ::nullopt,
171
- const std::optional<CodecConfig>& codec_config = c10 ::nullopt,
172
- const std::optional<std::string>& filter_desc = c10 ::nullopt);
164
+ const std::optional<std::string>& encoder = std ::nullopt,
165
+ const std::optional<OptionDict>& encoder_option = std ::nullopt,
166
+ const std::optional<std::string>& encoder_format = std ::nullopt,
167
+ const std::optional<double >& encoder_frame_rate = std ::nullopt,
168
+ const std::optional<int >& encoder_width = std ::nullopt,
169
+ const std::optional<int >& encoder_height = std ::nullopt,
170
+ const std::optional<std::string>& hw_accel = std ::nullopt,
171
+ const std::optional<CodecConfig>& codec_config = std ::nullopt,
172
+ const std::optional<std::string>& filter_desc = std ::nullopt);
173
173
// / @cond
174
174
// / Add output audio frame stream.
175
175
// / Allows for writing frames rather than tensors via `write_frame`.
@@ -179,13 +179,13 @@ class StreamingMediaEncoder {
179
179
int sample_rate,
180
180
int num_channels,
181
181
const std::string& format,
182
- const std::optional<std::string>& encoder = c10 ::nullopt,
183
- const std::optional<OptionDict>& encoder_option = c10 ::nullopt,
184
- const std::optional<std::string>& encoder_format = c10 ::nullopt,
185
- const std::optional<int >& encoder_sample_rate = c10 ::nullopt,
186
- const std::optional<int >& encoder_num_channels = c10 ::nullopt,
187
- const std::optional<CodecConfig>& codec_config = c10 ::nullopt,
188
- const std::optional<std::string>& filter_desc = c10 ::nullopt);
182
+ const std::optional<std::string>& encoder = std ::nullopt,
183
+ const std::optional<OptionDict>& encoder_option = std ::nullopt,
184
+ const std::optional<std::string>& encoder_format = std ::nullopt,
185
+ const std::optional<int >& encoder_sample_rate = std ::nullopt,
186
+ const std::optional<int >& encoder_num_channels = std ::nullopt,
187
+ const std::optional<CodecConfig>& codec_config = std ::nullopt,
188
+ const std::optional<std::string>& filter_desc = std ::nullopt);
189
189
190
190
// / Add output video frame stream.
191
191
// / Allows for writing frames rather than tensors via `write_frame`.
@@ -196,15 +196,15 @@ class StreamingMediaEncoder {
196
196
int width,
197
197
int height,
198
198
const std::string& format,
199
- const std::optional<std::string>& encoder = c10 ::nullopt,
200
- const std::optional<OptionDict>& encoder_option = c10 ::nullopt,
201
- const std::optional<std::string>& encoder_format = c10 ::nullopt,
202
- const std::optional<double >& encoder_frame_rate = c10 ::nullopt,
203
- const std::optional<int >& encoder_width = c10 ::nullopt,
204
- const std::optional<int >& encoder_height = c10 ::nullopt,
205
- const std::optional<std::string>& hw_accel = c10 ::nullopt,
206
- const std::optional<CodecConfig>& codec_config = c10 ::nullopt,
207
- const std::optional<std::string>& filter_desc = c10 ::nullopt);
199
+ const std::optional<std::string>& encoder = std ::nullopt,
200
+ const std::optional<OptionDict>& encoder_option = std ::nullopt,
201
+ const std::optional<std::string>& encoder_format = std ::nullopt,
202
+ const std::optional<double >& encoder_frame_rate = std ::nullopt,
203
+ const std::optional<int >& encoder_width = std ::nullopt,
204
+ const std::optional<int >& encoder_height = std ::nullopt,
205
+ const std::optional<std::string>& hw_accel = std ::nullopt,
206
+ const std::optional<CodecConfig>& codec_config = std ::nullopt,
207
+ const std::optional<std::string>& filter_desc = std ::nullopt);
208
208
209
209
// / Add packet stream. Intended to be used in conjunction with
210
210
// / ``StreamingMediaDecoder`` to perform packet passthrough.
@@ -226,7 +226,7 @@ class StreamingMediaEncoder {
226
226
// / Open the output file / device and write the header.
227
227
// /
228
228
// / @param opt Private options for protocol, device and muxer.
229
- void open (const std::optional<OptionDict>& opt = c10 ::nullopt);
229
+ void open (const std::optional<OptionDict>& opt = std ::nullopt);
230
230
// / Close the output file / device and finalize metadata.
231
231
void close ();
232
232
@@ -248,7 +248,7 @@ class StreamingMediaEncoder {
248
248
void write_audio_chunk (
249
249
int i,
250
250
const torch::Tensor& frames,
251
- const std::optional<double >& pts = c10 ::nullopt);
251
+ const std::optional<double >& pts = std ::nullopt);
252
252
// / Write video data
253
253
// / @param i Stream index.
254
254
// / @param frames Video/image tensor. Shape: ``(time, channel, height,
@@ -269,7 +269,7 @@ class StreamingMediaEncoder {
269
269
void write_video_chunk (
270
270
int i,
271
271
const torch::Tensor& frames,
272
- const std::optional<double >& pts = c10 ::nullopt);
272
+ const std::optional<double >& pts = std ::nullopt);
273
273
// / @cond
274
274
// / Write frame to stream.
275
275
// / @param i Stream index.
0 commit comments