GNOME Bugzilla – Bug 656775
oggmux: various cleanups
Last modified: 2011-08-25 06:27:32 UTC
soon in a repo near you.
Created attachment 194078 [details] [review] oggmux: headers should always have granpos 0
Created attachment 194079 [details] [review] oggmux: factor the header packet creation code
Created attachment 194080 [details] [review] oggmux: use GST_WARNING_OBJECT for warnings, not g_warning
Created attachment 194081 [details] [review] ogg: rationalize serialno type to guint32 It is a 32 bit unsigned number. Sure, the libogg API uses a long, but that's an unfortunate oversight.
Created attachment 194082 [details] [review] oggmux: use oggstream to decide which BOS packets to place first Ogg recommends video BOS packets to be first. Use the "is_video" flag in oggstream to select those, rather than check for known mime types.
Created attachment 194083 [details] [review] ogg: move the "always flush page" to oggstream It avoids checking for specific media types in the muxer.
Created attachment 194084 [details] [review] oggstream: new convenience function to get a stream's media type This will make logging a lot clearer, both in code and in output.
Created attachment 194103 [details] [review] oggstream: vorbis has a preroll of 2
Created attachment 194106 [details] [review] ogg: get the operator precedence right, even if only a doc
Created attachment 194111 [details] [review] ogg: use memory slices where appropriate While there, avoid zeroing newly allocated memory where unnecessary
Comment on attachment 194080 [details] [review] oggmux: use GST_WARNING_OBJECT for warnings, not g_warning These are programming errors and they should be reported via g_warning(), same as all the g_return_val_if_fail(), etc
Pushed them all except the g_warning() patch, which is incorrect.
Created attachment 194137 [details] [review] ogg: do not use 32 bit modifiers to print serial numbers If ints are 64 bits, 32 bits should get promoted in varargs anyway, and we don't care about 16 bit ints. This makes the code a lot more readable, and still gets us nice hexadecimal 32 bit serialnos.
Created attachment 194139 [details] [review] ogg: do not use 32 bit modifiers to print serial numbers If ints are 64 bits, 32 bits should get promoted in varargs anyway, and we don't care about 16 bit ints. This makes the code a lot more readable, and still gets us nice hexadecimal 32 bit serialnos.
Created attachment 194140 [details] [review] ogg: do not use 32 bit modifiers to print serial numbers If ints are 64 bits, 32 bits should get promoted in varargs anyway, and we don't care about 16 bit ints. This makes the code a lot more readable, and still gets us nice hexadecimal 32 bit serialnos. Trying again on a clean branch, my ogg branch is getting too crowded and patches are starting to conflict with each others, sorry.
Thanks for pushing. You marked https://bugzilla.gnome.org/attachment.cgi?id=194111 as committed but have not pushed it though. Cheers
commit b7bb1e56336b9d3167213e0f48fa0a25ea4b0ad4 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Thu Aug 18 16:20:57 2011 +0100 ogg: do not use 32 bit modifiers to print serial numbers If ints are 64 bits, 32 bits should get promoted in varargs anyway, and we don't care about 16 bit ints. This makes the code a lot more readable, and still gets us nice hexadecimal 32 bit serialnos. https://bugzilla.gnome.org/show_bug.cgi?id=656775
Reopening so we don't forget one patch is still pending.
commit 53c865624827f428247ea80f62db1c0ff12a6dd2 Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> Date: Thu Aug 18 10:05:17 2011 +0100 ogg: use memory slices where appropriate While there, avoid zeroing newly allocated memory where unnecessary https://bugzilla.gnome.org/show_bug.cgi?id=656775