Project

General

Profile

Bug #1815

Compile error - src/plumbing/transcoding.c

Added by Sascha Schmidt almost 9 years ago. Updated over 8 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
Transcoding
Target version:
-
Start date:
2013-10-16
Due date:
% Done:

0%

Estimated time:
Found in version:
git
Affected Versions:

Description

I'm trying to compile the latest git checkout of tvheadend on a debian jessie release...

I'm getting the following compile errors:

CC              src/plumbing/transcoding.o
src/plumbing/transcoding.c: In function ‘transcoder_stream_subtitle’:
src/plumbing/transcoding.c:218:5: error: implicit declaration of function ‘avcodec_open’ [-Werror=implicit-function-declaration]
     if (avcodec_open(ictx, icodec) < 0) {
     ^
src/plumbing/transcoding.c: In function ‘transcoder_stream_audio’:
src/plumbing/transcoding.c:330:28: error: ‘AV_CH_LAYOUT_MONO’ undeclared (first use in this function)
     octx->channel_layout = AV_CH_LAYOUT_MONO; 
                            ^
src/plumbing/transcoding.c:330:28: note: each undeclared identifier is reported only once for each function it appears in
src/plumbing/transcoding.c:334:28: error: ‘AV_CH_LAYOUT_STEREO’ undeclared (first use in this function)
     octx->channel_layout = AV_CH_LAYOUT_STEREO;
                            ^
src/plumbing/transcoding.c:338:28: error: ‘AV_CH_LAYOUT_SURROUND’ undeclared (first use in this function)
     octx->channel_layout = AV_CH_LAYOUT_SURROUND;
                            ^
src/plumbing/transcoding.c:342:28: error: ‘AV_CH_LAYOUT_QUAD’ undeclared (first use in this function)
     octx->channel_layout = AV_CH_LAYOUT_QUAD;
                            ^
src/plumbing/transcoding.c:346:28: error: ‘AV_CH_LAYOUT_5POINT0’ undeclared (first use in this function)
     octx->channel_layout = AV_CH_LAYOUT_5POINT0;
                            ^
src/plumbing/transcoding.c:350:28: error: ‘AV_CH_LAYOUT_5POINT1’ undeclared (first use in this function)
     octx->channel_layout = AV_CH_LAYOUT_5POINT1;
                            ^
src/plumbing/transcoding.c:354:28: error: ‘AV_CH_LAYOUT_6POINT1’ undeclared (first use in this function)
     octx->channel_layout = AV_CH_LAYOUT_6POINT1;
                            ^
src/plumbing/transcoding.c:358:28: error: ‘AV_CH_LAYOUT_7POINT1’ undeclared (first use in this function)
     octx->channel_layout = AV_CH_LAYOUT_7POINT1;
                            ^
src/plumbing/transcoding.c: In function ‘transcoder_init_subtitle’:
src/plumbing/transcoding.c:855:3: error: implicit declaration of function ‘avcodec_alloc_context’ [-Werror=implicit-function-declaration]
   ss->sub_ictx = avcodec_alloc_context();
   ^
src/plumbing/transcoding.c:855:16: error: assignment makes pointer from integer without a cast [-Werror]
   ss->sub_ictx = avcodec_alloc_context();
                ^
src/plumbing/transcoding.c:856:16: error: assignment makes pointer from integer without a cast [-Werror]
   ss->sub_octx = avcodec_alloc_context();
                ^
src/plumbing/transcoding.c: In function ‘transcoder_init_audio’:
src/plumbing/transcoding.c:947:16: error: assignment makes pointer from integer without a cast [-Werror]
   as->aud_ictx = avcodec_alloc_context();
                ^
src/plumbing/transcoding.c:948:16: error: assignment makes pointer from integer without a cast [-Werror]
   as->aud_octx = avcodec_alloc_context();
                ^
src/plumbing/transcoding.c: In function ‘transcoder_init_video’:
src/plumbing/transcoding.c:1057:16: error: assignment makes pointer from integer without a cast [-Werror]
   vs->vid_ictx = avcodec_alloc_context();
                ^
src/plumbing/transcoding.c:1058:16: error: assignment makes pointer from integer without a cast [-Werror]
   vs->vid_octx = avcodec_alloc_context();
                ^
cc1: all warnings being treated as errors
make: *** [/opt/install/tvheadend/build.linux/src/plumbing/transcoding.o] Error 1

Files

libavcodec9.patch (3.67 KB) libavcodec9.patch Steffen Vogel, 2013-10-19 19:16
tvheadend-libav-new-api.patch (7.24 KB) tvheadend-libav-new-api.patch Sascha Schmidt, 2013-11-05 13:59

History

#1

Updated by Sascha Schmidt almost 9 years ago

Seems to be in issue because of a new libavcodec version:

Took this from http://devel.mplayer2.org/ticket/144:
[...] Various old APIs were dropped from Libav git (and these changes were merged to FFmpeg too); the opt.h change is only a small part. Unfortunately using the new APIs requires either dropping compatibility for anything BUT the latest git head (including the recent Libav release, as it had some problems in these APIs) or adding extra workarounds. [...]

#2

Updated by Steffen Vogel almost 9 years ago

I fixed it by simply replacing the old API functions with the new ones.
But Im not sure if it builds on older distros.. Only tested under Debian jessie.

#3

Updated by Sascha Schmidt almost 9 years ago

The old error is gone, but is replaced by a new one...

CC              src/webui/extjs_v4l.o
CC              src/avahi.o
CC              src/libav.o
src/libav.c:54:1: error: return type is an incomplete type
 streaming_component_type2codec_id(streaming_component_type_t type)
 ^
src/libav.c:54:1: error: conflicting types for ‘streaming_component_type2codec_id’
In file included from src/libav.c:1:0:
src/libav.h:26:14: note: previous declaration of ‘streaming_component_type2codec_id’ was here
 enum CodecID streaming_component_type2codec_id(streaming_component_type_t type);
              ^
src/libav.c: In function ‘streaming_component_type2codec_id’:
src/libav.c:56:8: error: variable ‘codec_id’ has initializer but incomplete type
   enum CodecID codec_id = CODEC_ID_NONE;
        ^
src/libav.c:56:16: error: storage size of ‘codec_id’ isn’t known
   enum CodecID codec_id = CODEC_ID_NONE;
                ^
src/libav.c:97:3: error: ‘return’ with a value, in function returning void [-Werror]
   return codec_id;
   ^
src/libav.c:56:16: error: unused variable ‘codec_id’ [-Werror=unused-variable]
   enum CodecID codec_id = CODEC_ID_NONE;
                ^
src/libav.c: At top level:
src/libav.c:105:48: error: parameter 1 (‘id’) has incomplete type
 codec_id2streaming_component_type(enum CodecID id)
                                                ^
cc1: all warnings being treated as errors
make: *** [/opt/install/tvheadend/build.linux/src/libav.o] Error 1
[email protected]:/opt/install/tvheadend#
#4

Updated by Sascha Schmidt almost 9 years ago

Is there any active development or is this project going to die?

#5

Updated by Sascha Schmidt almost 9 years ago

Working through the libav manual I've changed some functions and defines:

Install:

git clone https://github.com/tvheadend/tvheadend.git

patch -s -p0 <tvheadend-libav-new-api.patch

The files within the directory "tvheadend" are now going to be patched. Afterwards you can compile tvheadend with the new libav (for example debian jessie).

Attention++
libav dropped the compatibility support. It will NOT be possible anymore to compile tvheadend with old libav versions.

#6

Updated by Adam Sutton almost 9 years ago

  • Category changed from General to Transcoding
#7

Updated by John Törnblom over 8 years ago

  • Status changed from New to Fixed

Also available in: Atom PDF