2002-03-20 21:45:03 +00:00
|
|
|
/* GStreamer
|
2001-12-22 23:43:34 +00:00
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* Library <2001> Thomas Vander Stichele <thomas@apestaart.org>
|
2011-08-18 17:15:03 +00:00
|
|
|
* <2011> Wim Taymans <wim.taymans@gmail.com>
|
2001-12-22 23:43:34 +00:00
|
|
|
*
|
|
|
|
* 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
|
2012-11-03 23:05:09 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2001-12-22 23:43:34 +00:00
|
|
|
*/
|
|
|
|
|
2004-02-27 21:47:49 +00:00
|
|
|
#ifndef __GST_AUDIO_AUDIO_H__
|
|
|
|
#define __GST_AUDIO_AUDIO_H__
|
|
|
|
|
2012-06-08 08:10:08 +00:00
|
|
|
#include <gst/gst.h>
|
2018-03-13 10:36:56 +00:00
|
|
|
#include <gst/audio/audio-prelude.h>
|
2012-03-19 15:18:56 +00:00
|
|
|
#include <gst/audio/audio-enumtypes.h>
|
2012-06-08 08:10:08 +00:00
|
|
|
#include <gst/audio/audio-format.h>
|
|
|
|
#include <gst/audio/audio-channels.h>
|
2016-01-08 15:22:25 +00:00
|
|
|
#include <gst/audio/audio-channel-mixer.h>
|
2012-06-08 08:10:08 +00:00
|
|
|
#include <gst/audio/audio-info.h>
|
2015-11-06 11:10:48 +00:00
|
|
|
#include <gst/audio/audio-quantize.h>
|
2015-11-06 16:49:00 +00:00
|
|
|
#include <gst/audio/audio-converter.h>
|
2015-11-13 14:32:29 +00:00
|
|
|
#include <gst/audio/audio-resampler.h>
|
2017-09-11 19:49:32 +00:00
|
|
|
#include <gst/audio/gstaudiostreamalign.h>
|
2018-03-11 15:13:32 +00:00
|
|
|
#include <gst/audio/gstaudioaggregator.h>
|
2012-03-19 15:18:56 +00:00
|
|
|
|
2012-06-08 08:10:08 +00:00
|
|
|
G_BEGIN_DECLS
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2011-08-18 17:15:03 +00:00
|
|
|
/* conversion macros */
|
2008-08-11 08:34:56 +00:00
|
|
|
/**
|
2011-08-18 17:15:03 +00:00
|
|
|
* GST_FRAMES_TO_CLOCK_TIME:
|
|
|
|
* @frames: sample frames
|
|
|
|
* @rate: sampling rate
|
|
|
|
*
|
|
|
|
* Calculate clocktime from sample @frames and @rate.
|
2008-08-11 08:34:56 +00:00
|
|
|
*/
|
2011-08-18 17:15:03 +00:00
|
|
|
#define GST_FRAMES_TO_CLOCK_TIME(frames, rate) \
|
|
|
|
((GstClockTime) gst_util_uint64_scale_round (frames, GST_SECOND, rate))
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2008-08-11 08:34:56 +00:00
|
|
|
/**
|
2011-08-18 17:15:03 +00:00
|
|
|
* GST_CLOCK_TIME_TO_FRAMES:
|
|
|
|
* @clocktime: clock time
|
|
|
|
* @rate: sampling rate
|
|
|
|
*
|
|
|
|
* Calculate frames from @clocktime and sample @rate.
|
2008-08-11 08:34:56 +00:00
|
|
|
*/
|
2011-08-18 17:15:03 +00:00
|
|
|
#define GST_CLOCK_TIME_TO_FRAMES(clocktime, rate) \
|
|
|
|
gst_util_uint64_scale_round (clocktime, rate, GST_SECOND)
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2013-08-21 21:56:15 +00:00
|
|
|
/* metadata macros */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GST_META_TAG_AUDIO_STR:
|
2013-09-09 13:52:05 +00:00
|
|
|
*
|
2013-08-21 21:56:15 +00:00
|
|
|
* This metadata is relevant for audio streams.
|
|
|
|
*
|
|
|
|
* Since: 1.2
|
|
|
|
*/
|
|
|
|
#define GST_META_TAG_AUDIO_STR "audio"
|
|
|
|
/**
|
|
|
|
* GST_META_TAG_AUDIO_CHANNELS_STR:
|
2013-09-09 13:52:05 +00:00
|
|
|
*
|
2013-08-21 21:56:15 +00:00
|
|
|
* This metadata stays relevant as long as channels are unchanged.
|
|
|
|
*
|
|
|
|
* Since: 1.2
|
|
|
|
*/
|
|
|
|
#define GST_META_TAG_AUDIO_CHANNELS_STR "channels"
|
|
|
|
|
2015-11-02 14:19:42 +00:00
|
|
|
/**
|
|
|
|
* GST_META_TAG_AUDIO_RATE_STR:
|
|
|
|
*
|
|
|
|
* This metadata stays relevant as long as sample rate is unchanged.
|
|
|
|
*
|
|
|
|
* Since: 1.8
|
|
|
|
*/
|
|
|
|
#define GST_META_TAG_AUDIO_RATE_STR "rate"
|
|
|
|
|
2001-12-22 23:43:34 +00:00
|
|
|
/*
|
|
|
|
* this library defines and implements some helper functions for audio
|
|
|
|
* handling
|
|
|
|
*/
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2018-03-13 10:36:56 +00:00
|
|
|
GST_AUDIO_API
|
2016-04-27 09:08:46 +00:00
|
|
|
GstBuffer * gst_audio_buffer_clip (GstBuffer *buffer,
|
|
|
|
const GstSegment *segment,
|
2011-08-20 08:49:17 +00:00
|
|
|
gint rate, gint bpf);
|
2004-01-12 19:35:54 +00:00
|
|
|
|
2011-12-16 09:55:13 +00:00
|
|
|
|
2003-07-19 23:47:42 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2012-12-12 17:13:10 +00:00
|
|
|
#include <gst/audio/gstaudioringbuffer.h>
|
|
|
|
#include <gst/audio/gstaudioclock.h>
|
|
|
|
#include <gst/audio/gstaudiofilter.h>
|
|
|
|
#include <gst/audio/gstaudiocdsrc.h>
|
|
|
|
#include <gst/audio/gstaudiodecoder.h>
|
|
|
|
#include <gst/audio/gstaudioencoder.h>
|
|
|
|
#include <gst/audio/gstaudiobasesink.h>
|
|
|
|
#include <gst/audio/gstaudiobasesrc.h>
|
|
|
|
#include <gst/audio/gstaudiometa.h>
|
|
|
|
#include <gst/audio/gstaudiosink.h>
|
|
|
|
#include <gst/audio/gstaudiosrc.h>
|
|
|
|
#include <gst/audio/streamvolume.h>
|
|
|
|
#include <gst/audio/gstaudioiec61937.h>
|
|
|
|
|
2004-02-27 21:47:49 +00:00
|
|
|
#endif /* __GST_AUDIO_AUDIO_H__ */
|