Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
audiomixer: allow per feature registration
Split plugin into features including dynamic types which can be indiviually registered during a static build. More details here: https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/199 https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/661 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1029>
- Loading branch information
Stéphane Cerveau
authored and
GStreamer Marge Bot
committed
Mar 16, 2021
1 parent
520a682
commit f94d9f1
Showing
7 changed files
with
271 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* GStreamer | ||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> | ||
* 2001 Thomas <thomas@apestaart.org> | ||
* 2005,2006 Wim Taymans <wim@fluendo.com> | ||
* 2013 Sebastian Dröge <sebastian@centricular.com> | ||
* Copyright (C) 2020 Huawei Technologies Co., Ltd. | ||
* @Author: Stéphane Cerveau <scerveau@collabora.com> | ||
* | ||
* audiomixer.c: AudioMixer element, N in, one out, samples are added | ||
* | ||
* 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. | ||
*/ | ||
|
||
|
||
#include "gstaudiomixerelements.h" | ||
|
||
#define GST_CAT_DEFAULT gst_audiomixer_debug | ||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); | ||
|
||
void | ||
audiomixer_element_init (GstPlugin * plugin) | ||
{ | ||
static gsize res = FALSE; | ||
if (g_once_init_enter (&res)) { | ||
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "audiomixer", 0, | ||
"audio mixing element"); | ||
g_once_init_leave (&res, TRUE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* GStreamer | ||
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu> | ||
* 2001 Thomas <thomas@apestaart.org> | ||
* 2005,2006 Wim Taymans <wim@fluendo.com> | ||
* 2013 Sebastian Dröge <sebastian@centricular.com> | ||
* Copyright (C) 2020 Huawei Technologies Co., Ltd. | ||
* @Author: Stéphane Cerveau <scerveau@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_AUDIO_MIXER_ELEMENTS_H__ | ||
#define __GST_AUDIO_MIXER_ELEMENTS_H__ | ||
|
||
#ifdef HAVE_CONFIG_H | ||
#include "config.h" | ||
#endif | ||
|
||
#include <gst/gst.h> | ||
#include <gst/audio/audio.h> | ||
#include <gst/audio/gstaudioaggregator.h> | ||
|
||
#include "gstaudiomixer.h" | ||
#include "gstaudiointerleave.h" | ||
|
||
G_BEGIN_DECLS | ||
|
||
G_GNUC_INTERNAL void audiomixer_element_init (GstPlugin * plugin); | ||
|
||
GST_ELEMENT_REGISTER_DECLARE (audiomixer); | ||
GST_ELEMENT_REGISTER_DECLARE (liveadder); | ||
GST_ELEMENT_REGISTER_DECLARE (audiointerleave); | ||
|
||
|
||
#endif /* __GST_AUDIO_MIXER_ELEMENTS_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* GStreamer | ||
* Copyright (C) 2020 Huawei Technologies Co., Ltd. | ||
* @Author: Stéphane Cerveau <scerveau@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. | ||
*/ | ||
|
||
#include "gstaudiomixerelements.h" | ||
|
||
static gboolean | ||
plugin_init (GstPlugin * plugin) | ||
{ | ||
gboolean ret = FALSE; | ||
|
||
ret |= GST_ELEMENT_REGISTER (audiomixer, plugin); | ||
ret |= GST_ELEMENT_REGISTER (liveadder, plugin); | ||
ret |= GST_ELEMENT_REGISTER (audiointerleave, plugin); | ||
|
||
return ret; | ||
} | ||
|
||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, | ||
GST_VERSION_MINOR, | ||
audiomixer, | ||
"Mixes multiple audio streams", | ||
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) |
Oops, something went wrong.