基于qt,msvc2017-64bits,ffmpeg.opengl的播放器
zhangmeng
2021-03-03 4a6d9312cc1c9d62d66c4def71246d9faae29edb
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
94
95
96
97
98
99
100
101
/*!
 * COPYRIGHT (C) 2010-2020 Emeric Grange - All Rights Reserved
 *
 * This file is part of MiniVideo.
 *
 * MiniVideo is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MiniVideo is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with MiniVideo.  If not, see <http://www.gnu.org/licenses/>.
 *
 * \author    Emeric Grange <emeric.grange@gmail.com>
 * \date      2016
 */
 
#ifndef MINIVIDEO_H
#define MINIVIDEO_H
/* ************************************************************************** */
 
struct MediaFile_t;
 
/*!
 * \brief Error codes returned to clients.
 */
typedef enum MiniVideoErrorCodes_e
{
    ERROR_UNKNOWN               = 1,
 
    ERROR_CONTAINER_UNKNOWN     = 10,
    ERROR_CONTAINER_FAILURE     = 11,
 
    ERROR_CODEC_UNKNOWN         = 20,
    ERROR_CODEC_FAILURE         = 21
 
} MiniVideoErrorCodes_e;
 
/* ************************************************************************** */
 
/*!
 * \brief Print informations about the library (version, date of the build, ...) into standard output.
 */
void minivideo_print_infos(void);
 
/*!
 * \brief Print informations about the library (enabled features, traces levels, ...) into standard output.
 */
void minivideo_print_features(void);
 
/*!
 * \brief Get informations about the library (version and build date/time).
 *
 * The date and time strings are static data and do not need to be freed.
 */
void minivideo_get_infos(int *minivideo_major,
                                          int *minivideo_minor,
                                          int *minivideo_patch,
                                          const char **minivideo_builddate,
                                          const char **minivideo_buildtime,
                                          bool *minivideo_builddebug);
 
/*!
 * \brief Print endianness of the current system.
 * \return 4321 for big endian, 1234 for little endian, -1 if unable to determine endianness.
 *
 * To determine endianness, we use a character pointer to the bytes of an int,
 * and then check its first byte to see if it is 0 (meaning big endianness)
 * or 1 (meaning little endianness).
 */
int minivideo_endianness(void);
 
/* ************************************************************************** */
 
/*!
 * \brief Open a file and return a MediaFile_t context.
 * \param[in] *input_filepath: The file path of the video we want to open.
 * \param[in,out] **input_media: The MediaFile_t context to create.
 * \return TODO ERROR CODE (1 if file opening is a success, 0 otherwise).
 *
 * The first step in the decoding process is to open the file with the given fileptath.
 * If the file is successfully opened, the program start gathering informations about
 * the file, print them if in debug mode.
 */
int minivideo_open(const char *input_filepath,
                                    MediaFile_t **input_media);
 
/*!
 * \brief Close a video file.
 * \param input_media[in,out]: The MediaFile_t context to destroy.
 * \return 1 if success, 0 otherwise.
 */
int minivideo_close(MediaFile_t **input_media);
 
 
#endif // MINIVIDEO_H