codec2json: Add h2642json element

This element convert H.264 frame header into human readable
json data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3865>
This commit is contained in:
Benjamin Gaignard 2023-02-01 16:44:39 +01:00 committed by Nicolas Dufresne
parent 579c9285c1
commit 3a7fec4ea1
5 changed files with 1171 additions and 0 deletions

View file

@ -6751,6 +6751,31 @@
}, },
"rank": "none" "rank": "none"
}, },
"h2642json": {
"author": "Benjamin Gaignard <benjamin.gaignard@collabora.com>",
"description": "H264 to json element",
"hierarchy": [
"GstH2642json",
"GstElement",
"GstObject",
"GInitiallyUnowned",
"GObject"
],
"klass": "Transform",
"pad-templates": {
"sink": {
"caps": "video/x-h264:\n",
"direction": "sink",
"presence": "always"
},
"src": {
"caps": "text/x-json:\n format: h264\n",
"direction": "src",
"presence": "always"
}
},
"rank": "none"
},
"vp82json": { "vp82json": {
"author": "Benjamin Gaignard <benjamin.gaignard@collabora.com>", "author": "Benjamin Gaignard <benjamin.gaignard@collabora.com>",
"description": "VP8 to json element", "description": "VP8 to json element",

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,33 @@
/* GStreamer
* Copyright (C) 2023 Benjamin Gaignard <benjamin.gaignard@collabora.Com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_H264_2_JSON_H__
#define __GST_H264_2_JSON_H__
#include <gst/codecparsers/gsth264parser.h>
G_BEGIN_DECLS
#define GST_TYPE_H264_2_JSON (gst_h264_2_json_get_type())
G_DECLARE_FINAL_TYPE (GstH2642json,
gst_h264_2_json, GST, H264_2_JSON, GstElement);
G_END_DECLS
#endif /* __GST_H264_2_TXT_H__ */

View file

@ -1,5 +1,6 @@
codec2json_sources = files([ codec2json_sources = files([
'gstav12json.c', 'gstav12json.c',
'gsth2642json.c',
'gstvp82json.c', 'gstvp82json.c',
'plugin.c', 'plugin.c',
]) ])

View file

@ -31,6 +31,7 @@
#endif #endif
#include "gstav12json.h" #include "gstav12json.h"
#include "gsth2642json.h"
#include "gstvp82json.h" #include "gstvp82json.h"
static gboolean static gboolean
@ -44,6 +45,10 @@ plugin_init (GstPlugin * plugin)
GST_TYPE_AV1_2_JSON)) GST_TYPE_AV1_2_JSON))
return FALSE; return FALSE;
if (!gst_element_register (plugin, "h2642json", GST_RANK_NONE,
GST_TYPE_H264_2_JSON))
return FALSE;
return TRUE; return TRUE;
} }