You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

621 lines
20KB

  1. /*
  2. * Copyright (c) 2010 Stefano Sabatini
  3. * Copyright (c) 2008 Victor Paesa
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. /**
  22. * @file
  23. * movie video source
  24. *
  25. * @todo use direct rendering (no allocation of a new frame)
  26. * @todo support a PTS correction mechanism
  27. */
  28. /* #define DEBUG */
  29. #include <float.h>
  30. #include "libavutil/avstring.h"
  31. #include "libavutil/avassert.h"
  32. #include "libavutil/opt.h"
  33. #include "libavutil/imgutils.h"
  34. #include "libavutil/timestamp.h"
  35. #include "libavformat/avformat.h"
  36. #include "audio.h"
  37. #include "avcodec.h"
  38. #include "avfilter.h"
  39. #include "formats.h"
  40. #include "internal.h"
  41. #include "video.h"
  42. typedef struct {
  43. AVStream *st;
  44. int done;
  45. } MovieStream;
  46. typedef struct {
  47. /* common A/V fields */
  48. const AVClass *class;
  49. int64_t seek_point; ///< seekpoint in microseconds
  50. double seek_point_d;
  51. char *format_name;
  52. char *file_name;
  53. char *stream_specs; /**< user-provided list of streams, separated by + */
  54. int stream_index; /**< for compatibility */
  55. int loop_count;
  56. AVFormatContext *format_ctx;
  57. int eof;
  58. AVPacket pkt, pkt0;
  59. AVFrame *frame; ///< video frame to store the decoded images in
  60. int max_stream_index; /**< max stream # actually used for output */
  61. MovieStream *st; /**< array of all streams, one per output */
  62. int *out_index; /**< stream number -> output number map, or -1 */
  63. } MovieContext;
  64. #define OFFSET(x) offsetof(MovieContext, x)
  65. #define F AV_OPT_FLAG_FILTERING_PARAM
  66. static const AVOption movie_options[]= {
  67. {"format_name", "set format name", OFFSET(format_name), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX, F },
  68. {"f", "set format name", OFFSET(format_name), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX, F },
  69. {"streams", "set streams", OFFSET(stream_specs), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MAX, CHAR_MAX, F },
  70. {"s", "set streams", OFFSET(stream_specs), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MAX, CHAR_MAX, F },
  71. {"si", "set stream index", OFFSET(stream_index), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, F },
  72. {"stream_index", "set stream index", OFFSET(stream_index), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, F },
  73. {"seek_point", "set seekpoint (seconds)", OFFSET(seek_point_d), AV_OPT_TYPE_DOUBLE, {.dbl = 0}, 0, (INT64_MAX-1) / 1000000, F },
  74. {"sp", "set seekpoint (seconds)", OFFSET(seek_point_d), AV_OPT_TYPE_DOUBLE, {.dbl = 0}, 0, (INT64_MAX-1) / 1000000, F },
  75. {"loop", "set loop count", OFFSET(loop_count), AV_OPT_TYPE_INT, {.i64 = 1}, 0, INT_MAX, F },
  76. {NULL},
  77. };
  78. static int movie_config_output_props(AVFilterLink *outlink);
  79. static int movie_request_frame(AVFilterLink *outlink);
  80. static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec)
  81. {
  82. int i, ret, already = 0, stream_id = -1;
  83. char type_char, dummy;
  84. AVStream *found = NULL;
  85. enum AVMediaType type;
  86. ret = sscanf(spec, "d%[av]%d%c", &type_char, &stream_id, &dummy);
  87. if (ret >= 1 && ret <= 2) {
  88. type = type_char == 'v' ? AVMEDIA_TYPE_VIDEO : AVMEDIA_TYPE_AUDIO;
  89. ret = av_find_best_stream(avf, type, stream_id, -1, NULL, 0);
  90. if (ret < 0) {
  91. av_log(log, AV_LOG_ERROR, "No %s stream with index '%d' found\n",
  92. av_get_media_type_string(type), stream_id);
  93. return NULL;
  94. }
  95. return avf->streams[ret];
  96. }
  97. for (i = 0; i < avf->nb_streams; i++) {
  98. ret = avformat_match_stream_specifier(avf, avf->streams[i], spec);
  99. if (ret < 0) {
  100. av_log(log, AV_LOG_ERROR,
  101. "Invalid stream specifier \"%s\"\n", spec);
  102. return NULL;
  103. }
  104. if (!ret)
  105. continue;
  106. if (avf->streams[i]->discard != AVDISCARD_ALL) {
  107. already++;
  108. continue;
  109. }
  110. if (found) {
  111. av_log(log, AV_LOG_WARNING,
  112. "Ambiguous stream specifier \"%s\", using #%d\n", spec, i);
  113. break;
  114. }
  115. found = avf->streams[i];
  116. }
  117. if (!found) {
  118. av_log(log, AV_LOG_WARNING, "Stream specifier \"%s\" %s\n", spec,
  119. already ? "matched only already used streams" :
  120. "did not match any stream");
  121. return NULL;
  122. }
  123. if (found->codec->codec_type != AVMEDIA_TYPE_VIDEO &&
  124. found->codec->codec_type != AVMEDIA_TYPE_AUDIO) {
  125. av_log(log, AV_LOG_ERROR, "Stream specifier \"%s\" matched a %s stream,"
  126. "currently unsupported by libavfilter\n", spec,
  127. av_get_media_type_string(found->codec->codec_type));
  128. return NULL;
  129. }
  130. return found;
  131. }
  132. static int open_stream(void *log, MovieStream *st)
  133. {
  134. AVCodec *codec;
  135. int ret;
  136. codec = avcodec_find_decoder(st->st->codec->codec_id);
  137. if (!codec) {
  138. av_log(log, AV_LOG_ERROR, "Failed to find any codec\n");
  139. return AVERROR(EINVAL);
  140. }
  141. st->st->codec->refcounted_frames = 1;
  142. if ((ret = avcodec_open2(st->st->codec, codec, NULL)) < 0) {
  143. av_log(log, AV_LOG_ERROR, "Failed to open codec\n");
  144. return ret;
  145. }
  146. return 0;
  147. }
  148. static int guess_channel_layout(MovieStream *st, int st_index, void *log_ctx)
  149. {
  150. AVCodecContext *dec_ctx = st->st->codec;
  151. char buf[256];
  152. int64_t chl = av_get_default_channel_layout(dec_ctx->channels);
  153. if (!chl) {
  154. av_log(log_ctx, AV_LOG_ERROR,
  155. "Channel layout is not set in stream %d, and could not "
  156. "be guessed from the number of channels (%d)\n",
  157. st_index, dec_ctx->channels);
  158. return AVERROR(EINVAL);
  159. }
  160. av_get_channel_layout_string(buf, sizeof(buf), dec_ctx->channels, chl);
  161. av_log(log_ctx, AV_LOG_WARNING,
  162. "Channel layout is not set in output stream %d, "
  163. "guessed channel layout is '%s'\n",
  164. st_index, buf);
  165. dec_ctx->channel_layout = chl;
  166. return 0;
  167. }
  168. static av_cold int movie_common_init(AVFilterContext *ctx, const char *args, const AVClass *class)
  169. {
  170. MovieContext *movie = ctx->priv;
  171. AVInputFormat *iformat = NULL;
  172. int64_t timestamp;
  173. int nb_streams, ret, i;
  174. char default_streams[16], *stream_specs, *spec, *cursor;
  175. char name[16];
  176. AVStream *st;
  177. movie->class = class;
  178. av_opt_set_defaults(movie);
  179. if (args) {
  180. movie->file_name = av_get_token(&args, ":");
  181. if (!movie->file_name)
  182. return AVERROR(ENOMEM);
  183. }
  184. if (!args || !*movie->file_name) {
  185. av_log(ctx, AV_LOG_ERROR, "No filename provided!\n");
  186. return AVERROR(EINVAL);
  187. }
  188. if (*args++ == ':' && (ret = av_set_options_string(movie, args, "=", ":")) < 0)
  189. return ret;
  190. movie->seek_point = movie->seek_point_d * 1000000 + 0.5;
  191. stream_specs = movie->stream_specs;
  192. if (!stream_specs) {
  193. snprintf(default_streams, sizeof(default_streams), "d%c%d",
  194. !strcmp(ctx->filter->name, "amovie") ? 'a' : 'v',
  195. movie->stream_index);
  196. stream_specs = default_streams;
  197. }
  198. for (cursor = stream_specs, nb_streams = 1; *cursor; cursor++)
  199. if (*cursor == '+')
  200. nb_streams++;
  201. if (movie->loop_count != 1 && nb_streams != 1) {
  202. av_log(ctx, AV_LOG_ERROR,
  203. "Loop with several streams is currently unsupported\n");
  204. return AVERROR_PATCHWELCOME;
  205. }
  206. av_register_all();
  207. // Try to find the movie format (container)
  208. iformat = movie->format_name ? av_find_input_format(movie->format_name) : NULL;
  209. movie->format_ctx = NULL;
  210. if ((ret = avformat_open_input(&movie->format_ctx, movie->file_name, iformat, NULL)) < 0) {
  211. av_log(ctx, AV_LOG_ERROR,
  212. "Failed to avformat_open_input '%s'\n", movie->file_name);
  213. return ret;
  214. }
  215. if ((ret = avformat_find_stream_info(movie->format_ctx, NULL)) < 0)
  216. av_log(ctx, AV_LOG_WARNING, "Failed to find stream info\n");
  217. // if seeking requested, we execute it
  218. if (movie->seek_point > 0) {
  219. timestamp = movie->seek_point;
  220. // add the stream start time, should it exist
  221. if (movie->format_ctx->start_time != AV_NOPTS_VALUE) {
  222. if (timestamp > INT64_MAX - movie->format_ctx->start_time) {
  223. av_log(ctx, AV_LOG_ERROR,
  224. "%s: seek value overflow with start_time:%"PRId64" seek_point:%"PRId64"\n",
  225. movie->file_name, movie->format_ctx->start_time, movie->seek_point);
  226. return AVERROR(EINVAL);
  227. }
  228. timestamp += movie->format_ctx->start_time;
  229. }
  230. if ((ret = av_seek_frame(movie->format_ctx, -1, timestamp, AVSEEK_FLAG_BACKWARD)) < 0) {
  231. av_log(ctx, AV_LOG_ERROR, "%s: could not seek to position %"PRId64"\n",
  232. movie->file_name, timestamp);
  233. return ret;
  234. }
  235. }
  236. for (i = 0; i < movie->format_ctx->nb_streams; i++)
  237. movie->format_ctx->streams[i]->discard = AVDISCARD_ALL;
  238. movie->st = av_calloc(nb_streams, sizeof(*movie->st));
  239. if (!movie->st)
  240. return AVERROR(ENOMEM);
  241. for (i = 0; i < nb_streams; i++) {
  242. spec = av_strtok(stream_specs, "+", &cursor);
  243. if (!spec)
  244. return AVERROR_BUG;
  245. stream_specs = NULL; /* for next strtok */
  246. st = find_stream(ctx, movie->format_ctx, spec);
  247. if (!st)
  248. return AVERROR(EINVAL);
  249. st->discard = AVDISCARD_DEFAULT;
  250. movie->st[i].st = st;
  251. movie->max_stream_index = FFMAX(movie->max_stream_index, st->index);
  252. }
  253. if (av_strtok(NULL, "+", &cursor))
  254. return AVERROR_BUG;
  255. movie->out_index = av_calloc(movie->max_stream_index + 1,
  256. sizeof(*movie->out_index));
  257. if (!movie->out_index)
  258. return AVERROR(ENOMEM);
  259. for (i = 0; i <= movie->max_stream_index; i++)
  260. movie->out_index[i] = -1;
  261. for (i = 0; i < nb_streams; i++)
  262. movie->out_index[movie->st[i].st->index] = i;
  263. for (i = 0; i < nb_streams; i++) {
  264. AVFilterPad pad = { 0 };
  265. snprintf(name, sizeof(name), "out%d", i);
  266. pad.type = movie->st[i].st->codec->codec_type;
  267. pad.name = av_strdup(name);
  268. pad.config_props = movie_config_output_props;
  269. pad.request_frame = movie_request_frame;
  270. ff_insert_outpad(ctx, i, &pad);
  271. ret = open_stream(ctx, &movie->st[i]);
  272. if (ret < 0)
  273. return ret;
  274. if ( movie->st[i].st->codec->codec->type == AVMEDIA_TYPE_AUDIO &&
  275. !movie->st[i].st->codec->channel_layout) {
  276. ret = guess_channel_layout(&movie->st[i], i, ctx);
  277. if (ret < 0)
  278. return ret;
  279. }
  280. }
  281. av_log(ctx, AV_LOG_VERBOSE, "seek_point:%"PRIi64" format_name:%s file_name:%s stream_index:%d\n",
  282. movie->seek_point, movie->format_name, movie->file_name,
  283. movie->stream_index);
  284. return 0;
  285. }
  286. static av_cold void movie_uninit(AVFilterContext *ctx)
  287. {
  288. MovieContext *movie = ctx->priv;
  289. int i;
  290. for (i = 0; i < ctx->nb_outputs; i++) {
  291. av_freep(&ctx->output_pads[i].name);
  292. if (movie->st[i].st)
  293. avcodec_close(movie->st[i].st->codec);
  294. }
  295. av_opt_free(movie);
  296. av_freep(&movie->file_name);
  297. av_freep(&movie->st);
  298. av_freep(&movie->out_index);
  299. av_frame_free(&movie->frame);
  300. if (movie->format_ctx)
  301. avformat_close_input(&movie->format_ctx);
  302. }
  303. static int movie_query_formats(AVFilterContext *ctx)
  304. {
  305. MovieContext *movie = ctx->priv;
  306. int list[] = { 0, -1 };
  307. int64_t list64[] = { 0, -1 };
  308. int i;
  309. for (i = 0; i < ctx->nb_outputs; i++) {
  310. MovieStream *st = &movie->st[i];
  311. AVCodecContext *c = st->st->codec;
  312. AVFilterLink *outlink = ctx->outputs[i];
  313. switch (c->codec_type) {
  314. case AVMEDIA_TYPE_VIDEO:
  315. list[0] = c->pix_fmt;
  316. ff_formats_ref(ff_make_format_list(list), &outlink->in_formats);
  317. break;
  318. case AVMEDIA_TYPE_AUDIO:
  319. list[0] = c->sample_fmt;
  320. ff_formats_ref(ff_make_format_list(list), &outlink->in_formats);
  321. list[0] = c->sample_rate;
  322. ff_formats_ref(ff_make_format_list(list), &outlink->in_samplerates);
  323. list64[0] = c->channel_layout;
  324. ff_channel_layouts_ref(avfilter_make_format64_list(list64),
  325. &outlink->in_channel_layouts);
  326. break;
  327. }
  328. }
  329. return 0;
  330. }
  331. static int movie_config_output_props(AVFilterLink *outlink)
  332. {
  333. AVFilterContext *ctx = outlink->src;
  334. MovieContext *movie = ctx->priv;
  335. unsigned out_id = FF_OUTLINK_IDX(outlink);
  336. MovieStream *st = &movie->st[out_id];
  337. AVCodecContext *c = st->st->codec;
  338. outlink->time_base = st->st->time_base;
  339. switch (c->codec_type) {
  340. case AVMEDIA_TYPE_VIDEO:
  341. outlink->w = c->width;
  342. outlink->h = c->height;
  343. outlink->frame_rate = st->st->r_frame_rate;
  344. break;
  345. case AVMEDIA_TYPE_AUDIO:
  346. break;
  347. }
  348. return 0;
  349. }
  350. static char *describe_frame_to_str(char *dst, size_t dst_size,
  351. AVFrame *frame,
  352. AVFilterLink *link)
  353. {
  354. switch (frame->type) {
  355. case AVMEDIA_TYPE_VIDEO:
  356. snprintf(dst, dst_size,
  357. "video pts:%s time:%s size:%dx%d aspect:%d/%d",
  358. av_ts2str(frame->pts), av_ts2timestr(frame->pts, &link->time_base),
  359. frame->width, frame->height,
  360. frame->sample_aspect_ratio.num,
  361. frame->sample_aspect_ratio.den);
  362. break;
  363. case AVMEDIA_TYPE_AUDIO:
  364. snprintf(dst, dst_size,
  365. "audio pts:%s time:%s samples:%d",
  366. av_ts2str(frame->pts), av_ts2timestr(frame->pts, &link->time_base),
  367. frame->nb_samples);
  368. break;
  369. default:
  370. snprintf(dst, dst_size, "%s BUG", av_get_media_type_string(frame->type));
  371. break;
  372. }
  373. return dst;
  374. }
  375. #define describe_frameref(f, link) \
  376. describe_frame_to_str((char[1024]){0}, 1024, f, link)
  377. static int rewind_file(AVFilterContext *ctx)
  378. {
  379. MovieContext *movie = ctx->priv;
  380. int64_t timestamp = movie->seek_point;
  381. int ret, i;
  382. if (movie->format_ctx->start_time != AV_NOPTS_VALUE)
  383. timestamp += movie->format_ctx->start_time;
  384. ret = av_seek_frame(movie->format_ctx, -1, timestamp, AVSEEK_FLAG_BACKWARD);
  385. if (ret < 0) {
  386. av_log(ctx, AV_LOG_ERROR, "Unable to loop: %s\n", av_err2str(ret));
  387. movie->loop_count = 1; /* do not try again */
  388. return ret;
  389. }
  390. for (i = 0; i < ctx->nb_outputs; i++) {
  391. avcodec_flush_buffers(movie->st[i].st->codec);
  392. movie->st[i].done = 0;
  393. }
  394. movie->eof = 0;
  395. return 0;
  396. }
  397. /**
  398. * Try to push a frame to the requested output.
  399. *
  400. * @param ctx filter context
  401. * @param out_id number of output where a frame is wanted;
  402. * if the frame is read from file, used to set the return value;
  403. * if the codec is being flushed, flush the corresponding stream
  404. * @return 1 if a frame was pushed on the requested output,
  405. * 0 if another attempt is possible,
  406. * <0 AVERROR code
  407. */
  408. static int movie_push_frame(AVFilterContext *ctx, unsigned out_id)
  409. {
  410. MovieContext *movie = ctx->priv;
  411. AVPacket *pkt = &movie->pkt;
  412. MovieStream *st;
  413. int ret, got_frame = 0, pkt_out_id;
  414. AVFilterLink *outlink;
  415. if (!pkt->size) {
  416. if (movie->eof) {
  417. if (movie->st[out_id].done) {
  418. if (movie->loop_count != 1) {
  419. ret = rewind_file(ctx);
  420. if (ret < 0)
  421. return ret;
  422. movie->loop_count -= movie->loop_count > 1;
  423. av_log(ctx, AV_LOG_VERBOSE, "Stream finished, looping.\n");
  424. return 0; /* retry */
  425. }
  426. return AVERROR_EOF;
  427. }
  428. pkt->stream_index = movie->st[out_id].st->index;
  429. /* packet is already ready for flushing */
  430. } else {
  431. ret = av_read_frame(movie->format_ctx, &movie->pkt0);
  432. if (ret < 0) {
  433. av_init_packet(&movie->pkt0); /* ready for flushing */
  434. *pkt = movie->pkt0;
  435. if (ret == AVERROR_EOF) {
  436. movie->eof = 1;
  437. return 0; /* start flushing */
  438. }
  439. return ret;
  440. }
  441. *pkt = movie->pkt0;
  442. }
  443. }
  444. pkt_out_id = pkt->stream_index > movie->max_stream_index ? -1 :
  445. movie->out_index[pkt->stream_index];
  446. if (pkt_out_id < 0) {
  447. av_free_packet(&movie->pkt0);
  448. pkt->size = 0; /* ready for next run */
  449. pkt->data = NULL;
  450. return 0;
  451. }
  452. st = &movie->st[pkt_out_id];
  453. outlink = ctx->outputs[pkt_out_id];
  454. movie->frame = av_frame_alloc();
  455. if (!movie->frame)
  456. return AVERROR(ENOMEM);
  457. switch (st->st->codec->codec_type) {
  458. case AVMEDIA_TYPE_VIDEO:
  459. ret = avcodec_decode_video2(st->st->codec, movie->frame, &got_frame, pkt);
  460. break;
  461. case AVMEDIA_TYPE_AUDIO:
  462. ret = avcodec_decode_audio4(st->st->codec, movie->frame, &got_frame, pkt);
  463. break;
  464. default:
  465. ret = AVERROR(ENOSYS);
  466. break;
  467. }
  468. if (ret < 0) {
  469. av_log(ctx, AV_LOG_WARNING, "Decode error: %s\n", av_err2str(ret));
  470. av_frame_free(&movie->frame);
  471. return 0;
  472. }
  473. if (!ret)
  474. ret = pkt->size;
  475. pkt->data += ret;
  476. pkt->size -= ret;
  477. if (pkt->size <= 0) {
  478. av_free_packet(&movie->pkt0);
  479. pkt->size = 0; /* ready for next run */
  480. pkt->data = NULL;
  481. }
  482. if (!got_frame) {
  483. if (!ret)
  484. st->done = 1;
  485. av_frame_free(&movie->frame);
  486. return 0;
  487. }
  488. av_dlog(ctx, "movie_push_frame(): file:'%s' %s\n", movie->file_name,
  489. describe_frameref(movie->frame, outlink));
  490. movie->frame->pts = av_frame_get_best_effort_timestamp(movie->frame);
  491. ret = ff_filter_frame(outlink, movie->frame);
  492. movie->frame = NULL;
  493. if (ret < 0)
  494. return ret;
  495. return pkt_out_id == out_id;
  496. }
  497. static int movie_request_frame(AVFilterLink *outlink)
  498. {
  499. AVFilterContext *ctx = outlink->src;
  500. unsigned out_id = FF_OUTLINK_IDX(outlink);
  501. int ret;
  502. while (1) {
  503. ret = movie_push_frame(ctx, out_id);
  504. if (ret)
  505. return FFMIN(ret, 0);
  506. }
  507. }
  508. #if CONFIG_MOVIE_FILTER
  509. AVFILTER_DEFINE_CLASS(movie);
  510. static av_cold int movie_init(AVFilterContext *ctx, const char *args)
  511. {
  512. return movie_common_init(ctx, args, &movie_class);
  513. }
  514. AVFilter avfilter_avsrc_movie = {
  515. .name = "movie",
  516. .description = NULL_IF_CONFIG_SMALL("Read from a movie source."),
  517. .priv_size = sizeof(MovieContext),
  518. .init = movie_init,
  519. .uninit = movie_uninit,
  520. .query_formats = movie_query_formats,
  521. .inputs = NULL,
  522. .outputs = NULL,
  523. .priv_class = &movie_class,
  524. };
  525. #endif /* CONFIG_MOVIE_FILTER */
  526. #if CONFIG_AMOVIE_FILTER
  527. #define amovie_options movie_options
  528. AVFILTER_DEFINE_CLASS(amovie);
  529. static av_cold int amovie_init(AVFilterContext *ctx, const char *args)
  530. {
  531. return movie_common_init(ctx, args, &amovie_class);
  532. }
  533. AVFilter avfilter_avsrc_amovie = {
  534. .name = "amovie",
  535. .description = NULL_IF_CONFIG_SMALL("Read audio from a movie source."),
  536. .priv_size = sizeof(MovieContext),
  537. .init = amovie_init,
  538. .uninit = movie_uninit,
  539. .query_formats = movie_query_formats,
  540. .inputs = NULL,
  541. .outputs = NULL,
  542. .priv_class = &amovie_class,
  543. };
  544. #endif /* CONFIG_AMOVIE_FILTER */