Embedding metadata time limit for Flash Builder 4.5.1mobile project?
Asked Answered
C

1

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];




            }
Capote answered 27/6, 2011 at 20:41 Comment(5)
+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?Mendie
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).Frederic
When are you sending the metadata? Like, how often?Mechling
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.Capote
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.Capote
C
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

Confectioner answered 13/9, 2011 at 18:3 Comment(1)
It was occurring on both devices and emulator.Capote

© 2022 - 2024 — McMap. All rights reserved.