Skip to main content
Inspiring
March 3, 2010
Question

Access Server Variables In C++ Plug-in

  • March 3, 2010
  • 1 reply
  • 954 views

Is there any way to access a Flash Media Server server-side script through a C++ plugin? I know you can call server-side functions, but I want to use the plugin to do image processing, so I need to get bitmap data from the client to the plugin.

I've been poring over the documentation and the forums and there doesn't seem to be any way for the plugin to communcate with the server other than to read Event properties. If this is the only way for the plugin to recieve data from the server, is there any way to override an event property to send custom data?

    This topic has been closed for replies.

    1 reply

    Asa_-_FMS
    Adobe Employee
    Adobe Employee
    March 3, 2010

    There are a few ways to get the plugin data, but none of them as easy as you're looking for.  It's a known pain point that information is easily passed from the plugin to script, but not the other way.  The answer depends on what your goal is.  Let me know a little bit about what you're trying to accomplish and we can try to come up with a way to do this.

    Asa

    gmcgee77Author
    Inspiring
    March 3, 2010

    I basically need to send bitmap data from the client to the plugin for image processing- I suppose the best way to do this is as a byte array. This would be sent to FMS, from the FMS to the plugin for processing, then the plugin should return data back to the server, and then given to the client.

    Asa_-_FMS
    Adobe Employee
    Adobe Employee
    March 4, 2010

    That's going to be tricky as it's a big hunk of information. Bluntly, the current plugins FMS have aren't meant to intercept large data messages sent from the player or otherwise and trying to get them there is going to be a bit of a bear.  I'd suggest that you're going to want to make use of Server Script's remoting or file capabilities.  Either way it's going to be a bit of a rube-goldberg machine - but there's not a lot of choice at the moment.  So, I'd either send it to a remote server to do this, or a different process on the same machine listening via network.  Alternatively you can do the same file FMS' file object and drop it into a place where the transcoder is listening and work off it from there.

    Another nice alternative I just thought of is using FMS' file adaptor to perform the job.  You can record the message that you care about to disk, and have FMS intercept the write that you care about - transcode it - and then write it out as desired and playback.  Trying to think of ways to get done what you're trying to accomplish.