Skip to main content
Participating Frequently
April 27, 2011
Question

Bug: Playing a Multicast stream before published,when published->NetStream.Publish.BadName

  • April 27, 2011
  • 1 reply
  • 1214 views

1.- If I try to play a pure ip multicast stream before is published. I receive the next events from NetConnection and NetStream objects. It's normal until this moment:

NetConnection.Connect.Success

NetStream.Connect.Success

NetStream.Play.Reset

NetStream.Play.Start

2.- Then when I publish the stream on the group that this netstream is trying to play, I receive the next events

NetStream.MulticastStream.Reset

NetStream.Publish.BadName

NetStream.Connect.Closed

NetConnection.Connect.Closed

a) Why I receive a NetStream.Publish.BadName event??? It's incorrect at that moment, nobody is trying to publish a stream with the same name, I'm only trying to read it! I think this is a bug, and It should work as unicast streaming: If a netstream is waiting for a stream, when the stream is published, the streamimng begins.

b) So, trying to avoid that bug, I would like to know from the FMS when the multicast stream is succesfully published. So, I found the point in the multicast main.asc, where the multicast publication is already done, so, I do a callback there, and I try to start the netstream just at that moment

function netStreamStatusHandler(info)

(...)

case "NetStream.Publish.Start":

            streamContext.state = STATE_REPUBLISHING; // Actively republishing to multicast.

But at that moment, I receive the same errors than before:

NetStream.MulticastStream.Reset

NetStream.Publish.BadName

NetStream.Connect.Closed

NetConnection.Connect.Closed

So, that state is not updated in the correct moment. That's a second bug.
c) It would be posible to know either in the FMS application or in the client when the stream that I'm waiting for is properly published???
Thank you very much,
Iván

    This topic has been closed for replies.

    1 reply

    Nikhil_Kalyan
    Participating Frequently
    April 27, 2011

    Hi,


    Thanks for trying out multicast on FMS !


    From the first look at your problem (and hence might as well be wrong), did you make two NetStream objects, one for the subscriber and one for the publisher for the multicast streams ? Seeing the log statements you posted, we only have one NetStream.Connect.Success. I would ideally expect the other netstream also to be initalized and connected and try to publish. If i am correct, since you tried to do publish and subscribe on the same netstream, you got the publish.badname.

    And this behavior will be the same on unicast as well if we try to do this on one single netstream.


    Can you please confirm if this is correct ?

    Thank you !

    ivangetaAuthor
    Participating Frequently
    April 27, 2011

    Thank you Nikhil for your very fast response.

    First, I'm not doing the publication and the playback with the same netconnection, but It's a very particular case. I explain it to you:  Instead of publishing on the FMS multicast application pushing the stream, I modified the multicast script for pulling a live stream from outside and publishing it as response to the first onConnect, in the same FMS application. In detail:

    1.- The custom multicast fms application receive the first user connected.

    2.- As response to that, the fms application request an external live stream, using a NetConnection to the Remote Source.

    3.- Then, I publish in multicast that remote source on the fms.

    4.- Until this point, It works properly, if I try to play that new multicast stream afterwards, It works properly, It's properly published in mutlicast.

    5.- The problem arrives, when, automatically, for this first user, I try to connect the NetStream to the new multicast publication, just after the multicast publication is done.

    6.- I don't start the netstream until the multicast publication is already done. Trying to avoid the error that I told before.

    7.- So, I wait for the fms finish publishing the new multicast. So I found the point when that occurs in the multicast application code.

    function netStreamStatusHandler(info)

    (...)

    case "NetStream.Publish.Start":

                streamContext.state = STATE_REPUBLISHING; // Actively republishing to multicast.

    8.- So, then, I create the netstream and try to play the multicast stream. And exactly then, I receive this error:

    NetStream.MulticastStream.Reset

    NetStream.Publish.BadName

    NetStream.Connect.Closed

    9.- But If I try to open  a new netstream (in the same netconnection) afterwards, It works properly. So that's the reason I arrived to the conclusion that I explained to you  in the first email: If you try to play a multicast stream before you publish it (from anohter different connection)  when it's published, you receive this BadName event.

    Thank you Nikhil,

    Iván

    Nikhil_Kalyan
    Participating Frequently
    April 27, 2011

    P.S. : i have little edited my previous resonse , i was mistaken for net stream and net connection and mentioned wrongly that you cannot have two streams on the same net connection. so, please do make sure you dont have a wrong understanding

    I try to put what you wrote in my understanding

    multicast app : m1

    remote app : r1

    subscriber net stream : s1

    publisher net stream : p1

    1. NetConnection success to m1.

    2 and 3. on Netconnection.connect.success  - connection to r1 . for this connect success, you will play a netstream (i guess its rtmp ) and re-publish it to rtmfp on the IP multicast. Is that correct ? and for this you will get netstream.play (for the remote rtmp stream) and netstream.connect.success and netstream.publish.start and netstream.multicastpublish.notify for the rtmfp publishing. I hope this is ur second step. this is p1 (rtmfp p1)

    4. you will subscribe to this stream ? How are you subscribing? Did you say its pure IP multicast ? or are you using fusion ?

    5. from here on , i got little confused.

    Can you share the code or , if you prefer , we can take this offline for a while and see if we can discuss a little. let me know . i am available @ npkalyan@adobe.com

    Thank you !