Giter Club home page Giter Club logo

srthaishinkit.swift's Introduction

Hi there 👋

srthaishinkit.swift's People

Contributors

allan-o3h avatar dependabot[bot] avatar pjvds avatar shogo4405 avatar spllr avatar themaxsmith avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

srthaishinkit.swift's Issues

Can't add the package

Describe the bug
When I try to put the package in the package dependencies, and try to compile it says

"Failed to resolve dependencies Dependencies could not be resolved because root depends on 'srthaishinkit.swift' 0.1.2..<1.0.0.
'srthaishinkit.swift' >= 0.1.2 cannot be used because no versions of 'srthaishinkit.swift' match the requirement 0.1.3..<1.0.0 and package 'srthaishinkit.swift' is required using a stable-version but ' srthaishinkit.swift' depends on an unstable-version package 'haishinkit.swift'."

To Reproduce
Steps to reproduce the behavior:

  1. Click on "File"
  2. "Add Packages..."
  3. Enter the package url on the top right "https://github.com/shogo4405/SRTHaishinKit.swift"
  4. Default settings for Dependency Rule "Up to Next Major Version: 0.1.2<1.0.0")
  5. Click on "Add Package"

Expected behavior
When I add the package, it doesn't give dependency issues

Two way connections

In SRTConnection two srt sockets are established when calling SRTConnection.connect(:).

From SRTConnection.swift:31:

outgoingSocket = SRTOutgoingSocket()
outgoingSocket?.delegate = self
((try? outgoingSocket?.connect(addr, options: options)) as ()??)

incomingSocket = SRTIncomingSocket()
incomingSocket?.delegate = self
((try? incomingSocket?.connect(addr, options: options)) as ()??)

My question is: is this specific for a server you (@shogo4405) are working with, or is this part of the srt protocol, as I have not been able to find any mention of this in the srt documentation or srt sample code.

Connecting to srt-live-server v1.4.x or ffplay endpoint fails/disconnect

Describe the bug
A clear and concise description of what the bug is.

When using the Example iOS app on a physical iPhone 8(14.4), connecting to srt-live-server results in a socket connection but immediate disconnect.

To Reproduce
Steps to reproduce the behavior:

  1. run srt-live-server locally(on ZeroTier VPN) on mac with this config:
srt {                #SRT
    worker_threads  1;
    worker_connections 300 ;
		
    log_file logs/error.log ; 
    log_level info;
    
    #stat_post_url http://192.168.31.106:8001/sls/stat;
    #stat_post_interval  5;#s
    
    record_hls_path_prefix /tmp/mov/sls; 
    #vod  file name: /tmp/mov/sls/$listen/$domain_publisher/$app_publisher/$stream_name/vod.m3u8
         
    server {
        listen 3000; 
        latency 200; #ms

        domain_player output;
        domain_publisher input;
        backlog 100; #accept connections at the same time
        idle_streams_timeout 10;#s -1: unlimited
        #on_event_url http://192.168.31.106:8000/sls/on_event; #?method=on_connect|on_close&role_name=&srt_url=%s
        app {
            app_player live ;           
            app_publisher live ; 
            
            record_hls off;#on, off 
            record_hls_segment_duration 10; #unit s
            
            #relay {
            #    type pull;
            #    mode loop;#loop; hash;
            #    reconnect_interval 10;
            #    idle_streams_timeout -1;#s -1: unlimited
            #    upstreams 127.0.0.1:9090?streamid=live.sls.com/live 192.168.1.100:8080/?streamid=live.test.com/live;
            #}
            #relay {
            #    type push;
            #    mode all; #all; hash
            #    reconnect_interval 10;
            #    idle_streams_timeout 10;#s -1: unlimited
            #    upstreams 192.168.31.106:8080?streamid=uplive.sls.com/live ;
            #}          
        }
    }
}
  1. run Example iOS app with this connection string:
    var url: String = "srt://172.27.125.195:3000?streamid=input/live/iphone8"
  1. log from srt-live-server
