#38 Improvements for Codec operations (textops)

Andrei Dragus
modules (91)
Thomas Gelf

I've never before used the codec_* functions that have recently been
added to textops module - but today they helped me to solve a really
nasty problem ;-)

While playing around with those functions a few possible improvements
came to my mind:

a) Make codec_exists/codec_delete case_insensitive
I didn't intensively test it, but it seems that thosw functions are
currently case sensitive, "speex" for example didn't match "Speex"

b) Kill related fmtp-lines
If I remove a codec, it's payload type number is removed from media
line, and related rtpmap-entries are trashed. fmtp-lines however will
remain, please remove them too!

c) Wildcards/Regexps?
Writing a codec_exists/codec_delete for G726-[16|24|30|40] or something
similar is nasty, what about supporting something like "G726-*" - or
just use regular expressions? The latter would also provide case

Best regards,
Thomas Gelf

mail: thomas@gelf.net
web: http://thomas.gelf.net/


    • assigned_to: nobody --> andreidragus
  • Andrei Dragus
    Andrei Dragus

    Points a) and b) have been solved. They are up on svn. Feel free to test.
    I am currently working on c).

  • Andrei Dragus
    Andrei Dragus

    Every function now has an equivalent function that takes a regular expression as a parameter.
    It has the same name, only followed by _re.
    Example: codec_exists_re("sp[a-z]*").

    Please report if there are any problems.

  • Andrei Dragus
    Andrei Dragus

    • status: open --> closed