Class MuxAdaptor

java.lang.Object
io.antmedia.muxer.MuxAdaptor
All Implemented Interfaces:
IEndpointStatusListener, IStreamListener, IRecordingListener

public class MuxAdaptor extends Object implements IRecordingListener, IEndpointStatusListener
  • Field Details

    • STAT_UPDATE_PERIOD_MS

      public static final int STAT_UPDATE_PERIOD_MS
      See Also:
    • ADAPTIVE_SUFFIX

      public static final String ADAPTIVE_SUFFIX
      See Also:
    • logger

      private static org.slf4j.Logger logger
    • streamPacketQueue

      protected ConcurrentLinkedQueue<IStreamPacket> streamPacketQueue
    • isPipeReaderJobRunning

      protected AtomicBoolean isPipeReaderJobRunning
    • isBufferedWriterRunning

      private AtomicBoolean isBufferedWriterRunning
    • muxerList

      protected List<Muxer> muxerList
    • deleteHLSFilesOnExit

      protected boolean deleteHLSFilesOnExit
    • deleteDASHFilesOnExit

      protected boolean deleteDASHFilesOnExit
    • videoStreamIndex

      private int videoStreamIndex
    • audioStreamIndex

      protected int audioStreamIndex
    • previewOverwrite

      protected boolean previewOverwrite
    • enableVideo

      protected volatile boolean enableVideo
    • enableAudio

      protected volatile boolean enableAudio
    • firstAudioPacketSkipped

      boolean firstAudioPacketSkipped
    • firstVideoPacketSkipped

      boolean firstVideoPacketSkipped
    • packetPollerId

      private long packetPollerId
    • bufferQueue

      private ConcurrentSkipListSet<IStreamPacket> bufferQueue
    • stopRequestExist

      private volatile boolean stopRequestExist
    • RECORDING_ENABLED_FOR_STREAM

      public static final int RECORDING_ENABLED_FOR_STREAM
      See Also:
    • RECORDING_DISABLED_FOR_STREAM

      public static final int RECORDING_DISABLED_FOR_STREAM
      See Also:
    • RECORDING_NO_SET_FOR_STREAM

      public static final int RECORDING_NO_SET_FOR_STREAM
      See Also:
    • WAIT_TIME_MILLISECONDS

      protected static final long WAIT_TIME_MILLISECONDS
      See Also:
    • isRecording

      protected AtomicBoolean isRecording
    • broadcastStream

      protected ClientBroadcastStream broadcastStream
    • mp4MuxingEnabled

      protected boolean mp4MuxingEnabled
    • webMMuxingEnabled

      protected boolean webMMuxingEnabled
    • addDateTimeToMp4FileName

      protected boolean addDateTimeToMp4FileName
    • hlsMuxingEnabled

      protected boolean hlsMuxingEnabled
    • dashMuxingEnabled

      protected boolean dashMuxingEnabled
    • objectDetectionEnabled

      protected boolean objectDetectionEnabled
    • isHealthCheckStartedMap

      protected ConcurrentHashMap<String,Boolean> isHealthCheckStartedMap
    • errorCountMap

      protected ConcurrentHashMap<String,Integer> errorCountMap
    • retryCounter

      protected ConcurrentHashMap<String,Integer> retryCounter
    • statusMap

      protected ConcurrentHashMap<String,String> statusMap
    • rtmpEndpointRetryLimit

      protected int rtmpEndpointRetryLimit
    • healthCheckPeriodMS

      protected int healthCheckPeriodMS
    • webRTCEnabled

      protected boolean webRTCEnabled
    • storageClient

      protected StorageClient storageClient
    • hlsTime

      protected String hlsTime
    • hlsListSize

      protected String hlsListSize
    • hlsPlayListType

      protected String hlsPlayListType
    • dashSegDuration

      protected String dashSegDuration
    • dashFragmentDuration

      protected String dashFragmentDuration
    • targetLatency

      protected String targetLatency
    • adaptiveResolutionList

      List<EncoderSettings> adaptiveResolutionList
    • dataStore

      protected DataStore dataStore
    • firstKeyFrameReceivedChecked

      private boolean firstKeyFrameReceivedChecked
      By default first video key frame should be checked and below flag should be set to true If first video key frame should not be checked, then below should be flag in advance
    • lastKeyFramePTS

      private long lastKeyFramePTS
    • streamId

      protected String streamId
    • startTime

      protected long startTime
    • scope

      protected IScope scope
    • appAdapter

      private IAntMediaStreamHandler appAdapter
    • encoderSettingsList

      protected List<EncoderSettings> encoderSettingsList
    • isStreamSource

      protected static boolean isStreamSource
    • previewCreatePeriod

      private int previewCreatePeriod
    • latestSpeed

      private double latestSpeed
    • lastQualityUpdateTime

      private long lastQualityUpdateTime
    • broadcast

      private Broadcast broadcast
    • appSettings

      protected AppSettings appSettings
    • previewHeight

      private int previewHeight
    • lastFrameTimestamp

      private int lastFrameTimestamp
    • maxAnalyzeDurationMS

      private int maxAnalyzeDurationMS
    • generatePreview

      protected boolean generatePreview
    • firstReceivedFrameTimestamp

      private int firstReceivedFrameTimestamp
    • totalIngestedVideoPacketCount

      protected int totalIngestedVideoPacketCount
    • bufferTimeMs

      private long bufferTimeMs
    • serverSettings

      protected ServerSettings serverSettings
    • packetTimeList

      private Deque<MuxAdaptor.PacketTime> packetTimeList
      Packet times in ordered way to calculate streaming health Key is the packet ime Value is the system time at that moment
    • lastDTS

      private long lastDTS
    • overflowCount

      private int overflowCount
    • vertx

      protected io.vertx.core.Vertx vertx
    • buffering

      private AtomicBoolean buffering
      Accessed from multiple threads so make it volatile
    • bufferLogCounter

      private int bufferLogCounter
    • bufferingFinishTimeMs

      private volatile long bufferingFinishTimeMs
      The time when buffering has been finished. It's volatile because it's accessed from multiple threads
    • avc

      private boolean avc
      Mux adaptor is generally used in RTMP. However it can be also used to stream RTSP Pull so that isAVC can be false
    • bufferedPacketWriterId

      private long bufferedPacketWriterId
    • lastPacketTimeMsInQueue

      private volatile long lastPacketTimeMsInQueue
    • firstPacketReadyToSentTimeMs

      private volatile long firstPacketReadyToSentTimeMs
    • dataChannelWebHookURL

      protected String dataChannelWebHookURL
    • absoluteTotalIngestTime

      protected long absoluteTotalIngestTime
    • dashMuxer

      protected Muxer dashMuxer
      It's defined here because EncoderAdaptor should access it directly to add new streams. Don't prefer to access to dashMuxer directly. Access it with getter
    • checkStreamsStartTime

      private long checkStreamsStartTime
    • videoDataConf

      private byte[] videoDataConf
    • audioDataConf

      private byte[] audioDataConf
    • queueSize

      private AtomicInteger queueSize
    • totalIngestTime

      protected long totalIngestTime
    • fps

      private int fps
    • width

      private int width
    • height

      protected int height
    • keyFramePerMin

      protected int keyFramePerMin
    • lastKeyFrameStatsTimeMs

      protected long lastKeyFrameStatsTimeMs
    • totalByteReceived

      private long totalByteReceived
    • streamSourceInputFormatContext

      protected org.bytedeco.ffmpeg.avformat.AVFormatContext streamSourceInputFormatContext
    • videoCodecParameters

      private org.bytedeco.ffmpeg.avcodec.AVCodecParameters videoCodecParameters
    • audioCodecParameters

      protected org.bytedeco.ffmpeg.avcodec.AVCodecParameters audioCodecParameters
    • audioExtraDataPointer

      private org.bytedeco.javacpp.BytePointer audioExtraDataPointer
    • videoExtraDataPointer

      private org.bytedeco.javacpp.BytePointer videoExtraDataPointer
    • endpointStatusUpdaterTimer

      private AtomicLong endpointStatusUpdaterTimer
    • endpointStatusUpdateMap

      private ConcurrentHashMap<String,String> endpointStatusUpdateMap
    • packetFeeder

      protected PacketFeeder packetFeeder
    • COUNT_TO_LOG_BUFFER

      private static final int COUNT_TO_LOG_BUFFER
      See Also:
    • TIME_BASE_FOR_MS

      public static final org.bytedeco.ffmpeg.avutil.AVRational TIME_BASE_FOR_MS
      Helper field to get the timebase for milliseconds Pay attention: Use them in basic conversions(av_rescale), do not use them by giving directly to the Muxers, Encoders as Timebase because Muxers and Encoders can close the timebase and we'll get error For muxers, encoders, use the gettimebaseForMs() method
    • videoTimeBase

      private org.bytedeco.ffmpeg.avutil.AVRational videoTimeBase
    • audioTimeBase

      private org.bytedeco.ffmpeg.avutil.AVRational audioTimeBase
    • channelLayout

      protected org.bytedeco.ffmpeg.avutil.AVChannelLayout channelLayout
    • lastTotalByteReceived

      private long lastTotalByteReceived
    • durationMs

      private long durationMs
    • videoCodecId

      private int videoCodecId
    • metadataTimeout

      private boolean metadataTimeout
    • lastWebhookStreamStatusUpdateTime

      private long lastWebhookStreamStatusUpdateTime
  • Constructor Details

  • Method Details

    • addID3Data

      public boolean addID3Data(String data)
    • addSEIData

      public boolean addSEIData(String data)
    • getTimeBaseForMs

      public static org.bytedeco.ffmpeg.avutil.AVRational getTimeBaseForMs()
    • initializeMuxAdaptor

      public static MuxAdaptor initializeMuxAdaptor(ClientBroadcastStream clientBroadcastStream, Broadcast broadcast, boolean isSource, IScope scope)
    • isEncoderAdaptorShouldBeTried

      public static boolean isEncoderAdaptorShouldBeTried(Broadcast broadcast, AppSettings appSettings)
    • addMuxer

      public boolean addMuxer(Muxer muxer)
    • addMuxer

      public boolean addMuxer(Muxer muxer, int resolutionHeight)
    • removeMuxer

      public boolean removeMuxer(Muxer muxer)
    • addMuxerInternal

      protected boolean addMuxerInternal(Muxer muxer)
    • init

      public boolean init(IConnection conn, String name, boolean isAppend)
      Description copied from interface: IRecordingListener
      Initialize the listener.
      Specified by:
      init in interface IRecordingListener
      Parameters:
      conn - Stream source connection
      name - Stream name
      isAppend - Append mode
      Returns:
      true if initialization completes and false otherwise
    • enableSettings

      public void enableSettings()
    • initStorageClient

      public void initStorageClient()
    • init

      public boolean init(IScope scope, String streamId, boolean isAppend)
      Description copied from interface: IRecordingListener
      Initialize the listener.
      Specified by:
      init in interface IRecordingListener
      Parameters:
      scope - Stream source scope
      streamId - Stream name
      isAppend - Append mode
      Returns:
      true if initialization completes and false otherwise
    • addHLSMuxer

      public HLSMuxer addHLSMuxer()
    • getDashMuxer

      public Muxer getDashMuxer()
    • initVertx

      private void initVertx()
    • initServerSettings

      protected void initServerSettings()
    • enableMp4Setting

      protected void enableMp4Setting()
    • enableWebMSetting

      protected void enableWebMSetting()
    • setUpEndPoints

      public static void setUpEndPoints(MuxAdaptor muxAdaptor, Broadcast broadcast, io.vertx.core.Vertx vertx)
    • getAudioCodecParameters

      public org.bytedeco.ffmpeg.avcodec.AVCodecParameters getAudioCodecParameters()
    • getVideoCodecParameters

      public org.bytedeco.ffmpeg.avcodec.AVCodecParameters getVideoCodecParameters()
    • prepare

      public boolean prepare() throws Exception
      Prepares the parameters. This method is called in RTMP ingesting
      Returns:
      Throws:
      Exception
    • registerToMainTrackIfExists

      public void registerToMainTrackIfExists()
    • prepareFromInputFormatContext

      public boolean prepareFromInputFormatContext(org.bytedeco.ffmpeg.avformat.AVFormatContext inputFormatContext) throws Exception
      Prepares parameters and muxers. This method is called when pulling stream source
      Parameters:
      inputFormatContext -
      Returns:
      Throws:
      Exception
    • getAnnexbExtradata

      public static byte[] getAnnexbExtradata(byte[] avcExtradata)
    • getStreamType

      public static String getStreamType(int codecType)
    • addStream2Muxers

      public void addStream2Muxers(org.bytedeco.ffmpeg.avcodec.AVCodecParameters codecParameters, org.bytedeco.ffmpeg.avutil.AVRational rat, int streamIndex)
    • prepareMuxerIO

      public void prepareMuxerIO()
    • updateStreamQualityParameters

      public void updateStreamQualityParameters(String streamId, double speed)
      Parameters:
      streamId - id of the stream
      quality - , quality string
      packetTime - , time of the packet in milliseconds
      duration - , the total elapsed time in milliseconds
      inputQueueSize - , input queue size of the packets that is waiting to be processed
    • getLatestSpeed

      public double getLatestSpeed()
    • getStreamHandler

      public IAntMediaStreamHandler getStreamHandler()
    • getAppSettings

      public AppSettings getAppSettings()
    • getDataStore

      public DataStore getDataStore()
    • correctPacketDtsOverflow

      public long correctPacketDtsOverflow(long packetDts)
    • writeStreamPacket

      public void writeStreamPacket(IStreamPacket packet)
      This is the entrance points for the packet coming from the RTMP stream. It's directly used in EncoderAdaptor in Enterprise We override the videoBufferReceived, audioBufferReceived, and notifyDataReceived methods to handle the packets in EncoderAdaptor
      Parameters:
      packet -
    • notifyMetaDataReceived

      public org.json.simple.JSONObject notifyMetaDataReceived(IStreamPacket packet, long dts)
    • audioBufferReceived

      public void audioBufferReceived(long dts, ByteBuffer byteBuffer)
    • videoBufferReceived

      public void videoBufferReceived(long dts, boolean isKeyFrame, long pts, ByteBuffer byteBuffer)
    • getMetaData

      public org.json.simple.JSONObject getMetaData(Notify notifyEvent)
    • getInput

      public Input getInput(Notify notifyEvent)
    • checkMaxAnalyzeTotalTime

      public void checkMaxAnalyzeTotalTime()
      Check if max analyze time has been passed. If it initializes the prepare then isRecording is set to true in prepareParameters
    • execute

      public void execute()
    • addBufferQueue

      public void addBufferQueue(IStreamPacket packet)
    • calculateBufferStatus

      public void calculateBufferStatus()
    • getVideoDataConf

      public void getVideoDataConf(IStreamCodecInfo codecInfo)
    • getAudioDataConf

      private void getAudioDataConf(IStreamCodecInfo codecInfo)
    • prepareParameters

      private void prepareParameters()
    • measureIngestTime

      private void measureIngestTime(long pktTimeStamp, long receivedTime)
    • getAbsoluteTimeMs

      public long getAbsoluteTimeMs()
    • updateQualityParameters

      public void updateQualityParameters(long pts, org.bytedeco.ffmpeg.avutil.AVRational timebase, long packetSize, boolean isKeyFrame)
    • closeRtmpConnection

      public void closeRtmpConnection()
    • writePacket

      public void writePacket(org.bytedeco.ffmpeg.avformat.AVStream stream, org.bytedeco.ffmpeg.avcodec.AVPacket pkt)
    • writeTrailer

      public void writeTrailer()
    • closeResources

      public void closeResources()
    • directMuxingSupported

      public boolean directMuxingSupported()
      This method means that if the MuxAdaptor writes incoming packets to muxers(muxerList) directly without any StreamAdaptor/Encoders It's true for RTMP, SRT ingest to MP4, HLS, RTMP Endpoint writing but it's not true WebRTC ingest. This method is being implemented in subclasses
      Returns:
    • start

      public void start()
      Description copied from interface: IRecordingListener
      Start the recording.
      Specified by:
      start in interface IRecordingListener
    • stop

      public void stop(boolean shutdownCompletely)
      Description copied from interface: IRecordingListener
      Stop the recording.
      Specified by:
      stop in interface IRecordingListener
    • setInputQueueSize

      public void setInputQueueSize(int size)
    • getInputQueueSize

      public int getInputQueueSize()
    • getEncodingQueueSize

      public int getEncodingQueueSize()
      Number of frames waiting to be encoded. It's zero here because MuxAdaptor does not transcode the stream
      Returns:
    • getDroppedPacketCountInIngestion

      public int getDroppedPacketCountInIngestion()
      Number of packets dropped in the ingestion
      Returns:
    • getDroppedFrameCountInEncoding

      public int getDroppedFrameCountInEncoding()
      Number of frames dropped in the encoding
      Returns:
    • isStopRequestExist

      public boolean isStopRequestExist()
    • debugSetStopRequestExist

      public void debugSetStopRequestExist(boolean stopRequest)
    • writeBufferedPacket

      public void writeBufferedPacket()
      This method is called when rtmpIngestBufferTime is bigger than zero
    • writeAllBufferedPackets

      private void writeAllBufferedPackets()
    • packetReceived

      public void packetReceived(IBroadcastStream stream, IStreamPacket packet)
      Description copied from interface: IRecordingListener
      A packet has been received from a stream.
      Specified by:
      packetReceived in interface IRecordingListener
      Specified by:
      packetReceived in interface IStreamListener
      Parameters:
      stream - the stream the packet has been received for
      packet - the packet received
    • isRecording

      public boolean isRecording()
      Specified by:
      isRecording in interface IRecordingListener
      Returns:
      recording state, true if recording and false otherwise
    • isAppending

      public boolean isAppending()
      Specified by:
      isAppending in interface IRecordingListener
      Returns:
      appending state, true if appending and false otherwise
    • getFileConsumer

      public FileConsumer getFileConsumer()
      Specified by:
      getFileConsumer in interface IRecordingListener
      Returns:
      the recordingConsumer
    • setFileConsumer

      public void setFileConsumer(FileConsumer recordingConsumer)
      Specified by:
      setFileConsumer in interface IRecordingListener
      Parameters:
      recordingConsumer - the recordingConsumer to set
    • getFileName

      public String getFileName()
      Specified by:
      getFileName in interface IRecordingListener
      Returns:
      the fileName
    • setFileName

      public void setFileName(String fileName)
      Specified by:
      setFileName in interface IRecordingListener
      Parameters:
      fileName - the fileName to set
    • getMuxerList

      public List<Muxer> getMuxerList()
    • setStorageClient

      public void setStorageClient(StorageClient storageClient)
    • isWebRTCEnabled

      public boolean isWebRTCEnabled()
    • setWebRTCEnabled

      public void setWebRTCEnabled(boolean webRTCEnabled)
    • setHLSFilesDeleteOnExit

      public void setHLSFilesDeleteOnExit(boolean deleteHLSFilesOnExit)
    • setPreviewOverwrite

      public void setPreviewOverwrite(boolean overwrite)
    • isPreviewOverwrite

      public boolean isPreviewOverwrite()
    • getStartTime

      public long getStartTime()
    • setStartTime

      public void setStartTime(long startTime)
    • getEncoderSettingsList

      public List<EncoderSettings> getEncoderSettingsList()
    • setEncoderSettingsList

      public void setEncoderSettingsList(List<EncoderSettings> encoderSettingsList)
    • isStreamSource

      public boolean isStreamSource()
    • setStreamSource

      public void setStreamSource(boolean isStreamSource)
    • isObjectDetectionEnabled

      public boolean isObjectDetectionEnabled()
    • setObjectDetectionEnabled

      public void setObjectDetectionEnabled(Boolean objectDetectionEnabled)
    • getPreviewCreatePeriod

      public int getPreviewCreatePeriod()
    • setPreviewCreatePeriod

      public void setPreviewCreatePeriod(int previewCreatePeriod)
    • getStreamId

      public String getStreamId()
    • setStreamId

      public void setStreamId(String streamId)
    • getStorageClient

      public StorageClient getStorageClient()
    • setFirstKeyFrameReceivedChecked

      public void setFirstKeyFrameReceivedChecked(boolean firstKeyFrameReceivedChecked)
      Parameters:
      firstKeyFrameReceivedChecked -
    • getBroadcast

      public Broadcast getBroadcast()
    • setBroadcast

      public void setBroadcast(Broadcast broadcast)
    • setGeneratePreview

      public void setGeneratePreview(boolean generatePreview)
    • getPreviewHeight

      public int getPreviewHeight()
    • setPreviewHeight

      public void setPreviewHeight(int previewHeight)
    • createMp4Muxer

      public Mp4Muxer createMp4Muxer()
    • addMp4Muxer

      private Muxer addMp4Muxer()
    • startRecording

      public RecordMuxer startRecording(RecordType recordType, int resolutionHeight)
      Start recording is used to start recording on the fly(stream is broadcasting).
      Parameters:
      recordType - MP4 or WEBM
      resolutionHeight - resolution height for the recording
      Returns:
    • prepareMuxer

      public boolean prepareMuxer(Muxer muxer, int resolutionHeight)
    • isAlreadyRecording

      public boolean isAlreadyRecording(RecordType recordType, int resolutionHeight)
    • findDynamicRecordMuxer

      public Muxer findDynamicRecordMuxer(RecordType recordType)
    • stopRecording

      public RecordMuxer stopRecording(RecordType recordType, int resolutionHeight)
      Stop recording is called to stop recording when the stream is broadcasting(on the fly)
      Parameters:
      recordType - MP4 or WEBM
      resolutionHeight - resolution height for the recording
      Returns:
    • getBroadcastStream

      public ClientBroadcastStream getBroadcastStream()
    • startRtmpStreaming

      public Result startRtmpStreaming(String rtmpUrl, int resolutionHeight)
    • sendEndpointErrorNotifyHook

      public void sendEndpointErrorNotifyHook(String url)
    • endpointStatusHealthCheck

      public void endpointStatusHealthCheck(String url)
      Periodically check the endpoint health status every 2 seconds If each check returned failed, try to republish to the endpoint
      Parameters:
      url - is the URL of the endpoint
    • clearCounterMapsAndCancelTimer

      public void clearCounterMapsAndCancelTimer(String url, Long id)
    • tryToRepublish

      private void tryToRepublish(String url, Long id)
    • endpointStatusUpdated

      public void endpointStatusUpdated(String url, String status)
      Description copied from interface: IEndpointStatusListener
      It's called when the endpoint status is updated
      Specified by:
      endpointStatusUpdated in interface IEndpointStatusListener
      Parameters:
      url - is the URL of the endpoint
      status - is the current status of the rtmp endpoint
    • updateBroadcastRecord

      private void updateBroadcastRecord()
    • getRtmpMuxer

      public RtmpMuxer getRtmpMuxer(String rtmpUrl)
    • stopRtmpStreaming

      public Result stopRtmpStreaming(String rtmpUrl, int resolutionHeight)
    • getExtendedSubfolder

      public static String getExtendedSubfolder(String mainTrackId, String streamId, String subFolder)
    • getSubfolder

      public static String getSubfolder(@Nonnull Broadcast broadcast, @Nonnull AppSettings appSettings)
    • isEnableVideo

      public boolean isEnableVideo()
    • setEnableVideo

      public void setEnableVideo(boolean enableVideo)
    • isEnableAudio

      public boolean isEnableAudio()
    • setEnableAudio

      public void setEnableAudio(boolean enableAudio)
    • getLastFrameTimestamp

      public int getLastFrameTimestamp()
    • setLastFrameTimestamp

      public void setLastFrameTimestamp(int lastFrameTimestamp)
    • setAppSettings

      public void setAppSettings(AppSettings appSettings)
    • getBufferTimeMs

      public long getBufferTimeMs()
    • isBuffering

      public boolean isBuffering()
    • setBuffering

      public void setBuffering(boolean buffering)
    • getDataChannelWebHookURL

      public String getDataChannelWebHookURL()
    • isDeleteDASHFilesOnExit

      public boolean isDeleteDASHFilesOnExit()
    • setDeleteDASHFilesOnExit

      public void setDeleteDASHFilesOnExit(boolean deleteDASHFilesOnExit)
    • isAvc

      public boolean isAvc()
    • setAvc

      public void setAvc(boolean avc)
    • getBufferQueue

      public ConcurrentSkipListSet<IStreamPacket> getBufferQueue()
    • setBufferingFinishTimeMs

      public void setBufferingFinishTimeMs(long bufferingFinishTimeMs)
    • getPacketTimeList

      public Queue<MuxAdaptor.PacketTime> getPacketTimeList()
    • getVideoStreamIndex

      public int getVideoStreamIndex()
    • setVideoStreamIndex

      public void setVideoStreamIndex(int videoStreamIndex)
    • getAudioStreamIndex

      public int getAudioStreamIndex()
    • setAudioStreamIndex

      public void setAudioStreamIndex(int audioStreamIndex)
    • addPacketListener

      public void addPacketListener(IPacketListener listener)
    • removePacketListener

      public boolean removePacketListener(IPacketListener listener)
    • setVideoCodecParameter

      public void setVideoCodecParameter(org.bytedeco.ffmpeg.avcodec.AVCodecParameters videoCodecParameters)
    • setAudioCodecParameter

      public void setAudioCodecParameter(org.bytedeco.ffmpeg.avcodec.AVCodecParameters audioCodecParameters)
    • getVideoTimeBase

      public org.bytedeco.ffmpeg.avutil.AVRational getVideoTimeBase()
    • getAudioTimeBase

      public org.bytedeco.ffmpeg.avutil.AVRational getAudioTimeBase()
    • setVideoTimeBase

      public void setVideoTimeBase(org.bytedeco.ffmpeg.avutil.AVRational videoTimeBase)
    • setAudioTimeBase

      public void setAudioTimeBase(org.bytedeco.ffmpeg.avutil.AVRational audioTimeBase)
    • getVertx

      public io.vertx.core.Vertx getVertx()
    • getEndpointStatusUpdateMap

      public Map<String,String> getEndpointStatusUpdateMap()
    • getIsHealthCheckStartedMap

      public Map<String,Boolean> getIsHealthCheckStartedMap()
    • setHeight

      public void setHeight(int height)
    • getHeight

      public int getHeight()
    • setIsRecording

      public void setIsRecording(boolean isRecording)
    • setAudioDataConf

      public void setAudioDataConf(byte[] audioDataConf)
    • isBlacklistCodec

      public boolean isBlacklistCodec(int codecId)
    • setBufferTimeMs

      public void setBufferTimeMs(long bufferTimeMs)
    • getIsPipeReaderJobRunning

      public AtomicBoolean getIsPipeReaderJobRunning()
    • getTotalByteReceived

      public long getTotalByteReceived()
    • getWidth

      public int getWidth()
    • setWidth

      public void setWidth(int width)
    • getLastDTS

      public long getLastDTS()
    • getOverflowCount

      public int getOverflowCount()
    • getPacketFeeder

      public PacketFeeder getPacketFeeder()
    • setTotalByteReceived

      public void setTotalByteReceived(long totalByteReceived)
    • getDurationMs

      public long getDurationMs()
    • setDurationMs

      public void setDurationMs(long durationMs)
    • getVideoCodecId

      public int getVideoCodecId()
    • setVideoDataConf

      public void setVideoDataConf(byte[] videoDataConf)
    • setPacketFeeder

      public void setPacketFeeder(PacketFeeder packetFeeder)