2021-05-18 19:36:31:764 SLS INFO: [0x7ff94480bc00]CSLSSrt::libsrt_accept ok, new sock=652293637, 172.27.23.118:50589.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, new client[172.27.23.118:50589], fd=652293637.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, [172.27.23.118:50589], sid 'input/live/iphone8'
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, new pub=0x7ff943da4000, key_stream_name=input/live/iphone8.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943e04768]CSLSMapData::add ok, key='input/live/iphone8'.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943e04878]CSLSMapPublisher::set_push_2_pushlisher, ok, publisher=0x7ff943da4000, app_streamname=input/live/iphone8, m_map_push_2_pushlisher.size()=1.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, new publisher[172.27.23.118:50589], key_stream_name=input/live/iphone8.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943e04b38]CSLSMapRelay::add_relay_manager, no relay conf info, app_uplive=input/live, stream_name=iphone8.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943d29000]CSLSListener::handler, m_map_pusher->add_relay_manager failed, new role[172.27.23.118:50589], key_stream_name=input/live/iphone8.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff943da4000]CSLSRole::add_to_epoll, publisher, sock=652293637, m_is_write=0, ret=0.
2021-05-18 19:36:31:764 SLS INFO: [0x7ff94401ca00]CSLSGroup::check_new_role, worker_number=0, publisher=0x7ff943da4000, add_to_epoll fd=652293637, role_map.size=2.
2021-05-18 19:36:31:775 SLS INFO: [0x7ff94480bc00]CSLSSrt::libsrt_accept ok, new sock=652293636, 172.27.23.118:53705.
2021-05-18 19:36:31:775 SLS INFO: [0x7ff943d29000]CSLSListener::handler, new client[172.27.23.118:53705], fd=652293636.
2021-05-18 19:36:31:775 SLS INFO: [0x7ff943d29000]CSLSListener::handler, [172.27.23.118:53705], sid 'input/live/iphone8'
2021-05-18 19:36:31:775 SLS ERROR: [0x7ff943d29000]CSLSListener::handler, refused, new role[172.27.23.118:53705], stream='input/live/iphone8',but publisher=0x7ff943da4000 is not NULL.
2021-05-18 19:36:31:775 SLS INFO: [0x7ff944812a00]CSLSSrt::libsrt_close, fd=652293636.
19:36:35.494052/T0x70000bdc9000!W:SRT.br: @652293637:RCV-DROPPED 1 packet(s), packet seqno %1140470064 delayed for 4.877 ms
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943da4000]CSLSRole::get_state, check_idle_streams_duration is true, cur m_state=1, m_idle_streams_timeout=10s, call invalid_srt.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943da4000]CSLSRole::invalid_srt, close sock=652293637, m_state=2.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff94680e200]CSLSSrt::libsrt_close, fd=652293637.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff94401ca00]CSLSGroup::check_invalid_sock, worker_number=0, publisher=0x7ff943da4000, invalid sock=0, state=2, role_map.size=2.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943e04768]CSLSMapData::remove, key='input/live/iphone8' delete array_data=0x7ff945105270.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943da4000]CSLSPublisher::uninit, removed publisher from m_map_data, ret=0.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943e04878]CSLSMapPublisher::remove, publisher=0x7ff943da4000, live_key=input/live/iphone8.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff943da4000]CSLSPublisher::uninit, removed publisher from m_map_publisher, ret=0.
2021-05-18 19:36:47:031 SLS INFO: [0x7ff94401ca00]CSLSGroup::check_invalid_sock, worker_number=0, publisher=0x7ff943da4000, delete.
  1. log from Xcode console(12.4):
