×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    11

    Providing continuous network stream

    I am having problems with providing continuous streaming of data through a network socket.

    The data is provided via a video recorder sink (MCMRMediaSink::WriteBufferL()) and is passed to a network socket writer AO. If the writer is active the data is buffered to internal buffer. Buffers are flushed every time writer AO returns OK (RunL()).

    Problem is that the stream is not continuous. It gets interrupted by 7-10 frames and then the whole buffer gets flushed to the network. When buffers are empty (writer AO is finished) new stream of frames arrive again blocking the network for 7-10 frames.

    I enabled the TCP_NO_DELAY option on that socket, boosted socket writer AO priority to EPriorityHigh and still no change. I am sending packets which are no more than 1400 bytes in length.

    What could be done to make network flow continuous?
    Is there a way to lower the video recorder sink callback priority?
    Would UDP connection be any better?


    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    -> Async RSocket::Send(1400b)
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT


    CSocketWriter::RunL() ENTER
    -> Async RSocket::Send(1400b)
    CSocketWriter::RunL() EXIT

    CSocketWriter::RunL() ENTER
    -> Async RSocket::Send(1400b)
    CSocketWriter::RunL() EXIT

    CSocketWriter::RunL() ENTER
    -> Async RSocket::Send(1400b)
    CSocketWriter::RunL() EXIT

    CSocketWriter::RunL() ENTER
    -> Async RSocket::Send(777b)
    CSocketWriter::RunL() EXIT

    CSocketWriter::RunL() ENTER
    -> Buffer empty
    CSocketWriter::RunL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    -> Async RSocket::Send()
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT

    CRecorderSink::WriteBufferL() ENTER
    CSocketWriter::Enqueue() ENTER
    CSocketWriter::Enqueue() EXIT
    CRecorderSink::WriteBufferL() EXIT...

  2. #2
    Regular Contributor
    Join Date
    May 2003
    Posts
    471

    Re: Providing continuous network stream

    Tou can not stream using TCP!!!
    change to UDP and it will work like a charm

    Nahum

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    16

    Re: Providing continuous network stream

    Hi I'am tring to use MCMRMediaSink::WriteBufferL(). Data come from this function are audio and video frames data ?

    thanks

Similar Threads

  1. Network Band Info
    By nishantghai in forum Symbian
    Replies: 7
    Last Post: 2010-10-24, 12:51
  2. Continuous audio stream from http server?
    By khurshed79 in forum Symbian
    Replies: 1
    Last Post: 2006-09-29, 14:28
  3. Half Duplex Audio Streaming
    By subhrajyotisaha in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-05-25, 04:39
  4. Setting network names in C++ program.
    By molausso in forum Multimodecards
    Replies: 1
    Last Post: 2002-09-18, 05:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×