play a stream

Hi,i have the following problem:

My computer(client)is connected to a server using a socket.The server sends an avi stream through the socket.How can the client play this avi stream....without saving it on the harddisk

Any ideas....sample codes....anything.Thanks



Answer this question

play a stream

  • Jim Swarr

    The fact is i don't understand. I can read from a file....i can read from a device....but i still don't get it how to read from a network stream. Just give me a sample code....and i promise i woun't bother you anymore.
  • Nani

    It sounds very useful.it would be nice if the filter would be in C#...because that is what i am using.Anyway...thanks a lot!!!
  • RobertW

    If nothing else shows up, I may have a sample that would work for you. The filter is in c++, but the code that shows how to use it is in c#. If I get a chance I'll whip together something for c++ tonight.

    In essence, the filter gets its mediatype from the application, then does callbacks to the application which populates the samples. It only supports one output pin, but it sounds like that's all you need.

    Sound useful


  • Filip Langerock

    Hi Gheatza,

    Have you got success on your project

    I'm having a similar problem, but my project needs to play a audio that is in a server and it has a non default wave format.
    I have found a sample in the following link that it has some interesting code to me, but I don't know if it will be help to you (it is using a stream to play a wave from winmm.dll; win multi-media dll):
    link: http://www.csharp-home.com/index/tiki-read_article.php articleId=110

    Please, let me know if you have other solution and if you can send it to me.

    Thanks in advance, Ajr



  • CarolJ

    This filter doesn't read from a socket. You are going to have to read them yourself.

    After you have the samples, you can feed them into the filter graph by populating the IMediaSample that is passed to the SampleCallback method.


  • DaveOnSEN

    I looke at your code.....i red a lot of documentation on msdn,but i still dont'g get it,how in the world can i create a filter that reads a socket stream and puts it on the screen.

    MSDN explications are sooooooo mixed up


  • virnoche

    You'll need to write a source filter to read the data from the socket and deliver it to the decoder filters. You'll probably want a push-mode source filter (modelled on something like the ball sample), that splits the audio and video and delivers them to the decoders on separate output streams.

    G


  • Guido Pica MSFT

    But do you have a sample code.....or any example,because i am new at this chapter so it is kind of difficult for me :D
  • thaoula

    This sample is going to be part of DirectShowLib (from http://DirectShowNet.SourceForge.net). We're still a couple of days away from our next release. If you'd like a pre-release copy with the c++ source for the filter, a release build of the filter, c# code showing how to use it, and a huge readme, it can be found at http://www.LimeGreenSocks.com/DShow/GSSF.zip

    If you find it useful (or if you don't), I would be grateful for an email letting me know how it went.


  • play a stream