[FFmpeg-devel] [PATCH] libcaca output device
Paul B Mahol
onemda at gmail.com
Fri Jul 20 00:21:13 CEST 2012
On 7/19/12, Stefano Sabatini <stefasab at gmail.com> wrote:
> On date Thursday 2012-07-19 18:43:57 +0000, Paul B Mahol encoded:
>> On 7/19/12, Stefano Sabatini <stefasab at gmail.com> wrote:
>> > On date Thursday 2012-07-19 15:10:22 +0000, Paul B Mahol encoded:
>> >>
>> >> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> >> ---
>> >> configure | 12 +++
>> >> libavdevice/Makefile | 1 +
>> >> libavdevice/alldevices.c | 1 +
>> >> libavdevice/caca.c | 191
>> >> ++++++++++++++++++++++++++++++++++++++++++++++
>> >> 4 files changed, 205 insertions(+), 0 deletions(-)
>> >> create mode 100644 libavdevice/caca.c
>> >>
>> [...]
>> >> +
>> >> + if (encctx->pix_fmt != PIX_FMT_RGB24) {
>> >> + av_log(s, AV_LOG_ERROR,
>> >> + "Unsupported pixel format '%s', choose rgb24.\n",
>> >> + av_get_pix_fmt_name(encctx->pix_fmt));
>> >> + return AVERROR(EINVAL);
>> >> + }
>> >> +
>> >> + c->canvas = caca_create_canvas(encctx->width, encctx->height);
>> >> + if (!c->canvas) {
>> >> + av_log(s, AV_LOG_ERROR, "Failed to create canvas.\n");
>> >> + return AVERROR(ENOMEM);
>> >
>> > Don't know if libcaca supports error messages, could be nice to add
>> > them to improve the feedback.
>>
>> It only sets errno.
>
> OK, then maybe:
> av_log(s, AV_LOG_ERROR, "Failed to create canvas: %s\n",
> av_err2str(AVERROR(errno)));
That is just duplicating "return AVERROR(errno)" so i will use that instead.
More information about the ffmpeg-devel
mailing list