On Fri, Jul 5, 2013 at 1:32 PM, Tomas Neme <lacrymol...@gmail.com> wrote: > as on-cue as possible every 1/fps, and returning from get_frame as soon as > the memory gets written with a new frame. Moving the blocking call to > get_image segfaults I think when there's a call to get_audio where the data > hasn't been set up yet, but if the problem may be in blocking get_frame > instead of get_image, I think this can be solved
It may not matter which is the blocking function depending upon the threading model selected by real_time. It definitely makes a difference if using parallel processing (real_time < -1 or >1). > There were a couple of issues I'd had because I didn't set up the right > metadata on the producer_init function, so I was thinking this might have > something to do with that? is there anywhere I can get a full list of the > metadata I absolutely need to fill in in order for this to work correctly? The only thing you really to set on the producer itself is length if you know it, or you can let the user override the default length of 10 minutes. What is more important is that you should set some things on the frame especially if using auto-profile. However, as a convenience, all properties on the producer that begin with meta. are automatically copied to the frame, while also providing a form of introspection for use with melt -consumer xml. However, for serious use (e.g. auto profile), one must really obtain a frame and its image and inspect its properties to see the real attributes because some producers like avformat cannot provide all information with certainty until an image has been read. Look at the definition of mlt_profile.c:mlt_profile_from_producer() to see a list of the meta properties read on a frame that is needed for auto-profile. Now, with that said, there are still some other properties that may need to be set on a frame: aspect_ratio and progressive. "aspect_ratio" is the pixel aspect ratio and defaults to the current mlt_profile. "progressive" is a flag and defaults to 0 (just like any unset property retrieved as an int), which means interlaced. Related to that, there is also "meta.top_field_first" and "top_field_first". The general idea is "meta." properties represent the source producer's attributes and are not altered by filters, and the properties without "meta" represent the current attributes of the image or audio held within a frame. But also consider that some properties are set automatically upon return from your get_image function: format, width, height. Likewise for get_audio: audio_frequency, audio_channels, audio_samples, audio_format. > Is there a way of telling avformat that the input is a stream, and that it no > should output the frames it gets inmediatly, not skipping them if in any > case? yes, that is the way it behaves by default because it defaults to real_time=-1. It also behaves that way when using real_time=0, but without a separate rendering thread. > Thanks a lot > > Tomas > > -- > "The whole of Japan is pure invention. There is no such country, there are > no such people" --Oscar Wilde > > |_|0|_| > |_|_|0| > |0|0|0| > > (\__/) > (='.'=)This is Bunny. Copy and paste bunny > (")_(") to help him gain world domination. > ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel