mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
94d74c8900
The fake video decoder ignores input bitstream except to enforce caps restrictions. It reads video width, height and framerate from caps. Then it just pushes video frames without doing any decoding. The fake video decoder just draws a snake moving from left to right in the middle of the frame. This is a light weight drawing while it still provides an idea about how smooth is the rendering. The fake video decoder inherits from GstVideoDecoder. It is useful to measure how smooth will be the whole rendering pipeline if you had the most efficient video decoder. Also useful to bisect issues for example when suspecting issues in a specific video decoder. Handles mpeg2, mpeg4, h263, h264, theora, vp8, wmv3, msmpeg, flash-video, vp6, vp9, wmv1, wmv2, divx but more can be added if needed. For now it can only output RGBA, RGBx, BGRA, BGRx. Its rank is 0 (none) but I added a property to change it so that it can be selected by decodebin. gst-launch-1.0 fakevideodec rank=512 \ playbin uri=http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 http://bugzilla.gnome.org/show_bug.cgi?id=723778 Closes #679 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5636>
53 lines
1.5 KiB
C
53 lines
1.5 KiB
C
/* GStreamer
|
|
* Copyright (C) 2004 Benjamin Otte <otte@gnome.org>
|
|
* Copyright (C) 2020 Huawei Technologies Co., Ltd.
|
|
* @Author: Stéphane Cerveau <stephane.cerveau@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.
|
|
*/
|
|
/**
|
|
* plugin-basedebug:
|
|
* @short_description: elements for testing and debugging
|
|
*
|
|
* This plugin contains elements that are useful for debugging and testing
|
|
* purposes.
|
|
*
|
|
* Since: 1.24
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
# include "config.h"
|
|
#endif
|
|
|
|
#include <gst/gst.h>
|
|
|
|
#include "gstdebugutilselements.h"
|
|
|
|
static gboolean
|
|
plugin_init (GstPlugin * plugin)
|
|
{
|
|
gboolean ret = FALSE;
|
|
|
|
ret |= GST_ELEMENT_REGISTER (fakevideodec, plugin);
|
|
|
|
return ret;
|
|
}
|
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
GST_VERSION_MINOR,
|
|
basedebug,
|
|
"elements for testing and debugging",
|
|
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
|