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>
|
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>
|
|
|
|
#include <gst/audio/audio-info.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"
|
|
|
|
|
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
|
|
|
|
2011-08-20 08:49:17 +00:00
|
|
|
GstBuffer * gst_audio_buffer_clip (GstBuffer *buffer, GstSegment *segment,
|
|
|
|
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__ */
|