diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-06 16:04:18 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-06 16:04:18 (GMT) |
commit | 9cc762d85afffea42de3e1d156a6b8838d88a00c (patch) | |
tree | bff170c0493759c7f1bffca2648960b6f43ca139 /src/uscxml/plugins/invoker/ffmpeg | |
parent | be98a8297b4e10e169290f497e649e803e43d791 (diff) | |
download | uscxml-9cc762d85afffea42de3e1d156a6b8838d88a00c.zip uscxml-9cc762d85afffea42de3e1d156a6b8838d88a00c.tar.gz uscxml-9cc762d85afffea42de3e1d156a6b8838d88a00c.tar.bz2 |
Made Blob into Pimpl to better support language bindings
Diffstat (limited to 'src/uscxml/plugins/invoker/ffmpeg')
-rw-r--r-- | src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp | 14 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp index 4a0ec00..eda4ce8 100644 --- a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp +++ b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp @@ -373,7 +373,7 @@ void FFMPEGInvoker::openVideo(EncodingContext* ctx, AVFormatContext *oc, AVCodec *((AVPicture *)ctx->frame) = ctx->dst_picture; } -void FFMPEGInvoker::writeVideoFrame(EncodingContext* ctx, AVFormatContext *oc, AVStream *st, boost::shared_ptr<Blob> image) { +void FFMPEGInvoker::writeVideoFrame(EncodingContext* ctx, AVFormatContext *oc, AVStream *st, Blob image) { int ret; AVCodecContext *c = st->codec; @@ -392,14 +392,14 @@ void FFMPEGInvoker::writeVideoFrame(EncodingContext* ctx, AVFormatContext *oc, A } uint32_t headerOffset = 0; - headerOffset += image->data[10] << 0; - headerOffset += image->data[11] << 8; - headerOffset += image->data[12] << 16; - headerOffset += image->data[13] << 24; + headerOffset += image._impl->data[10] << 0; + headerOffset += image._impl->data[11] << 8; + headerOffset += image._impl->data[12] << 16; + headerOffset += image._impl->data[13] << 24; // std::cout << headerOffset + (c->width * c->height) << " / " << image->_size << std::endl; - ret = avpicture_fill(&ctx->src_picture, (uint8_t*)(image->data + headerOffset), BMP_FORMAT, c->width, c->height); + ret = avpicture_fill(&ctx->src_picture, (uint8_t*)(image._impl->data + headerOffset), BMP_FORMAT, c->width, c->height); if (ret < 0) { fprintf(stderr, "Could not fill image from given bitmap\n"); @@ -408,7 +408,7 @@ void FFMPEGInvoker::writeVideoFrame(EncodingContext* ctx, AVFormatContext *oc, A (const uint8_t * const *)ctx->src_picture.data, ctx->src_picture.linesize, 0, c->height, ctx->dst_picture.data, ctx->dst_picture.linesize); } else { - avpicture_fill(&ctx->dst_picture, (uint8_t*)image->data, c->pix_fmt, c->width, c->height); + avpicture_fill(&ctx->dst_picture, (uint8_t*)image._impl->data, c->pix_fmt, c->width, c->height); } if (oc->oformat->flags & AVFMT_RAWPICTURE) { diff --git a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h index 964681b..81589bb 100644 --- a/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h +++ b/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.h @@ -92,7 +92,7 @@ protected: AVStream* addStream(EncodingContext* ctx, AVFormatContext *oc, AVCodec **codec, enum AVCodecID codec_id); void openVideo(EncodingContext* ctx, AVFormatContext *oc, AVCodec *codec, AVStream *st); - void writeVideoFrame(EncodingContext* ctx, AVFormatContext *oc, AVStream *st, boost::shared_ptr<Blob> image); + void writeVideoFrame(EncodingContext* ctx, AVFormatContext *oc, AVStream *st, Blob image); void closeVideo(EncodingContext* ctx, AVFormatContext *oc, AVStream *st); static void run(void*); |