Package net.bramp.ffmpeg.progress
Class AbstractSocketProgressParser
java.lang.Object
net.bramp.ffmpeg.progress.AbstractSocketProgressParser
- All Implemented Interfaces:
Closeable,AutoCloseable,ProgressParser
- Direct Known Subclasses:
TcpProgressParser,UdpProgressParser
Abstract base class for socket-based FFmpeg progress parsers.
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractSocketProgressParser(ProgressListener listener) Constructs a new socket progress parser with the given listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected abstract RunnablegetRunnable(CountDownLatch startSignal) Returns the runnable that handles incoming progress data.protected abstract StringReturns the name for the background thread handling connections.voidstart()Starts the ProgressParser waiting for progress.voidstop()Stops the progress parser.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.bramp.ffmpeg.progress.ProgressParser
getUri
-
Constructor Details
-
AbstractSocketProgressParser
Constructs a new socket progress parser with the given listener.
-
-
Method Details
-
getThreadName
Returns the name for the background thread handling connections. -
getRunnable
Returns the runnable that handles incoming progress data. -
start
Starts the ProgressParser waiting for progress.- Specified by:
startin interfaceProgressParser- Throws:
IllegalThreadStateException- if the parser was already started.
-
stop
Description copied from interface:ProgressParserStops the progress parser.- Specified by:
stopin interfaceProgressParser- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-