gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] RTMP NetStream Patch


From: Sandro Santilli
Subject: Re: [Gnash-dev] RTMP NetStream Patch
Date: Wed, 19 Jun 2013 10:42:23 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jun 19, 2013 at 12:29:43AM +0530, George Thomas wrote:
> On Tue, Jun 18, 2013 at 6:40 PM, Sandro Santilli <...> wrote:
> > On Tue, Jun 18, 2013 at 06:33:38PM +0530, George Thomas wrote:
> >> Hi,
> >>
> >> I was able to get a streaming red5 server applying the patch I have
> >> attached. I used the oflademo test case to get this done from red5.
> >>
> >> oflademo.as has been added to do the testing.
> >>
> >> I am unaware of how to proceed from this position to make the
> >> streaming proper. Wanted to write a test case to test it properly
> >> using the video object but was not able to get  the test case which
> >> works as a player using makeswf. Was able to hear sound in the process
> >> but not video even in case of local streaming. Could someone help me
> >> on this ?
> >
> > First of all: did you test the testcase against the proprietary player ?
> >
> 
> Yeah I did and watched the wireshark outputs. Gnash previously did not have
> createstream and play packets sent. I added a bit of code so that
> those gets sent.
> 
> > The NetStream class expects NetConnection to provide an IOChannel as input
> > stream. I don't know if this is applicable to RTMP streams. There are many
> > debugging lines in the NetStream.cpp file, running the test with verbosity
> > level 2 should give you more info.
> >
> 
> Looking at the logs the same is happening.
> 
> 2826:1] 441 FUNCTION: PASSED: RTMP connection - status Success
> 2826:1] 441 DEBUG: Loading native class NetStream
> 2826:1] 441 DEBUG: Calling remote method createStream
> 2826:1] 442 FUNCTION: In Run test
> 2826:1] 442 FUNCTION: Running test1
> 2826:1] 442 FUNCTION: NetStream contents
> 2826:1] 442 DEBUG: Calling remote method play
> 2826:1] 443 DEBUG: detachAuxStreamer called while not attached
> 2826:1] 443 SECURITY: Connecting to movie: hobbit_vp6
> 2826:1] 443 SECURITY: Checking security of URL
> 'file:///home/george/work/bldGnash/testsuite/misc-ming.all/hobbit_vp6'
> 2826:1] 444 SECURITY: Load of file
> /home/george/work/bldGnash/testsuite/misc-ming.all/hobbit_vp6 granted
> (under local sandbox
> /home/george/work/bldGnash/testsuite/misc-ming.all/)
> 2826:1] 444 ERROR: Could not open file
> /home/george/work/bldGnash/testsuite/misc-ming.all/hobbit_vp6: No such
> file or directory
> 2826:1] 444 ERROR: Gnash could not get stream 'hobbit_vp6' from NetConnection
> 2826:1] 445 ERROR: NetStream.play(hobbit_vp6): failed starting playback
> 2826:1] 459 DEBUG: Received <invoke packet>

You can see that Gnash tries to load the "hobbit_vp6" as a file,
it shouldn't happen, right ? 

> After this the video packets come from the server which it unaware of.
> 
> 2826:1] 796 DEBUG: Received <metadata packet>
> 2826:1] 807 DEBUG: Received <audio packet>
> 2826:1] 827 ERROR: Incomplete packet received on channel 21
> 2826:1] 827 ERROR: Incomplete packet received on channel 21
> 2826:1] 827 ERROR: Incomplete packet received on channel 21
> 2826:1] 827 ERROR: Incomplete packet received on channel 21
> 2826:1] 827 ERROR: Incomplete packet received on channel 21
> 2826:1] 837 ERROR: Incomplete packet received on channel 21
> 2826:1] 837 ERROR: Incomplete packet received on channel 21
> 2826:1] 837 ERROR: Incomplete packet received on channel 21
> 2826:1] 837 ERROR: Incomplete packet received on channel 21
> 2826:1] 837 ERROR: Incomplete packet received on channel 21

I guess these ones come from the RTMP class itself, correct ?

> To understand how streaming works, I tried writing a small player
> using the video
> object and makeswf but couldn't build a player which renders http or
> local file. My idea was
> to use http as a reference to understand the code flow and then to
> mock the same for
> RTMP.

I'm afraid makeswf isn't enough to build a video player as you needed
a DefineVideo tag last time I tried this. See NetStream-SquareTest.c
for a working example.

> var videoObj = new Video();
> ncrtmp = new NetConnection();
> ncrtmp.connect(null);
> netStream = new NetStream (ncrtmp);
> videoObj.attachVideo(netStream);
> netStream.setBufferTime (3);
> netStream.play ("hobbit_vp6.flv");
> 
> I was unable to compile this and make a test case to eveluate how the
> streams gets created for video for both gnash and proprietary player.
> Are there restrictions with makeswf to get this done or a lot is to be done
> to get this done in actionscript?

Maybe you can try an hack of using createEmptyMovieClip to place
a display object on the stage and use attachVideo against that one,
but even if you get it working with the proprietary player it might
still not work with Gnash due to stricter typing. Better to do it
the "saner" way for a start.

--strk;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]