summaryrefslogtreecommitdiff
path: root/rotord/src/libavwrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
-rwxr-xr-xrotord/src/libavwrapper.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp
index c21d077..1b18769 100755
--- a/rotord/src/libavwrapper.cpp
+++ b/rotord/src/libavwrapper.cpp
@@ -518,7 +518,7 @@ bool libav::decoder::avtry(int result, const std::string& msg) {
// encoder methods //
///////////////////////////
-
+/*
libav::encoder::encoder(const char * file_name, int width, int height, float _framerate,enum AVCodecID codec_id)
: picture_yuv(NULL)
, picture_rgb(NULL)
@@ -632,13 +632,13 @@ libav::encoder::encoder(const char * file_name, int width, int height, float _fr
mutex.unlock();
}
- /* Get framebuffers */
+ // Get framebuffers //
if (! (picture_yuv = avcodec_alloc_frame()) ) // final frame format
throw std::runtime_error("");
if (! (picture_rgb = avcodec_alloc_frame()) ) // rgb version I can understand easily
throw std::runtime_error("");
- /* the image can be allocated by any means and av_image_alloc() is
- * just the most convenient way if av_malloc() is to be used */
+ // the image can be allocated by any means and av_image_alloc() is
+ // just the most convenient way if av_malloc() is to be used //
if ( av_image_alloc(picture_yuv->data, picture_yuv->linesize,
pCtx->width, pCtx->height, pCtx->pix_fmt, 1) < 0 )
throw std::runtime_error("Error allocating YUV frame buffer");
@@ -646,7 +646,7 @@ libav::encoder::encoder(const char * file_name, int width, int height, float _fr
pCtx->width, pCtx->height, PIX_FMT_RGB24, 1) < 0 )
throw std::runtime_error("Error allocating RGB frame buffer");
- /* Init scale & convert */
+ // Init scale & convert //
if (! (Sctx=sws_getContext(
width,
height,
@@ -704,7 +704,7 @@ libav::encoder::encoder(const char * file_name, int width, int height, float _fr
// are we supposed to use the same codeccontext?
//
- /* open the output file */
+ // open the output file //
if (!(fmt->flags & AVFMT_NOFILE))
{
//QMutexLocker lock(&decoder::mutex);
@@ -735,7 +735,7 @@ void libav::encoder::write_frame(float seconds,uint8_t *rgbdata)
picture_yuv->data, // dst
picture_yuv->linesize ); // dst stride
- /* encode the image */
+ // encode the image //
// use non-deprecated avcodec_encode_video2(...)
AVPacket packet={0};
av_init_packet(&packet);
@@ -812,7 +812,7 @@ void libav::encoder::write_frame(float seconds,uint16_t *audiodata){
avcodec_free_frame(&audio_frame);
}
-/* virtual */
+// virtual //
libav::encoder::~encoder()
{
@@ -853,7 +853,7 @@ libav::encoder::~encoder()
picture_rgb = NULL;
}
-
+*/
bool libav::exporter::setup(int w,int h, int bitRate, int frameRate, std::string container){
maybeInitFFMpegLib();