[][src]Function ffmpeg_sys_next::av_parser_parse2

pub unsafe extern "C" fn av_parser_parse2(
    s: *mut AVCodecParserContext,
    avctx: *mut AVCodecContext,
    poutbuf: *mut *mut u8,
    poutbuf_size: *mut c_int,
    buf: *const u8,
    buf_size: c_int,
    pts: i64,
    dts: i64,
    pos: i64
) -> c_int

Parse a packet.

@param s parser context. @param avctx codec context. @param poutbuf set to pointer to parsed buffer or NULL if not yet finished. @param poutbuf_size set to size of parsed buffer or zero if not yet finished. @param buf input buffer. @param buf_size buffer size in bytes without the padding. I.e. the full buffer size is assumed to be buf_size + AV_INPUT_BUFFER_PADDING_SIZE. To signal EOF, this should be 0 (so that the last frame can be output). @param pts input presentation timestamp. @param dts input decoding timestamp. @param pos input byte position in stream. @return the number of bytes of the input bitstream used.

Example: @code while(in_len){ len = av_parser_parse2(myparser, AVCodecContext, &data, &size, in_data, in_len, pts, dts, pos); in_data += len; in_len -= len;

   if(size)
      decode_frame(data, size);

} @endcode