net.sf.ffmpeg_java.custom_protocol
Interface CallbackURLProtocolHandler

All Known Implementing Classes:
FileCallbackURLProtocolHandler

public interface CallbackURLProtocolHandler

A Java version ffmpeg URLProtocol, bug specific to a single stream. Subclasses should be constructed once for each stream, with the information needed to connect to the stream provided in the constructor.

Author:
Ken Larson

Field Summary
static int SEEK_CUR
           
static int SEEK_END
           
static int SEEK_SET
           
 
Method Summary
 int close(AVFormatLibrary.URLContext h)
           
 int open(AVFormatLibrary.URLContext h, java.lang.String filename, int flags)
          Flags may be a combination of: AVFormatLibrary.URL_RDONLY, AVFormatLibrary.URL_WRONLY, AVFormatLibrary.URL_RDWR.
 int read(AVFormatLibrary.URLContext h, com.sun.jna.Pointer buf, int size)
           
 long seek(AVFormatLibrary.URLContext h, long pos, int whence)
          Implementations need to be very careful about returning -1.
 int write(AVFormatLibrary.URLContext h, com.sun.jna.Pointer buf, int size)
           
 

Field Detail

SEEK_SET

static final int SEEK_SET
See Also:
Constant Field Values

SEEK_CUR

static final int SEEK_CUR
See Also:
Constant Field Values

SEEK_END

static final int SEEK_END
See Also:
Constant Field Values
Method Detail

open

int open(AVFormatLibrary.URLContext h,
         java.lang.String filename,
         int flags)
Flags may be a combination of: AVFormatLibrary.URL_RDONLY, AVFormatLibrary.URL_WRONLY, AVFormatLibrary.URL_RDWR.


read

int read(AVFormatLibrary.URLContext h,
         com.sun.jna.Pointer buf,
         int size)

write

int write(AVFormatLibrary.URLContext h,
          com.sun.jna.Pointer buf,
          int size)

seek

long seek(AVFormatLibrary.URLContext h,
          long pos,
          int whence)
Implementations need to be very careful about returning -1. Basically, they should support full seek capability, or not at all, because much code in ffmpeg never checks the return value of a seek.


close

int close(AVFormatLibrary.URLContext h)