|
|
@ -115,8 +115,7 @@ static const AVal av_NetStream_Play_Stop = AVC("NetStream.Play.Stop");
|
|
|
|
static const char *cst[] = { "client", "server" };
|
|
|
|
static const char *cst[] = { "client", "server" };
|
|
|
|
|
|
|
|
|
|
|
|
// Returns 0 for OK/Failed/error, 1 for 'Stop or Complete'
|
|
|
|
// Returns 0 for OK/Failed/error, 1 for 'Stop or Complete'
|
|
|
|
int
|
|
|
|
int ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *body)
|
|
|
|
ServeInvoke(STREAMING_SERVER *server, int which, RTMPPacket *pack, const char *body)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int ret = 0, nRes;
|
|
|
|
int ret = 0, nRes;
|
|
|
|
int nBodySize = pack->m_nBodySize;
|
|
|
|
int nBodySize = pack->m_nBodySize;
|
|
|
@ -412,8 +411,7 @@ out:
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
int ServePacket(STREAMING_SERVER *server, int which, RTMPPacket *packet)
|
|
|
|
ServePacket(STREAMING_SERVER *server, int which, RTMPPacket *packet)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int ret = 0;
|
|
|
|
int ret = 0;
|
|
|
|
|
|
|
|
|
|
|
@ -497,8 +495,7 @@ ServePacket(STREAMING_SERVER *server, int which, RTMPPacket *packet)
|
|
|
|
return ret;
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
int WriteStream(char **buf, // target pointer, maybe preallocated
|
|
|
|
WriteStream(char **buf, // target pointer, maybe preallocated
|
|
|
|
|
|
|
|
unsigned int *plen, // length of buffer if preallocated
|
|
|
|
unsigned int *plen, // length of buffer if preallocated
|
|
|
|
uint32_t *nTimeStamp,
|
|
|
|
uint32_t *nTimeStamp,
|
|
|
|
RTMPPacket *packet)
|
|
|
|
RTMPPacket *packet)
|
|
|
@ -669,8 +666,7 @@ WriteStream(char **buf, // target pointer, maybe preallocated
|
|
|
|
return ret; // no more media packets
|
|
|
|
return ret; // no more media packets
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TFTYPE
|
|
|
|
TFTYPE controlServerThread(void *unused)
|
|
|
|
controlServerThread(void *unused)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
char ich;
|
|
|
|
char ich;
|
|
|
|
while (1)
|
|
|
|
while (1)
|
|
|
@ -970,8 +966,7 @@ quit:
|
|
|
|
TFRET();
|
|
|
|
TFRET();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TFTYPE
|
|
|
|
TFTYPE serverThread(void *arg)
|
|
|
|
serverThread(void *arg)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
STREAMING_SERVER *server = arg;
|
|
|
|
STREAMING_SERVER *server = arg;
|
|
|
|
server->state = STREAMING_ACCEPTING;
|
|
|
|
server->state = STREAMING_ACCEPTING;
|
|
|
|