Package net.bramp.ffmpeg.progress
Class TcpProgressParser
java.lang.Object
net.bramp.ffmpeg.progress.AbstractSocketProgressParser
net.bramp.ffmpeg.progress.TcpProgressParser
- All Implemented Interfaces:
Closeable,AutoCloseable,ProgressParser
Parses FFmpeg progress output over a TCP socket connection.
-
Constructor Summary
ConstructorsConstructorDescriptionTcpProgressParser(ProgressListener listener) Constructs a TCP progress parser listening on a random available port.TcpProgressParser(ProgressListener listener, int port, InetAddress addr) Creates a new TCP progress parser bound to the given port and address. -
Method Summary
Modifier and TypeMethodDescriptionprotected RunnablegetRunnable(CountDownLatch startSignal) Returns the runnable that handles incoming progress data.protected StringReturns the name for the background thread handling connections.getUri()The URL to parse to FFmpeg to communicate with this parser.voidstop()Stops the progress parser.Methods inherited from class net.bramp.ffmpeg.progress.AbstractSocketProgressParser
close, start
-
Constructor Details
-
TcpProgressParser
Constructs a TCP progress parser listening on a random available port.- Throws:
IOExceptionURISyntaxException
-
TcpProgressParser
public TcpProgressParser(ProgressListener listener, int port, InetAddress addr) throws IOException, URISyntaxException Creates a new TCP progress parser bound to the given port and address.- Throws:
IOExceptionURISyntaxException
-
-
Method Details
-
stop
Description copied from interface:ProgressParserStops the progress parser.- Specified by:
stopin interfaceProgressParser- Overrides:
stopin classAbstractSocketProgressParser- Throws:
IOException
-
getThreadName
Description copied from class:AbstractSocketProgressParserReturns the name for the background thread handling connections.- Specified by:
getThreadNamein classAbstractSocketProgressParser
-
getRunnable
Description copied from class:AbstractSocketProgressParserReturns the runnable that handles incoming progress data.- Specified by:
getRunnablein classAbstractSocketProgressParser
-
getUri
Description copied from interface:ProgressParserThe URL to parse to FFmpeg to communicate with this parser.- Returns:
- The URI to communicate with FFmpeg.
-