Skip to content

Commit

Permalink
Add iron_mpeg functions
Browse files Browse the repository at this point in the history
  • Loading branch information
luboslenco committed Nov 25, 2024
1 parent 7a0ff99 commit 06e76b4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions armorcore/sources/iron.h
Original file line number Diff line number Diff line change
Expand Up @@ -2698,8 +2698,18 @@ buffer_t *iron_encode_png(buffer_t *bytes, i32 w, i32 h, i32 format) {
#endif

#ifdef WITH_MPEG_WRITE
buffer_t *iron_write_mpeg() {
return NULL;
static FILE *iron_mpeg_fp;

void iron_mpeg_begin(char *path) {
iron_mpeg_fp = fopen(path, "wb");
}

void iron_mpeg_end() {
fclose(iron_mpeg_fp);
}

void iron_mpeg_write(buffer_t *bytes, i32 w, i32 h) {
jo_write_mpeg(iron_mpeg_fp, bytes->buffer, w, h, 60);
}
#endif

Expand Down

0 comments on commit 06e76b4

Please sign in to comment.