source: git/src/moviemaker.cc @ c648bd1

RELEASE/1.2debug-cidebug-ci-sanitisersfaster-cavernloglog-selectstereostereo-2025walls-datawalls-data-hanging-as-warningwarn-only-for-hanging-survey
Last change on this file since c648bd1 was c648bd1, checked in by Olly Betts <olly@…>, 11 years ago

src/moviemaker.cc,src/moviemaker.h: Fix to actually build without
libav/ffmpeg.

  • Property mode set to 100644
File size: 14.5 KB
RevLine 
[6a4cdcb6]1//
2//  moviemaker.cc
3//
4//  Class for writing movies from Aven.
5//
[710bd97]6//  Copyright (C) 2004,2011,2012,2013,2014 Olly Betts
[6a4cdcb6]7//
8//  This program is free software; you can redistribute it and/or modify
9//  it under the terms of the GNU General Public License as published by
10//  the Free Software Foundation; either version 2 of the License, or
11//  (at your option) any later version.
12//
13//  This program is distributed in the hope that it will be useful,
14//  but WITHOUT ANY WARRANTY; without even the implied warranty of
15//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16//  GNU General Public License for more details.
17//
18//  You should have received a copy of the GNU General Public License
19//  along with this program; if not, write to the Free Software
[ecbc6c18]20//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
[6a4cdcb6]21//
22
[cc9e7a06]23/* Based on output-example.c:
24 *
25 * Libavformat API example: Output a media file in any supported
26 * libavformat format. The default codecs are used.
27 *
28 * Copyright (c) 2003 Fabrice Bellard
29 *
30 * Permission is hereby granted, free of charge, to any person obtaining a copy
31 * of this software and associated documentation files (the "Software"), to deal
32 * in the Software without restriction, including without limitation the rights
33 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34 * copies of the Software, and to permit persons to whom the Software is
35 * furnished to do so, subject to the following conditions:
36 *
37 * The above copyright notice and this permission notice shall be included in
38 * all copies or substantial portions of the Software.
39 *
40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
43 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
46 * THE SOFTWARE.
47 */
48
[6a4cdcb6]49#ifdef HAVE_CONFIG_H
50#include <config.h>
51#endif
52
[cc9e7a06]53#define __STDC_CONSTANT_MACROS
54
[1805274]55#include <assert.h>
[6a4cdcb6]56#include <stdlib.h>
57#include <string.h>
58
59#include "moviemaker.h"
60
[cc9e7a06]61#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
62extern "C" {
[008f2f3]63# include <libavutil/mathematics.h>
[64d06c0]64# include <libavformat/avformat.h>
[86d8ee5]65# include <libswscale/swscale.h>
[cc9e7a06]66}
[7831cef]67# ifndef AV_PKT_FLAG_KEY
68#  define AV_PKT_FLAG_KEY PKT_FLAG_KEY
69# endif
70# ifndef HAVE_AV_GUESS_FORMAT
71#  define av_guess_format guess_format
72# endif
73# ifndef HAVE_AVIO_OPEN
74#  define avio_open url_fopen
75# endif
76# ifndef HAVE_AVIO_CLOSE
77#  define avio_close url_fclose
78# endif
[cc69cf5]79# ifndef HAVE_AVCODEC_FREE_FRAME
[ec81f086]80static inline void avcodec_free_frame(AVFrame ** frame) {
81    free((*frame)->data[0]);
82    free(*frame);
83    *frame = NULL
[cc69cf5]84}
85# endif
[86d8ee5]86# ifndef HAVE_AVCODEC_OPEN2
87// We always pass NULL for OPTS below.
88#  define avcodec_open2(CTX, CODEC, OPTS) avcodec_open(CTX, CODEC)
89# endif
90# ifndef HAVE_AVFORMAT_NEW_STREAM
91// We always pass NULL for CODEC below.
92#  define avformat_new_stream(S, CODEC) av_new_stream(S, 0)
93# endif
[7831cef]94# if !HAVE_DECL_AVMEDIA_TYPE_VIDEO
95#  define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO
96# endif
[64d06c0]97# if !HAVE_DECL_AVCODEC_ID_NONE
98#  define AVCODEC_ID_NONE CODEC_ID_NONE
99# endif
100# if !HAVE_DECL_AV_PIX_FMT_YUV420P
101#  define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
102# endif
103# ifndef AVIO_FLAG_WRITE
104#  define AVIO_FLAG_WRITE URL_WRONLY
105# endif
[6a4cdcb6]106#endif
107
[091069f]108enum {
109    MOVIE_NO_SUITABLE_FORMAT = 1,
110    MOVIE_AUDIO_ONLY,
[c648bd1]111    MOVIE_FILENAME_TOO_LONG
[091069f]112};
113
[1805274]114const int OUTBUF_SIZE = 200000;
[6a4cdcb6]115
[1805274]116MovieMaker::MovieMaker()
[ccb83b7]117#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[64d06c0]118    : oc(0), video_st(0), frame(0), outbuf(0), pixels(0), sws_ctx(0), averrno(0)
[ccb83b7]119#endif
[6a4cdcb6]120{
[cc9e7a06]121#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[6a4cdcb6]122    static bool initialised_ffmpeg = false;
[1805274]123    if (initialised_ffmpeg) return;
[6a4cdcb6]124
[1805274]125    // FIXME: register only the codec(s) we want to use...
[64d06c0]126    avcodec_register_all();
[1805274]127    av_register_all();
[6a4cdcb6]128
[1805274]129    initialised_ffmpeg = true;
130#endif
131}
132
133bool MovieMaker::Open(const char *fnm, int width, int height)
134{
[cc9e7a06]135#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[7831cef]136    AVOutputFormat * fmt = av_guess_format(NULL, fnm, NULL);
[1805274]137    if (!fmt) {
138        // We couldn't deduce the output format from file extension so default
139        // to MPEG.
[7831cef]140        fmt = av_guess_format("mpeg", NULL, NULL);
[1805274]141        if (!fmt) {
[091069f]142            averrno = MOVIE_NO_SUITABLE_FORMAT;
[1805274]143            return false;
144        }
145    }
[64d06c0]146    if (fmt->video_codec == AVCODEC_ID_NONE) {
[091069f]147        averrno = MOVIE_AUDIO_ONLY;
[1805274]148        return false;
[6a4cdcb6]149    }
150
[64d06c0]151    /* Allocate the output media context. */
[6ed625e]152    oc = avformat_alloc_context();
[1805274]153    if (!oc) {
[63621a7]154        averrno = AVERROR(ENOMEM);
[1805274]155        return false;
[6a4cdcb6]156    }
[1805274]157    oc->oformat = fmt;
158    if (strlen(fnm) >= sizeof(oc->filename)) {
[091069f]159        averrno = MOVIE_FILENAME_TOO_LONG;
[1805274]160        return false;
161    }
162    strcpy(oc->filename, fnm);
[6a4cdcb6]163
[64d06c0]164    /* find the video encoder */
165    AVCodec *codec = avcodec_find_encoder(fmt->video_codec);
166    if (!codec) {
167        // FIXME : Erm - internal ffmpeg library problem?
[63621a7]168        averrno = AVERROR(ENOMEM);
[1805274]169        return false;
[6a4cdcb6]170    }
171
[64d06c0]172    // Add the video stream.
173    video_st = avformat_new_stream(oc, codec);
174    if (!video_st) {
175        averrno = AVERROR(ENOMEM);
176        return false;
177    }
[6a4cdcb6]178
179    // Set sample parameters.
[64d06c0]180    AVCodecContext *c = video_st->codec;
[6a4cdcb6]181    c->bit_rate = 400000;
[64d06c0]182    /* Resolution must be a multiple of two. */
[1805274]183    c->width = width;
184    c->height = height;
[64d06c0]185    /* timebase: This is the fundamental unit of time (in seconds) in terms
186     * of which frame timestamps are represented. For fixed-fps content,
187     * timebase should be 1/framerate and timestamp increments should be
188     * identical to 1. */
[cc9e7a06]189    c->time_base.den = 25; // Frames per second.
[64d06c0]190    c->time_base.num = 1;
191    c->gop_size = 12; /* emit one intra frame every twelve frames at most */
192    c->pix_fmt = AV_PIX_FMT_YUV420P;
[997509d]193    c->rc_buffer_size = c->bit_rate * 4; // Enough for 4 seconds
[1805274]194    // B frames are backwards predicted - they can improve compression,
195    // but may slow encoding and decoding.
[64d06c0]196    // if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
197    //     c->max_b_frames = 2;
198    // }
[6a4cdcb6]199
[64d06c0]200    /* Some formats want stream headers to be separate. */
[cc9e7a06]201    if (oc->oformat->flags & AVFMT_GLOBALHEADER)
202        c->flags |= CODEC_FLAG_GLOBAL_HEADER;
203
[7831cef]204    int retval;
205#ifndef HAVE_AVFORMAT_WRITE_HEADER
[1805274]206    // Set the output parameters (must be done even if no parameters).
[7831cef]207    retval = av_set_parameters(oc, NULL);
[091069f]208    if (retval < 0) {
209        averrno = retval;
[1805274]210        return false;
211    }
[7831cef]212#endif
[1805274]213
[64d06c0]214    retval = avcodec_open2(c, NULL, NULL);
[091069f]215    if (retval < 0) {
216        averrno = retval;
[1805274]217        return false;
[6a4cdcb6]218    }
[1805274]219
[64d06c0]220#ifndef HAVE_AVCODEC_ENCODE_VIDEO2
221    outbuf = NULL;
222    if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
[cc9e7a06]223        outbuf = (unsigned char *)malloc(OUTBUF_SIZE);
224        if (!outbuf) {
[63621a7]225            averrno = AVERROR(ENOMEM);
[cc9e7a06]226            return false;
227        }
[6a4cdcb6]228    }
[64d06c0]229#endif
[1805274]230
[64d06c0]231    /* Allocate the encoded raw picture. */
[6a4cdcb6]232    frame = avcodec_alloc_frame();
[cc9e7a06]233    if (!frame) {
[63621a7]234        averrno = AVERROR(ENOMEM);
[1805274]235        return false;
[6a4cdcb6]236    }
[64d06c0]237    retval = avpicture_alloc((AVPicture *)frame, c->pix_fmt, c->width, c->height);
238    if (retval < 0) {
239        averrno = retval;
[1805274]240        return false;
[6a4cdcb6]241    }
[cc9e7a06]242
243    if (c->pix_fmt != PIX_FMT_YUV420P) {
244        // FIXME need to allocate another frame for this case if we stop
245        // hardcoding PIX_FMT_YUV420P.
246        abort();
247    }
[6a4cdcb6]248
249    pixels = (unsigned char *)malloc(width * height * 6);
250    if (!pixels) {
[63621a7]251        averrno = AVERROR(ENOMEM);
[1805274]252        return false;
[6a4cdcb6]253    }
[1805274]254
[64d06c0]255    // Show the format we've ended up with (for debug purposes).
256    // av_dump_format(oc, 0, fnm, 1);
257
258    av_free(sws_ctx);
259    sws_ctx = sws_getContext(width, height, PIX_FMT_RGB24,
260                             width, height, c->pix_fmt, SWS_BICUBIC,
261                             NULL, NULL, NULL);
262    if (sws_ctx == NULL) {
263        fprintf(stderr, "Cannot initialize the conversion context!\n");
264        averrno = AVERROR(ENOMEM);
[1805274]265        return false;
266    }
267
[64d06c0]268    if (!(fmt->flags & AVFMT_NOFILE)) {
269        retval = avio_open(&oc->pb, fnm, AVIO_FLAG_WRITE);
270        if (retval < 0) {
271            averrno = retval;
272            return false;
273        }
274    }
275
[1805274]276    // Write the stream header, if any.
[7831cef]277#ifdef HAVE_AVFORMAT_WRITE_HEADER
278    retval = avformat_write_header(oc, NULL);
279#else
[091069f]280    retval = av_write_header(oc);
[7831cef]281#endif
[091069f]282    if (retval < 0) {
283        averrno = retval;
[1805274]284        return false;
285    }
[9e516d0d]286
[091069f]287    averrno = 0;
[1805274]288    return true;
[6a4cdcb6]289#else
[6e22f11]290    (void)fnm;
291    (void)width;
292    (void)height;
[6a4cdcb6]293    return false;
294#endif
295}
296
297unsigned char * MovieMaker::GetBuffer() const {
[eac4514]298#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[64d06c0]299    AVCodecContext * c = video_st->codec;
[9e516d0d]300    return pixels + c->height * c->width * 3;
[eac4514]301#else
302    return NULL;
303#endif
[6a4cdcb6]304}
305
306int MovieMaker::GetWidth() const {
[cc9e7a06]307#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[ccb83b7]308    assert(video_st);
[64d06c0]309    AVCodecContext *c = video_st->codec;
[6a4cdcb6]310    return c->width;
[1805274]311#else
312    return 0;
313#endif
[6a4cdcb6]314}
315
316int MovieMaker::GetHeight() const {
[cc9e7a06]317#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[ccb83b7]318    assert(video_st);
[64d06c0]319    AVCodecContext *c = video_st->codec;
[6a4cdcb6]320    return c->height;
[1805274]321#else
322    return 0;
323#endif
[6a4cdcb6]324}
325
[98fd937]326bool MovieMaker::AddFrame()
[6a4cdcb6]327{
[cc9e7a06]328#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[64d06c0]329    AVCodecContext * c = video_st->codec;
[cc9e7a06]330
331    if (c->pix_fmt != PIX_FMT_YUV420P) {
332        // FIXME convert...
333        abort();
334    }
[1805274]335
[9e516d0d]336    int len = 3 * c->width;
[fed3713]337    {
338        // Flip image vertically
339        int h = c->height;
340        unsigned char * src = pixels + h * len;
341        unsigned char * dest = src - len;
342        while (h--) {
343            memcpy(dest, src, len);
344            src += len;
345            dest -= len;
346        }
[6a4cdcb6]347    }
[9e516d0d]348    sws_scale(sws_ctx, &pixels, &len, 0, c->height, frame->data, frame->linesize);
[6a4cdcb6]349
[cc9e7a06]350    if (oc->oformat->flags & AVFMT_RAWPICTURE) {
351        abort();
352    }
[6a4cdcb6]353
[1805274]354    // Encode this frame.
[64d06c0]355#ifdef HAVE_AVCODEC_ENCODE_VIDEO2
[710bd97]356    AVPacket pkt;
[64d06c0]357    int got_packet;
358    av_init_packet(&pkt);
[710bd97]359    pkt.data = NULL;
[64d06c0]360
361    int ret = avcodec_encode_video2(c, &pkt, frame, &got_packet);
362    if (ret < 0) {
[98fd937]363        averrno = ret;
364        return false;
[64d06c0]365    }
366    if (got_packet && pkt.size) {
367        // Write the compressed frame to the media file.
[710bd97]368        if (pkt.pts != int64_t(AV_NOPTS_VALUE)) {
[64d06c0]369            pkt.pts = av_rescale_q(pkt.pts,
370                                   c->time_base, video_st->time_base);
371        }
[710bd97]372        if (pkt.dts != int64_t(AV_NOPTS_VALUE)) {
[64d06c0]373            pkt.dts = av_rescale_q(pkt.dts,
374                                   c->time_base, video_st->time_base);
375        }
376        pkt.stream_index = video_st->index;
377
378        /* Write the compressed frame to the media file. */
[98fd937]379        ret = av_interleaved_write_frame(oc, &pkt);
380        if (ret < 0) {
381            averrno = ret;
382            return false;
[64d06c0]383        }
384    }
385#else
[6a4cdcb6]386    out_size = avcodec_encode_video(c, outbuf, OUTBUF_SIZE, frame);
[1805274]387    // outsize == 0 means that this frame has been buffered, so there's nothing
388    // to write yet.
[cc9e7a06]389    if (out_size) {
[1805274]390        // Write the compressed frame to the media file.
[cc9e7a06]391        AVPacket pkt;
392        av_init_packet(&pkt);
393
[63621a7]394        if (c->coded_frame->pts != (int64_t)AV_NOPTS_VALUE)
[64d06c0]395            pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, video_st->time_base);
[cc9e7a06]396        if (c->coded_frame->key_frame)
397            pkt.flags |= AV_PKT_FLAG_KEY;
[64d06c0]398        pkt.stream_index = video_st->index;
[cc9e7a06]399        pkt.data = outbuf;
400        pkt.size = out_size;
401
[64d06c0]402        /* Write the compressed frame to the media file. */
[98fd937]403        int ret = av_interleaved_write_frame(oc, &pkt);
404        if (ret < 0) {
405            averrno = ret;
406            return false;
[1805274]407        }
[6a4cdcb6]408    }
409#endif
[64d06c0]410#endif
[98fd937]411    return true;
[6a4cdcb6]412}
413
[98fd937]414bool
415MovieMaker::Close()
[6a4cdcb6]416{
[cc9e7a06]417#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[64d06c0]418    if (video_st && averrno == 0) {
[1805274]419        // No more frames to compress.  The codec may have a few frames
420        // buffered if we're using B frames, so write those too.
[64d06c0]421        AVCodecContext * c = video_st->codec;
[1805274]422
[64d06c0]423#ifdef HAVE_AVCODEC_ENCODE_VIDEO2
424        while (1) {
[710bd97]425            AVPacket pkt;
[64d06c0]426            int got_packet;
427            av_init_packet(&pkt);
[710bd97]428            pkt.data = NULL;
[64d06c0]429
430            int ret = avcodec_encode_video2(c, &pkt, NULL, &got_packet);
431            if (ret < 0) {
[98fd937]432                release();
433                averrno = ret;
434                return false;
[64d06c0]435            }
436            if (!got_packet) break;
437            if (!pkt.size) continue;
438
439            // Write the compressed frame to the media file.
[710bd97]440            if (pkt.pts != int64_t(AV_NOPTS_VALUE)) {
[64d06c0]441                pkt.pts = av_rescale_q(pkt.pts,
442                                       c->time_base, video_st->time_base);
443            }
[710bd97]444            if (pkt.dts != int64_t(AV_NOPTS_VALUE)) {
[64d06c0]445                pkt.dts = av_rescale_q(pkt.dts,
446                                       c->time_base, video_st->time_base);
447            }
448            pkt.stream_index = video_st->index;
449
450            /* Write the compressed frame to the media file. */
[98fd937]451            ret = av_interleaved_write_frame(oc, &pkt);
452            if (ret < 0) {
453                release();
454                averrno = ret;
455                return false;
[64d06c0]456            }
457        }
458#else
[1805274]459        while (out_size) {
460            out_size = avcodec_encode_video(c, outbuf, OUTBUF_SIZE, NULL);
461            if (out_size) {
[cc9e7a06]462                // Write the compressed frame to the media file.
463                AVPacket pkt;
464                av_init_packet(&pkt);
465
[63621a7]466                if (c->coded_frame->pts != (int64_t)AV_NOPTS_VALUE)
[64d06c0]467                    pkt.pts = av_rescale_q(c->coded_frame->pts, c->time_base, video_st->time_base);
[cc9e7a06]468                if (c->coded_frame->key_frame)
469                    pkt.flags |= AV_PKT_FLAG_KEY;
[64d06c0]470                pkt.stream_index = video_st->index;
[cc9e7a06]471                pkt.data = outbuf;
472                pkt.size = out_size;
473
474                /* write the compressed frame in the media file */
[98fd937]475                int ret = av_interleaved_write_frame(oc, &pkt);
476                if (ret < 0) {
477                    release();
478                    averrno = ret;
479                    return false;
[1805274]480                }
481            }
[6a4cdcb6]482        }
[64d06c0]483#endif
[6a4cdcb6]484
[cc9e7a06]485        av_write_trailer(oc);
[091069f]486    }
[cc9e7a06]487
[98fd937]488    release();
489#endif
490    return true;
491}
492
[c648bd1]493#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[98fd937]494void
495MovieMaker::release()
496{
[64d06c0]497    if (video_st) {
[1805274]498        // Close codec.
[64d06c0]499        avcodec_close(video_st->codec);
[98fd937]500        video_st = NULL;
[6a4cdcb6]501    }
502
[cc9e7a06]503    if (frame) {
[ec81f086]504        avcodec_free_frame(&frame);
[cc9e7a06]505    }
[6a4cdcb6]506    free(pixels);
[98fd937]507    pixels = NULL;
[64d06c0]508    free(outbuf);
[98fd937]509    outbuf = NULL;
[9e516d0d]510    av_free(sws_ctx);
[98fd937]511    sws_ctx = NULL;
[1805274]512
513    if (oc) {
514        // Free the streams.
[cc9e7a06]515        for (size_t i = 0; i < oc->nb_streams; ++i) {
516            av_freep(&oc->streams[i]->codec);
[1805274]517            av_freep(&oc->streams[i]);
518        }
519
[cc9e7a06]520        if (!(oc->oformat->flags & AVFMT_NOFILE)) {
521            // Close the output file.
[7831cef]522            avio_close(oc->pb);
[cc9e7a06]523        }
[1805274]524
525        // Free the stream.
[6ed625e]526        av_free(oc);
[98fd937]527        oc = NULL;
[1805274]528    }
[6a4cdcb6]529}
[c648bd1]530#endif
[091069f]531
[98fd937]532MovieMaker::~MovieMaker()
533{
[c648bd1]534#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[98fd937]535    release();
[c648bd1]536#endif
[98fd937]537}
538
[091069f]539const char *
540MovieMaker::get_error_string() const
541{
[eac4514]542#ifdef HAVE_LIBAVFORMAT_AVFORMAT_H
[091069f]543    switch (averrno) {
[63621a7]544        case AVERROR(EIO):
[091069f]545            return "I/O error";
[63621a7]546        case AVERROR(EDOM):
[091069f]547            return "Number syntax expected in filename";
548        case AVERROR_INVALIDDATA:
549            /* same as AVERROR_UNKNOWN: return "unknown error"; */
550            return "invalid data found";
[63621a7]551        case AVERROR(ENOMEM):
[091069f]552            return "not enough memory";
[63621a7]553        case AVERROR(EILSEQ):
[091069f]554            return "unknown format";
[63621a7]555        case AVERROR(ENOSYS):
[091069f]556            return "Operation not supported";
[63621a7]557        case AVERROR(ENOENT):
[091069f]558            return "No such file or directory";
559        case AVERROR_EOF:
560            return "End of file";
561        case AVERROR_PATCHWELCOME:
562            return "Not implemented in FFmpeg";
563        case 0:
564            return "No error";
565        case MOVIE_NO_SUITABLE_FORMAT:
566            return "Couldn't find a suitable output format";
567        case MOVIE_AUDIO_ONLY:
568            return "Audio-only format specified";
569        case MOVIE_FILENAME_TOO_LONG:
570            return "Filename too long";
571        case MOVIE_NOT_ENABLED:
572            return "Movie export support not included";
573    }
574    return "Unknown error";
[eac4514]575#else
576    return "Movie generation support code not present";
577#endif
[091069f]578}
Note: See TracBrowser for help on using the repository browser.