After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 711820 - Add min-size property on typefind element
Add min-size property on typefind element
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.0.7
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-11 07:25 UTC by Wonchul Lee
Modified: 2013-11-12 08:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add min-size property on typefind element (3.16 KB, patch)
2013-11-11 07:25 UTC, Wonchul Lee
rejected Details | Review

Description Wonchul Lee 2013-11-11 07:25:14 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 :)
Comment 1 Sebastian Dröge (slomo) 2013-11-11 17:02:08 UTC
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);
Comment 2 Sebastian Dröge (slomo) 2013-11-11 17:12:26 UTC
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.
Comment 3 Sebastian Dröge (slomo) 2013-11-11 17:13:45 UTC
And if it still happens, can you attach a sample file that reproduces this behaviour?
Comment 4 Wonchul Lee 2013-11-12 06:10:31 UTC
I checked this issue fixed at 1.2
Thanks for your reply Sebastian.