bob paulose appackan skrev 2011-02-16 16:54:
Hi Everyone,

Before parsing, we do probe for every possible format and check for a
'score'. I could understand that some data is being passed on to the
probe function. The size of this probe data is also set by:
AVPROBE_PADDING_SIZE

No, the padding is just to handle certain probe functions reading past the end of the probe buffer.

The probe functions will get called with progressively larger probe buffer until one of them returns a sufficiently high score.

The probe basically returns a SCORE.

How can we actually define what is required by SCORE?
        >>Is it the 'number of frames' that the probe function could understand
that was of the particular type in the probe data that was given?

The score is use in order to "rank" demuxers by how much they think a particular file adheres to their spec. For instance, if you find a file whose first eight bytes says "RIFFAVI " the AVI demuxer will go "this is definately an AVI file" by returning AVPROBE_SCORE_MAX.

The score is needed in order to handle ambiguous cases, like formats that don't have anything like a magic number at the start of the file (like MP3). Less certain probe results will yield lower scores.

In the MP3 case it'll try parsing the file for a bit, which means it might a couple of frames to do so.

I hope the above information is helpful to you :)

/Tomas
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to