You sir, ROCK!!!

LOL, can you send me the files so I can committ them?  I can help you flush out the rest of the details if you want;)

Wow, I'm really impressed man - that takes serious back bone to dive in like that!!

much appreciated

John

On 11/13/06, Storm <[EMAIL PROTECTED]> wrote:
Well, some good news for...me at least!  YEAH!

With that method above and just redirecting the new event to VideoConference.as i got it running, what i do is just calling videopool.subscribe from this new event and comment (I didn't want to destroy your work John ;) ) the code in the streamPublishStart server-side method because if you leave it as it is you'll have duplicates for users with cam.

Now it seems to work properly on new incoming clients into the conversation no matter they've got webcam or not. Now i have to test what happen with sound and that stuff but it is finally working!!!! Thanks Jhon for your help, try recode it if you have the time in fact you'll only have to change 5-6 lines of code (remember the doubleCheckTime thingy).

Cheers

Storm


On 11/13/06, Storm < [EMAIL PROTECTED]> wrote:
Back to bussiness.

It's being kinda hard since there are a lot of methods without comments in the online API, but i'm trying to redirect the notifications to new incoming connections instead of new Streams published, i plan on showing the picture for every connection and then let the "newStream" thing overwrite it afterwards if needed. For now i'm catching the new connections porperly with this code in the server side:

public boolean appConnect(IConnection conn, Object[] params) {
        IServiceCapableConnection service = (IServiceCapableConnection) conn;
        log.info("Client connected " + conn.getClient().getId() + " conn "
                + conn);
        log.info("Setting stream id: " + getClients().size()); // just a unique number
        service.invoke("setId", new Object[] { conn.getClient().getId() },this);
               
        //added by Carlos 13/11/2006
       
        Iterator<IConnection> it = scope.getConnections();
        while (it.hasNext()) {
            IConnection conn2 = it.next();
            if (conn2.equals(conn)) {
                // Don't notify current client
                continue;
            }if (conn2 instanceof IServiceCapableConnection) {
                ((IServiceCapableConnection) conn2).invoke("nuevaConexion",new Object[]{ conn.getClient().getId()}, this);
                log.debug("invocado nuevaConexión!!!!! " + conn2);
            }
        }
       
       
        return true;
    }

and then i've created a nuevaConexion function client-side. I'm tracing it and works properly, now i "only" have to deal with the logic needed to make this useful in the client... time to learn some more ActionScript i suppose lol.
To do thigs as i've thought i'll have to get the video container recently assigned in my new method to overwrite it with the video stream if the user finally have a cam...

Comments and help appreciated!!

On 11/10/06, John Grden < [EMAIL PROTECTED]> wrote:
Sounds good, if I get the time, I'll take a crack at it ;)


On 11/10/06, Storm < [EMAIL PROTECTED]> wrote:
yeah, it make sense, and that's what i've been trying to do today but i haven't found how! i've learned some goodies about Red5, but not the goodie i was looking for xD

John, i don't have red5 installed at home so till monday i won't be able to see my modified code but please keep me informed in this thread about what you get, and if i can help you with anything just let me know. If you come to me with some running code i can "comment it for dummies" so it could be a sort of documentation for someone to know how a not-too-simple application works. What do you think?

Cheers

Carlos


On 11/10/06, Chris Allen < [EMAIL PROTECTED]> wrote:
That makes sense to me John. It will be great to have this one up and
running again.

On 11/10/06, John Grden < [EMAIL PROTECTED]> wrote:
> I really think we'll have to rely on a new connection method rather than the
> netStream to notify everyone.  I think if we re-route that portion of the
> app, we can have it up and running.
>
> Make sense?
>
> one of the sample apps has a demo of how to do a new client notification -
> i'll see if I can dig it up and create a new app that we can connect to for
> the VideoConference app.
>
>
> On 11/10/06, Storm < [EMAIL PROTECTED] > wrote:
> > I'm pretty lost right now.
> > Please read through and correct me if i'm wrong:
> >
> > 1. streamPublishStart method on server-side is called when someone do
> stream.publish on client-side (in this case at method onSetID inside
> broadcaster.as)
> >
> > 2. no-cam users reach that line as well as cam users
> >
> > 3. there's no "streamPublishStart" invocation for no-cam users :(
> >
> > The reasoning is right, there SHOULD be an execution of that method
> everytime anyone connects, so either i've missunderstood how it works or
> something doesn't work properly or stream.publish does something annoying
> when called by no-cam users.
> >
> > any takers? John? Mr. Tanembaum?
> >
> > Yours
> >
> > Carlos
> >
> >
> >
> > On 11/10/06, Storm <[EMAIL PROTECTED] > wrote:
> > > Ok, i've just understood how that "streamPublichStart" works (i've been
> surfing the API). But i'm quite stuck now. Subscribers are nicely notified
> of incoming clients through the invoke of "newStream" in that method but now
> it's obvious for me that it won't be called when no-cam users connect. That
> newStream event ends calling Subscribe.subscribe at client side, method that
> YES, manage clients w/o cam by setting the _noStream.visible=true.
> > > So i've thought about creating a fake "newStream" event somewhere, but
> it won't work 'cause for cam users it would be invoked twice. What to do????
> I wonder if i can fake a stream for no-cam users so they would generate the
> desidered streamPublishStart call...
> > >
> > > By the glory of the super cow powers, help a poor guy! ;) It'd be great
> having a perfectly-working videoconf. demo for 0.6RC2 wouldn't it? ;)
> > >
> > > Cheers
> > >
> > >
> > > Carlos
> > >
> > >
> > > On 11/9/06, Storm < [EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > > On 11/9/06, John Grden < [EMAIL PROTECTED] > wrote:
> > > > > first, excellent work on following that crazy code of mine ;)  i'm
> impressed!
> > > >
> > > >
> > > > Thanks John, it has been kinda hard since  that has been the first  AS
>  code i've ever read, but you gotta do what you gotta do ;)
> > > >
> > > >
> > > > > second - yeah it's all coming back to me now!  Instead of dealing
> with it at the new stream notification, we need to do it at the connection
> level - when someone connects, that's when everyone is notified.  Then we
> need to match up that user's stream with their ID, and bam, I think we're in
> business.
> > > >
> > > >
> > > > Will try something in that line tomorrow (i'm in Spain, it's  21:02
> now and i'm at home) but there's something i want to ask you. Where are the
> calls to "streamPublishStart" method generated? because i cannot see any,
> idk if i'm mising some AS archive somewhere or if i'm missundertanding how a
> Red5 app works (that's pretty possible since i have only fuzzy idea).
> > > > If you were so kind to find out that for me i'd be able to sleep
> tonight without having nightmares with magically called methods lol.
> > > >
> > > > Thanks a bunch:
> > > >
> > > > Carlos
> > > >
> > > >
> > > >
> > > > >
> > > > >
> > > > > On 11/9/06, Storm < [EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Ok, let's see if i can put together what i got and where i am:
> > > > > >
> > > > > > At the begining when clients connected they randomly could see
> each other or they couldn't. Browsing the client code i found this at
> Suscriber.as
> > > > > >
> > > > > > private function doubleCheckTime():Void
> > > > > >     {
> > > > > >         clearInterval(si);
> > > > > >         if(checkTime == stream.time){
> > > > > >
> > > > > >             reset();
> > > > > >         }
> > > > > >     }
> > > > > >
> > > > > > I noticed that new clients cleared incoming streams through this,
> so i just commented the clear(); call and then that never happens again :)
> > > > > > Now clients that owns cams are working ok, but already connected
> users cannot see the noStream picture of any new client tho newer ones will
> see the pics for the already connected no-cam users (this shows that the
> list of clients is working properly, the problem is the notification of
> incoming users WITHOUT cam).
> > > > > > So...i left the client side for a while and started to have a look
> at the server Application.class (you didn't break your head to name this did
> you? lol j/k).
> > > > > > I was trying to see where the "newStream" calls are generated and
> it's here:
> > > > > >
> > > > > > public void streamPublishStart(IBroadcastStream
> stream) {
> > > > > >         // Notify all the clients that the stream had been started
> > > > > >         log.debug("stream broadcast starts: " +
> stream.getPublishedName ());
> > > > > >         IConnection current = Red5.getConnectionLocal();
> > > > > >         Iterator<IConnection> it = scope.getConnections();
> > > > > >         while (it.hasNext()) {
> > > > > >             IConnection conn = it.next();
> > > > > >             if ( conn.equals(current)) {
> > > > > >                 // Don't notify current client
> > > > > >                 continue;
> > > > > >             }if (conn instanceof IServiceCapableConnection) {
> > > > > >                 ((IServiceCapableConnection)
> conn).invoke("newStream",
> > > > > >                         new Object[] { stream.getPublishedName()
> }, this);
> > > > > >                 log.debug("sending notification to " + conn);
> > > > > >             }
> > > > > >         }
> > > > > >     }
> > > > > >
> > > > > > When an user without webcam connects this method is not called
> (i've seen that following the logs step by step) so the current clients
> aren't notified of his/her arrive to the conversation.
> > > > > >
> > > > > > Now that i (think that) know what happens ... how fix it? I hope
> someone colud help me...
> > > > > >
> > > > > > Cheers
> > > > > >
> > > > > > Carlos
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> -------------------------------------------------------------------
> > > > > > "Nos gusta los domingos ir al parque a pinchar los globos de los
> niños para verlos llorar" .- Eskorbuto
> > > > > > _______________________________________________
> > > > > > Red5 mailing list
> > > > > > [email protected]
> > > > > >
> http://osflash.org/mailman/listinfo/red5_osflash.org
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > [  JPG  ]
> > > > > _______________________________________________
> > > > > Red5 mailing list
> > > > > [email protected]
> > > > >
> http://osflash.org/mailman/listinfo/red5_osflash.org
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> -------------------------------------------------------------------
> > > >
> > > > "Nos gusta los domingos ir al parque a pinchar los globos de los niños
> para verlos llorar" .- Eskorbuto
> > >
> > >
> > >
> > > --
> > >
> -------------------------------------------------------------------
> > >
> > > "Nos gusta los domingos ir al parque a pinchar los globos de los niños
> para verlos llorar" .- Eskorbuto
> >
> >
> >
> > --
> >
> -------------------------------------------------------------------
> >
> > "Nos gusta los domingos ir al parque a pinchar los globos de los niños
> para verlos llorar" .- Eskorbuto
> > _______________________________________________
> > Red5 mailing list
> > [email protected]
> > http://osflash.org/mailman/listinfo/red5_osflash.org
> >
> >
> >
>
>
>
> --
> [  JPG  ]
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
>

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org



--

-------------------------------------------------------------------
"Nos gusta los domingos ir al parque a pinchar los globos de los niños para verlos llorar" .- Eskorbuto

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org





--
[  JPG  ]

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org





--
-------------------------------------------------------------------
"Nos gusta los domingos ir al parque a pinchar los globos de los niños para verlos llorar" .- Eskorbuto



--

-------------------------------------------------------------------
"Nos gusta los domingos ir al parque a pinchar los globos de los niños para verlos llorar" .- Eskorbuto

_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org





--
[  JPG  ]
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to