2021-05-18 19:35:27.022439-0400 Example iOS[6443:803303] Could not load the "first" image referenced from a nib in the bundle with identifier "com.haishinkit.srt.SRTHaishinKit"
2021-05-18 19:35:27.023813-0400 Example iOS[6443:803303] Could not load the "second" image referenced from a nib in the bundle with identifier "com.haishinkit.srt.SRTHaishinKit"
2021-05-18 19:35:27.134315-0400 Example iOS[6443:803303] Metal API Validation Enabled
2021-18-05 19:35:27.175 [Warn] [com.haishinkit.HaishinKit] [VideoIOComponent.swift:163] continuousAutofocus > focusMode(2) is not supported
2021-18-05 19:35:27.176 [Warn] [com.haishinkit.HaishinKit] [VideoIOComponent.swift:222] continuousExposure > exposureMode(2) is not supported
2021-18-05 19:35:36.257 [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-18-05 19:36:31.551 [Info] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:42] status > SRT Socket Connected
2021-18-05 19:36:31.559 [Info] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:42] status > SRT Socket Connected
2021-18-05 19:36:31.570 [Info] [com.haishinkit.HaishinKit] [AudioCodec.swift:94] inSourceFormat > AudioStreamBasicDescription(mSampleRate: 44100.0, mFormatID: 1819304813, mFormatFlags: 12, mBytesPerPacket: 2, mFramesPerPacket: 1, mBytesPerFrame: 2, mChannelsPerFrame: 1, mBitsPerChannel: 16, mReserved: 0)
2021-18-05 19:36:31.593 [Info] [com.haishinkit.HaishinKit] [AudioCodec.swift:81] formatDescription > Optional(<CMAudioFormatDescription 0x281550500 [0x1f7fc9b20]> {
	mediaType:'soun' 
	mediaSubType:'aac ' 
	mediaSpecific: {
		ASBD: {
			mSampleRate: 44100.000000 
			mFormatID: 'aac ' 
			mFormatFlags: 0x2 
			mBytesPerPacket: 0 
			mFramesPerPacket: 1024 
			mBytesPerFrame: 0 
			mChannelsPerFrame: 1 
			mBitsPerChannel: 0 	} 
		cookie: {(null)} 
		ACL: {(null)}
		FormatList Array: {
			Index: 0 
			ChannelLayoutTag: 0x640001 
			ASBD: {
			mSampleRate: 44100.000000 
			mFormatID: 'aac ' 
			mFormatFlags: 0x2 
			mBytesPerPacket: 0 
			mFramesPerPacket: 1024 
			mBytesPerFrame: 0 
			mChannelsPerFrame: 1 
			mBitsPerChannel: 0 	}} 
	} 
	extensions: {(null)}
})
2021-18-05 19:36:31.617 [Info] [com.haishinkit.HaishinKit] [AudioCodec.swift:72] actualBitrate > 32000
2021-18-05 19:36:36.700 [Warn] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:45] status > SRT Socket Broken
2021-18-05 19:36:36.700 [Info] [com.haishinkit.HaishinKit] [AudioCodec.swift:81] formatDescription > nil
2021-18-05 19:36:36.737 [Warn] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:54] status > SRT Socket Not Exist
2021-18-05 19:36:46.864 [Warn] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:45] status > SRT Socket Broken
2021-18-05 19:36:46.899 [Warn] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:54] status > SRT Socket Not Exist

Expected behavior
Expected to connect to srt-live-server with SRTHaishinKit without ERROR but received:
2021-05-18 19:36:31:775 SLS ERROR: [0x7ff943d29000]CSLSListener::handler, refused, new role[172.27.23.118:53705], stream='input/live/iphone8',but publisher=0x7ff943da4000 is not NULL.

Screenshots
n/a

Desktop (please complete the following information):

  • macOS Catalina 10.15.7 (19H2)

Smartphone (please complete the following information):

  • Device: iPhone 8
  • OS: iOS 14.4

Additional context

checked-out latest master headrev: 82d81398092f21652efab2e7f14df223af5a281f

NOTE: Connecting to server with ffmpeg as publisher:

ffmpeg -f lavfi -i testsrc=duration=1000:size=1280x720:rate=30 -f mpegts "srt://localhost:3000?streamid=input/live/somename"

and ffplay as playback:

ffplay -fflags nobuffer -i "srt://172.27.125.195:3000?streamid=output/live/somename

worked successfully.

BUT:

Connecting to server to playback iphone8 with ffplay resulted in "Input/output error":
ffplay -fflags nobuffer -i "srt://172.27.125.195:3000?streamid=output/live/iphone8"
srt://172.27.125.195:3000?streamid=output/live/iphone8: Input/output error

**NOTE: Using ffplay as an endpoint(instead of srt-live-server) ALSO resulted in an error: **

ffplay -analyzeduration 100 -i 'srt://172.27.125.195:3000?mode=listener'
srt://172.27.125.195:3000?mode=listener: Unknown error: 316

.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Not able to run project in xcode 11.2

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Adding Framework to project

Hi, I'm wondering how I add the SRTHaishinKit framework to my current xcode project. I didn't see a cocoapods for it so I wasn't sure how I have to add it in.
-Thanks

How to compile SRT packages to xcode?

hai:
I used the build-srt-iOS.sh script to compile the srt library, but all failed. The libsrt.a library has not been compiled. Can you talk about the compilation steps?
thank!

Building the project: Library not found for -lcrypto

Hi. Trying to build this project example for iOS but cannot get the -lcrypto linking to work. Have you the same behaviour?
Xcode v12.0

Here@s the ld output from the build in Xcode:

