public static void url_close_dyn_buf(ref ByteIOContext s, out byte[] buffer) { byte *ptr; int length = url_close_dyn_buf(ref s, out ptr); buffer = new byte[length]; Marshal.Copy((IntPtr)ptr, buffer, 0, length); FFmpeg.av_free(ptr); }
/// <summary> /// Allocates all the structures needed to read an input stream. /// This does not open the needed codecs for decoding the stream[s]. /// </summary> private static AVError av_open_input_stream(out AVFormatContext ctx, ref ByteIOContext pb, string filename, ref AVInputFormat fmt, ref AVFormatParameters ap) { AVFormatContext *ptr; AVError err = av_open_input_stream(out ptr, ref pb, filename, ref fmt, ref ap); ctx = *ptr; FFmpeg.av_free(ptr); return(err); }
public static extern int url_setbufsize(ref ByteIOContext s, int buf_size);
public static extern long url_ftell(ref ByteIOContext s);
public static extern int url_fdopen(ref ByteIOContext s, ref URLContext h);
public static extern int url_open_dyn_buf(ref ByteIOContext s);
public static extern int url_close_dyn_buf(ref ByteIOContext s, out byte *pbuffer);
public static extern URLContext *url_fileno(ref ByteIOContext s);
public static extern int url_open_buf(ref ByteIOContext s, [In, Out] byte[] buf, int buf_size, int flags);
public static extern int get_partial_buffer(ref ByteIOContext s, [In, Out] byte[] buf, int size);
public static extern int get_byte(ref ByteIOContext s);
public static extern string url_fgets(ref ByteIOContext s, [In, Out] byte[] buf, int buf_size);
public static extern void put_flush_packet(ref ByteIOContext s);
public static extern int url_fgetc(ref ByteIOContext s);
public static extern int url_ferror(ref ByteIOContext s);
public static extern long url_fsize(ref ByteIOContext s);
public static extern int url_fopen(ref ByteIOContext s, string filename, int flags);
public static extern uint get_le16(ref ByteIOContext s);
public static extern int url_fclose(ref ByteIOContext s);
public static extern string get_strz(ref ByteIOContext s, [In, Out] byte[] buf, int maxlen);
public static extern int url_fget_max_packet_size(ref ByteIOContext s);
public static extern uint get_be32(ref ByteIOContext s);
public static extern int url_close_buf(ref ByteIOContext s);
public static extern ulong get_checksum(ref ByteIOContext s);
public static extern int url_open_dyn_packet_buf(ref ByteIOContext s, int max_packet_size);
public static extern long url_fseek(ref ByteIOContext s, long offset, int whence);
public static extern ulong get_be64(ref ByteIOContext s);
public static extern void url_fskip(ref ByteIOContext s, long offset);
public static extern void init_checksum(ref ByteIOContext s, UpdateChecksumCallback update_checksun, ulong checksum);
public static bool url_is_streamed(ref ByteIOContext s) { return(s.is_streamed); }