static int io_write_data_type(void *opaque, uint8_t *buf, int size,

                              enum AVIODataMarkerType type, int64_t time)

{

    char timebuf[30], content[5] = { 0 };

    const char *str;

    switch (type) {

    case AVIO_DATA_MARKER_HEADER:         str = "header";   break;

    case AVIO_DATA_MARKER_SYNC_POINT:     str = "sync";     break;

    case AVIO_DATA_MARKER_BOUNDARY_POINT: str = "boundary"; break;

    case AVIO_DATA_MARKER_UNKNOWN:        str = "unknown";  break;

    case AVIO_DATA_MARKER_TRAILER:        str = "trailer";  break;


    }

    if (time == AV_NOPTS_VALUE)

        snprintf(timebuf, sizeof(timebuf), "nopts");

    else

        snprintf(timebuf, sizeof(timebuf), "%"PRId64, time);

    // There can be multiple header/trailer callbacks, only log the box type

    // for header at out_size == 0

    if (type != AVIO_DATA_MARKER_UNKNOWN &&

        type != AVIO_DATA_MARKER_TRAILER &&

        (type != AVIO_DATA_MARKER_HEADER || out_size == 0) &&

        size >= 8)

        memcpy(content, &buf[4], 4);

    else

        snprintf(content, sizeof(content), "-");

    printf("write_data len %d, time %s, type %s atom %s\n", size, timebuf, str, content);

    return io_write(opaque, buf, size);

}
static int io_write_data_type(void *opaque, uint8_t *buf, int size,

                              enum AVIODataMarkerType type, int64_t time)

{

    char timebuf[30], content[5] = { 0 };

    const char *str;

    switch (type) {

    case AVIO_DATA_MARKER_HEADER:         str = "header";   break;

    case AVIO_DATA_MARKER_SYNC_POINT:     str = "sync";     break;

    case AVIO_DATA_MARKER_BOUNDARY_POINT: str = "boundary"; break;

    case AVIO_DATA_MARKER_UNKNOWN:        str = "unknown";  break;

    case AVIO_DATA_MARKER_TRAILER:        str = "trailer";  break;


    }

    if (time == AV_NOPTS_VALUE)

        snprintf(timebuf, sizeof(timebuf), "nopts");

    else

        snprintf(timebuf, sizeof(timebuf), "%"PRId64, time);

    

    

    if (type != AVIO_DATA_MARKER_UNKNOWN &&

        type != AVIO_DATA_MARKER_TRAILER &&

        (type != AVIO_DATA_MARKER_HEADER || out_size == 0) &&

        size >= 8)

        memcpy(content, &buf[4], 4);

    else

        snprintf(content, sizeof(content), "-");

    printf("write_data len %d, time %s, type %s atom %s\n", size, timebuf, str, content);

    return io_write(opaque, buf, size);

}
static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int VAR_2,

                              enum AVIODataMarkerType VAR_3, int64_t VAR_4)

{

    char VAR_5[30], VAR_6[5] = { 0 };

    const char *VAR_7;

    switch (VAR_3) {

    case AVIO_DATA_MARKER_HEADER:         VAR_7 = "header";   break;

    case AVIO_DATA_MARKER_SYNC_POINT:     VAR_7 = "sync";     break;

    case AVIO_DATA_MARKER_BOUNDARY_POINT: VAR_7 = "boundary"; break;

    case AVIO_DATA_MARKER_UNKNOWN:        VAR_7 = "unknown";  break;

    case AVIO_DATA_MARKER_TRAILER:        VAR_7 = "trailer";  break;


    }

    if (VAR_4 == AV_NOPTS_VALUE)

        snprintf(VAR_5, sizeof(VAR_5), "nopts");

    else

        snprintf(VAR_5, sizeof(VAR_5), "%"PRId64, VAR_4);

    

    

    if (VAR_3 != AVIO_DATA_MARKER_UNKNOWN &&

        VAR_3 != AVIO_DATA_MARKER_TRAILER &&

        (VAR_3 != AVIO_DATA_MARKER_HEADER || out_size == 0) &&

        VAR_2 >= 8)

        memcpy(VAR_6, &VAR_1[4], 4);

    else

        snprintf(VAR_6, sizeof(VAR_6), "-");

    printf("write_data len %d, VAR_4 %s, VAR_3 %s atom %s\n", VAR_2, VAR_5, VAR_7, VAR_6);

    return io_write(VAR_0, VAR_1, VAR_2);

}
static int FUNC_0(void *VAR_0, uint8_t *VAR_1, int VAR_2,
enum AVIODataMarkerType VAR_3, int64_t VAR_4)
{ char VAR_5[30], VAR_6[5] = { 0 }; const char *VAR_7; switch (VAR_3) { case AVIO_DATA_MARKER_HEADER:         VAR_7 = "header";   break; case AVIO_DATA_MARKER_SYNC_POINT:     VAR_7 = "sync";     break; case AVIO_DATA_MARKER_BOUNDARY_POINT: VAR_7 = "boundary"; break; case AVIO_DATA_MARKER_UNKNOWN:        VAR_7 = "unknown";  break; case AVIO_DATA_MARKER_TRAILER:        VAR_7 = "trailer";  break; } if (VAR_4 == AV_NOPTS_VALUE)
snprintf(VAR_5, sizeof(VAR_5), "nopts"); else
snprintf(VAR_5, sizeof(VAR_5), "%"PRId64, VAR_4); if (VAR_3 != AVIO_DATA_MARKER_UNKNOWN &&
VAR_3 != AVIO_DATA_MARKER_TRAILER &&
(VAR_3 != AVIO_DATA_MARKER_HEADER || out_size == 0) &&
VAR_2 >= 8)
memcpy(VAR_6, &VAR_1[4], 4); else
snprintf(VAR_6, sizeof(VAR_6), "-"); printf("write_data len %d, VAR_4 %s, VAR_3 %s atom %s\n", VAR_2, VAR_5, VAR_7, VAR_6); return io_write(VAR_0, VAR_1, VAR_2); }