In the '_return' of connection, the 'data' property could be amf0 number
type if there is only version field or amf0 object type if there is
special information. We need to probe the type on receiving it.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
That is an issue on Nginx-RTMP. The test showing there is no video stream
downloaded to the player through it with onMetaData function and being all
right without it confuses me quite a lot. Due to some users' complain, I
decide to revert onMetaData in repo and continue research in the future.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
Nginx-rtmp module needs extra special AMF0 data including @setDataFrame
string field, onMetaData string field and a null AMF0 null object before
AV streaming.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
1. Add timeout in waiting for connection failure.
2. Do not use wall time for timestamp in case of overflow.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
GOP indicates the interval frames of I-frames which have larger sizes
than P-frames have. And therefore the larger GOP setting comes with less
bandwidth overhead. For instance, GOP=60 and FPS=15 means every 4 seconds
comes with an I-frame which is better for pictures with less movements.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
1. Use boolean flag in write thread to avoid InterruptedException while
it is blocked and use interrupted flag in read thread.
2. Do NOT close input stream in read thread and output stream in write
thread when shutting down. socket.close() will handle it automatically.
Otherwise SocketException will be raised in the corresponding thread.
3. Do socket.shutdownInput() before ending read thread and capture
EOFException which may be the only correct way to return the blocking
input stream read method.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
Since isEmpty method of ConcurrentLinkedQueue may take some time, and
therefore it would not detect new elements offered, we have to wait a time
out to ensure ConcurrentLinkedQueue can detect new elements.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
ConcurrentLinkedQueue may have some bug since the queue is still empty
while elements have been added into it.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
When processing Cb and Cr component In yuv420planner frame, the length
of width and height should be half of that in Y component.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
The createStream response from the server may come after onFCPublish.
Therefore we have to wait until onStatus containing NetStream.Publish.Start
status code arrives.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
The chunk size of RTMP packet means two things: When the SetChunkSize
command comes from the server, it changes rx chunk size of the peer
while the tx chunk size still stays unchanged.
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>