[Live-devel] RE: stream a movie

Dixon Siu dixonsiu at mediaglue.co.jp
Wed Apr 21 11:19:03 PDT 2004


Hi,

>i want to stream MPEG1or2 movie for one time in the
>server hand and the client have to receive this movie
>and stop receiving after reception.
>what changes can be made in testMpeg1or2VideoStreamer
>and  testMpeg1or2Videoreceiver.

the following procedure is from the "testMPEG1or2VideoStreamer", you can
simply comment out the play() at the end of the procedure to prevent the
infinite recurrsive cycle.

void afterPlaying(void* /*clientData*/) {
  *env << "...done reading from file\n";

  Medium::close(videoSource);
#ifdef SOURCE_IS_PROGRAM_STREAM
  Medium::close(mpegDemux);
#endif
  // Note that this also closes the input file that this source read from.

#  play(); // Comment this line to play the video once
}
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.661 / Virus Database: 424 - Release Date: 2004/04/19



More information about the live-devel mailing list