| 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 | |
| 39 | G_BEGIN_DECLS |
| 40 | |
| 41 | /* conversion macros */ |
| 42 | /** |
| 43 | * GST_FRAMES_TO_CLOCK_TIME: |
| 44 | * @frames: sample frames |
| 45 | * @rate: sampling rate |
| 46 | * |
| 47 | * Calculate clocktime from sample @frames and @rate. |
| 48 | */ |
| 49 | #define GST_FRAMES_TO_CLOCK_TIME(frames, rate) \ |
| 50 | ((GstClockTime) gst_util_uint64_scale_round (frames, GST_SECOND, rate)) |
| 51 | |
| 52 | /** |
| 53 | * GST_CLOCK_TIME_TO_FRAMES: |
| 54 | * @clocktime: clock time |
| 55 | * @rate: sampling rate |
| 56 | * |
| 57 | * Calculate frames from @clocktime and sample @rate. |
| 58 | */ |
| 59 | #define GST_CLOCK_TIME_TO_FRAMES(clocktime, rate) \ |
| 60 | gst_util_uint64_scale_round (clocktime, rate, GST_SECOND) |
| 61 | |
| 62 | /* metadata macros */ |
| 63 | |
| 64 | /** |
| 65 | * GST_META_TAG_AUDIO_STR: |
| 66 | * |
| 67 | * This metadata is relevant for audio streams. |
| 68 | * |
| 69 | * Since: 1.2 |
| 70 | */ |
| 71 | #define GST_META_TAG_AUDIO_STR "audio" |
| 72 | /** |
| 73 | * GST_META_TAG_AUDIO_CHANNELS_STR: |
| 74 | * |
| 75 | * This metadata stays relevant as long as channels are unchanged. |
| 76 | * |
| 77 | * Since: 1.2 |
| 78 | */ |
| 79 | #define GST_META_TAG_AUDIO_CHANNELS_STR "channels" |
| 80 | |
| 81 | /** |
| 82 | * GST_META_TAG_AUDIO_RATE_STR: |
| 83 | * |
| 84 | * This metadata stays relevant as long as sample rate is unchanged. |
| 85 | * |
| 86 | * Since: 1.8 |
| 87 | */ |
| 88 | #define GST_META_TAG_AUDIO_RATE_STR "rate" |
| 89 | |
| 90 | /* |
| 91 | * this library defines and implements some helper functions for audio |
| 92 | * handling |
| 93 | */ |
| 94 | |
| 95 | GST_AUDIO_API |
| 96 | GstBuffer * gst_audio_buffer_clip (GstBuffer *buffer, |
| 97 | const GstSegment *segment, |
| 98 | gint rate, gint bpf); |
| 99 | |
| 100 | GST_AUDIO_API |
| 101 | GstBuffer * gst_audio_buffer_truncate (GstBuffer *buffer, |
| 102 | gint bpf, gsize trim, gsize samples); |
| 103 | |
| 104 | G_END_DECLS |
| 105 | |
| 106 | #include <gst/audio/gstaudioringbuffer.h> |
| 107 | #include <gst/audio/gstaudioclock.h> |
| 108 | #include <gst/audio/gstaudiofilter.h> |
| 109 | #include <gst/audio/gstaudiocdsrc.h> |
| 110 | #include <gst/audio/gstaudiodecoder.h> |
| 111 | #include <gst/audio/gstaudioencoder.h> |
| 112 | #include <gst/audio/gstaudiobasesink.h> |
| 113 | #include <gst/audio/gstaudiobasesrc.h> |
| 114 | #include <gst/audio/gstaudiometa.h> |
| 115 | #include <gst/audio/gstaudiosink.h> |
| 116 | #include <gst/audio/gstaudiosrc.h> |
| 117 | #include <gst/audio/streamvolume.h> |
| 118 | #include <gst/audio/gstaudioiec61937.h> |
| 119 | |
| 120 | #endif /* __GST_AUDIO_AUDIO_H__ */ |
| 121 | |