Queueing of frames

#1

How do I find out how many frames are queued to be sent? Or: How do I manage the queue myself, i.e. by having sendBinaryMessage() et. al. block?

It seems there is no way of finding out how many frames are queued because it is all managed by the Android Looper classes.

Any help would be very welcome.

Regards,

Janus Troelsen

PS I have submitted a bug on Github, is that the right place?

0 Likes

#2

Oh, I forgot to say, I am of course using AutobahnAndroid, from Git.

0 Likes

#3

Autobahn queues wrapped WebSocket messages to be sent via the Android
message queue of the background writer (WebSocketWriter).

sendXXX() are all non-blocking, since they are called from the UI
thread and must not block.

I can't see why you would want that to block. If it did, your UI would
become unresponsive.

What are you ultimately trying to achieve?

···

On Nov 28, 2:29 am, Janus Troelsen <ysan...@gmail.com> wrote:

Oh, I forgot to say, I am of course using AutobahnAndroid, from Git.

0 Likes

#4

I am trying to stream video from the camera. This means I would be
streaming around 30 * 700000 bytes per second. Obviously I will have
to drop a lot of frames, but I can't really know how many frames to
drop, since I don't know how fast the are being sent.

I already have my own networking thread, so nothing would block.

···

On Mon, Nov 28, 2011 at 12:38 PM, tgo <tobias.o...@gmail.com> wrote:

Autobahn queues wrapped WebSocket messages to be sent via the Android
message queue of the background writer (WebSocketWriter).

sendXXX() are all non-blocking, since they are called from the UI
thread and must not block.

I can't see why you would want that to block. If it did, your UI would
become unresponsive.

What are you ultimately trying to achieve?

On Nov 28, 2:29 am, Janus Troelsen <ysan...@gmail.com> wrote:

Oh, I forgot to say, I am of course using AutobahnAndroid, from Git.

0 Likes

#5

Autobahn WebSockets for Python was designed to allow for streaming data over WebSockets.
The ciritical component you need is end-to-end ("app level") flow-control:
http://www.tavendo.de/autobahn/tutorial/producer.html

That being said:
a) Autobahn for Android does not support streaming (different use cases)
b) I am sceptical whether WebSockets is the right protocol anyway for doing media streaming,
since it's TCP based.

You may want to look at

http://www.w3.org/TR/webrtc/

an upcoming standard for media streaming which uses WS/TCP only for signaling,
and UDP for media transport AFAIK.

If you still want to go with WebSockets, I'd suggest ripping off the framing code from
Autobahn and use your own networking code ..

···

Am 28.11.2011 13:39, schrieb Janus Troelsen:

I am trying to stream video from the camera. This means I would be
streaming around 30 * 700000 bytes per second. Obviously I will have
to drop a lot of frames, but I can't really know how many frames to
drop, since I don't know how fast the are being sent.

I already have my own networking thread, so nothing would block.

On Mon, Nov 28, 2011 at 12:38 PM, tgo<tobias.o...@gmail.com> wrote:

Autobahn queues wrapped WebSocket messages to be sent via the Android
message queue of the background writer (WebSocketWriter).

sendXXX() are all non-blocking, since they are called from the UI
thread and must not block.

I can't see why you would want that to block. If it did, your UI would
become unresponsive.

What are you ultimately trying to achieve?

On Nov 28, 2:29 am, Janus Troelsen<ysan...@gmail.com> wrote:

Oh, I forgot to say, I am of course using AutobahnAndroid, from Git.

0 Likes