Comments (5)
I can build this project successfully. When I run on my iphone device, I click the button to push stream then I can see some error in logs.
[Error] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:102] createConnectionException() > Connection setup failure: connection time out
i cann't push stream, I don't know how to fix this bug,I need your help.
Thanks very much.
from srthaishinkit.swift.
Hello Please help me with this issue i try to use your example demo to connect to srt server but have this log
2021-01-11 13:02:21.557 [Info] [com.haishinkit.HaishinKit] [VideoIOComponent.swift:96] fps > (fps: 30.0, duration: __C.CMTime(value: 100, timescale: 3000, flags: __C.CMTimeFlags(rawValue: 1), epoch: 0)) 2021-01-11 13:02:32.126 [Info] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:42] status > SRT Socket Connected 2021-01-11 13:02:35.130 [Error] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:93] connect(_:options:) > Connection setup failure: connection time out
and then i try to create srt local server by ffplay -i "srt://0.0.0.0:3000?mode=listener" and try to connect again , but can't connect too
2021-01-11 13:02:21.557 [Info] [com.haishinkit.HaishinKit] [VideoIOComponent.swift:96] fps > (fps: 30.0, duration: __C.CMTime(value: 100, timescale: 3000, flags: __C.CMTimeFlags(rawValue: 1), epoch: 0)) 2021-01-11 13:02:32.126 [Info] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:42] status > SRT Socket Connected 2021-01-11 13:02:35.130 [Error] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:93] connect(_:options:) > Connection setup failure: connection time out
The step i try to run step 1 : download your source step 2: install cmake step 3. install carthage update --use-xcframeworks --platform iOS step 4 : run your sh command : build-openssl-iOS & build-srt-iOS step 5 : build SRTHaishinkit step 6: run example demo for ios
but i can't connect to any server , but another app in appstore can , i don't know why, please help , sorry for my bad english
`import UIKit import HaishinKit import SRTHaishinKit import AVFoundation
final class LiveViewController: UIViewController { private static let maxRetryCount: Int = 5
@IBOutlet private weak var lfView: MTHKView! @IBOutlet private weak var currentFPSLabel: UILabel! @IBOutlet private weak var publishButton: UIButton! @IBOutlet private weak var pauseButton: UIButton! @IBOutlet private weak var videoBitrateLabel: UILabel! @IBOutlet private weak var videoBitrateSlider: UISlider! @IBOutlet private weak var audioBitrateLabel: UILabel! @IBOutlet private weak var zoomSlider: UISlider! @IBOutlet private weak var audioBitrateSlider: UISlider! @IBOutlet private weak var fpsControl: UISegmentedControl! @IBOutlet private weak var effectSegmentControl: UISegmentedControl! private var connection: SRTConnection! private var stream: SRTStream! private var currentPosition: AVCaptureDevice.Position = .back override func viewDidLoad() { super.viewDidLoad() connection = .init() stream = SRTStream(connection) stream.captureSettings = [ .sessionPreset: AVCaptureSession.Preset.hd1280x720, .continuousAutofocus: true, .continuousExposure: true ] stream.videoSettings = [ .width: 720, .height: 1280 ] connection.attachStream(stream) lfView.attachStream(stream) } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) stream.attachAudio(AVCaptureDevice.default(for: .audio)) { _ in // logger.warn(error.description) } stream.attachCamera(DeviceUtil.device(withPosition: currentPosition)) { _ in // logger.warn(error.description) } } @IBAction func rotateCamera(_ sender: UIButton) { } @IBAction func toggleTorch(_ sender: UIButton) { } @IBAction func on(slider: UISlider) { } @IBAction func on(pause: UIButton) { } @IBAction func on(close: UIButton) { self.dismiss(animated: true, completion: nil) } @IBAction func on(publish: UIButton) { if publish.isSelected { UIApplication.shared.isIdleTimerDisabled = false stream.close() connection.close() publish.setTitle("●", for: []) } else { UIApplication.shared.isIdleTimerDisabled = true connection.connect(URL(string: Preference.shared.url)) stream.publish(Preference.shared.streamName) publish.setTitle("■", for: []) } publish.isSelected.toggle() } func tapScreen(_ gesture: UIGestureRecognizer) { } @IBAction private func onFPSValueChanged(_ segment: UISegmentedControl) { } @IBAction private func onEffectValueChanged(_ segment: UISegmentedControl) { } @objc private func on(_ notification: Notification) { } @objc private func didEnterBackground(_ notification: Notification) { } @objc private func didBecomeActive(_ notification: Notification) { }
} `
I am having exactly the same issue. Has anyone been able to solve the socket disconnection ?
from srthaishinkit.swift.
Issue solved in branch version #22
from srthaishinkit.swift.
master and SRT-Listener-Support branch That's still the problem,Connection setup failure: connection time out
from srthaishinkit.swift.
might be fixed it 6c0b680
from srthaishinkit.swift.
Related Issues (15)
- Use correct Transport Stream standard for SRT HOT 9
- Adding Framework to project HOT 1
- Connecting to srt-live-server v1.4.x or ffplay endpoint fails/disconnect HOT 1
- Building the project: Library not found for -lcrypto
- Two way connections HOT 2
- Connection setup failure: connection time out
- How to compile SRT packages to xcode? HOT 1
- connect method is not available HOT 1
- unable to set passphase
- VTDecompressionSessionDecodeFrame fails with OSStatus=-12909 HOT 1
- Can't add the package HOT 1
- .
- Getting performanceData crash the app
- Not able to run project in xcode 11.2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from srthaishinkit.swift.