diff options
| author | Comment <tim@gray.(none)> | 2013-02-25 19:46:09 +0000 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-02-25 19:46:09 +0000 |
| commit | 963963271f0bec94a4d3d8b6b0fe60621d83318d (patch) | |
| tree | 1c517eb052efb75ecb4ba2b2ed06eb21a7bb33e9 /rotord/av/avCodec.h | |
| parent | 7b82d6a61b468ec21e6e433a93bcbc32ae72df1a (diff) | |
starting audio parser
Diffstat (limited to 'rotord/av/avCodec.h')
| -rw-r--r-- | rotord/av/avCodec.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/rotord/av/avCodec.h b/rotord/av/avCodec.h new file mode 100644 index 0000000..7e1815a --- /dev/null +++ b/rotord/av/avCodec.h @@ -0,0 +1,35 @@ +// libav includes +// from /usr/include + +extern "C" { + #ifndef __STDC_CONSTANT_MACROS + # define __STDC_CONSTANT_MACROS + #endif + + #ifndef UINT64_C + #define UINT64_C(c) (c ## ULL) + #endif + + #include <math.h> + + #include "libavcodec/avcodec.h" + + #include "libavutil/opt.h" + #include "libavutil/channel_layout.h" + #include "libavutil/common.h" + #include "libavutil/imgutils.h" + #include "libavutil/mathematics.h" + #include "libavutil/samplefmt.h" +} + +namespace avCodec { + static int check_sample_fmt(AVCodec *codec, enum AVSampleFormat sample_fmt); + static int select_sample_rate(AVCodec *codec); + static int select_channel_layout(AVCodec *codec); + static void audio_encode_example(const char *filename); + static void audio_decode_example(const char *outfilename, const char *filename); + static void video_encode_example(const char *filename, int codec_id); + static void pgm_save(unsigned char *buf, int wrap, int xsize, int ysize,char *filename); + static int decode_write_frame(const char *outfilename, AVCodecContext *avctx,AVFrame *frame, int *frame_count, AVPacket *pkt, int last); + static void video_decode_example(const char *outfilename, const char *filename); +}
\ No newline at end of file |
