Class Broadcast

java.lang.Object
io.antmedia.datastore.db.types.Broadcast

@Entity("broadcast") @Index(fields=@Field(value="name",type=TEXT)) @Index(fields=@Field("streamId"),options=@IndexOptions(unique=true,name="streamId_unique_index")) @Index(fields=@Field("status")) public class Broadcast extends Object
  • Field Details

    • logger

      private static final org.slf4j.Logger logger
    • dbId

      @Id private org.bson.types.ObjectId dbId
    • streamId

      private String streamId
      id of the broadcast
    • status

      private String status
      "finished", "broadcasting", "created"
    • playListStatus

      private String playListStatus
    • type

      private String type
      "liveStream", "ipCamera", "streamSource", "VoD"
    • publishType

      private String publishType
      "WebRTC", "RTMP", "Pull"
    • name

      private String name
      name of the broadcast
    • description

      private String description
      description of the broadcast
    • publish

      private boolean publish
      It is a video filter for the service, this value is controlled by the user, default value is true in the db
    • date

      private long date
      date when record is created in milliseconds
    • plannedStartDate

      private long plannedStartDate
      Planned start date unix timestamp in seconds This parameter is not mandatory, default parameter is null This feature is enabled in RTMP and WebRTC streams Streams are accepting when plannedStartDate is lower than now(Unix Timestamp)
    • plannedEndDate

      private long plannedEndDate
      Planned end date unix timestamp in seconds This parameter is not mandatory, default parameter is null This feature is enabled in RTMP and WebRTC streams Streams are accepting when plannedEndDate is higher than now(Unix Timestamp)
    • duration

      private long duration
      duration of the stream in milliseconds
    • endPointList

      private List<Endpoint> endPointList
    • playListItemList

      private List<Broadcast.PlayListItem> playListItemList
    • publicStream

      private boolean publicStream
      is public
    • is360

      private boolean is360
      If this stream is a 360 degree video
    • listenerHookURL

      private String listenerHookURL
      This is the url that will be notified when stream is published, ended and muxing finished It sends some variables with POST UrlEncodedForm variables are "id" mandatory This is the id of the broadcast "action" mandatory This parameter defines what happened. Values can be "liveStreamStarted" this parameter is sent when stream is started "liveStreamEnded" this parameter is sent when stream is finished "vodReady" this parameter is sent when vod(mp4) file ready. It is typically a few seconds later after "liveStreamEnded" "vodName" It is sent with "vodReady" action. This is the name of the file physicall recorded file "streamName" optional It is sent with above parameters if stream name exists "category" optional It is sent if category exists
    • category

      private String category
    • ipAddr

      private String ipAddr
    • username

      private String username
    • password

      private String password
    • quality

      private String quality
    • speed

      private double speed
    • streamUrl

      private String streamUrl
      This is the stream url for fetching stream. It has a value for IPCameras and streams in the cloud
    • originAdress

      private String originAdress
      This is the origin address server broadcasting.
    • mp4Enabled

      private int mp4Enabled
      Mp4 muxing is enabled or not for the stream 1 means enabled, -1 means disabled, 0 means no settings for the stream
    • webMEnabled

      private int webMEnabled
      WebM muxing is enabled or not for the stream 1 means enabled, -1 means disabled, 0 means no settings for the stream
    • seekTimeInMs

      private long seekTimeInMs
      Initial time to start playing. It can be used in VoD file or stream sources that has seek support If it's a VoD file, it can seek to that time and start playing there
    • conferenceMode

      @Deprecated(forRemoval=true, since="2.9.1") private String conferenceMode
      Deprecated, for removal: This API element is subject to removal in a future version.
      It's created for backward compatibility. It will be deleted.
      Conference mode of the stream.
    • subtracksLimit

      private int subtracksLimit
      The number of subtracks that is allowed to be created for the broadcast. It's useful for limiting number of conference attendees. Default value is -1 and -1 means no limit
    • expireDurationMS

      private int expireDurationMS
      This is the expire time in milliseconds For instance if this value is 10000 then broadcast should be started in 10 seconds after it is created. If expire duration is 0, then stream will never expire
    • rtmpURL

      private String rtmpURL
      RTMP URL where to publish live stream to
    • zombi

      private boolean zombi
      zombi It is true, if a broadcast that is not added to data store through rest service or management console It is false by default
    • pendingPacketSize

      private int pendingPacketSize
      Number of audio and video packets that is being pending to be encoded in the queue
    • hlsViewerCount

      private int hlsViewerCount
      number of hls viewers of the stream
    • dashViewerCount

      private int dashViewerCount
      number of dash viewers of the stream
    • webRTCViewerCount

      private int webRTCViewerCount
    • rtmpViewerCount

      private int rtmpViewerCount
    • startTime

      private long startTime
    • receivedBytes

      private long receivedBytes
    • bitrate

      private long bitrate
    • width

      private int width
    • height

      private int height
    • encoderQueueSize

      private int encoderQueueSize
    • dropPacketCountInIngestion

      private int dropPacketCountInIngestion
    • dropFrameCountInEncoding

      private int dropFrameCountInEncoding
    • packetLostRatio

      private double packetLostRatio
    • packetsLost

      private int packetsLost
    • jitterMs

      private int jitterMs
    • rttMs

      private int rttMs
    • userAgent

      private String userAgent
    • remoteIp

      private String remoteIp
    • latitude

      private String latitude
    • longitude

      private String longitude
    • altitude

      private String altitude
    • mainTrackStreamId

      private String mainTrackStreamId
    • subTrackStreamIds

      @Deprecated(forRemoval=true, since="2.10.1") private List<String> subTrackStreamIds
      Deprecated, for removal: This API element is subject to removal in a future version.
    • absoluteStartTimeMs

      private long absoluteStartTimeMs
    • webRTCViewerLimit

      private int webRTCViewerLimit
    • hlsViewerLimit

      private int hlsViewerLimit
    • dashViewerLimit

      private int dashViewerLimit
    • subFolder

      private String subFolder
    • currentPlayIndex

      private int currentPlayIndex
      Current playing index for play lists
    • metaData

      private String metaData
      Meta data filed for the custom usage
    • playlistLoopEnabled

      private boolean playlistLoopEnabled
      The flag to enable/disable looping playlist. If it's true, playlist will be loop infinitely. If it's false, playlist played once and finished. It's enable by default
    • updateTime

      private long updateTime
      Update time of the Broadcast object This parameter updates consistently according to broadcast status
    • role

      private String role
      Broadcast role for selective playback
    • hlsParameters

      private Broadcast.HLSParameters hlsParameters
    • autoStartStopEnabled

      private boolean autoStartStopEnabled
    • encoderSettingsList

      private List<EncoderSettings> encoderSettingsList
    • virtual

      private boolean virtual
      If this broadcast is a virtual or not. For the conference calls, broadcasts are virtual. It means that they are not real streams but they are just a reference to the main stream. On the other hand, virtual streams can be real streams as well.
  • Constructor Details

  • Method Details

    • getStreamId

      public String getStreamId()
    • setStreamId

      public void setStreamId(String id) throws Exception
      Throws:
      Exception
    • getSpeed

      public double getSpeed()
    • setSpeed

      public void setSpeed(double speed)
    • getQuality

      public String getQuality()
    • setQuality

      public void setQuality(String quality)
    • getStatus

      public String getStatus()
    • setStatus

      public void setStatus(String status)
      Pay attention to the status field. Even if you set to BROADCASTING, it will check last update time to understand if it's really broadcasting Check the getStatus()
      Parameters:
      status -
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • isPublish

      public boolean isPublish()
    • setPublish

      public void setPublish(boolean publish)
    • getDate

      public long getDate()
    • setDate

      public void setDate(long date)
    • getPlannedStartDate

      public long getPlannedStartDate()
    • setPlannedStartDate

      public void setPlannedStartDate(long plannedStartDate)
    • getPlannedEndDate

      public long getPlannedEndDate()
    • setPlannedEndDate

      public void setPlannedEndDate(long plannedEndDate)
    • getDuration

      public long getDuration()
    • setDuration

      public void setDuration(Long duration)
    • getEndPointList

      public List<Endpoint> getEndPointList()
    • setEndPointList

      public void setEndPointList(List<Endpoint> endPointList)
    • isIs360

      public boolean isIs360()
    • setIs360

      public void setIs360(boolean is360)
    • isPublicStream

      public boolean isPublicStream()
    • setPublicStream

      public void setPublicStream(boolean publicStream)
    • getListenerHookURL

      public String getListenerHookURL()
    • setListenerHookURL

      public void setListenerHookURL(String listenerHookURL)
    • getCategory

      public String getCategory()
    • setCategory

      public void setCategory(String category)
    • getType

      public String getType()
    • setType

      public void setType(String type)
    • getIpAddr

      public String getIpAddr()
    • setIpAddr

      public void setIpAddr(String ipAddr)
    • getUsername

      public String getUsername()
    • setUsername

      public void setUsername(String username)
    • getPassword

      public String getPassword()
    • setPassword

      public void setPassword(String password)
    • getExpireDurationMS

      public int getExpireDurationMS()
    • setExpireDurationMS

      public void setExpireDurationMS(int expireDurationMS)
    • getRtmpURL

      public String getRtmpURL()
    • setRtmpURL

      public void setRtmpURL(String rtmpURL)
    • getDbId

      public org.bson.types.ObjectId getDbId()
    • setDbId

      public void setDbId(org.bson.types.ObjectId dbId)
    • isZombi

      public boolean isZombi()
    • setZombi

      public void setZombi(boolean zombi)
    • resetStreamId

      public void resetStreamId()
    • getStreamUrl

      public String getStreamUrl()
    • setStreamUrl

      public void setStreamUrl(String streamUrl)
    • getHlsViewerCount

      public int getHlsViewerCount()
    • setHlsViewerCount

      public void setHlsViewerCount(int hlsViewerCount)
    • getWebRTCViewerCount

      public int getWebRTCViewerCount()
    • setWebRTCViewerCount

      public void setWebRTCViewerCount(int webRTCViewerCount)
    • getRtmpViewerCount

      public int getRtmpViewerCount()
    • setRtmpViewerCount

      public void setRtmpViewerCount(int rtmpViewerCount)
    • getPendingPacketSize

      public int getPendingPacketSize()
    • setPendingPacketSize

      public void setPendingPacketSize(int pendingPacketSize)
    • getOriginAdress

      public String getOriginAdress()
    • setOriginAdress

      public void setOriginAdress(String originAdress)
    • getMp4Enabled

      public int getMp4Enabled()
    • setMp4Enabled

      public void setMp4Enabled(int mp4Enabled)
    • getStartTime

      public long getStartTime()
    • setStartTime

      public void setStartTime(long startTime)
    • getReceivedBytes

      public long getReceivedBytes()
    • setReceivedBytes

      public void setReceivedBytes(long receivedBytes)
    • getBitrate

      public long getBitrate()
    • setBitrate

      public void setBitrate(long bitrate)
    • getUserAgent

      public String getUserAgent()
    • setUserAgent

      public void setUserAgent(String userAgent)
    • getLatitude

      public String getLatitude()
    • setLatitude

      public void setLatitude(String latitude)
    • getLongitude

      public String getLongitude()
    • setLongitude

      public void setLongitude(String longitude)
    • getAltitude

      public String getAltitude()
    • setAltitude

      public void setAltitude(String altitude)
    • getMainTrackStreamId

      public String getMainTrackStreamId()
    • setMainTrackStreamId

      public void setMainTrackStreamId(String mainTrackStreamId)
    • getSubTrackStreamIds

      @Deprecated(forRemoval=true, since="2.10.1") public List<String> getSubTrackStreamIds()
      Deprecated, for removal: This API element is subject to removal in a future version.
      get the subtracks directly from database
      Returns:
    • setSubTrackStreamIds

      @Deprecated(forRemoval=true, since="2.10.1") public void setSubTrackStreamIds(List<String> subTrackStreamIds)
      Deprecated, for removal: This API element is subject to removal in a future version.
      get the subtracks directly from database
      Parameters:
      subTrackStreamIds -
    • setAbsoluteStartTimeMs

      public void setAbsoluteStartTimeMs(long absoluteStartTimeMs)
    • getAbsoluteStartTimeMs

      public long getAbsoluteStartTimeMs()
    • getWebMEnabled

      public int getWebMEnabled()
    • setWebMEnabled

      public void setWebMEnabled(int webMEnabled)
    • getWebRTCViewerLimit

      public int getWebRTCViewerLimit()
    • setWebRTCViewerLimit

      public void setWebRTCViewerLimit(int webRTCViewerLimit)
    • getHlsViewerLimit

      public int getHlsViewerLimit()
    • setHlsViewerLimit

      public void setHlsViewerLimit(int hlsViewerLimit)
    • getPlayListItemList

      public List<Broadcast.PlayListItem> getPlayListItemList()
    • setPlayListItemList

      public void setPlayListItemList(List<Broadcast.PlayListItem> playListItemList)
    • getCurrentPlayIndex

      public int getCurrentPlayIndex()
    • setCurrentPlayIndex

      public void setCurrentPlayIndex(int currentPlayIndex)
    • setPlayListStatus

      public void setPlayListStatus(String playListStatus)
    • getPlayListStatus

      public String getPlayListStatus()
    • setSubFolder

      public void setSubFolder(String subFolder)
    • getSubFolder

      public String getSubFolder()
    • getPublishType

      public String getPublishType()
    • setPublishType

      public void setPublishType(String publishType)
    • getMetaData

      public String getMetaData()
    • setMetaData

      public void setMetaData(String metaData)
    • getDashViewerLimit

      public int getDashViewerLimit()
    • setDashViewerLimit

      public void setDashViewerLimit(int dashViewerLimit)
    • getDashViewerCount

      public int getDashViewerCount()
    • setDashViewerCount

      public void setDashViewerCount(int dashViewerCount)
    • getUpdateTime

      public long getUpdateTime()
    • setUpdateTime

      public void setUpdateTime(long updateTime)
    • getHlsParameters

      public Broadcast.HLSParameters getHlsParameters()
    • setHlsParameters

      public void setHlsParameters(Broadcast.HLSParameters hlsParameters)
    • isAnyoneWatching

      public boolean isAnyoneWatching()
    • isAutoStartStopEnabled

      public boolean isAutoStartStopEnabled()
    • setAutoStartStopEnabled

      public void setAutoStartStopEnabled(boolean autoStartStopEnabled)
    • getSeekTimeInMs

      public long getSeekTimeInMs()
    • setSeekTimeInMs

      public void setSeekTimeInMs(long seekTimeInMs)
    • getConferenceMode

      public String getConferenceMode()
    • setConferenceMode

      public void setConferenceMode(String conferenceMode)
    • getSubtracksLimit

      public int getSubtracksLimit()
    • setSubtracksLimit

      public void setSubtracksLimit(int subtracksLimit)
    • getEncoderSettingsList

      public List<EncoderSettings> getEncoderSettingsList()
    • setEncoderSettingsList

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

      public String getRole()
    • setRole

      public void setRole(String role)
    • isPlaylistLoopEnabled

      public boolean isPlaylistLoopEnabled()
    • setPlaylistLoopEnabled

      public void setPlaylistLoopEnabled(boolean playlistLoopEnabled)
    • getWidth

      public int getWidth()
      Returns:
      the width
    • setWidth

      public void setWidth(int width)
      Parameters:
      width - the width to set
    • getHeight

      public int getHeight()
      Returns:
      the height
    • setHeight

      public void setHeight(int height)
      Parameters:
      height - the height to set
    • getEncoderQueueSize

      public int getEncoderQueueSize()
      Returns:
      the encoderQueueSize
    • setEncoderQueueSize

      public void setEncoderQueueSize(int encoderQueueSize)
      Parameters:
      encoderQueueSize - the encoderQueueSize to set
    • getDropPacketCountInIngestion

      public int getDropPacketCountInIngestion()
      Returns:
      the dropPacketCountInIngestion
    • setDropPacketCountInIngestion

      public void setDropPacketCountInIngestion(int dropPacketCountInIngestion)
      Parameters:
      dropPacketCountInIngestion - the dropPacketCountInIngestion to set
    • getDropFrameCountInEncoding

      public int getDropFrameCountInEncoding()
      Returns:
      the dropFrameCountInEncoding
    • setDropFrameCountInEncoding

      public void setDropFrameCountInEncoding(int dropFrameCountInEncoding)
      Parameters:
      dropFrameCountInEncoding - the dropFrameCountInEncoding to set
    • getPacketLostRatio

      public double getPacketLostRatio()
      Returns:
      the packetLostRatio
    • setPacketLostRatio

      public void setPacketLostRatio(double packetLostRatio)
      Parameters:
      packetLostRatio - the packetLostRatio to set
    • getJitterMs

      public int getJitterMs()
      Returns:
      the jitterMs
    • setJitterMs

      public void setJitterMs(int jitterMs)
      Parameters:
      jitterMs - the jitterMs to set
    • getRttMs

      public int getRttMs()
      Returns:
      the rttMs
    • setRttMs

      public void setRttMs(int rttMs)
      Parameters:
      rttMs - the rttMs to set
    • getPacketsLost

      public int getPacketsLost()
      Returns:
      the packetsLost
    • setPacketsLost

      public void setPacketsLost(int packetsLost)
      Parameters:
      packetsLost - the packetsLost to set
    • getRemoteIp

      public String getRemoteIp()
      Returns:
      the remoteIp
    • setRemoteIp

      public void setRemoteIp(String remoteIp)
      Parameters:
      remoteIp - the remoteIp to set
    • isVirtual

      public boolean isVirtual()
      Returns:
      the virtual
    • setVirtual

      public void setVirtual(boolean virtual)
      Parameters:
      virtual - the virtual to set