Cleanup: Remove unused AviCodecData
Non-ffmpeg movie support was removed in #118409, but I did not notice that AviCodecData is now not needed. Pull Request: https://projects.blender.org/blender/blender/pulls/119777
This commit is contained in:
parent
24b4461be3
commit
480f2f5bdd
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
struct AviCodecData;
|
||||
struct Base;
|
||||
struct Collection;
|
||||
struct Depsgraph;
|
||||
|
@ -61,8 +60,6 @@ enum eSceneCopyMethod {
|
|||
*/
|
||||
Base *_setlooper_base_step(Scene **sce_iter, ViewLayer *view_layer, Base *base);
|
||||
|
||||
void free_avicodecdata(AviCodecData *acd);
|
||||
|
||||
Scene *BKE_scene_add(Main *bmain, const char *name);
|
||||
|
||||
void BKE_scene_remove_rigidbody_object(Main *bmain, Scene *scene, Object *ob, bool free_us);
|
||||
|
|
|
@ -333,14 +333,6 @@ static void scene_copy_data(Main *bmain,
|
|||
/* tool settings */
|
||||
scene_dst->toolsettings = BKE_toolsettings_copy(scene_dst->toolsettings, flag_subdata);
|
||||
|
||||
/* make a private copy of the avicodecdata */
|
||||
if (scene_src->r.avicodecdata) {
|
||||
scene_dst->r.avicodecdata = static_cast<AviCodecData *>(
|
||||
MEM_dupallocN(scene_src->r.avicodecdata));
|
||||
scene_dst->r.avicodecdata->lpFormat = MEM_dupallocN(scene_dst->r.avicodecdata->lpFormat);
|
||||
scene_dst->r.avicodecdata->lpParms = MEM_dupallocN(scene_dst->r.avicodecdata->lpParms);
|
||||
}
|
||||
|
||||
if (scene_src->display.shading.prop) {
|
||||
scene_dst->display.shading.prop = IDP_CopyProperty(scene_src->display.shading.prop);
|
||||
}
|
||||
|
@ -411,12 +403,6 @@ static void scene_free_data(ID *id)
|
|||
BKE_rigidbody_free_world(scene);
|
||||
}
|
||||
|
||||
if (scene->r.avicodecdata) {
|
||||
free_avicodecdata(scene->r.avicodecdata);
|
||||
MEM_freeN(scene->r.avicodecdata);
|
||||
scene->r.avicodecdata = nullptr;
|
||||
}
|
||||
|
||||
scene_free_markers(scene, do_id_user);
|
||||
BLI_freelistN(&scene->transform_spaces);
|
||||
BLI_freelistN(&scene->r.views);
|
||||
|
@ -1130,16 +1116,6 @@ static void scene_blend_write(BlendWriter *writer, ID *id, const void *id_addres
|
|||
}
|
||||
}
|
||||
|
||||
if (sce->r.avicodecdata) {
|
||||
BLO_write_struct(writer, AviCodecData, sce->r.avicodecdata);
|
||||
if (sce->r.avicodecdata->lpFormat) {
|
||||
BLO_write_raw(writer, size_t(sce->r.avicodecdata->cbFormat), sce->r.avicodecdata->lpFormat);
|
||||
}
|
||||
if (sce->r.avicodecdata->lpParms) {
|
||||
BLO_write_raw(writer, size_t(sce->r.avicodecdata->cbParms), sce->r.avicodecdata->lpParms);
|
||||
}
|
||||
}
|
||||
|
||||
/* writing dynamic list of TimeMarkers to the blend file */
|
||||
LISTBASE_FOREACH (TimeMarker *, marker, &sce->markers) {
|
||||
BLO_write_struct(writer, TimeMarker, marker);
|
||||
|
@ -1450,11 +1426,6 @@ static void scene_blend_read_data(BlendDataReader *reader, ID *id)
|
|||
sce->r.mode &= ~R_NO_CAMERA_SWITCH;
|
||||
#endif
|
||||
|
||||
BLO_read_data_address(reader, &sce->r.avicodecdata);
|
||||
if (sce->r.avicodecdata) {
|
||||
BLO_read_data_address(reader, &sce->r.avicodecdata->lpFormat);
|
||||
BLO_read_data_address(reader, &sce->r.avicodecdata->lpParms);
|
||||
}
|
||||
BLO_read_list(reader, &(sce->markers));
|
||||
LISTBASE_FOREACH (TimeMarker *, marker, &sce->markers) {
|
||||
BLO_read_data_address(reader, &marker->prop);
|
||||
|
@ -1650,22 +1621,6 @@ const char *RE_engine_id_BLENDER_EEVEE_NEXT = "BLENDER_EEVEE_NEXT";
|
|||
const char *RE_engine_id_BLENDER_WORKBENCH = "BLENDER_WORKBENCH";
|
||||
const char *RE_engine_id_CYCLES = "CYCLES";
|
||||
|
||||
void free_avicodecdata(AviCodecData *acd)
|
||||
{
|
||||
if (acd) {
|
||||
if (acd->lpFormat) {
|
||||
MEM_freeN(acd->lpFormat);
|
||||
acd->lpFormat = nullptr;
|
||||
acd->cbFormat = 0;
|
||||
}
|
||||
if (acd->lpParms) {
|
||||
MEM_freeN(acd->lpParms);
|
||||
acd->lpParms = nullptr;
|
||||
acd->cbParms = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void remove_sequencer_fcurves(Scene *sce)
|
||||
{
|
||||
AnimData *adt = BKE_animdata_from_id(&sce->id);
|
||||
|
@ -1878,13 +1833,6 @@ Scene *BKE_scene_duplicate(Main *bmain, Scene *sce, eSceneCopyMethod type)
|
|||
BKE_toolsettings_free(sce_copy->toolsettings);
|
||||
sce_copy->toolsettings = BKE_toolsettings_copy(sce->toolsettings, 0);
|
||||
|
||||
/* make a private copy of the avicodecdata */
|
||||
if (sce->r.avicodecdata) {
|
||||
sce_copy->r.avicodecdata = static_cast<AviCodecData *>(MEM_dupallocN(sce->r.avicodecdata));
|
||||
sce_copy->r.avicodecdata->lpFormat = MEM_dupallocN(sce_copy->r.avicodecdata->lpFormat);
|
||||
sce_copy->r.avicodecdata->lpParms = MEM_dupallocN(sce_copy->r.avicodecdata->lpParms);
|
||||
}
|
||||
|
||||
BKE_sound_reset_scene_runtime(sce_copy);
|
||||
|
||||
/* grease pencil */
|
||||
|
|
|
@ -58,35 +58,6 @@ typedef struct SceneRuntimeHandle SceneRuntimeHandle;
|
|||
/** \name FFMPEG
|
||||
* \{ */
|
||||
|
||||
typedef struct AviCodecData {
|
||||
/** Save format. */
|
||||
void *lpFormat;
|
||||
/** Compressor options. */
|
||||
void *lpParms;
|
||||
/** Size of lpFormat buffer. */
|
||||
unsigned int cbFormat;
|
||||
/** Size of lpParms buffer. */
|
||||
unsigned int cbParms;
|
||||
|
||||
/** Stream type, for consistency. */
|
||||
unsigned int fccType;
|
||||
/** Compressor. */
|
||||
unsigned int fccHandler;
|
||||
/** Keyframe rate. */
|
||||
unsigned int dwKeyFrameEvery;
|
||||
/** Compress quality 0-10,000. */
|
||||
unsigned int dwQuality;
|
||||
/** Bytes per second. */
|
||||
unsigned int dwBytesPerSecond;
|
||||
/** Flags... see below. */
|
||||
unsigned int dwFlags;
|
||||
/** For non-video streams only. */
|
||||
unsigned int dwInterleaveEvery;
|
||||
char _pad[4];
|
||||
|
||||
char avicodecname[128];
|
||||
} AviCodecData;
|
||||
|
||||
typedef enum eFFMpegPreset {
|
||||
FFM_PRESET_NONE = 0,
|
||||
|
||||
|
@ -684,7 +655,7 @@ typedef enum eBakePassFilter {
|
|||
typedef struct RenderData {
|
||||
struct ImageFormatData im_format;
|
||||
|
||||
struct AviCodecData *avicodecdata;
|
||||
void *_pad;
|
||||
struct FFMpegCodecData ffcodecdata;
|
||||
|
||||
/** Frames as in 'images'. */
|
||||
|
|
Loading…
Reference in New Issue