23

I am working on a project that requires me to embed metadata on the fly with a recorded stream from a webcam. I am utilizing Flash Builder 4.5.1 creating a mobile project. I am using a simple netStream.send function to set the metadata I want. This works just fine until my netstream time goes over around 10 seconds, then the function ceases to work or will not embed into the video. All my connections are correct and I can record to the Flash Media Server

The only thing I can think of is that my Flash Media Server 4 Developer is being over loaded and does not compute the metadata I send.

Any ideas would greatly help.

 private function sendMetadata():void {


                 infotxt.text += 'called';
                trace("sendMetaData() called")
                myMetadata = new Object();
                myMetadata.customProp = "This message is sent by @setDataFrame.";
                myMetadata.customOther = cueHolder;
                ns.send("@setDataFrame", "onMetaData", myMetadata);
            }  

And here is my onMetaData function

public function onMetaData(info:Object):void { 
                trace("caught");
                infotxt.text = 'caught';
                var key:String;
                for (key in info){ 
                    outputWindow.text +=(key + ": " + info[key] + "\n"); 
                }
                //cueHolderReturn = info.customOther;
                 for (var i:int = 0; i < info.customOther.length; i++) 
                {
                    infotxt.text += info.customOther[i]
                } 

                //infotxt.text = info.customOther[0];




            }
Nikeah
  • 231
  • 1
  • 2
  • 2
    +1 b/c I think your code helps explain the issue. Have you used a program, such as ServiceCapture or the Flash Builder network monitor to see what is being passed back and forth? – JeffryHouser Jun 27 '11 at 22:49
  • I'm not sure if this will help but have you tried to clean the data keyframe before adding a new one? On the _sendMetadata_ method add at the beginning: `ns.send("@clearDataFrame", "onMetaData");` (also add a validation for `info == null` on _onMetaData_). – bmleite Jun 28 '11 at 09:35
  • When are you sending the metadata? Like, how often? – J_A_X Jun 28 '11 at 12:53
  • J_A_X i am trying to only add metadata once. I am storing time stamps in a video and when all the time stamps are collected I want to store that array of time stamps as metadata. However it only seem to work if I send the stamps before 10seconds into the recording. – Nikeah Jun 28 '11 at 14:11
  • bmleite - I tried the clearDataFrame and all it did was shut down my netConnection. Thanks for the input though I will be using the validation idea. – Nikeah Jun 28 '11 at 14:37

1 Answers1

1

Just wondering - is this problem occuring on both a real mobile device and a mobile emulator? If not, it could be the mobile connection - HTH

OKeez
  • 108
  • 3