mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
macos: Move atdec from applemedia (-bad) to osxaudio (-good)
osxaudio has a few helper methods potentially useful in atdec (or future atenc), like GStreamer -> CoreAudio channel mapping. Doesn't make sense to duplicate them in applemedia, and atdec is the only audio-oriented element there anyway. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6223>
This commit is contained in:
parent
a26b363d3e
commit
d3fba31da0
6 changed files with 10 additions and 9 deletions
|
@ -6,7 +6,6 @@ applemedia_sources = [
|
|||
'coremediabuffer.c',
|
||||
'videotexturecache.m',
|
||||
'videotexturecache-gl.m',
|
||||
'atdec.c',
|
||||
'glcontexthelper.c',
|
||||
'helpers.c',
|
||||
]
|
||||
|
@ -42,8 +41,7 @@ applemedia_frameworks = []
|
|||
corefoundation_dep = dependency('CoreFoundation', required : applemedia_option)
|
||||
coremedia_dep = dependency('CoreMedia', required : applemedia_option)
|
||||
corevideo_dep = dependency('CoreVideo', required : applemedia_option)
|
||||
audiotoolbox_dep = dependency('AudioToolbox', required : applemedia_option)
|
||||
applemedia_frameworks += [corefoundation_dep, coremedia_dep, corevideo_dep, audiotoolbox_dep]
|
||||
applemedia_frameworks += [corefoundation_dep, coremedia_dep, corevideo_dep]
|
||||
|
||||
avfoundation_dep = dependency('AVFoundation', required : applemedia_option)
|
||||
if avfoundation_dep.found()
|
||||
|
@ -118,7 +116,7 @@ if applemedia_found_deps
|
|||
objcpp_args : gst_plugins_bad_args + applemedia_args + applemedia_objc_args + applemedia_objcpp_args,
|
||||
link_args : noseh_link_args,
|
||||
include_directories : [configinc, libsinc],
|
||||
dependencies : [gstvideo_dep, gstaudio_dep, gstpbutils_dep, gst_dep, gstbase_dep, gstgl_dep, gstglproto_dep, gstcodecparsers_dep] + applemedia_frameworks,
|
||||
dependencies : [gstvideo_dep, gstpbutils_dep, gst_dep, gstbase_dep, gstgl_dep, gstglproto_dep, gstcodecparsers_dep] + applemedia_frameworks,
|
||||
override_options : ['cpp_std=c++11'],
|
||||
install : true,
|
||||
install_dir : plugins_install_dir,
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#else
|
||||
#define AV_RANK GST_RANK_PRIMARY
|
||||
#endif
|
||||
#include "atdec.h"
|
||||
|
||||
#ifdef HAVE_VIDEOTOOLBOX
|
||||
void gst_vtenc_register_elements (GstPlugin * plugin);
|
||||
|
@ -85,8 +84,6 @@ plugin_init (GstPlugin * plugin)
|
|||
GST_RANK_PRIMARY, GST_TYPE_AVF_DEVICE_PROVIDER);
|
||||
#endif
|
||||
|
||||
res &= gst_element_register (plugin, "atdec", GST_RANK_MARGINAL, GST_TYPE_ATDEC);
|
||||
|
||||
#ifdef HAVE_VIDEOTOOLBOX
|
||||
/* Check if the framework actually exists at runtime */
|
||||
if (&VTCompressionSessionCreate != NULL) {
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/audio/gstaudiodecoder.h>
|
||||
#include "atdec.h"
|
||||
#include "gstatdec.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (gst_atdec_debug_category);
|
||||
#define GST_CAT_DEFAULT gst_atdec_debug_category
|
||||
|
@ -81,6 +81,7 @@ static GstStaticPadTemplate gst_atdec_sink_template =
|
|||
G_DEFINE_TYPE_WITH_CODE (GstATDec, gst_atdec, GST_TYPE_AUDIO_DECODER,
|
||||
GST_DEBUG_CATEGORY_INIT (gst_atdec_debug_category, "atdec", 0,
|
||||
"debug category for atdec element"));
|
||||
GST_ELEMENT_REGISTER_DEFINE (atdec, "atdec", GST_RANK_MARGINAL, GST_TYPE_ATDEC);
|
||||
|
||||
static GstStaticCaps aac_caps = GST_STATIC_CAPS ("audio/mpeg, mpegversion=4");
|
||||
static GstStaticCaps mp3_caps =
|
|
@ -49,6 +49,8 @@ struct _GstATDecClass
|
|||
|
||||
GType gst_atdec_get_type (void);
|
||||
|
||||
GST_ELEMENT_REGISTER_DECLARE (atdec);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
|
@ -30,6 +30,7 @@
|
|||
#include "gstosxaudioelement.h"
|
||||
#include "gstosxaudiosink.h"
|
||||
#include "gstosxaudiosrc.h"
|
||||
#include "gstatdec.h"
|
||||
#ifndef HAVE_IOS
|
||||
#include "gstosxaudiodeviceprovider.h"
|
||||
#endif
|
||||
|
@ -41,6 +42,7 @@ plugin_init (GstPlugin * plugin)
|
|||
|
||||
ret |= GST_ELEMENT_REGISTER (osxaudiosrc, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (osxaudiosink, plugin);
|
||||
ret |= GST_ELEMENT_REGISTER (atdec, plugin);
|
||||
#ifndef HAVE_IOS
|
||||
ret |= GST_DEVICE_PROVIDER_REGISTER (osxaudiodeviceprovider, plugin);
|
||||
#endif
|
||||
|
|
|
@ -5,7 +5,8 @@ osxaudio_sources = [
|
|||
'gstosxaudiosrc.c',
|
||||
'gstosxcoreaudiocommon.c',
|
||||
'gstosxcoreaudio.c',
|
||||
'gstosxaudio.c'
|
||||
'gstosxaudio.c',
|
||||
'gstatdec.c',
|
||||
]
|
||||
|
||||
have_osxaudio = false
|
||||
|
|
Loading…
Reference in a new issue