Can i use TDAudioStreamer with GCDAsyncSocket or NetService? - ios

I want to stream audio file between to multiple device, one act as server and other as client on the local network, I found https://github.com/tonyd256/TDAudioStreamer this class that stream audio to connected client but it use multiplier connectivity. I wonder that, can I use this class with GCDAsyncSocket or NetService if there is any way?

as my experience you have to pass stream object to this classes in order to work with GCDAsyncSocket or NetService. Then after client side receiving data from server you have to convert that data in proper format to play.
That's all i know.

Related

How to transfer Video data using Adaptive Autosar

I am working on Adaptive Autosar project, where input data (video) captured from camera sensor needs to be transferred from client machine to server machine, which runs object detection algorithm.
someIP (service oriented middleware over IP) protocol is used as middleware .
Is it possible to share video file using SomeIP protocol?
If No, what is other method to share the video frame?
Thanks & Regards
Astha Mishra
The problem would be, that you would need a very good connection between the two ECUs, and I doubt that even with Ethernet, you can pass the data that fast to keep a certain performance. It might make sense to preprocess the data, before transmitting it somewhere else.
Transmission would be done rather as a byte stream with a streaming protocol, e.g. SomeIpTp, you might think about compression if possible. UDP instead of TCP might be also a good idea, but consider the possible drawbacks of UDP.
Vector seems to provide some MICROSAR module called MICROSAR.AVB module for Audio/Video-Briding.
But make sure, the sensor/camera does not provide the data faster than it can push it out over the network.

send UISlider values using Multipeer Connectivity wifi/bluetooth

Im starting to create music production applications and the Multipeer Connectivity can come in handy!!!
I can set up a connection between two iDevices. But my goal is to send UISlider values from one device to another where they will go straight into my sound engine on the host device).
Should I use an NSStream or just send NSData (perhaps using MCSessionSendDataUnreliable)?
And if NSData then when? should I attach a selector for UIControlEventValueChanged???
I'm having trouble with everything at the moment on this one task...
The multipeer connectivity framework seems awesome, and I think many people could use this
All of your ideas are spot on. The choice between NSStream and NSData will come down to how frequently the sliders are updated. Since you'll be doing music production, time synchronization will be crucial (especially if you are doing any tasks with MIDI).
If time and latency is indeed a factor, I would recommend going the NSStream route, and then routing all packets through that stream. You can easily implement this idea using NSData and then determine if the latency is an issue.
Roughly what you will need to do, is package up the data you want to transmit as an NSData and send it over the wire. You have a two options here: You can either create C structs and initialize data from pointers to those structs. Or you can create an NSObject subclass that conforms to the NSSecureCoding protocol. Then use NSKeyedArchiver and NSKeyedUnarchiver to convert the class to an NSData.

NSStream closing and opening error

I'm working with NSStream to send and receive single characters over a network connection.
I instantiate the streams both for reading and for writing using CFStreamCreatePairWithSocketToCFHost(...).
The basic working mechanism to send and receive is working fine.
Now I want to create the NSStream only when I need to send or receive something (usually one time every 2 minutes). The first time I create the streams, send the packet, close it and everything work well. Next I try to recreate the NSStream (create a new socket and open the stream on it), the opening function don't work. Since I'm using netcat to test it, I see that when I close the stream using [NSStream close] method, the connection on the server is not closing. How can I force to close the socket? Or there's a better way to do what I'm trying to do?
Use CFWriteStreamSetProperty and CFReadStreamSetProperty to set kCFStreamPropertyShouldCloseNativeSocket to kCFBooleanTrue in order that the underlying socket is closed when the stream is closed.

How to optimize the http-connection in case of Blackberry?

Want to optimize the http-connection in Blackberry(J2ME or LWUIT or RIM).
I am using the connection object this way:-
HttpConnection c=(HttpConnection)Connector.open(url);
I thought of using connection pool, but the problem is the url varies.
Optimize- Using the same connection object so that the code works more efficiently
Connector.open doesn't work properly on the blackberry and had inherent issues in LWUIT. CodenameOne's networking layer includes special support for RIM solving networking on that device.
In my application i add the requast to Queue of class Network Manager that responsible on connection in Lwuit (I can't create http connect,all done by lwuit). about optmaize you can use unsynchronizrd function that will be load the new connection on the instance only if the respone will recievd or that connection be finishe, But i think that is "recipe" for problems.

How to collect data programmatically for the performed network traffic on BlackBerry?

I want to get the data about when a connection from the device is established, when the connection is terminated and how many bytes were transferred (in/out).
I couldn't find proper listeners in the BB API. I found application that does this and I am wondering how this can be implemented?
You could take a look at the RadioInfo class - there are methods in there such as getNumberOfPacketsReceived() and getNumberOfPacketsSent() that might do what you want.

Resources