[Live-devel] FW: Convert H263 framed stream to.avi media file?

Mikhail Y. Bogunov, TXL Russia Mikhail.Y.Bogunov at techsell.ru
Wed Apr 20 17:29:07 PDT 2005


Hi! 
I Created my FrameSource subclass that reads my file in DeliverFrame
method which I call from the doGetNextFrame method (I used DeviceSource
class as a template)
I changed the code in AVIFileSink so it calls my FramedSource subclass.

In my test program I implemented the following calls:
1) create scheduler
2) create env
3) create dummy dsp string : 

sdpDescription ="v=0\no=mb 2890844526 2890842807 IN IP4
0.0.0.0\ns=test\nc=IN IP4 0.0.0.0/127\nt=2873397496
2873404696\na=recvonly\nm=video 49170 RTP/AVP 34";
  
4) create session
5) create AVIFileSink
6) startPlaying AVIFileSink
7) scheduler doEventLoop

But the program crashes after one time executing the doGetNextFrame. I
can't debug where in the code this happens. I checked my file I/O
routines, it is working. I think that I missed something in configuring
the classes. Do you have any Idea why it could happen? The output file
is being created, but it contains only the header like 

RIFF.....AVI.....hdrlavih8....LIST.....strlstrh8.....vidsH263....strf...
....H263....JUNK...

And then zero bytes
The file is about 4 k.

I was trying different ways of connecting and implementing my source
class but it's all the same. Maybe the problem is with the
AVISubsessionIOState class? What is it for?

Thank you!

/mike

-----Original Message-----
From: live-devel-bounces at ns.live.com
[mailto:live-devel-bounces at ns.live.com] On Behalf Of Ross Finlayson
Sent: Tuesday, April 19, 2005 7:02 PM
To: LIVE.COM Streaming Media - development & use
Subject: RE: [Live-devel] FW: Convert H263 framed stream to.avi media
file?


>So if I understand right, I need to:
>1) Create a subclass of FramedSource that will read my file frame by
frame
>2) Create a SDP description for passing it to MediaSession::createNew()

>and then I could link this session to AVIFileSink
>
>But how should I connect my subclass of FramedSource to the session?

You will need to modify (your copy of) the "AVIFileSink" code, in the 
places where it calls "subsession->readSource()".  In those places, it
will 
need to refer to your H.263 input stream object instead.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>

_______________________________________________
live-devel mailing list
live-devel at lists.live.com
http://lists.live.com/mailman/listinfo/live-devel



More information about the live-devel mailing list