public class VideoFileOutput extends VideoOutput implements IVideoFileOutput
Modifier and Type | Field and Description |
---|---|
protected static byte |
ASYNC_STREAM_ID |
protected static byte |
SYNC_STREAM_ID |
METADATA_AU_HEADER_LEN, options
Constructor and Description |
---|
VideoFileOutput(VideoOutputOptions options)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMetadataFrame(MetadataFrame frame)
Append a
MetadataFrame to the file. |
void |
addVideoFrame(VideoFrame frame)
Append a
VideoFrame to the file. |
void |
close()
Close the file.
|
boolean |
isOpen()
Check if a file is open.
|
void |
open(String filename)
Open a new file for writing.
|
protected static final byte ASYNC_STREAM_ID
protected static final byte SYNC_STREAM_ID
public VideoFileOutput(VideoOutputOptions options)
options
- Options for video outputpublic void open(String filename) throws IOException
IVideoFileOutput
open
in interface IVideoFileOutput
filename
- The file nameIOException
- if the file could not be openedpublic boolean isOpen()
IVideoFileOutput
isOpen
in interface IVideoFileOutput
public void close() throws IOException
IVideoFileOutput
close
in interface AutoCloseable
close
in interface IVideoFileOutput
IOException
- if an error occurs while closing the filepublic void addVideoFrame(VideoFrame frame) throws IOException
IVideoFileOutput
VideoFrame
to the file.addVideoFrame
in interface IVideoFileOutput
frame
- The video frame to addIOException
- if the file could not be writtenpublic void addMetadataFrame(MetadataFrame frame) throws IOException
IVideoFileOutput
MetadataFrame
to the file.addMetadataFrame
in interface IVideoFileOutput
frame
- The metadata frame to addIOException
- if the file could not be writtenCopyright © 2022 West Ridge Systems. All rights reserved.