Exemple #1
0
void StatusWriter::writePublicationContent(const Publication& publication,AMFWriter& writer) {
	writer.writeObjectProperty("id",publication.publisherId());
	writer.writeObjectProperty("name",publication.name());
	writer.writeObjectProperty("listeners",publication.listeners.count());
	writer.writeObjectProperty("vLost",publication.videoQOS().lostRate);
	writer.writeObjectProperty("aLost",publication.audioQOS().lostRate);
	writer.writeObjectProperty("vLatency",publication.videoQOS().latency);
	writer.writeObjectProperty("aLatency",publication.audioQOS().latency);
	writer.writeObjectProperty("df",publication.videoQOS().droppedFrames);
}
Exemple #2
0
void LUAPublication::Delete(lua_State* pState, Publication& publication) {
	if (!publication.running())
		return;
	lua_getmetatable(pState, -1);
	lua_getfield(pState, -1, "|invoker");
	lua_replace(pState, -2);
	Invoker* pInvoker = (Invoker*)lua_touserdata(pState, -1);
	if (pInvoker)
		pInvoker->unpublish(publication.name());
	lua_pop(pState, 1);
}
Exemple #3
0
Listener::Listener(Publication& publication,Client& client,Writer& writer) :
   _writer(writer), publication(publication), receiveAudio(true), receiveVideo(true), client(client), _firstTime(true),
	_pAudioWriter(NULL),_pVideoWriter(NULL),_pDataWriter(NULL),_publicationNamePacket((const UInt8*)publication.name().c_str(),publication.name().size()),
	_startTime(0),_codecInfosSent(false) {
}