GNOME Bugzilla – Bug 711820
Add min-size property on typefind element
Last modified: 2013-11-12 08:07:03 UTC
Created attachment 259528 [details] [review] Add min-size property on typefind element Some MPEG-PS contents have been typefinded to mp3 In that cases it need to be grab more data before typefinding upto 4KB Thus I add the 'min-size' property on typefind element. I will wait feedback :)
Review of attachment 259528 [details] [review]: Generally makes sense ::: plugins/elements/gsttypefindelement.c @@ +218,3 @@ + g_param_spec_uint ("min-size", _("minimum buffer size of typefinding"), + _("minimum buffer size of typefinding"), 0, + G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); Use TYPE_FIND_MIN_SIZE as default here @@ +288,3 @@ typefind->caps = NULL; typefind->min_probability = 1; + typefind->min_size = 0; And initialize with TYPE_FIND_MIN_SIZE @@ +879,3 @@ if (check_avail) { + have_min = avail >= (typefind->min_size > TYPE_FIND_MIN_SIZE) + ? typefind->min_size : TYPE_FIND_MIN_SIZE; Then this can just become have_min = (avail >= typefind->min_size);
Does this still happen with 1.2 btw? The problem you mentioned might be fixed already. Also the MPEG PS and MP3 typefinders should arguably not return a high-enough probability until they're really sure... so typefind would get more data until they are.
And if it still happens, can you attach a sample file that reproduces this behaviour?
I checked this issue fixed at 1.2 Thanks for your reply Sebastian.