[Libav-user] libstagefright.cpp: undefined symbol '_ZTIN7android11MediaSourceE' for libavcodec.so

Xiemin Chen chenxiemin at gmail.com
Sun Jul 13 07:59:34 CEST 2014

Hi, all... I want to try ffmpeg hw accelerate with libstagefright_h264 for
android device.
Seems that the source code has a little bit old with ffmpeg 2.2.1 and
android 4.2.2.
So I try to update the source code but when I only write just a little code
like following:

struct FFSource : public MediaSource {

    virtual status_t start(MetaData *params) { return -1; }

    virtual status_t stop() { return -1; }

    virtual sp<MetaData> getFormat() { return sp<MetaData>(); }

    virtual status_t read(

            MediaBuffer **buffer, const ReadOptions *options) { return -1;

static av_cold int Stagefright_init(AVCodecContext *avctx)


    av_log(avctx, AV_LOG_ERROR, "In function: %s\n", __FUNCTION__);

    FFSource *decoder;

    sp<MediaSource> mediaSource;

    decoder = new FFSource();

    return -1;

it tells me like following when I run the code:
     cannot locate symbol "_ZTIN7android11MediaSourceE" referenced by

And I the result show the nm command for libavcodec-55.so:

[cxm at ubuntu ffmpeg-2.2.1.lsc]$nm ./libavcodec/libavcodec.so  | grep Source

003a31a8 t
003a319c t _ZN7android11MediaSource5pauseEv
         U _ZN7android11MediaSourceC2Ev
         U _ZN7android11MediaSourceD0Ev
         U _ZN7android11MediaSourceD1Ev
         U _ZN7android11MediaSourceD2Ev
003a31d0 t
003a31bc t _ZN8FFSource4stopEv
003a31b4 t _ZN8FFSource5startEPN7android8MetaDataE
003a31c4 t _ZN8FFSource9getFormatEv
003a3340 t _ZN8FFSourceD0Ev
003a32e0 t _ZN8FFSourceD1Ev
007b29f0 d _ZTC8FFSource0_N7android11MediaSourceE
007b29e0 d _ZTI8FFSource
*         U _ZTIN7android11MediaSourceE*
006ac028 r _ZTS8FFSource
007b2970 d _ZTT8FFSource
         U _ZTv0_n12_N7android11MediaSourceD0Ev
         U _ZTv0_n12_N7android11MediaSourceD1Ev
003a3330 t _ZTv0_n12_N8FFSourceD0Ev
003a32d0 t _ZTv0_n12_N8FFSourceD1Ev
007b2980 d _ZTV8FFSource

Also I cannot find _ZTIN7android11MediaSourceE in libstagefright.so. I
think there's any mistake I have in writing the source code instead of
mis-link the stagefright library.
Please help about this topic. Thanks very much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140713/89859e46/attachment.html>

More information about the Libav-user mailing list