summaryrefslogtreecommitdiff
path: root/rotord/libavwrapper.h
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-05-27 17:22:16 +0100
committerTim Redfern <tim@eclectronics.org>2013-05-27 17:22:16 +0100
commit14f3d350aa7c9abfd8bc394e87177d3f9e6b8d87 (patch)
tree0c6475fc6d320fbd1f718fd8eee5a5d87c67bfa7 /rotord/libavwrapper.h
parent12c7449bd73a49ede4dacb90a9b0b7f73eb2e287 (diff)
adding audio output to avwrapper
Diffstat (limited to 'rotord/libavwrapper.h')
-rwxr-xr-xrotord/libavwrapper.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/rotord/libavwrapper.h b/rotord/libavwrapper.h
index 449c2f2..c06a94d 100755
--- a/rotord/libavwrapper.h
+++ b/rotord/libavwrapper.h
@@ -131,18 +131,27 @@ namespace libav {
public:
//typedef encoder::Channel Channel;
- encoder(const char * file_name, int width, int height, enum AVCodecID codec_id = CODEC_ID_MPEG4);
+ encoder(const char * file_name, int width, int height, float _framerate=25.0f, enum AVCodecID codec_id = CODEC_ID_MPEG4);
virtual ~encoder();
void setPixelIntensity(int x, int y, int c, uint8_t value);
- void write_frame();
+ void write_frame(float seconds,uint8_t *rgbdata);
+ void write_frame(float seconds,uint16_t *audiodata);
+ int get_audio_framesize(){ return audio_input_frame_size; }
+ float get_audio_step(){return audiostep;};
protected:
AVFormatContext *container;
AVCodecContext *pCtx;
AVFrame *picture_yuv;
AVFrame *picture_rgb;
+ AVFrame *audio_frame;
+ float timebase;
struct SwsContext *Sctx;
+
+ int audio_input_frame_size;
+ float audiostep;
};
+
}