34#define SYNC_BEGIN ESC "[?2026h"
35#define SYNC_END ESC "[?2026l"
36#define CURSOR_SAVE ESC "7"
37#define CURSOR_RESTORE ESC "8"
38#define CURSOR_HOME ESC "[H"
39#define CURSOR_BOTTOM ESC "[999H"
41#define OSC_START ESC "]1337;"
46#define TMUX_DCS ESC "Ptmux;"
52#define FILEPART_CHUNK ((1 << 20) - 4096)
54#define WRITE_LITERAL(pb, str) avio_write(pb, (const unsigned char *)(str), \
83 size_t b64_len = strlen(
c->b64);
88 if (
c->display_width &&
c->display_width[0])
90 if (
c->display_height &&
c->display_height[0])
145#define OFFSET(x) offsetof(ITerm2Context, x)
146#define ENC AV_OPT_FLAG_ENCODING_PARAM
149 {
"display_width",
"on-screen width (auto, N cells, Npx, N%%)",
151 {
"display_height",
"on-screen height (auto, N cells, Npx, N%%)",
153 {
"keep_aspect",
"preserve aspect ratio when scaling",
155 {
"tmux",
"wrap image in tmux DCS passthrough, requires tmux set -g allow-passthrough on",
161 .class_name =
"iTerm2 muxer",
int avio_printf(AVIOContext *s, const char *fmt,...) av_printf_format(2
Writes a formatted string to the context.
void avio_write(AVIOContext *s, const unsigned char *buf, int size)
void avio_flush(AVIOContext *s)
Force flushing of buffered data.
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
char * av_base64_encode(char *out, int out_size, const uint8_t *in, int in_size)
Encode data to base64 and null-terminate.
#define AV_BASE64_SIZE(x)
Calculate the output size needed to base64-encode x bytes to a null-terminated string.
const char * av_default_item_name(void *ptr)
Return the context name.
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
#define LIBAVUTIL_VERSION_INT
static int iterm2_write_packet(AVFormatContext *s, AVPacket *pkt)
static av_cold void iterm2_deinit(AVFormatContext *s)
static void osc_open(ITerm2Context *c, AVIOContext *pb)
static const AVClass iterm2_class
static void write_image(ITerm2Context *c, AVIOContext *pb, int size)
static void osc_close(ITerm2Context *c, AVIOContext *pb)
static int iterm2_write_trailer(AVFormatContext *s)
#define WRITE_LITERAL(pb, str)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AV_CLASS_CATEGORY_MUXER
Utility Preprocessor macros.
Memory handling functions.
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
Describe the class of an AVClass context structure.
This structure stores compressed data.