Home Forums Support very slow comm if sending large data frame

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1037
    Anonymous
    Inactive

    Need to stream live video from Windows-7 by USB to iPad at at least 15 frames per second for 512×512 byte frame.

    But only seeing < 1 frame per second.
    Loop is iPad app uses NetworkComms.SendReceiveObject() to request frame, and Windows app uses NetworkComms.SendObject() to send frame reply.

    Can NetworkComms stream 512 x 512 byte frames continually from Windows to iPad?

    Seeing 3.6 fps by USB and 30fps by WIFI if sending 100×100 byte frame.
    But at desired frame size 512 x 512, USB is < 1fps, and WIFI is ~6fps.

    Strange that WIFI is fa

    Windows app is Visual Studio 2010 C# with NetworkComms.net.
    iPad app is Xamarin Monotouch C# with NetworkComms.net.

    #1038
    Anonymous
    Inactive

    “Strange that WIFI is faster.”

    #1039
    Anonymous
    Inactive

    I am going to try one-way streaming using NetworkComms.Net’s “UDP BROADCAST” topic’s method to solve this problem.

    Also, I have moved this topic to STACKOVERFLOW.COM as:
    “NetworkComms.net very slow sending from Windows by USB to ipad”
    and will post my solutions, help, and tips there.

    #1043
    Anonymous
    Inactive

    Any performance issues when sending large amounts of data are generally caused because of the compression and serialisation methods being used. Please see the advanced send example included in the source which demonstrates how to disable compression for performance testing. If you are still having issues please post back.

    Kind regards,
    Marc

    #1047
    Anonymous
    Inactive

    Marc, how do I send a continuous stream of fixed size data? UDP or TCP?
    Which NetworkComms.net method? Is there example?

    I already connect across USB ok (through tunnel).
    Then need to start sending fixed size image frames from NetworkComms.net on Windows-7 to NetworkComms.net on iPad Xamarin Mono.
    Each frame is 2Mbits.

    It’s live video so there’s no time for synchronously awaiting reply.

    Thanks for a super product!

    #1048
    Anonymous
    Inactive

    Looks like TCP should stream, following AdvancedSend.cs example.
    Here’s my plan:

    Windows STREAMING SENDER:
    connectionToUse = TCPConnection.GetConnection(connectionInfo);
    connectionToUse.SendObject(“ArrayInt”, toSendObject);

    iPAD LISTENER:
    NetworkComms.AppendGlobalIncomingPacketHandler<int[]>(“ArrayInt”,…
    TCPConnection.StartListening
    (packet handler processes received frame)

    Thanks!

    #1050
    Anonymous
    Inactive

    You can stream using either UDP or TCP but the differences between the two protocols is important (http://www.diffen.com/difference/TCP_vs_UDP).

    Sounds like you are making progress.

    Kind regards,
    Marc

    #1051
    Anonymous
    Inactive

    Guess what the problem was?? I was running the Windows C# in the Visual Studio 2010 development environment. When I ran the C# .exe, I get 44Mbps throughput from Windows-7 through USB2.0 to iPad (ipad hardware is only USB2.0).

    And here’s the peperoni… (ancient Cheech & Chong allusion):

    // VISUAL STUDIO 2010 C# STREAMING TRANSMIT TO IPAD:

    for (; ; ) // thread’s exec loop
    {
    NetworkComms.SendObject(“Ultrasound Stream”, ultrasound_stream_sourceId, false, frame_to_iPad);
    }

    // IPAD STREAMING RECEIVER FROM WINDOWS:

    NetworkCommsDotNet.NetworkComms.AppendIncomingPacketHandler<byte[]>(“Ultrasound Stream”,
    (packetHeader, connection, incoming_bytes) =>
    {
    // your code that processes incoming_bytes goes here.
    }, false);

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.