1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
FFmpeg/libavutil
Zhao Zhili ba9cd06c76 avutil/avutil: make AV_TIME_BASE_Q available in C++
ISO C++ forbids compound-literals. It's not available with MSVC.
This is a known issue from 10 years ago, and that's why there is a
av_get_time_base_q().

Since we have no plan to remove AV_TIME_BASE_Q, just make it
available in C++.

There are multiple choices:
1. Use C++11 syntax: AVRational{1, AV_TIME_BASE}

Users may still use C++98 to write new code. So no.

2. Use av_get_time_base_q().

It's for this purpose. But it's not compile time constants as
AV_TIME_BASE_Q in C.

So I choose av_make_q() as Anton's suggestion.

https://libav-devel.libav.narkive.com/ZQCWfTun/patch-0-2-fix-avutil-h-usage-from-c
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-09-19 00:52:21 +08:00
..
aarch64 aarch64: remove VFP feature check 2023-07-15 22:56:30 +03:00
arm
avr32
loongarch avutil/la: Add function performance testing 2023-05-25 21:05:21 +02:00
mips
ppc
riscv lavu/timer: specify RISC-V time unit 2023-08-24 20:58:57 +03:00
sh4
tests avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
x86 avutil/internal: Don't auto-include emms.h 2023-09-04 11:04:45 +02:00
.gitignore
adler32.c
adler32.h
aes_ctr.c
aes_ctr.h
aes_internal.h
aes.c
aes.h
ambient_viewing_environment.c
ambient_viewing_environment.h
attributes_internal.h
attributes.h
audio_fifo.c avutil/audio_fifo: Constify some pointees 2023-09-12 09:20:13 +02:00
audio_fifo.h avutil/audio_fifo: Constify some pointees 2023-09-12 09:20:13 +02:00
avassert.h lavu/avassert: include config.h 2023-07-12 15:35:37 +02:00
avsscanf.c
avstring.c avutil/avstring: Remove obsolete version.h inclusion 2023-09-07 00:48:50 +02:00
avstring.h avutil/avstring: Remove obsolete version.h inclusion 2023-09-07 00:48:50 +02:00
avutil.h avutil/avutil: make AV_TIME_BASE_Q available in C++ 2023-09-19 00:52:21 +08:00
avutilres.rc
base64.c
base64.h
blowfish.c
blowfish.h
bprint.c avutil/bprint: Allow size == 0 in av_bprint_init_for_buffer() 2023-08-10 08:53:38 +02:00
bprint.h avutil/bprint: Allow size == 0 in av_bprint_init_for_buffer() 2023-08-10 08:53:38 +02:00
bswap.h
buffer_internal.h
buffer.c
buffer.h
camellia.c
camellia.h
cast5.c
cast5.h
channel_layout.c avutil/channel_layout: Account for \0 in sizes 2023-08-10 08:55:05 +02:00
channel_layout.h avutil/channel_layout: make pre-defined channel layouts C++ friendly 2023-08-18 08:27:24 -03:00
colorspace.h
common.h avutil: Move error.h from avutil.h to common.h 2023-09-07 00:41:47 +02:00
cpu_internal.h
cpu.c lavu: add/use flag for RISC-V Zba extension 2023-07-19 19:29:35 +03:00
cpu.h lavu: add/use flag for RISC-V Zba extension 2023-07-19 19:29:35 +03:00
crc.c
crc.h
csp.c
csp.h
cuda_check.h
des.c
des.h
detection_bbox.c
detection_bbox.h
dict_internal.h
dict.c avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
dict.h
display.c
display.h
dovi_meta.c
dovi_meta.h
downmix_info.c
downmix_info.h
dynarray.h
emms.h avutil/internal: Don't auto-include emms.h 2023-09-04 11:04:45 +02:00
encryption_info.c avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
encryption_info.h
error.c
error.h
eval.c
eval.h
executor.c avutil: add thread executor 2023-09-02 02:49:06 +02:00
executor.h avutil: add thread executor 2023-09-02 02:49:06 +02:00
ffmath.h
fifo.c avutil/fifo: Constify AVFifo pointees in peek functions 2023-09-12 09:20:49 +02:00
fifo.h avutil/fifo: Constify AVFifo pointees in peek functions 2023-09-12 09:20:49 +02:00
file_open.c
file_open.h
file.c avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
file.h
film_grain_params.c
film_grain_params.h
fixed_dsp.c
fixed_dsp.h
float2half.c
float2half.h
float_dsp.c
float_dsp.h
frame.c avutil/imgutils: Add wrapper for av_image_copy() to avoid casts 2023-09-12 09:42:27 +02:00
frame.h lavu: add video_hint API 2023-08-08 09:46:11 +02:00
getenv_utf8.h
half2float.c
half2float.h
hash.c avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
hash.h
hdr_dynamic_metadata.c
hdr_dynamic_metadata.h
hdr_dynamic_vivid_metadata.c
hdr_dynamic_vivid_metadata.h
hmac.c avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
hmac.h
hwcontext_cuda_internal.h
hwcontext_cuda.c lavu/hwcontext_cuda: declare support for rgb32/bgr32 2023-06-15 12:29:52 -07:00
hwcontext_cuda.h
hwcontext_d3d11va.c avutil/imgutils: Add wrapper for av_image_copy() to avoid casts 2023-09-12 09:42:27 +02:00
hwcontext_d3d11va.h
hwcontext_drm.c
hwcontext_drm.h
hwcontext_dxva2.c avutil/imgutils: Add wrapper for av_image_copy() to avoid casts 2023-09-12 09:42:27 +02:00
hwcontext_dxva2.h
hwcontext_internal.h
hwcontext_mediacodec.c
hwcontext_mediacodec.h
hwcontext_opencl.c
hwcontext_opencl.h
hwcontext_qsv.c lavu/hwcontext_qsv: silence the warning 2023-07-31 09:09:20 +08:00
hwcontext_qsv.h
hwcontext_stub.c
hwcontext_vaapi.c lavu/hwcontext_vaapi: Add vaapi_drm_format_map support for x2rgb10 2023-08-17 12:06:09 +08:00
hwcontext_vaapi.h
hwcontext_vdpau.c
hwcontext_vdpau.h
hwcontext_videotoolbox.c
hwcontext_videotoolbox.h
hwcontext_vulkan.c avutil/hwcontext_vulkan: Cosmetics 2023-09-15 02:38:14 +02:00
hwcontext_vulkan.h hwcontext_vulkan: rewrite to support multiplane surfaces 2023-05-29 00:41:49 +02:00
hwcontext.c all: Use av_frame_replace() where appropriate 2023-09-10 21:22:30 +02:00
hwcontext.h
imgutils_internal.h
imgutils.c avutil/imgutils: Constify some pointees 2023-09-12 09:14:25 +02:00
imgutils.h avutil/imgutils: Add wrapper for av_image_copy() to avoid casts 2023-09-12 09:42:27 +02:00
integer.c
integer.h
internal.h avutil/internal: Don't auto-include emms.h 2023-09-04 11:04:45 +02:00
intfloat.h
intmath.c
intmath.h
intreadwrite.h intreadwrite: Indicate potential aliasing in AV_RN/AV_WN for Clang/MSVC mode 2023-08-04 21:50:57 +03:00
lfg.c
lfg.h
libavutil.v
libm.h
lls.c
lls.h
log2_tab.c
log.c
log.h
lzo.c
lzo.h
macos_kperf.c macos_kperf: fix incomplete prototype 2023-07-22 21:35:15 +03:00
macos_kperf.h
macros.h
Makefile avutil: add thread executor 2023-09-02 02:49:06 +02:00
mastering_display_metadata.c
mastering_display_metadata.h
mathematics.c Move bessel_i0() from swresample/resample to avutil/mathematics 2023-05-29 00:45:28 +02:00
mathematics.h Move bessel_i0() from swresample/resample to avutil/mathematics 2023-05-29 00:45:28 +02:00
md5.c avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
md5.h
mem_internal.h
mem.c
mem.h avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
motion_vector.h
murmur3.c avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
murmur3.h
objc.h
opt.c
opt.h
parseutils.c
parseutils.h
pca.c
pca.h
pixdesc.c lavu: add 12-bit 2-plane 422 and 444 pixel formats 2023-05-29 00:41:35 +02:00
pixdesc.h
pixelutils.c
pixelutils.h
pixfmt.h lavu: add 12-bit 2-plane 422 and 444 pixel formats 2023-05-29 00:41:35 +02:00
qsort.h
random_seed.c avutil/random_seed: turn off buffering when reading from random 2023-07-16 11:48:31 +02:00
random_seed.h avutil/random_seed: include stddef.h 2023-07-05 10:25:12 -07:00
rational.c
rational.h
rc4.c
rc4.h
replaygain.h
reverse.c
reverse.h
ripemd.c
ripemd.h
samplefmt.c avutil/samplefmt: Constify some pointees 2023-09-12 09:17:28 +02:00
samplefmt.h avutil/samplefmt: Constify some pointees 2023-09-12 09:17:28 +02:00
sha512.c
sha512.h
sha.c
sha.h
slicethread.c
slicethread.h
softfloat_ieee754.h
softfloat_tables.h
softfloat.h avutil/softfloat: Basic documentation for av_sincos_sf() 2023-06-23 02:06:46 +02:00
spherical.c avutil/avstring: Remove obsolete version.h inclusion 2023-09-07 00:48:50 +02:00
spherical.h
stereo3d.c
stereo3d.h
tablegen.h
tea.c
tea.h
thread.h avutil/thread: add wrappers for pthread_cond_t functions 2023-08-19 10:03:07 -03:00
threadmessage.c avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
threadmessage.h
time_internal.h
time.c
time.h
timecode.c
timecode.h
timer.h timer: don't leak perf FD if zero 2023-07-22 21:35:15 +03:00
timestamp.h avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
tree.c
tree.h
twofish.c
twofish.h
tx_double.c
tx_float.c
tx_int32.c
tx_priv.h avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
tx_template.c lavu/tx: fix scaling of R2R transforms 2023-09-01 23:59:13 +02:00
tx.c avcodec/libaribb24,ttmlenc, avutil/tx: Remove redundant init of AVBPrint 2023-09-14 12:32:02 +02:00
tx.h lavu/tx: add DCT-I and DST-I transforms 2023-09-01 23:59:10 +02:00
utils.c
uuid.c
uuid.h
version_major.h
version.c
version.h avutil/avutil: make AV_TIME_BASE_Q available in C++ 2023-09-19 00:52:21 +08:00
video_enc_params.c
video_enc_params.h
video_hint.c lavu: add video_hint API 2023-08-08 09:46:11 +02:00
video_hint.h lavu: add video_hint API 2023-08-08 09:46:11 +02:00
vulkan_functions.h vulkan: enable VK_KHR_cooperative_matrix 2023-08-26 23:14:53 +02:00
vulkan_loader.h vulkan: enable VK_KHR_cooperative_matrix 2023-08-26 23:14:53 +02:00
vulkan.c vulkan: do not leak bound_buffer_indices 2023-08-28 22:29:36 +02:00
vulkan.h vulkan: enable VK_KHR_cooperative_matrix 2023-08-26 23:14:53 +02:00
wchar_filename.h avutil/mem: Don't include avutil.h 2023-09-07 00:42:10 +02:00
xga_font_data.c
xga_font_data.h
xtea.c
xtea.h