All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.antmedia.webrtc.api.IWebRTCMuxer Maven / Gradle / Ivy

Go to download

Ant Media Server supports RTMP, RTSP, MP4, HLS, WebRTC, Adaptive Streaming, etc.

There is a newer version: 2.10.0
Show newest version
package io.antmedia.webrtc.api;

import java.nio.ByteBuffer;
import java.util.Queue;

import io.antmedia.cluster.IStreamInfo;
import io.antmedia.webrtc.VideoCodec;

public interface IWebRTCMuxer extends IStreamInfo {
	

	
	public void setWebRTCAdaptor(IWebRTCAdaptor webRTCAdaptor);
	
	/**
	 * Register to WebRTC Adaptor
	 */
	public void registerToAdaptor();
	
	
	public String getStreamId();
	
	
	/**
	 * Register new WebRTCClient to send video data
	 * First packet to send should be video conf data
	 * @param webRTCClient
	 */
	public void registerWebRTCClient(IWebRTCClient webRTCClient);
	
	
	/**
	 * Deregisters WebRTCClient from its list and does not send any
	 * video or audio packet to this WebRTCClient
	 * @param webRTCClient
	 */
	public boolean unRegisterWebRTCClient(IWebRTCClient webRTCClient);
	
	
	/**
	 * Send video packet to WebRTCClients
	 * @param videoPacket
	 * @param isKeyFrame
	 */
	public void sendVideoPacket(ByteBuffer videoPacket, boolean isKeyFrame, long timestamp, int frameRotation);
	
	/**
	 * Send video packet to WebRTCClients
	 * @param videoPacket
	 * @param isKeyFrame
	 * @param trackIndex
	 */
	public void sendTrackVideoPacket(ByteBuffer videoPacket, boolean isKeyFrame, long timestamp, int frameRotation,
			String trackId);
	
	/**
	 * Send audio packet to WebRTCClients
	 * @param audioPacket
	 */
	public void sendAudioPacket(ByteBuffer audioPacket, long timestamp);
	
	/**
	 * Returns number of WebRTCClients registered to the muxer
	 */
	public int getClientCount();
	
	
	public boolean contains(IWebRTCClient webRTCClient);
	
	
	/**
	 * Return the list of webrtc clients receiving data from webrtc muxer 
	 * @return
	 */
	public Queue getClientList();
	
	/**
	 * Return the video codec of the IWebRTCMuxer
	 */
	public VideoCodec getVideoCodec();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy