How  to automatically alter  rtmp /rtmfp  connections

Hi ,there!   I'm developing  a real-time game project . First , i wanna  use rmtfp  to do the video/audio communication so that i can save a lot bandwidth . when  A scrible B  and publish Astream, and B scrible A and publish Bstream.  how do i know if they(A and B) are connected,then give them both a hint ? if connected .,then how do i know the delay status between them ? if the delay latency is more than 5 seconds, then i 'll think about using rtmp to connect. Any one can help ?

private function netConnectionHandler(event:NetStatusEvent):void
    status("NetConnection event: " + event.info.code + "\n");
             switch (event.info.code)
                 case "NetConnection.Connect.Success":
                  connectSuccess();
                     break;
                    case "NetConnection.Connect.Closed":
                     currentState = LoginNotConnected;
                     break;
                    case "NetStream.Connect.Success":
                     // we get this when other party connects to our outgoing stream
                     status("Connection from: " + event.info.stream.farID + "\n");
                     break;
                    case "NetConnection.Connect.Failed":
                     status("Unable to connect to " + connectUrl + "\n");
                   // swift the rtmp mode
                   changeRTMP();
                     currentState = LoginNotConnected;
                     break;
private function connectSuccess():void
    status("Connected, my ID: " + netConnection.nearID + "\n");
                // exchange peer id using web service
    idManager = new HttpIdManager();
    idManager.service = WebServiceUrl;
               idManager.addEventListener("registerSuccess", idManagerEvent);
               idManager.addEventListener("registerFailure", idManagerEvent);
               idManager.addEventListener("lookupFailure", idManagerEvent);
               idManager.addEventListener("lookupSuccess", idManagerEvent);
               idManager.addEventListener("idManagerError", idManagerEvent);
               idManager.register(userNameInput.text, netConnection.nearID);