Ld /Users/vidarsolli/Library/Developer/Xcode/DerivedData/SRTHaishinKit-hjmierqeioaeicencevymoujrenl/Build/Products/Debug-iphoneos/SRTHaishinKit.framework/SRTHaishinKit normal (in target 'SRTHaishinKit iOS' from project 'SRTHaishinKit')
cd /Users/vidarsolli/Desktop/source/SRTHaishinKit.swift
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios12.0 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk -L/Users/vidarsolli/Library/Developer/Xcode/DerivedData/SRTHaishinKit-hjmierqeioaeicencevymoujrenl/Build/Products/Debug-iphoneos -L/Users/vidarsolli/Desktop/source/SRTHaishinKit.swift/Vendor/SRT -F/Users/vidarsolli/Library/Developer/Xcode/DerivedData/SRTHaishinKit-hjmierqeioaeicencevymoujrenl/Build/Products/Debug-iphoneos -filelist /Users/vidarsolli/Library/Developer/Xcode/DerivedData/SRTHaishinKit-hjmierqeioaeicencevymoujrenl/Build/Intermediates.noindex/SRTHaishinKit.build/Debug-iphoneos/SRTHaishinKit\ iOS.build/Objects-normal/arm64/SRTHaishinKit.LinkFileList -install_name @rpath/SRTHaishinKit.framework/SRTHaishinKit -Xlinker -rpath -Xlinker /usr/lib/swift -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/vidarsolli/Library/Developer/Xcode/DerivedData/SRTHaishinKit-hjmierqeioaeicencevymoujrenl/Build/Intermediates.noindex/SRTHaishinKit.build/Debug-iphoneos/SRTHaishinKit\ iOS.build/Objects-normal/arm64/SRTHaishinKit_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fapplication-extension -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/vidarsolli/Library/Developer/Xcode/DerivedData/SRTHaishinKit-hjmierqeioaeicencevymoujrenl/Build/Intermediates.noindex/SRTHaishinKit.build/Debug-iphoneos/SRTHaishinKit\ iOS.build/Objects-normal/arm64/SRTHaishinKit.swiftmodule -framework Logboard -lcrypto -lc++ -framework HaishinKit -lsrt-iOS -Xlinker -no_adhoc_codesign -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/vidarsolli/Library/Developer/Xcode/DerivedData/SRTHaishinKit-hjmierqeioaeicencevymoujrenl/Build/Intermediates.noindex/SRTHaishinKit.build/Debug-iphoneos/SRTHaishinKit\ iOS.build/Objects-normal/arm64/SRTHaishinKit_dependency_info.dat -o /Users/vidarsolli/Library/Developer/Xcode/DerivedData/SRTHaishinKit-hjmierqeioaeicencevymoujrenl/Build/Products/Debug-iphoneos/SRTHaishinKit.framework/SRTHaishinKit

ld: library not found for -lcrypto

Thanks.
Kaj

Connection setup failure: connection time out

I can build this project successfully, but when I run in my iphone device ,
I click the button to push stream then I can see some errors in log;

[Error] [com.haishinkit.SRTHaishinKit] [SRTSocket.swift:102] createConnectionException() > Connection setup failure: connection time out

i cann't push stream , I don't konw how to fix this bug , Can you help me to fix this bug. thanks very mush.

Use correct Transport Stream standard for SRT

Unable to stream to SRS 4.0

https://github.com/ossrs/srs/
https://github.com/ossrs/srs/blob/4.0release/trunk/src/srt/ts_demux.cpp

Crashes SRS with error
srs: ./src/srt/ts_demux.cpp:415: int ts_demux::pes_parse(unsigned char*, size_t, unsigned char**, size_t&, uint64_t&, uint64_t&): Assertion 0x80 == p[pos]' failed.
`
I believe this is due to TSWriter. OBS and FFMPEG work fine so I believe it is the config in Hashinkit.
Here is the defaults for FFMPEG
https://ffmpeg.org/ffmpeg-formats.html#mpegts

I am looking into this but I would love it if someone else can also attempt to take a look at solving this.

Can't connect to sever

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) {
}

}
`

unable to set passphase

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

VTDecompressionSessionDecodeFrame fails with OSStatus=-12909

Discussed in #56

Originally posted by martinzsapka May 10, 2023
Hello!

I'm trying to receive an h264 srt stream, but the decoder fails with error OSStatus=-12909. Specifically, the VTDecompressionSessionDecodeFrame call. Of course because of that, I don't get any imagebuffer.

Do you have any guesses as to what I may have misplaced? Maybe some configuration is missing?

Thanks!

Getting performanceData crash the app

connection.performanceData.mbpsBandwidth
crash on this method
class SRTSocket
func doOutput(data: Data) {
outgoingQueue.async {
self.outgoingBuffer.append(contentsOf: data.chunk(SRTSocket.payloadSize))
repeat {
guard var data = self.outgoingBuffer.first else {
return
}
_ = self.sendmsg2(&data)
self.outgoingBuffer.remove(at: 0)
} while !self.outgoingBuffer.isEmpty
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.