Package io.antmedia.recorder
Class FrameRecorder
java.lang.Object
io.antmedia.recorder.FrameRecorder
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
FFmpegFrameRecorder
- Author:
- Samuel Audet
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected double
protected int
protected int
protected int
protected String
protected double
protected Charset
protected String
protected int
protected double
protected int
protected int
protected int
protected int
protected boolean
protected int
protected int
protected int
protected int
protected int
protected long
protected int
protected int
protected int
protected String
protected double
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static FrameRecorder
create
(Class<? extends FrameRecorder> c, Class p, Object o, int w, int h) static FrameRecorder
static FrameRecorder
static FrameRecorder
createDefault
(File file, int width, int height) static FrameRecorder
createDefault
(String filename, int width, int height) abstract void
flush()
static Class<? extends FrameRecorder>
double
int
int
int
getAudioMetadata
(String key) getAudioOption
(String key) double
static Class<? extends FrameRecorder>
int
double
int
int
int
int
int
int
getMetadata
(String key) int
int
int
long
int
int
int
getVideoMetadata
(String key) getVideoOption
(String key) double
static void
init()
boolean
abstract void
abstract void
release()
void
setAspectRatio
(double aspectRatio) void
setAudioBitrate
(int audioBitrate) void
setAudioChannels
(int audioChannels) void
setAudioCodec
(int audioCodec) void
setAudioCodecName
(String audioCodecName) void
setAudioMetadata
(String key, String value) void
setAudioMetadata
(Map<String, String> metadata) void
setAudioOption
(String key, String value) void
setAudioOptions
(Map<String, String> options) void
setAudioQuality
(double audioQuality) void
void
setFrameNumber
(int frameNumber) void
setFrameRate
(double frameRate) void
setGopSize
(int gopSize) void
setImageHeight
(int imageHeight) void
setImageScalingFlags
(int imageScalingFlags) void
setImageWidth
(int imageWidth) void
setInterleaved
(boolean interleaved) void
setMaxBFrames
(int maxBFrames) void
setMaxDelay
(int maxDelay) void
setMetadata
(String key, String value) void
setMetadata
(Map<String, String> metadata) void
void
setOptions
(Map<String, String> options) void
setPixelFormat
(int pixelFormat) void
setSampleFormat
(int sampleFormat) void
setSampleRate
(int sampleRate) void
setTimestamp
(long timestamp) void
setTrellis
(int trellis) void
setVideoBitrate
(int videoBitrate) void
setVideoCodec
(int videoCodec) void
setVideoCodecName
(String videoCodecName) void
setVideoMetadata
(String key, String value) void
setVideoMetadata
(Map<String, String> metadata) void
setVideoOption
(String key, String value) void
setVideoOptions
(Map<String, String> options) void
setVideoQuality
(double videoQuality) abstract void
start()
abstract void
stop()
-
Field Details
-
list
-
format
-
videoCodecName
-
audioCodecName
-
imageWidth
protected int imageWidth -
imageHeight
protected int imageHeight -
audioChannels
protected int audioChannels -
pixelFormat
protected int pixelFormat -
videoCodec
protected int videoCodec -
videoBitrate
protected int videoBitrate -
imageScalingFlags
protected int imageScalingFlags -
gopSize
protected int gopSize -
aspectRatio
protected double aspectRatio -
frameRate
protected double frameRate -
videoQuality
protected double videoQuality -
sampleFormat
protected int sampleFormat -
audioCodec
protected int audioCodec -
audioBitrate
protected int audioBitrate -
sampleRate
protected int sampleRate -
audioQuality
protected double audioQuality -
interleaved
protected boolean interleaved -
charset
-
options
-
videoOptions
-
audioOptions
-
metadata
-
videoMetadata
-
audioMetadata
-
frameNumber
protected int frameNumber -
timestamp
protected long timestamp -
maxBFrames
protected int maxBFrames -
trellis
protected int trellis -
maxDelay
protected int maxDelay
-
-
Constructor Details
-
FrameRecorder
public FrameRecorder()
-
-
Method Details
-
init
public static void init() -
getDefault
-
get
- Throws:
FrameRecorder.Exception
-
create
public static FrameRecorder create(Class<? extends FrameRecorder> c, Class p, Object o, int w, int h) throws FrameRecorder.Exception - Throws:
FrameRecorder.Exception
-
createDefault
public static FrameRecorder createDefault(File file, int width, int height) throws FrameRecorder.Exception - Throws:
FrameRecorder.Exception
-
createDefault
public static FrameRecorder createDefault(String filename, int width, int height) throws FrameRecorder.Exception - Throws:
FrameRecorder.Exception
-
create
public static FrameRecorder create(String className, File file, int width, int height) throws FrameRecorder.Exception - Throws:
FrameRecorder.Exception
-
create
public static FrameRecorder create(String className, String filename, int width, int height) throws FrameRecorder.Exception - Throws:
FrameRecorder.Exception
-
getFormat
-
setFormat
-
getVideoCodecName
-
setVideoCodecName
-
getAudioCodecName
-
setAudioCodecName
-
getImageWidth
public int getImageWidth() -
setImageWidth
public void setImageWidth(int imageWidth) -
getImageHeight
public int getImageHeight() -
setImageHeight
public void setImageHeight(int imageHeight) -
getAudioChannels
public int getAudioChannels() -
setAudioChannels
public void setAudioChannels(int audioChannels) -
getPixelFormat
public int getPixelFormat() -
setPixelFormat
public void setPixelFormat(int pixelFormat) -
getVideoCodec
public int getVideoCodec() -
setVideoCodec
public void setVideoCodec(int videoCodec) -
getVideoBitrate
public int getVideoBitrate() -
setVideoBitrate
public void setVideoBitrate(int videoBitrate) -
getImageScalingFlags
public int getImageScalingFlags() -
setImageScalingFlags
public void setImageScalingFlags(int imageScalingFlags) -
getGopSize
public int getGopSize() -
setGopSize
public void setGopSize(int gopSize) -
getAspectRatio
public double getAspectRatio() -
setAspectRatio
public void setAspectRatio(double aspectRatio) -
getFrameRate
public double getFrameRate() -
setFrameRate
public void setFrameRate(double frameRate) -
getVideoQuality
public double getVideoQuality() -
setVideoQuality
public void setVideoQuality(double videoQuality) -
getSampleFormat
public int getSampleFormat() -
setSampleFormat
public void setSampleFormat(int sampleFormat) -
getAudioCodec
public int getAudioCodec() -
setAudioCodec
public void setAudioCodec(int audioCodec) -
getAudioBitrate
public int getAudioBitrate() -
setAudioBitrate
public void setAudioBitrate(int audioBitrate) -
getSampleRate
public int getSampleRate() -
setSampleRate
public void setSampleRate(int sampleRate) -
getAudioQuality
public double getAudioQuality() -
setAudioQuality
public void setAudioQuality(double audioQuality) -
isInterleaved
public boolean isInterleaved() -
setInterleaved
public void setInterleaved(boolean interleaved) -
getOptions
-
setOptions
-
getVideoOptions
-
setVideoOptions
-
getAudioOptions
-
setAudioOptions
-
getMetadata
-
setMetadata
-
getVideoMetadata
-
setVideoMetadata
-
getAudioMetadata
-
setAudioMetadata
-
getOption
-
setOption
-
getVideoOption
-
setVideoOption
-
getAudioOption
-
setAudioOption
-
getMetadata
-
setMetadata
-
getVideoMetadata
-
setVideoMetadata
-
getAudioMetadata
-
setAudioMetadata
-
getFrameNumber
public int getFrameNumber() -
setFrameNumber
public void setFrameNumber(int frameNumber) -
getTimestamp
public long getTimestamp() -
setTimestamp
public void setTimestamp(long timestamp) -
getMaxBFrames
public int getMaxBFrames() -
setMaxBFrames
public void setMaxBFrames(int maxBFrames) -
getTrellis
public int getTrellis() -
setTrellis
public void setTrellis(int trellis) -
getMaxDelay
public int getMaxDelay() -
setMaxDelay
public void setMaxDelay(int maxDelay) -
start
- Throws:
FrameRecorder.Exception
-
flush
- Throws:
FrameRecorder.Exception
-
stop
- Throws:
FrameRecorder.Exception
-
record
- Throws:
FrameRecorder.Exception
-
release
- Throws:
FrameRecorder.Exception
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
FrameRecorder.Exception
-