+/**
+ * Print a listing containing all the formats supported by the
+ * program.
+ */
+void show_formats(void);
+
+/**
+ * Print a listing containing all the codecs supported by the
+ * program.
+ */
+void show_codecs(void);
+
+/**
+ * Print a listing containing all the filters supported by the
+ * program.
+ */
+void show_filters(void);
+
+/**
+ * Print a listing containing all the bit stream filters supported by the
+ * program.
+ */
+void show_bsfs(void);
+
+/**
+ * Print a listing containing all the protocols supported by the
+ * program.
+ */
+void show_protocols(void);
+
+/**
+ * Print a listing containing all the pixel formats supported by the
+ * program.
+ */
+void show_pix_fmts(void);
+
+/**
+ * Print a listing containing all the sample formats supported by the
+ * program.
+ */
+int show_sample_fmts(const char *opt, const char *arg);
+
+/**
+ * Return a positive value if a line read from standard input
+ * starts with [yY], otherwise return 0.
+ */
+int read_yesno(void);
+
+/**
+ * Read the file with name filename, and put its content in a newly
+ * allocated 0-terminated buffer.
+ *
+ * @param bufptr location where pointer to buffer is returned
+ * @param size location where size of buffer is returned
+ * @return 0 in case of success, a negative value corresponding to an
+ * AVERROR error code in case of failure.
+ */
+int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
+
+typedef struct {
+ int64_t num_faulty_pts; /// Number of incorrect PTS values so far
+ int64_t num_faulty_dts; /// Number of incorrect DTS values so far
+ int64_t last_pts; /// PTS of the last frame
+ int64_t last_dts; /// DTS of the last frame
+} PtsCorrectionContext;
+
+/**
+ * Reset the state of the PtsCorrectionContext.
+ */
+void init_pts_correction(PtsCorrectionContext *ctx);
+
+/**
+ * Attempt to guess proper monotonic timestamps for decoded video frames
+ * which might have incorrect times. Input timestamps may wrap around, in
+ * which case the output will as well.
+ *
+ * @param pts the pts field of the decoded AVPacket, as passed through
+ * AVCodecContext.reordered_opaque
+ * @param dts the dts field of the decoded AVPacket
+ * @return one of the input values, may be AV_NOPTS_VALUE
+ */
+int64_t guess_correct_pts(PtsCorrectionContext *ctx, int64_t pts, int64_t dts);
+
+/**
+ * Get a file corresponding to a preset file.
+ *
+ * If is_path is non-zero, look for the file in the path preset_name.
+ * Otherwise search for a file named arg.ffpreset in the directories
+ * $AVCONV_DATADIR (if set), $HOME/.avconv, and in the datadir defined
+ * at configuration time, in that order. If no such file is found and
+ * codec_name is defined, then search for a file named
+ * codec_name-preset_name.ffpreset in the above-mentioned directories.
+ *
+ * @param filename buffer where the name of the found filename is written
+ * @param filename_size size in bytes of the filename buffer
+ * @param preset_name name of the preset to search
+ * @param is_path tell if preset_name is a filename path
+ * @param codec_name name of the codec for which to look for the
+ * preset, may be NULL
+ */
+FILE *get_preset_file(char *filename, size_t filename_size,
+ const char *preset_name, int is_path, const char *codec_name);
+
+typedef struct {
+ enum PixelFormat pix_fmt;
+} FFSinkContext;
+
+extern AVFilter ffsink;
+
+/**
+ * Extract a frame from sink.
+ *
+ * @return a negative error in case of failure, 1 if one frame has
+ * been extracted successfully.
+ */
+int get_filtered_video_frame(AVFilterContext *sink, AVFrame *frame,
+ AVFilterBufferRef **picref, AVRational *pts_tb);
+
+/**
+ * Do all the necessary cleanup and abort.
+ * This function is implemented in the avtools, not cmdutils.
+ */
+void exit_program(int ret);
+
+/**
+ * Realloc array to hold new_size elements of elem_size.
+ * Calls exit_program() on failure.
+ *
+ * @param elem_size size in bytes of each element
+ * @param size new element count will be written here
+ * @return reallocated array
+ */
+void *grow_array(void *array, int elem_size, int *size, int new_size);
+
+#endif /* LIBAV_CMDUTILS_H */