fftools/ffmpeg_enc: split Encoder into a private and public part

Similar to what was previously done for other components, e.g. decoders
(see 3b84140a1b).

Start by moving {samples,frames}_encoded into the public struct.
This commit is contained in:
Anton Khirnov
2024-09-24 10:08:00 +02:00
parent f295b4d8a0
commit 434377a764
3 changed files with 58 additions and 43 deletions

View File

@@ -569,7 +569,13 @@ typedef struct KeyframeForceCtx {
int dropped_keyframe;
} KeyframeForceCtx;
typedef struct Encoder Encoder;
typedef struct Encoder {
const AVClass *class;
// number of frames/samples sent to the encoder
uint64_t frames_encoded;
uint64_t samples_encoded;
} Encoder;
enum CroppingType {
CROP_DISABLED = 0,
@@ -621,9 +627,6 @@ typedef struct OutputStream {
/* stats */
// number of packets send to the muxer
atomic_uint_least64_t packets_written;
// number of frames/samples sent to the encoder
uint64_t frames_encoded;
uint64_t samples_encoded;
/* packet quality factor */
atomic_int quality;