Cant stream to FMS
zas132 opened this issue · 2 comments
server is Adobe Media Server 5
Log is:
2016-06-17 16:00:21.046 SampleBroadcaster[10776:3669581] Screen rect:{{0, 0}, {320, 568}}
2016-06-17 16:00:21.050 SampleBroadcaster[10776:3669581] Creating context
2016-06-17 16:00:23.243 SampleBroadcaster[10776:3669665] Focus mode not supported: AVCaptureFocusModeContinuousAutoFocus
Connecting:192.168.1.124:1935, stream name:letest
ClientState: 1
ClientState: 2
ClientState: 3
Want read:4096, read:1448
ClientState: 4
Not enough s1 size
Want read:2648, read:1625
ClientState: 5
ClientState: 6
Tracking command(1, connect)
Want read:4096, read:336
Steam in buffer size:336
First byte:0x2, header type:0
Handle message:5
Received server window size: 2500000
Steam in buffer size:320
First byte:0x2, header type:0
Handle message:6
Received peer bandwidth limit: 2500000 type: 2
Steam in buffer size:303
First byte:0x2, header type:0
Handle message:1
Request to change incoming chunk size from 128 -> 4096
Steam in buffer size:287
First byte:0x3, header type:0
Handle message:20
Received invoke
now Received invoke _result
Find command: connect for ID:1
Tracking command(2, releaseStream)
Tracking command(3, FCPublish)
Tracking command(4, createStream)
ClientState: 7
Steam in buffer size:33
First byte:0x3, header type:0
Handle message:20
Received invoke
now Received invoke onBWDone
Want read:4096, read:0
Read from stream error:0
ClientState: 11
~RTMPSession
my Code:
_session = [[VCSimpleSession alloc] initWithVideoSize:CGSizeMake(360, 640) frameRate:20 bitrate:600*1000 useInterfaceOrientation:NO];
_session.cameraState = VCCameraStateFront;
[self.previewView addSubview:_session.previewView];
_session.previewView.frame = self.previewView.bounds;
button click:
[_session startRtmpSessionWithURL:@"rtmp://192.168.1.124/live/letest" andStreamKey:nil];
flash can stream to this server and it works fine. but videoCore 0.3.2 see this error.
and some time the log is:
2016-06-17 16:17:53.598 SampleBroadcaster[10798:3673469] Screen rect:{{0, 0}, {320, 568}}
2016-06-17 16:17:53.600 SampleBroadcaster[10798:3673469] Creating context
2016-06-17 16:17:54.087 SampleBroadcaster[10798:3673499] Focus mode not supported: AVCaptureFocusModeContinuousAutoFocus
Connecting:www.xxx.com:1936, stream name:letest
ClientState: 1
ClientState: 2
ClientState: 3
Want read:4096, read:1428
ClientState: 4
Not enough s1 size
Want read:2668, read:1645
ClientState: 5
ClientState: 6
Tracking command(1, connect)
Want read:4096, read:338
Steam in buffer size:338
First byte:0x2, header type:0
Handle message:5
Received server window size: 2500000
Steam in buffer size:322
First byte:0x2, header type:0
Handle message:6
Received peer bandwidth limit: 2500000 type: 2
Steam in buffer size:305
First byte:0x2, header type:0
Handle message:1
Request to change incoming chunk size from 128 -> 4096
Steam in buffer size:289
First byte:0x3, header type:0
Handle message:20
Received invoke
now Received invoke _result
Find command: connect for ID:1
Tracking command(2, releaseStream)
Tracking command(3, FCPublish)
Tracking command(4, createStream)
ClientState: 7
Steam in buffer size:33
First byte:0x3, header type:0
Handle message:20
Received invoke
now Received invoke onBWDone
2016-06-17 16:17:56.929 SampleBroadcaster[10798:3673499] No more data in stream, clear read status
Want read:4096, read:-1
Read from stream error:-1
ClientState: 10
and also show a "Thread 3 : EXEC_BAD_ACCESS(code=1,address=0x4000000014e5e092)
error at these code:
if (NSIS(m_inputStream).streamError) {
NSLog(@"Input stream error:%@", NSIS(m_inputStream).streamError);
}
if (NSOS(m_outputStream).streamError) {
NSLog(@"Output stream error:%@", NSIS(m_outputStream).streamError);
}
code line number is 208 at namespace videocore {
namespace Apple {
StreamSession::StreamSession()
StreamSession.mm