1/* GStreamer
2 * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
3 * Library <2001> Thomas Vander Stichele <thomas@apestaart.org>
4 * <2011> Wim Taymans <wim.taymans@gmail.com>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 */
21
22#ifndef __GST_AUDIO_AUDIO_H__
23#define __GST_AUDIO_AUDIO_H__
24
25#include <gst/gst.h>
26#include <gst/audio/audio-prelude.h>
27#include <gst/audio/audio-enumtypes.h>
28#include <gst/audio/audio-format.h>
29#include <gst/audio/audio-channels.h>
30#include <gst/audio/audio-channel-mixer.h>
31#include <gst/audio/audio-info.h>
32#include <gst/audio/audio-buffer.h>
33#include <gst/audio/audio-quantize.h>
34#include <gst/audio/audio-converter.h>
35#include <gst/audio/audio-resampler.h>
36#include <gst/audio/gstaudiostreamalign.h>
37#include <gst/audio/gstaudioaggregator.h>
38#include <gst/audio/gstdsd.h>
39
40G_BEGIN_DECLS
41
42/* conversion macros */
43/**
44 * GST_FRAMES_TO_CLOCK_TIME:
45 * @frames: sample frames
46 * @rate: sampling rate
47 *
48 * Calculate clocktime from sample @frames and @rate.
49 */
50#define GST_FRAMES_TO_CLOCK_TIME(frames, rate) \
51 ((GstClockTime) gst_util_uint64_scale_round (frames, GST_SECOND, rate))
52
53/**
54 * GST_CLOCK_TIME_TO_FRAMES:
55 * @clocktime: clock time
56 * @rate: sampling rate
57 *
58 * Calculate frames from @clocktime and sample @rate.
59 */
60#define GST_CLOCK_TIME_TO_FRAMES(clocktime, rate) \
61 gst_util_uint64_scale_round (clocktime, rate, GST_SECOND)
62
63/* metadata macros */
64
65/**
66 * GST_META_TAG_AUDIO_STR:
67 *
68 * This metadata is relevant for audio streams.
69 *
70 * Since: 1.2
71 */
72#define GST_META_TAG_AUDIO_STR "audio"
73/**
74 * GST_META_TAG_AUDIO_CHANNELS_STR:
75 *
76 * This metadata stays relevant as long as channels are unchanged.
77 *
78 * Since: 1.2
79 */
80#define GST_META_TAG_AUDIO_CHANNELS_STR "channels"
81
82/**
83 * GST_META_TAG_AUDIO_RATE_STR:
84 *
85 * This metadata stays relevant as long as sample rate is unchanged.
86 *
87 * Since: 1.8
88 */
89#define GST_META_TAG_AUDIO_RATE_STR "rate"
90
91/*
92 * this library defines and implements some helper functions for audio
93 * handling
94 */
95
96GST_AUDIO_API
97GstBuffer * gst_audio_buffer_clip (GstBuffer *buffer,
98 const GstSegment *segment,
99 gint rate, gint bpf);
100
101GST_AUDIO_API
102GstBuffer * gst_audio_buffer_truncate (GstBuffer *buffer,
103 gint bpf, gsize trim, gsize samples);
104
105G_END_DECLS
106
107#include <gst/audio/gstaudioringbuffer.h>
108#include <gst/audio/gstaudioclock.h>
109#include <gst/audio/gstaudiofilter.h>
110#include <gst/audio/gstaudiocdsrc.h>
111#include <gst/audio/gstaudiodecoder.h>
112#include <gst/audio/gstaudioencoder.h>
113#include <gst/audio/gstaudiobasesink.h>
114#include <gst/audio/gstaudiobasesrc.h>
115#include <gst/audio/gstaudiometa.h>
116#include <gst/audio/gstaudiosink.h>
117#include <gst/audio/gstaudiosrc.h>
118#include <gst/audio/streamvolume.h>
119#include <gst/audio/gstaudioiec61937.h>
120
121#endif /* __GST_AUDIO_AUDIO_H__ */
122

source code of include/gstreamer-1.0/gst/audio/audio.h