![]() |
Miam-Player
0.8.0
A nice music player
|
#include "QtAV/QtAV_Global.h"
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libavutil/avstring.h>
#include <libavutil/dict.h>
#include <libavutil/imgutils.h>
#include <libavutil/log.h>
#include <libavutil/mathematics.h>
#include <libavutil/cpu.h>
#include <libavutil/error.h>
#include <libavutil/opt.h>
#include <libavutil/parseutils.h>
#include <libavutil/pixdesc.h>
#include <libavutil/channel_layout.h>
#include <libavutil/samplefmt.h>
Go to the source code of this file.
Macros | |
#define | QTAV_USE_FFMPEG(MODULE) (MODULE##_VERSION_MICRO >= 100) |
NOTE: include this at last. More... | |
#define | QTAV_USE_LIBAV(MODULE) !QTAV_USE_FFMPEG(MODULE) |
#define | FFMPEG_MODULE_CHECK(MODULE, MAJOR, MINOR, MICRO) (QTAV_USE_FFMPEG(MODULE) && MODULE##_VERSION_INT >= AV_VERSION_INT(MAJOR, MINOR, MICRO)) |
#define | LIBAV_MODULE_CHECK(MODULE, MAJOR, MINOR, MICRO) (QTAV_USE_LIBAV(MODULE) && MODULE##_VERSION_INT >= AV_VERSION_INT(MAJOR, MINOR, MICRO)) |
#define | AV_MODULE_CHECK(MODULE, MAJOR, MINOR, MICRO, MINOR2, MICRO2) (LIBAV_MODULE_CHECK(MODULE, MAJOR, MINOR, MICRO) || FFMPEG_MODULE_CHECK(MODULE, MAJOR, MINOR2, MICRO2)) |
#define | AV_ENSURE_OK(FUNC, ...) AV_RUN_CHECK(FUNC, return, __VA_ARGS__) |
example: AV_ENSURE(avcodec_close(avctx), false) will print error and return false if failed. AV_WARN just prints error. More... | |
#define | AV_ENSURE(FUNC, ...) AV_RUN_CHECK(FUNC, return, __VA_ARGS__) |
#define | AV_WARN(FUNC) AV_RUN_CHECK(FUNC, void) |
#define | AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c) |
Guide to uniform the api for different FFmpeg version(or other libraries) We use the existing old api to simulater . More... | |
#define | GCC_VERSION_AT_LEAST(major, minor, patch) 0 |
#define | QTAV_HAVE_AVBUFREF AV_MODULE_CHECK(LIBAVUTIL, 52, 8, 0, 19, 100) |
#define | AV_ERROR_MAX_STRING_SIZE 64 |
#define | avcodec_decode_audio3(avctx, samples, frame_size_ptr, avpkt) avcodec_decode_audio2(avctx, samples, frame_size_ptr, (*avpkt).data, (*avpkt).size); |
defined(av_err2str) || GCC_VERSION_AT_LEAST(4, 7, 2) More... | |
#define | av_dump_format(...) dump_format(__VA_ARGS__) |
#define | QTAV_PIX_FMT_C(X) PIX_FMT_##X |
#define | PIX_FMT_PLANAR 16 |
At least one pixel component is not in the first data plane. More... | |
#define | PIX_FMT_RGB 32 |
The pixel format contains RGB-like data (as opposed to YUV/grayscale) More... | |
#define | PIX_FMT_PSEUDOPAL 64 |
#define | PIX_FMT_ALPHA 128 |
The pixel format has an alpha channel. More... | |
#define | AV_PIX_FMT_FLAG_BE PIX_FMT_BE |
#define | AV_PIX_FMT_FLAG_PAL PIX_FMT_PAL |
#define | AV_PIX_FMT_FLAG_BITSTREAM PIX_FMT_BITSTREAM |
#define | AV_PIX_FMT_FLAG_HWACCEL PIX_FMT_HWACCEL |
#define | AV_PIX_FMT_FLAG_PLANAR PIX_FMT_PLANAR |
#define | AV_PIX_FMT_FLAG_RGB PIX_FMT_RGB |
#define | AV_PIX_FMT_FLAG_PSEUDOPAL PIX_FMT_PSEUDOPAL |
#define | AV_PIX_FMT_FLAG_ALPHA PIX_FMT_ALPHA |
#define | QTAV_CODEC_ID(X) CODEC_ID_##X |
#define | av_frame_alloc() avcodec_alloc_frame() |
#define | av_frame_free(f) avcodec_free_frame(f) |
#define | av_packet_unref(pkt) av_free_packet(pkt) |
#define | AV_CODEC_ID_HEVC ((AVCodecID)0) |
#define | CODEC_ID_HEVC ((AVCodecID)0) |
#define | FF_PROFILE_HEVC_MAIN -1 |
#define | FF_PROFILE_HEVC_MAIN_10 -1 |
#define | AV_CODEC_ID_VP9 ((AVCodecID)0) |
#define | CODEC_ID_VP9 ((AVCodecID)0) |
#define | FF_PROFILE_VP9_0 0 |
#define | FF_PROFILE_VP9_1 1 |
#define | FF_PROFILE_VP9_2 2 |
#define | FF_PROFILE_VP9_3 3 |
#define | AV_RUN_CHECK(FUNC, RETURN, ...) |
Typedefs | |
typedef enum PixelFormat | AVPixelFormat |
typedef enum CodecID | AVCodecID |
#define AV_CODEC_ID_HEVC ((AVCodecID)0) |
#define AV_CODEC_ID_VP9 ((AVCodecID)0) |
#define av_dump_format | ( | ... | ) | dump_format(__VA_ARGS__) |
#define AV_ENSURE | ( | FUNC, | |
... | |||
) | AV_RUN_CHECK(FUNC, return, __VA_ARGS__) |
#define AV_ENSURE_OK | ( | FUNC, | |
... | |||
) | AV_RUN_CHECK(FUNC, return, __VA_ARGS__) |
example: AV_ENSURE(avcodec_close(avctx), false) will print error and return false if failed. AV_WARN just prints error.
#define AV_ERROR_MAX_STRING_SIZE 64 |
#define av_frame_alloc | ( | void | ) | avcodec_alloc_frame() |
#define av_frame_free | ( | f | ) | avcodec_free_frame(f) |
#define AV_MODULE_CHECK | ( | MODULE, | |
MAJOR, | |||
MINOR, | |||
MICRO, | |||
MINOR2, | |||
MICRO2 | |||
) | (LIBAV_MODULE_CHECK(MODULE, MAJOR, MINOR, MICRO) || FFMPEG_MODULE_CHECK(MODULE, MAJOR, MINOR2, MICRO2)) |
#define av_packet_unref | ( | pkt | ) | av_free_packet(pkt) |
#define AV_PIX_FMT_FLAG_ALPHA PIX_FMT_ALPHA |
#define AV_PIX_FMT_FLAG_BE PIX_FMT_BE |
#define AV_PIX_FMT_FLAG_BITSTREAM PIX_FMT_BITSTREAM |
#define AV_PIX_FMT_FLAG_HWACCEL PIX_FMT_HWACCEL |
#define AV_PIX_FMT_FLAG_PAL PIX_FMT_PAL |
#define AV_PIX_FMT_FLAG_PLANAR PIX_FMT_PLANAR |
#define AV_PIX_FMT_FLAG_PSEUDOPAL PIX_FMT_PSEUDOPAL |
#define AV_PIX_FMT_FLAG_RGB PIX_FMT_RGB |
#define AV_RUN_CHECK | ( | FUNC, | |
RETURN, | |||
... | |||
) |
#define AV_VERSION_INT | ( | a, | |
b, | |||
c | |||
) | (a<<16 | b<<8 | c) |
Guide to uniform the api for different FFmpeg version(or other libraries) We use the existing old api to simulater .
#define AV_WARN | ( | FUNC | ) | AV_RUN_CHECK(FUNC, void) |
#define avcodec_decode_audio3 | ( | avctx, | |
samples, | |||
frame_size_ptr, | |||
avpkt | |||
) | avcodec_decode_audio2(avctx, samples, frame_size_ptr, (*avpkt).data, (*avpkt).size); |
defined(av_err2str) || GCC_VERSION_AT_LEAST(4, 7, 2)
#define CODEC_ID_HEVC ((AVCodecID)0) |
#define CODEC_ID_VP9 ((AVCodecID)0) |
#define FF_PROFILE_HEVC_MAIN -1 |
#define FF_PROFILE_HEVC_MAIN_10 -1 |
#define FF_PROFILE_VP9_0 0 |
#define FF_PROFILE_VP9_1 1 |
#define FF_PROFILE_VP9_2 2 |
#define FF_PROFILE_VP9_3 3 |
#define FFMPEG_MODULE_CHECK | ( | MODULE, | |
MAJOR, | |||
MINOR, | |||
MICRO | |||
) | (QTAV_USE_FFMPEG(MODULE) && MODULE##_VERSION_INT >= AV_VERSION_INT(MAJOR, MINOR, MICRO)) |
#define GCC_VERSION_AT_LEAST | ( | major, | |
minor, | |||
patch | |||
) | 0 |
#define LIBAV_MODULE_CHECK | ( | MODULE, | |
MAJOR, | |||
MINOR, | |||
MICRO | |||
) | (QTAV_USE_LIBAV(MODULE) && MODULE##_VERSION_INT >= AV_VERSION_INT(MAJOR, MINOR, MICRO)) |
#define PIX_FMT_ALPHA 128 |
The pixel format has an alpha channel.
#define PIX_FMT_PLANAR 16 |
At least one pixel component is not in the first data plane.
#define PIX_FMT_PSEUDOPAL 64 |
#define PIX_FMT_RGB 32 |
The pixel format contains RGB-like data (as opposed to YUV/grayscale)
#define QTAV_CODEC_ID | ( | X | ) | CODEC_ID_##X |
#define QTAV_HAVE_AVBUFREF AV_MODULE_CHECK(LIBAVUTIL, 52, 8, 0, 19, 100) |
#define QTAV_PIX_FMT_C | ( | X | ) | PIX_FMT_##X |
#define QTAV_USE_FFMPEG | ( | MODULE | ) | (MODULE##_VERSION_MICRO >= 100) |
NOTE: include this at last.
#define QTAV_USE_LIBAV | ( | MODULE | ) | !QTAV_USE_FFMPEG(MODULE) |
typedef enum CodecID AVCodecID |
typedef enum PixelFormat AVPixelFormat |
av_always_inline char* av_err2str | ( | int | errnum | ) |
enum AVColorRange av_frame_get_color_range | ( | const AVFrame * | frame | ) |
enum AVColorSpace av_frame_get_colorspace | ( | const AVFrame * | frame | ) |
int64_t av_get_default_channel_layout | ( | int | nb_channels | ) |
void av_packet_free_side_data | ( | AVPacket * | pkt | ) |
void av_packet_rescale_ts | ( | AVPacket * | pkt, |
AVRational | src_tb, | ||
AVRational | dst_tb | ||
) |
int av_pix_fmt_count_planes | ( | AVPixelFormat | pix_fmt | ) |
const AVPixFmtDescriptor* av_pix_fmt_desc_get | ( | AVPixelFormat | pix_fmt | ) |
AVPixelFormat av_pix_fmt_desc_get_id | ( | const AVPixFmtDescriptor * | desc | ) |
const AVPixFmtDescriptor* av_pix_fmt_desc_next | ( | const AVPixFmtDescriptor * | prev | ) |
int av_samples_copy | ( | uint8_t ** | dst, |
uint8_t *const * | src, | ||
int | dst_offset, | ||
int | src_offset, | ||
int | nb_samples, | ||
int | nb_channels, | ||
enum AVSampleFormat | sample_fmt | ||
) |
Copy samples from src to dst.
dst | destination array of pointers to data planes |
src | source array of pointers to data planes |
dst_offset | offset in samples at which the data will be written to dst |
src_offset | offset in samples at which the data will be read from src |
nb_samples | number of samples to be copied |
nb_channels | number of audio channels |
sample_fmt | audio sample format |
void avcodec_free_context | ( | AVCodecContext ** | avctx | ) |
const char* avcodec_get_name | ( | enum AVCodecID | id | ) |
int avformat_alloc_output_context2 | ( | AVFormatContext ** | avctx, |
AVOutputFormat * | oformat, | ||
const char * | format, | ||
const char * | filename | ||
) |
int avio_feof | ( | AVIOContext * | s | ) |
void ffmpeg_version_print | ( | ) |
const char* get_codec_long_name | ( | AVCodecID | id | ) |