]> git.sesse.net Git - nageru/blob - ffmpeg_util.h
Support audio-only FFmpeg inputs. Somewhat wonky, though.
[nageru] / ffmpeg_util.h
1 #ifndef _FFMPEG_UTIL_H
2 #define _FFMPEG_UTIL_H 1
3
4 // Some common utilities for the two FFmpeg users (ImageInput and FFmpegCapture).
5
6 #include <string>
7
8 extern "C" {
9 #include <libavformat/avformat.h>
10 }
11
12 // Look for the file in all theme_dirs until we find one;
13 // that will be the permanent resolution of this file, whether
14 // it is actually valid or not. Returns an empty string on error.
15 std::string search_for_file(const std::string &filename);
16
17 // Same, but exits on error.
18 std::string search_for_file_or_die(const std::string &filename);
19
20 // Returns -1 if not found.
21 int find_stream_index(AVFormatContext *ctx, AVMediaType media_type);
22
23 #endif  // !defined(_FFMPEG_UTIL_H)