216 Commits (03d5733d57a00fd522cefeeb2bed2a3e12213903)
 

Author SHA1 Message Date
Leo Ma 9e35f22b7f Fix extended timestamp
Once the extended timestamp is sent, the subsequent extended timestamp
should always be sent.

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 848b0763b9 Better interface
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma bbd0e7df2f Add metadata on publishing
Video resolution set method.

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 0307650290 Fix key frame interval setting
The unit of the parameter is second(s) not number of frames.

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma a9cdb36a66 Fix connection packet format
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 4111df5876 Add property length info to AmfMap writing
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 4ec88b7131 Add video output FPS dectection
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma be1b7d888b Fix type cast bug
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>
9 years ago
Leo Ma 18a1358534 Supplement get methods of publisher
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 205e72a234 Complete reset on connetion shutdown
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma e95be5335b Reduce target sdk version for android M (API 23)
Class library Camera could not run on android M.

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma d071b6ed8d Retrieve server ip/pid/id on connection if any
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma b5e39cb218 Revert onMetaData sending
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>
9 years ago
Leo Ma 882ce15d3e Fix streaming on nginx-rtmp
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>
9 years ago
Leo Ma 71a7e51940 Remove unnessary condition in SrsFlvMuxer stop
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 04c831146d Add event handler for RTMP
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 7281158f1c Fix RTMP packet timestamp marking
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma cc08c9f399 Fix timestamp mark
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 0e2e7e5e80 Connection process synchronization
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>
9 years ago
Leo Ma d418715673 Encapsulate `SrsRtmpPublisher` into `SrsRtmpFlv`
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 1178a1be3a Adjust video frame cache size
Just cache GOP / FPS seconds data according to latency.

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma d42d01a742 Adjust video frame cache number to GOP x 2
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 6b3920509b Update gradle version
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 6a7bc1afd9 Fix RTMP packet timestamp
Use relative time instead of wall time as packet timestamp.

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma d999b08765 Rename
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 4cb3ab0811 Adjust GOP and FPS parameters
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 405eeeb45c Merge branch 'master' of github.com:begeekmyfriend/yasea 9 years ago
Leo Ma 576e6537a2 Generate random RTMP URL to avoid conflict
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 35e94b86f1 Update README 9 years ago
Leo Ma 56f2be1651 Update README 9 years ago
Leo Ma b8a4455037 Add Android Arsenal badge. Congratulations! 9 years ago
Leo Ma 4662cac158 Update README.md 9 years ago
Leo Ma 624b84b94a Adjust FPS and GOP parameters
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>
9 years ago
Leo Ma 95902f5ccf Optimization for YUV transformation
Cropping ahead of flipping and rotation.

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 6307f6c5ad Camera size validity check
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 65472cc5c1 Update README 9 years ago
Leo Ma e082e3ba2e Clear queue while shutting down
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma fd7eb0566d Streaming parameter adjustment
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 5930749228 Simplification
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 5f37bd808b Fix socket and thread close method
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>
9 years ago
Leo Ma 33f3195c7a Fix NullPointerException
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma e4340b09ee Handle return to home page by onPause
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 9bc3bc2e73 Replace Looper with Queue for less CPU overhead
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 73c6c8e451 Add video cached frame counting
To check networking situation according to cached frame counting.

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 236636ca74 Handle InterruptedException by Thread.interrupt()
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma 2b83e5656d Use runOnUiThread to process exception
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma e54db1cd8b Use ConcurrentLinkedQueue to reduce CPU overhead
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>
9 years ago
Leo Ma e89a5caf12 Replace ConcurrentLinkedQueue with Looper & handleMessage
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>
9 years ago
Leo Ma 62bb4823c4 Add DefaultUncaughtException for global error processing
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago
Leo Ma ff98ae24c6 Synchronize thread extermination
Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
9 years ago