Hi, I am using the ByteStreamFileSource as an example to implement frameread. But I noticed something fishy. I run the testOnDemandRTSPServer on one machine (montavista linux on DM355) and try to play it at the client side (Windows PC) using VLC
There was an initial delay , so i added some printfs to see what is happening. I added a printf in the file ByteStreamFileSource.cpp before the line FILE* fid = OpenInputFile(env, fileName); to see if the file is opened multipletimes to even be played once and the log fopen instance 1 Read Data fFrameSize 150000 Read Data fFrameSize 135519 Read Data fFrameSize 142284 Read Data fFrameSize 141502 Read Data fFrameSize 146454 Read Data fFrameSize 145149 Read Data fFrameSize 143908 Read Data fFrameSize 146148 Read Data fFrameSize 148311 Read Data fFrameSize 144188 Read Data fFrameSize 142923 Read Data fFrameSize 146860 Read Data fFrameSize 144253 Read Data fFrameSize 145276 Read Data fFrameSize 17033 fopen instance 2 Read Data fFrameSize 150000 Read Data fFrameSize 135519 Read Data fFrameSize 142284 Read Data fFrameSize 141502 Read Data fFrameSize 146454 Read Data fFrameSize 145149 Read Data fFrameSize 143908 Read Data fFrameSize 146148 Read Data fFrameSize 148311 Read Data fFrameSize 144188 Read Data fFrameSize 142923 Read Data fFrameSize 146860 Read Data fFrameSize 144253 Read Data fFrameSize 145276 Read Data fFrameSize 17033 As you can see the file is opened TWICE !!! But then if i try to play it any further it opens the file only once. Only at the first instance it does a complete file read !?! Is it a bug at the client end ? Ross Finlayson wrote: >> Hi, >> I am trying to understand and modify one of the testProgs - >> testOnDemandRTSP >> Below is how I understand the flow (pardon my lack of OOD understanding) >> >> testOnDemandRTSPServer -> ServerMediaSession -> >> MPEG4VideoFileServerMediaSubsession -> >> FileServerMediaSubsession-> ByteStreamFileSource >> >> Instead of using a file as an input source I would like to use the >> output of a "blocking function", which gives one output MPEG4 frame >> every call. This function captures a V4L2 frame from a capture device >> and encodes it into a MPEG4 frame. Which is the right point where I >> should insert this blocking function ? > > You should first write your own subclass of "FramedSource" that > encapsulates your capture device. (See "DeviceSource.cpp" for a model > of how to do this.) > > Then, you should write your own subclass of "ServerMediaSubsession" - > that uses your new 'capture device' class (instead of > "ByteStreamFileSource") - and use this in place of > "MPEG4VideoFileServerMediaSubsession". _______________________________________________ live-devel mailing list [email protected] http://lists.live555.com/mailman/listinfo/live-devel
