Package net.bramp.ffmpeg.progress
Class UdpProgressParser
java.lang.Object
net.bramp.ffmpeg.progress.AbstractSocketProgressParser
net.bramp.ffmpeg.progress.UdpProgressParser
- All Implemented Interfaces:
Closeable,AutoCloseable,ProgressParser
Parses FFmpeg progress output over a UDP socket connection.
-
Constructor Summary
ConstructorsConstructorDescriptionUdpProgressParser(ProgressListener listener) Constructs a UDP progress parser listening on a random available port.UdpProgressParser(ProgressListener listener, int port, InetAddress addr) Creates a new UDP 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
-
UdpProgressParser
Constructs a UDP progress parser listening on a random available port.- Throws:
SocketExceptionURISyntaxException
-
UdpProgressParser
public UdpProgressParser(ProgressListener listener, int port, InetAddress addr) throws SocketException, URISyntaxException Creates a new UDP progress parser bound to the given port and address.- Throws:
SocketExceptionURISyntaxException
-
-
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.
-