GNOME Bugzilla – Bug 650877
matroska: refactor code common to matroskademux and matroskaparse
Last modified: 2011-06-15 22:43:34 UTC
There is a lot of code that is shared by the matroskademux and matroskaparse because the parser was written by copying the demultiplexer. Sharing this common code will avoid duplication of bugs and make it easier to introduce new features.
Created attachment 188387 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188389 [details] [review] matroska: refactor code common to matroskademux and matroskaparse Removed GstMatroskaReadCommonState from matroska-read-common.h. It is not being used yet. Should be in a later commit.
Comment on attachment 188387 [details] [review] matroska: refactor code common to matroskademux and matroskaparse commit 15ce1142ca8bb70931eb2bd2eddd2f17142acb2b Author: Debarshi Ray <rishi@gnu.org> Date: Mon May 23 18:06:44 2011 +0300 matroska: refactor code common to matroskademux and matroskaparse Replace the following functions with their gst_matroska_read_common_* counterparts: - gst_matroska_{demux,parse}_parse_index - gst_matroska_{demux,parse}_parse_skip - gst_matroska_{demux,parse}_stream_from_num Introduce GstMatroskaReadCommon to contain those members of GstMatroskaDemux and GstMatroskaParse that were used by the above functions. https://bugzilla.gnome.org/show_bug.cgi?id=650877
Next time you copy'n'paste code from one file into another, please copy'n'paste the original copyrights as well ;-)
Created attachment 188393 [details] [review] matroska: move GstMatroska{Demux,Parse}::state to GstMatroskaReadCommon
Created attachment 188407 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188409 [details] [review] matroska: fixed copyright headers
Already about 500 lines of code less than previous release. Good work :) commit b316e2346cf31e6122e1244995fd0875580c7ae1 Author: Debarshi Ray <rishi@gnu.org> Date: Mon May 23 20:46:04 2011 +0300 matroska: fixed copyright headers https://bugzilla.gnome.org/show_bug.cgi?id=650877 commit 85036682cbe341da237830aae6123e52e6aa6580 Author: Debarshi Ray <rishi@gnu.org> Date: Mon May 23 18:06:44 2011 +0300 matroska: refactor code common to matroskademux and matroskaparse Move the following functions to matroska-read-common.[ch] from matroska-demux.c and matroska-parse.c: - gst_matroska_decode_content_encodings - gst_matroska_decompress_data https://bugzilla.gnome.org/show_bug.cgi?id=650877 commit 51c7e6d252466bc332332fb91234f4519e58b57a Author: Debarshi Ray <rishi@gnu.org> Date: Mon May 23 18:48:57 2011 +0300 matroska: move GstMatroska{Demux,Parse}::state to GstMatroskaReadCommon https://bugzilla.gnome.org/show_bug.cgi?id=650877
Created attachment 188478 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188557 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
commit f885e2721a2ee52fe5ff33179bd2b0aa0339b225 Author: Debarshi Ray <rishi@gnu.org> Date: Mon May 23 18:06:44 2011 +0300 matroska: refactor code common to matroskademux and matroskaparse Move the following functions to matroska-read-common.[ch] from matroska-demux.c and matroska-parse.c: - gst_matroska_{demux,parse}_encoding_order_unique - gst_matroska_{demux,parse}_read_track_encoding https://bugzilla.gnome.org/show_bug.cgi?id=650877
commit 72d969b3605aff4bfde3f97716a718eb40cdb484 Author: Debarshi Ray <rishi@gnu.org> Date: Mon May 23 18:06:44 2011 +0300 matroska: refactor code common to matroskademux and matroskaparse Move the following function to matroska-read-common.[ch] from matroska-demux.c and matroska-parse.c: - gst_matroska_{demux,parse}_peek_bytes https://bugzilla.gnome.org/show_bug.cgi?id=650877
Created attachment 188586 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
commit 5384308c9953c97fe00e3766ecbc9ccd055576ce Author: Debarshi Ray <rishi@gnu.org> Date: Mon May 23 18:06:44 2011 +0300 matroska: refactor code common to matroskademux and matroskaparse Move the following function to matroska-read-common.[ch] from matroska-demux.c and matroska-parse.c: - gst_matroska_{demux,parse}_peek_pull https://bugzilla.gnome.org/show_bug.cgi?id=650877
Great work on these patches Debarshi, our Matroska support has needed improving for some time. Any chance you could also look at sorting out some of our long standing reported Matroska bugs? (140783,334082,434996,481070,616936,617367,623565,636599,639710,644154,644808,650516).
(In reply to comment #15) > Any chance you could also look at sorting out some of our long > standing reported Matroska bugs? > (140783,334082,434996,481070,616936,617367,623565,636599,639710,644154,644808,650516). I will take a look.
Created attachment 188693 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188694 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188695 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
commit 5ba333bcad38af955303581a436a9b37184dd12a Author: Debarshi Ray <rishi@gnu.org> Date: Thu May 26 23:35:52 2011 +0530 matroska: refactor code common to matroskademux and matroskaparse Move the following functions to matroska-read-common.[ch] from matroska-demux.c and matroska-parse.c: - gst_matroska_{demux,parse}_encoding_cmp - gst_matroska_{demux,parse}_read_track_encodings https://bugzilla.gnome.org/show_bug.cgi?id=650877 commit 2589f1cd2d64c792d8ba5e141f2042a349de4e54 Author: Debarshi Ray <rishi@gnu.org> Date: Mon May 23 18:06:44 2011 +0300 matroska: refactor code common to matroskademux and matroskaparse Move the following functions to matroska-read-common.[ch] from matroska-demux.c and matroska-parse.c: - gst_matroska_{demux,parse}_peek_id_length_pull - gst_matroska_{demux,parse}_peek_id_length_push https://bugzilla.gnome.org/show_bug.cgi?id=650877 commit f3820b61a181d12c3b3e36234e2c8336683b9daf Author: Debarshi Ray <rishi@gnu.org> Date: Mon May 23 18:06:44 2011 +0300 matroska: refactor code common to matroskademux and matroskaparse Move the following function to matroska-read-common.[ch] from matroska-demux.c and matroska-parse.c: - gst_matroska_{demux,parse}_peek_adapter https://bugzilla.gnome.org/show_bug.cgi?id=650877
Created attachment 188762 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188765 [details] [review] refactor code common to matroskademux and matroskaparse
Created attachment 188777 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188799 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188854 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188856 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 188883 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 189235 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 189251 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 189252 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 189274 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 189299 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 189306 [details] [review] matroska: refactor code common to matroskademux and matroskaparse
Created attachment 189317 [details] [review] matroska: refactor code common to matroskademux and matroskaparse