Blender V5.0
movie_proxy_indexer.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023-2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_vector.hh"
12#include "IMB_imbuf_enums.h"
13#include "MOV_enums.hh"
14
15struct MovieReader;
16
17/*
18 * separate animation index files to solve the following problems:
19 *
20 * a) different time-codes within one file (like DTS/PTS, Time-code-Track,
21 * "implicit" time-codes within DV-files and HDV-files etc.)
22 * b) seeking difficulties within FFMPEG for files with timestamp holes
23 * c) broken files that miss several frames / have varying frame-rates
24 * d) use proxies accordingly
25 *
26 * ... we need index files, that provide us with
27 *
28 * the binary(!) position, where we have to seek into the file *and*
29 * the continuous frame number (ignoring the holes) starting from the
30 * beginning of the file, so that we know, which proxy frame to serve.
31 *
32 * This index has to be only built once for a file and is written into
33 * the BL_proxy directory structure for later reuse in different blender files.
34 */
35
42
43struct MovieIndex {
44 char filepath[1024];
45
47
48 uint64_t get_seek_pos_pts(int frame_index) const;
49 uint64_t get_seek_pos_dts(int frame_index) const;
50
51 int get_frame_index(int frameno) const;
52 uint64_t get_pts(int frame_index) const;
53 int get_duration() const;
54};
55
IMB_Proxy_Size
IMB_Timecode_Type
Definition MOV_enums.hh:44
unsigned long long int uint64_t
const MovieIndex * movie_open_index(MovieReader *anim, IMB_Timecode_Type tc)
MovieReader * movie_open_proxy(MovieReader *anim, IMB_Proxy_Size preview_size)
int get_duration() const
blender::Vector< MovieIndexFrame > entries
char filepath[1024]
int get_frame_index(int frameno) const
uint64_t get_seek_pos_dts(int frame_index) const
uint64_t get_pts(int frame_index) const
uint64_t get_seek_pos_pts(int frame_index) const