GNOME Bugzilla – Bug 657684
texttestsrc: a new text source, generates random text.
Last modified: 2018-11-03 13:08:42 UTC
Useful, eh ? :P
Created attachment 195172 [details] [review] texttestsrc: a new text source, generates random text.
Unfinished (seeking yet to be tested, and I'll make it use rand seeds so it gets the same data), but I won't work on it in the next few days so I'm posting it here for comments.
Ah, and main use case is to help create automated tests.
Created attachment 196919 [details] [review] texttestsrc: a new text source, generates random text. The intent is to facilitate the creation of automated tests for other elements using text input.
Created attachment 198602 [details] [review] texttestsrc: a new text source, generates random text. The intent is to facilitate the creation of automated tests for other elements using text input.
New version, fixes a few bugs in UTF-8 generation, add a couple tests, and do not generate 0 in the text, makes g_utf8_validate happy and makes sense enough to change.
Review of attachment 198602 [details] [review]: ::: gst/texttestsrc/gsttexttestsrc.c @@ +2,3 @@ + * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu> + * Copyright (C) <2002> David A. Schleef <ds@schleef.org> + * Copyright (C) <2011> Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> I think you can make that completely your copyright. @@ +166,3 @@ + g_param_spec_string ("suffix", "Suffix", + "String to place after other text data", DEFAULT_SUFFIX, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); Maybe mention that prefix and suffix is per buffer and the in between is filled with random characters.
Dunno if we would need to have a mode where the whole buffer is filled with a repeated text. Like you set text="Hello world!". Otherwise wonder if we should do good review and just put that straight to base?
> I think you can make that completely your copyright. It's based on textaudiosrc. > @@ +166,3 @@ > + g_param_spec_string ("suffix", "Suffix", > + "String to place after other text data", DEFAULT_SUFFIX, > + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); > > Maybe mention that prefix and suffix is per buffer and the in between is filled > with random characters. This should work by setting a prefix string with a length equal to the block size. I know I tried it at some point.
Created attachment 202302 [details] [review] texttestsrc: a new text source, generates random text. The intent is to facilitate the creation of automated tests for other elements using text input.
While trawling for old patches to push, I noticed I'd misnuderstood the comment in 7. Done now. Tempted to push this before the freeze... Anyone against ?
I'm for pushing this, but (bikeshed alert!) maybe we can stuff it into an existing plugin, like subparse in -base or debugutils in -good or debugutilsbad or so?
If it's for tests, then it would be best to put it into -base I guess... (we just have to ignore the name of the plugin).
subparse seems wrong, the other two could do. The intent is to easily feed data to any plugin that wants timed text as input, yes. Really the text version of {audio,video}testsrc. The name seems canonical for what this is, but I can rename it to whatever else is deemed better.
What about merging testaudiosrc, testvideosrc and this one into a testsrc plugin? While plugin merges where controversial in the past this should hardly affect apps.
So, I got reminded this was in bugzilla when I used a launch line for someone to test with. What to do with this ? The options seem either: - add it to -bad - add it to a new plugin with audiotestsrc and videotestsrc in -base Is the second option worth the effort for 0.10 ?
2nd option is easier for having it in both 0.10 and 0.11.
Let's just get this done for 1.0 now and put it into bad as a separate plugin for now as that is least controversial. We can still merge everything together later. Vincent?
Comment on attachment 202302 [details] [review] texttestsrc: a new text source, generates random text. Needs updating for 1.0 at least
Still valid. Just needs patch to be updated for current master.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/45.