private function changeRTMP(){
when the case    NetConnection.Connect.Failed    i could change to rtmp mode ,but if  NetConnection.Connect.Success .  how do i know the delay seconds between A and B . then i can find the optimun way (rtmp/rtmfp

Similar Messages

  • How to automatically change rtmp /rtmfp

    Hi ,there! I'm developing a real-time game project . First , i wanna use rmtfp to do the video/audio communication so that i can save a lot bandwidth .
    when A scrible B and publish Astream, and B scrible A and publish Bstream.
    how do i know if they(A and B) are connected,then give them both a hint ?
    if connected .,then how do i know the delay status between them ?
    if the delay latency is more than 5 seconds, then i 'll think about using rtmp to connect. Any one can help ?
    private function netConnectionHandler(event:NetStatusEvent):void
    status("NetConnection event: " + event.info.code + "\n");
    switch (event.info.code)
    case "NetConnection.Connect.Success":
    connectSuccess();
    break;
    case "NetConnection.Connect.Closed":
    currentState = LoginNotConnected;
    break;
    case "NetStream.Connect.Success":
    // we get this when other party connects to our outgoing stream
    status("Connection from: " + event.info.stream.farID + "\n");
    break;
    case "NetConnection.Connect.Failed":
    status("Unable to connect to " + connectUrl + "\n");
    // swift the rtmp mode
    changeRTMP();
    currentState = LoginNotConnected;
    break;
    private function connectSuccess():void
    status("Connected, my ID: " + netConnection.nearID + "\n");
    // exchange peer id using web service
    idManager = new HttpIdManager();
    idManager.service = WebServiceUrl;
    idManager.addEventListener("registerSuccess", idManagerEvent);
    idManager.addEventListener("registerFailure", idManagerEvent);
    idManager.addEventListener("lookupFailure", idManagerEvent);
    idManager.addEventListener("lookupSuccess", idManagerEvent);
    idManager.addEventListener("idManagerError", idManagerEvent);
    idManager.register(userNameInput.text, netConnection.nearID);
    private function changeRTMP(){
    when the case NetConnection.Connect.Failed i could change to rtmp mode ,but if NetConnection.Connect.Success . how do i know the delay seconds between A and B . then i can find the optimun way (rtmp/rtmfp

    Hi ,there! I'm developing a real-time game project . First , i wanna use rmtfp to do the video/audio communication so that i can save a lot bandwidth .
    when A scrible B and publish Astream, and B scrible A and publish Bstream.
    how do i know if they(A and B) are connected,then give them both a hint ?
    if connected .,then how do i know the delay status between them ?
    if the delay latency is more than 5 seconds, then i 'll think about using rtmp to connect. Any one can help ?
    private function netConnectionHandler(event:NetStatusEvent):void
    status("NetConnection event: " + event.info.code + "\n");
    switch (event.info.code)
    case "NetConnection.Connect.Success":
    connectSuccess();
    break;
    case "NetConnection.Connect.Closed":
    currentState = LoginNotConnected;
    break;
    case "NetStream.Connect.Success":
    // we get this when other party connects to our outgoing stream
    status("Connection from: " + event.info.stream.farID + "\n");
    break;
    case "NetConnection.Connect.Failed":
    status("Unable to connect to " + connectUrl + "\n");
    // swift the rtmp mode
    changeRTMP();
    currentState = LoginNotConnected;
    break;
    private function connectSuccess():void
    status("Connected, my ID: " + netConnection.nearID + "\n");
    // exchange peer id using web service
    idManager = new HttpIdManager();
    idManager.service = WebServiceUrl;
    idManager.addEventListener("registerSuccess", idManagerEvent);
    idManager.addEventListener("registerFailure", idManagerEvent);
    idManager.addEventListener("lookupFailure", idManagerEvent);
    idManager.addEventListener("lookupSuccess", idManagerEvent);
    idManager.addEventListener("idManagerError", idManagerEvent);
    idManager.register(userNameInput.text, netConnection.nearID);
    private function changeRTMP(){
    when the case NetConnection.Connect.Failed i could change to rtmp mode ,but if NetConnection.Connect.Success . how do i know the delay seconds between A and B . then i can find the optimun way (rtmp/rtmfp

  • How to automatically get a call connected to ear phones?

    I own an iphone4 with ios6.0.1. I've a Samsung HM1100 ear phone.  I've enabled Bluetooth on my iPhone and it gets connected immediately when my Bluetooth enabled which is very good. Now when I receive a call, my iPhone as well rings and never auto connects to ear phone. Normally if its an earphone or headset then it should auto connect the call, how to achieve the same? Please let me know, thanks.

    Press the on/off button once to silence the call and twice to reject it and send to voicemail.

  • How do i stop iPhoto from automatically opening when I connect my iPhone?

    Hi, well as the title states:
    How do i stop iPhoto from automatically opening when I connect my iPhone?
    It's getting on my nerves...
    Thanks.

    This might also be helpful:
    I wrote an AppleScript that asks me each time I connect the iPhone/camera/etc whether or not I want to open iPhoto. Usually I just hit return and it doesn't open, but once in a while I'll click Yes to open iPhoto and import videos from my phone. I just did it because it's nice to have a little reminder so I don't go for too too long without importing, but not have it slow things down each time I plug in.
    Below is the script. Paste it into AppleScript Editor, then export it as an application. Then set Image Capture to open this app when you plug in your phone. Would love to hear if it's helpful for you or if you modify it to use other criteria to automatically import only at certain times or conditions.
    Nathan
    set question to display dialog "Open iPhoto to import photos?" buttons {"Yes", "No"} default button 2
    set answer to button returned of question
    if answer is equal to "Yes" then
              tell application "iPhoto" to activate
    end if

  • How do I set up my iPhone 4s to sync automatically to iTunes when connected to my iMac via USB?

        How do I set up my iPhone 4s to sync automatically to iTunes when connected to my iMac via USB?  Currently it only syncs when I manually click on sync.
        Somehow I do have my 5th gen. iPod set up to sync automatically with the same iTunes / computer.  But I do not actually see a checkbox for either device.
        (yes, the 'prevent devices from automatically syncing' is unchecked)
    thank you!

    Turn off mobile data?
    Talk to your carrier about the usage increase.
    Googling provides many tips- https://www.google.com/search?q=reduce+iPhone+data+usage&ie=utf-8&oe=utf-8

  • How to "Open iTunes automatically when iPod is connected"....

    ...without having them sync automatically?  I'm able to do this on my MBP just fine.  The solution on my MBP is to uncheck "prevent ipods, ipads, iphones from syncing automatically" under Devices Preferences.  Then I'm able to check "Open iTunes when Ipod is connected" under my iPod's Summary Options.  After that i can then go back a uncheck "prevents Ip.... from syncing automatically". 
    Unfortunately, this option doesn't seem to be available to Windows users.  or is it?
    Thanks,
    Mike

    this will solve half of my issue while coincidentally causing the other half of it. 
    I want to be able to:
    Open iTunes automatically when iPod is connected
    AND
    Prevent my ipod from syncing automatically *(when this is enabled the prior feature becomes disabled)

  • FMS RTMFP connection failure

    I am testing an FMS 4.5 server with an application I already have running on FMS 4.0.
    On FMS 4.0, both RTMP and RTMFP connections work fine.
    On FMS 4.5, only RTMP connections work. RTMFP connections get TCP reset responses. This means the FMS application does not receive any notice of the incoming connection.
    This is with the firewall turned off. Both FMS are on public IP addresses, so there are no NAT issues.  Both servers are running Windows 2008R2.
    Does anyone have any idea how to fix this or what might cause this?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
    SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
    View ▹ Show Log List
    from the menu bar at the top of the screen.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.

  • How many devices can I have connected to one iTunes account?

    How many devices can I have connected to one iTunes account?

    If you mean authorized computers, five.
    If you mean devices associated with iTunes Match or automatic downloads, ten.
    If you mean devices synced with a single iTunes library, there’s no limit.
    (108873)

  • How to automatically detect server ip address

    does any one know how to automatically detect an ip address of a server from the client with a socket based connection ?
    instead of prompting the client to connect to the server ip address which is trouble some.

    You must start with some initial information and a known environment.
    There are several possibilities after that.
    - The server has a 'name'. This is not an ip address but a name like "yahoo.com". When you connect using that, even if the IP changes, the correct IP will be returned. (At least ignoring an annoying bug in some VMs)
    - A specific IP address
    - Use a methodoly to 'request' a server address. One version of this is to use a UDP broadcast another version uses a service manager (which itself must be found.)

  • How to automate the exchange rates in BI

    Hi Guys
    can any one let me know the step by step approach of how to automate the exchange rates in BI...I know that if we right click in source system and say transfer exchange rates ..we will get those values ....But I want to automate this process in BI with a Process chain...I have created a start variant and connected it to a ABAP process type and calling the RSIMPCURR programm in sync..local....Do I need to call any Program event ? Iam not able automate this..please advice step by stepp
    After ABAP process type do I need to create any other steps ?
    regards

    Hi,
    All you have to do is to define the ABAP Process as new process variant, call mode syncronous, called from local, program name RSIMPCURR, and define a program variant for example number 12 and create it, there you select the update exchange rates., go to attributes, give a meaning and save all. You can automate the start of the porocess chain and select it as period job.
    Regards
    MK

  • How to automate the data flow to content servers?

    We have ECC connected to CS. Could you help tell how to automate the data flow into the CS? Thanks a lot!

    What do you use the Content Server for? If its for archiving you need to run the STORE job to send the data to the CS.
    I can't see a reason to automate that process
    Regards
    Juan

  • How to automatically create the custom migration scripts after recreating SSMA project?

    How to automatically create the custom data migration scripts after recreating SSMA project?
    There is number of tables ( big tables with BLOBS)  which I want to set up automatically to be migrated with custom migration scripts (replacing e.g. attribute named "FILE" with "TO_BLOB('') AS FILE" ).
    So the question is how to open MB file (I think that it should be standard db of some destktop RDBMS) ? 

    Hi Roman.Pokrovskij,
    According
    to your description, we can use SSMA tool to migrate data from one database (including Access, Oracle and so on) to SQL Server via GUI or the scripts. There is an example about migrating Access database to SQL Server via the
    custom migration scripts, you can review refer to them.
    <?xml version="1.0" encoding="utf-8"?>
    <ssma-script-file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Microsoft SQL Server Migration Assistant for Access\Schemas\A2SSConsoleScriptSchema.xsd">
    <config>
    <output-providers>
    <output-window suppress-messages="false"
    destination="stdout"/>
    <upgrade-project action="yes"/>
    <data-migration-connection source-use-last-used="true"
    target-server="target_1"/>
    <progress-reporting enable="false"
    report-messages="false"
    report-progress="off"/>
    <object-overwrite action="skip" />
    </output-providers>
    </config>
    <servers>
    <!-- Server definition for Sql server target server-->
    <sql-server name="target_1">
    <sql-server-authentication>
    <server value="$SQLServerName$"/>
    <database value="$SQLServerDb$"/>
    <user-id value="$SQLServerUsrID$"/>
    <password value="$SQLServerPassword$"/>
    <encrypt value="true"/>
    <trust-server-certificate value="true"/>
    </sql-server-authentication>
    </sql-server>
    </servers>
    <script-commands>
    <create-new-project project-folder="$project_folder$ "
    project-name="$project_name$"
    overwrite-if-exists="true"/>
    <connect-target-database server="target_1"/>
    <load-access-database database-file="$AccessDbFolder$\$AccessDatabaseFile$"/>---
    <!--Schema Mapping-->
    <map-schema source-schema="$AccessDatabase$" sql-server-schema="$SQLServerDb$.dbo" />
    <!-- Convert schema -->
    <!-- Example: Convert entire Schema (with all attributes)-->
    <convert-schema object-name="$AccessDatabase$"
    object-type="Databases"
    conversion-report-overwrite="true"
    verbose="true"
    report-errors="true" />
    <!-- Synchronize target -->
    <!-- Example: Synchronize target entire Database with all attributes-->
    <synchronize-target object-name="$SQLServerDb$.dbo"
    on-error="fail-script" />
    <!-- Data Migration-->
    <!--Example: Data Migration of all tables in the schema (with all attributes)-->
    <migrate-data object-name="$AccessDatabase$.Tables"
    object-type="category"
    report-errors="true"
    verbose="true"/>
    </script-commands>
    </ssma-script-file>
    There is a similar scripts about migrating Oracle database to SQL Server, you can use powershell script to automatically run the console for scripts/variable files, saved in the specified folder. For more information, review the following
    article.
    http://blogs.msdn.com/b/ssma/archive/2010/09/09/performing-database-migration-assessment-using-ssma-console-application.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Stop iTunes 11.0 from launching automatically when iPhone is connected?

    Hi all -
    Just got an iPhone 5 and connected it to my computer to charge. Discovered upon doing so that my version of iTunes is now upgraded to 11.0.  How do I stop iTunes 11.0 from automatically launching when I connect my iPhone?  I can't find an appropriate box to uncheck.  In the old version of iTunes, there were different things to uncheck for stopping automatic syncing and automatic launching.  Is this still the case?  If so I'd like to prevent launching but keep syncing.
    Thanks.

    Hummm, that's odd. I always have "Automatically sync when iPhone is connected" unchecked, it has been working fine untill this morning, out of the blue when I plug the iPhone 5 in, **** iTunes launchs itself Then an error message said the iTune could not connect to the iPhone5, meanwhile the iPhone keeps beeping because of that.
    It seems like Apple loves all these obnoxious automatic this and that features, they do it in iPhoto, XCode.... everything they make. Personally I like to have more control of what I want to do, I really HATE HATE HATE HATE HATE HATE HATE!! all the automatic these and that.

  • HT2476 How do I alter which programs start when I turn my iMac on?

    New to Apple Mac, how do I alter which programs automatically run at Start Up?

    Forgot to say that its mainly Office 2011.  I have looked at Login Items and the only one there is Itunes?  So why does Word and Excel start? and my Mail?

  • Original image automatically altered when importing into iPhoto

    When importing photos from a CD into iPhoto (by first saving them to desktop then dragging them in to iPhoto), they are being automatically altered by iPhoto. They appear in their original form on the desktop, but when I drag them into iPhoto, it seems to be doing some auto-enhancing (in this case not for the better). May be missing something simple, but have not had this problem w/ importing photos from a CD before. Any ideas?

    iPhoto works best with an sRGB colour profile. From your description of the symptoms you have a different colour profile.
    Why is this important? Because the colour profile tells the computer how to display the colours. It tells it, in other words, what this file means by 'red' or 'blue'.
    Try attach an sRGB profile to one or two of the pics and import them. See does it help. You can do this using the Tools menu in Preview.
    Regards
    TD

Maybe you are looking for