Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Audio Stream / Download

Qt Audio Stream / Download

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RuhigBrauner
    wrote on last edited by
    #1

    Hi,

    I would like to write some example applications to demonstrate how push and pull models in server client communication work and I thought streaming or downloading audio would be a cool example since you can spot the differences quite well.
    But sadly, networking is not my strengh so I would like to ask you, to help me come up with the general approach. ;)

    So I want to write 4 applications, one client server pair for audio streaming, one client server pair for "downloadin".

    The pull (download) apps should be easy when it comes to the concept:
    A client requests a .wav-file. The servers sends a chunk of the file and the client writes the chunk in a local copy and requests a new chunk. this repeats until the end of the file is reached.
    The reason I want to use this method is that the client also should start playing the samples after buffering for a while.
    Which protocol would you use and could you give me a sketch of what Qt classes I should use? I would like to let the s/c communication run on a higher level so I don't have to think about loosing samples and so on. ;)

    When it comes to the push / streaming example, I don't have any idea how to solve this. Which classes / protocols should I use and is it even possible to stream audio from a pc? (Lets say 10 clients are more than enough to demonstrate the concept. :) )

    I am sorry that I post such an generall queston here but I am new to Qt and don't have much experience with networking either. :( I hope you can help me!

    Thanks in advance!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The QtNetwork modules comes to mind and the related examples/demos you have in Qt's documentation should help you get started. As for the protocol, Tcp for the pull and Udp for the push. You have QTcpSocket and QUdpSocket that you can look at.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • R Offline
        R Offline
        RuhigBrauner
        wrote on last edited by
        #3

        Yes I already looked at the examples. (at least at some tcp ones)

        [quote author="SGaist" date="1399925707"]Hi,
        As for the protocol, Tcp for the pull and Udp for the push. You have QTcpSocket and QUdpSocket that you can look at.[/quote]

        It's not often that you get such a clear answer. Thanks. ;)
        Regarding UDP, do I have to manage lost packets or does Qt help me there already? I don't know if it is ok to just ignore lost packages and so on in an audio stream.

        But I still need to figure out, how the layout of the push exmaple should look like. ;)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved