Blender V4.3
BKE_writeffmpeg.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11#ifdef WITH_FFMPEG
12
13enum {
14 FFMPEG_MPEG1 = 0,
15 FFMPEG_MPEG2 = 1,
16 FFMPEG_MPEG4 = 2,
17 FFMPEG_AVI = 3,
18 FFMPEG_MOV = 4,
19 FFMPEG_DV = 5,
20 FFMPEG_H264 = 6,
21 FFMPEG_XVID = 7,
22 FFMPEG_FLV = 8,
23 FFMPEG_MKV = 9,
24 FFMPEG_OGG = 10,
25 FFMPEG_INVALID = 11,
26 FFMPEG_WEBM = 12,
27 FFMPEG_AV1 = 13,
28};
29
30enum {
31 FFMPEG_PRESET_NONE = 0,
32 FFMPEG_PRESET_H264 = 1,
33 FFMPEG_PRESET_THEORA = 2,
34 FFMPEG_PRESET_XVID = 3,
35 FFMPEG_PRESET_AV1 = 4,
36};
37
38struct AVFrame;
39struct ImageFormatData;
40struct ImBuf;
41struct RenderData;
42struct ReportList;
43struct Scene;
44struct SwsContext;
45
46bool BKE_ffmpeg_start(void *context_v,
47 const Scene *scene,
48 RenderData *rd,
49 int rectx,
50 int recty,
51 ReportList *reports,
52 bool preview,
53 const char *suffix);
54void BKE_ffmpeg_end(void *context_v);
55bool BKE_ffmpeg_append(void *context_v,
56 RenderData *rd,
57 int start_frame,
58 int frame,
59 const ImBuf *image,
60 const char *suffix,
61 ReportList *reports);
62void BKE_ffmpeg_filepath_get(char filepath[/*FILE_MAX*/ 1024],
63 const RenderData *rd,
64 bool preview,
65 const char *suffix);
66
67void BKE_ffmpeg_preset_set(RenderData *rd, int preset);
68void BKE_ffmpeg_image_type_verify(RenderData *rd, const ImageFormatData *imf);
69bool BKE_ffmpeg_alpha_channel_is_supported(const RenderData *rd);
70
71void *BKE_ffmpeg_context_create();
72void BKE_ffmpeg_context_free(void *context_v);
73
74void BKE_ffmpeg_exit();
75
82SwsContext *BKE_ffmpeg_sws_get_context(int src_width,
83 int src_height,
84 int av_src_format,
85 int dst_width,
86 int dst_height,
87 int av_dst_format,
88 int sws_flags);
89void BKE_ffmpeg_sws_release_context(SwsContext *ctx);
90
91void BKE_ffmpeg_sws_scale_frame(SwsContext *ctx, AVFrame *dst, const AVFrame *src);
92
93#endif