cablelabs/gst-plugins-bad — pull request #1 by s-maynard (2013-08-22 16:03:46+00:00)
Title: Text track refactor

This set of changes reflects all the suggestions in the review of the previous pull request in bitbucket. It is mostly clean-up, but includes the following:

Issue #6:
The CC parser needs the following changes to match GStreamer's style:
Name classes in camelcase.
Name variables lowercase with underscores.
Name enums as capitals with underscores.
Get rid of variable name prefixes (p_).
Simplify logging to not start with * or @@@@@ or ----
Remove use of g_print.
Use if (x) and if (!x) instead of if (x == TRUE) and if (x == FALSE).
Use G_OBJECT(x), GST_ELEMENT(x), etc. instead of (GObject*)x and (GstElement*)x.
If an element only has one source and sink pad, they should be named "src" and "sink".
Fill in author name. Where we just say "ruihri@cablelabs.com", instead say, "CableLabs RUIH-RI Team ruihri@cablelabs.com".

Issue #7:
There are a number of places in the CC parser where using constants would make the code a lot clearer.

Issue #8:
"In GstCcFilter, I think we can simplify things by making ccWindows an array of cea708Window instead of an array of pointers. Replace this:

cea708Window *ccWindows[NUM_708_WINDOWS];
With this?
cea708Window ccWindows[NUM_708_WINDOWS];

Also, g_slist_free doesn't free the contents of the list. Make sure we're not leaking memory when we call it. We can use g_slist_free_full(list, g_free), or g_slist_free_full(list, gst_object_unref).

Comments (1)
Steve Maynard
cea708Window struct size is 19312 bytes, there is a 64K limit on the size of an element struct (GObject limitation) and therefore the windows must be dynamically allocated...
the g_slist_free_full has been implemented in the branch...