Skip to main content
niteshkumar
Inspiring
February 20, 2010
Question

Problem with IP/Network Camera and Flash media Server

  • February 20, 2010
  • 1 reply
  • 1239 views

Hi,

I am publishing my IP(network camera) stream over FMS,For that i have to create Direct show video capture filter in VC++.My filter is working fine with Flash media Live Encoder 3 and also with GraphEdit(app to test filters)but when I publish with my own Action Script code filter code don't work proprely.Let me explain the my  problem:

With GraphEdit:-

My filter's Create Instance function called only once and at the application close its destructor gets called so i free the memory in destructor.No memory  leak

With Adobe Flash media Encode:-

My Filter's constructor and destructor get multiple call but for each constructor call there is one destructor call,and when i close flash media live encoder app,again destructor of filter get called,so no memory leak.


With My own ActionScript code:-
My filter's constructor get call for 4 time and its destructor get call for only 2 times
and even when i close the my applicaiton(SWF file) no destructor gets called.
so memory leak.

My action script code is same as given in the the below Link

http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d56e-7ff0.htmlhttp://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d56e-7ff0.html

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    February 23, 2010

    Can you write piece of code which you can trigger on click of button. I mean put a button on your swf file say name it "btnstopPublish" and click on it. Write below code snippet in click handler of the button and see if it works for you,



    btnstopPublish.addEventListener(MouseEvent.CLICK, stopPublish);


    function stopPublish_Play(eventObj:MouseEvent){


      ns.publish(false);

      ns.close();


     nsPlayer.play(false);
     nsPlayer.close();


    }