forked from mikrosimage/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutil.hpp
More file actions
93 lines (74 loc) · 2.55 KB
/
Copy pathutil.hpp
File metadata and controls
93 lines (74 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#ifndef _AV_TRANSCODER_UTIL_HPP
#define _AV_TRANSCODER_UTIL_HPP
#include "common.hpp"
#include "Option.hpp"
extern "C" {
#include <libavutil/pixfmt.h>
#include <libavutil/samplefmt.h>
}
#include <string>
#include <vector>
#include <map>
namespace avtranscoder
{
typedef std::map<std::string, OptionArray> OptionArrayMap;
/**
* @brief Get format name from a given filename
*/
std::string AvExport getFormat( const std::string& filename );
/**
* @brief Check if a format name corresponds to the format of a given filename
*/
bool AvExport matchFormat( const std::string& format, const std::string& filename );
/**
* @brief Get pixel format supported by a video codec.
* @param videoCodecName: the video codec name (empty if not indicated, and so get all pixel formats supported by all video codecs).
*/
std::vector<std::string> getPixelFormats( const std::string& videoCodecName = "" );
/**
* @brief Get sample format supported by an audio codec.
* @param audioCodecName: the audio codec name (empty if not indicated, and so get all sample formats supported by all audio codecs).
*/
std::vector<std::string> getSampleFormats( const std::string& audioCodecName = "" );
/**
* @brief Get the corresponding AVPixelFormat from the pixel format name
* @param pixelFormat: the name of the pixel format
*/
AVPixelFormat getAVPixelFormat( const std::string& pixelFormat );
/**
* @brief Get the corresponding AVSampleFormat from the sample format name
* @param sampleFormat: the name of the sample format
*/
AVSampleFormat getAVSampleFormat( const std::string& sampleFormat );
/**
* @brief Get long name of all format supported by FFmpeg / libav.
* @see getFormatsShortNames: to get short names
*/
std::vector<std::string> getFormatsLongNames();
std::vector<std::string> getFormatsShortNames();
/**
* @brief Get long name of all video codec supported by FFmpeg / libav.
* @see getVideoCodecsShortNames: to get short names
*/
std::vector<std::string> getVideoCodecsLongNames();
std::vector<std::string> getVideoCodecsShortNames();
/**
* @brief Get long name of all audio codec supported by FFmpeg / libav.
* @see getAudioCodecsShortNames: to get short names
*/
std::vector<std::string> getAudioCodecsLongNames();
std::vector<std::string> getAudioCodecsShortNames();
/**
* @brief Get the list of options for each output format
*/
OptionArrayMap getOutputFormatOptions();
/**
* @brief Get the list of options for each video codec
*/
OptionArrayMap getVideoCodecOptions();
/**
* @brief Get the list of options for each audio codec
*/
OptionArrayMap getAudioCodecOptions();
}
#endif