Lines Matching refs:test_ctx
125 TestContext test_ctx = { 0 };
126 test_ctx.class = &test_class;
127 av_opt_set_defaults(&test_ctx);
129 printf("num=%d\n", test_ctx.num);
130 printf("toggle=%d\n", test_ctx.toggle);
131 printf("string=%s\n", test_ctx.string);
132 printf("escape=%s\n", test_ctx.escape);
133 printf("flags=%d\n", test_ctx.flags);
134 printf("rational=%d/%d\n", test_ctx.rational.num, test_ctx.rational.den);
135 printf("video_rate=%d/%d\n", test_ctx.video_rate.num, test_ctx.video_rate.den);
136 printf("width=%d height=%d\n", test_ctx.w, test_ctx.h);
137 printf("pix_fmt=%s\n", av_get_pix_fmt_name(test_ctx.pix_fmt));
138 printf("sample_fmt=%s\n", av_get_sample_fmt_name(test_ctx.sample_fmt));
139 printf("duration=%"PRId64"\n", test_ctx.duration);
140 printf("color=%d %d %d %d\n", test_ctx.color[0], test_ctx.color[1], test_ctx.color[2], test_ctx.color[3]);
141 printf("channel_layout=%"PRId64"=%"PRId64"\n", test_ctx.channel_layout.u.mask, (int64_t)AV_CH_LAYOUT_HEXAGONAL);
142 if (test_ctx.binary)
143 printf("binary=%x %x %x %x\n", ((uint8_t*)test_ctx.binary)[0], ((uint8_t*)test_ctx.binary)[1], ((uint8_t*)test_ctx.binary)[2], ((uint8_t*)test_ctx.binary)[3]);
144 printf("binary_size=%d\n", test_ctx.binary_size);
145 printf("num64=%"PRId64"\n", test_ctx.num64);
146 printf("flt=%.6f\n", test_ctx.flt);
147 printf("dbl=%.6f\n", test_ctx.dbl);
149 av_opt_show2(&test_ctx, NULL, -1, 0);
151 av_opt_free(&test_ctx);
157 TestContext test_ctx = { 0 };
159 test_ctx.class = &test_class;
163 while (o = av_opt_next(&test_ctx, o)) {
164 ret = av_opt_is_set_to_default_by_name(&test_ctx, o->name, 0);
167 av_opt_set_defaults(&test_ctx);
168 while (o = av_opt_next(&test_ctx, o)) {
169 ret = av_opt_is_set_to_default_by_name(&test_ctx, o->name, 0);
172 av_opt_free(&test_ctx);
177 TestContext test_ctx = { 0 };
180 test_ctx.class = &test_class;
185 av_opt_set_defaults(&test_ctx);
187 while (o = av_opt_next(&test_ctx, o)) {
197 ret1 = av_opt_get(&test_ctx, o->name, 0, (uint8_t **)&value1);
212 av_opt_free(&test_ctx);
218 TestContext test_ctx = { 0 };
220 test_ctx.class = &test_class;
224 av_opt_set_defaults(&test_ctx);
225 if (av_opt_serialize(&test_ctx, 0, 0, &buf, '=', ',') >= 0) {
227 av_opt_free(&test_ctx);
228 memset(&test_ctx, 0, sizeof(test_ctx));
229 test_ctx.class = &test_class;
230 av_set_options_string(&test_ctx, buf, "=", ",");
232 if (av_opt_serialize(&test_ctx, 0, 0, &buf, '=', ',') >= 0) {
237 av_opt_free(&test_ctx);
242 TestContext test_ctx = { 0 };
308 test_ctx.class = &test_class;
309 av_opt_set_defaults(&test_ctx);
315 av_log(&test_ctx, AV_LOG_DEBUG, "Setting options string '%s'\n", options[i]);
318 if (av_set_options_string(&test_ctx, options[i], "=", ":") < 0)
324 av_opt_free(&test_ctx);
329 TestContext test_ctx = { 0 };
343 test_ctx.class = &test_class;
344 av_opt_set_defaults(&test_ctx);
349 av_log(&test_ctx, AV_LOG_DEBUG, "Setting options string '%s'\n", options[i]);
350 if (av_opt_set_from_string(&test_ctx, options[i], shorthand, "=", ":") < 0)
355 av_opt_free(&test_ctx);