GNOME Bugzilla – Bug 726024
Share more code between video decoder and encoder
Last modified: 2014-07-23 08:21:14 UTC
Created attachment 271409 [details] [review] Patch Identical functionality spread of two different components. We can't use a common base class because of different inheritance, but let's try to share the code anyway.
Review of attachment 271409 [details] [review]: Looks good, just some minor things ::: omx/gstomxvideo.c @@ +1,3 @@ +/* + * Copyright 2014 Advanced Micro Devices, Inc. + * Author: Christian König <christian.koenig@amd.com> Copy over the copyright notices from the files from which you copied the code ::: omx/gstomxvideo.h @@ +43,3 @@ + GstVideoCodecState * state); + +GstCaps * gst_omx_video_get_caps_4_map(GList * map); Please rename this to caps_for_map() :)
commit 6b28cf0378bc44c2f7a0db040af05409a05c3919 Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Mar 12 12:48:12 2014 +0100 omx: Copy old copyright notice into the new file commit a04ef276e58523f0193c3d2a8cc75a2741324f6a Author: Sebastian Dröge <sebastian@centricular.com> Date: Wed Mar 12 12:47:34 2014 +0100 omx: Rename function from _4_ to _for_ for clarity commit 6bf4d9a498ca163a0c431e8a864658922a8bab1f Author: Christian König <christian.koenig@amd.com> Date: Mon Mar 3 16:15:24 2014 +0100 omxvideo: start sharing more code between video decoder and encoder Identical functionality spread of two different components. We can't use a common base class because of different inheritance, but let's try to share the code anyway. https://bugzilla.gnome.org/show_bug.cgi?id=726024
Actually just found a minor bug in the patch that isn't fixed yet. GST_DEBUG_CATEGORY_STATIC (gst_omx_video_debug_category); #define GST_CAT_DEFAULT gst_omx_video_debug_category Those lines cause errors/warnings when debugging is turned on because the debug category isn't initialized anywhere. How should we fix that?
Oops. Initialise it in class_init :)
Erm, we're not talking about the bufferpool here... right. Initialise it in plugin_init() then and make it a extern/non-static debug category
Created attachment 271857 [details] [review] Fix debug category initializatrion. Ok, patch is attached. Please review and commit (or should I open up a new bug for this?).
commit 8a860bd02491237a6c636c79539786cf5110c6bd Author: Christian König <christian.koenig@amd.com> Date: Thu Mar 13 14:26:58 2014 +0100 omxvideo: fix debug category initialisation https://bugzilla.gnome.org/show_bug.cgi?id=726024