annotate png.h @ 2304:b3832f73444f

Save audio to a wave file when saving video to APNG
author Michael Pavone <pavone@retrodev.com>
date Wed, 15 Mar 2023 18:50:24 -0700
parents eb45ad9d8a3f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1532
b505083dcd87 Added png screenshot support
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #ifndef PNG_H_
b505083dcd87 Added png screenshot support
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
2 #define PNG_H_
b505083dcd87 Added png screenshot support
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
3
2295
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
4 typedef struct {
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
5 uint32_t sequence_number;
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
6 uint32_t num_frames;
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
7 uint32_t num_frame_offset;
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
8 uint16_t delay_num;
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
9 uint16_t delay_den;
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
10 } apng_state;
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
11
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
12 void save_png24_frame(FILE *f, uint32_t *buffer, apng_state *apng, uint32_t width, uint32_t height, uint32_t pitch);
1532
b505083dcd87 Added png screenshot support
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
13 void save_png24(FILE *f, uint32_t *buffer, uint32_t width, uint32_t height, uint32_t pitch);
b505083dcd87 Added png screenshot support
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
14 void save_png(FILE *f, uint32_t *buffer, uint32_t width, uint32_t height, uint32_t pitch);
2295
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
15 apng_state* start_apng(FILE *f, uint32_t width, uint32_t height, float frame_rate);
eb45ad9d8a3f WIP "video" recording in APNG format
Michael Pavone <pavone@retrodev.com>
parents: 1569
diff changeset
16 void end_apng(FILE *f, apng_state *apng);
1569
0ec89dadb36d Add code for loading PNG images. Added 360 controller image. WIP work on gamepad mapping UI
Michael Pavone <pavone@retrodev.com>
parents: 1532
diff changeset
17 uint32_t *load_png(uint8_t *buffer, uint32_t buf_size, uint32_t *width, uint32_t *height);
1532
b505083dcd87 Added png screenshot support
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
18
b505083dcd87 Added png screenshot support
Michael Pavone <pavone@retrodev.com>
parents:
diff changeset
19 #endif //PNG_H_