[Libav-user] libstagefright.cpp: undefined symbol '_ZTIN7android11MediaSourceE' for libavcodec.so
Alex Cohn
alexcohn at netvision.net.il
Mon Jul 14 11:26:50 CEST 2014
_ZTIN7android11MediaSourceE is typeinfo for android::MediaSource. You
probably have rtti enabled in your build configuration, but Android
libraries do not include run-time type information; so, you should
make sure that --extra-cxxflags contains "-fno-rtti".
(http://stackoverflow.com/a/24725179/192373)
BR
Alex Cohn
On Sun, Jul 13, 2014 at 8:59 AM, Xiemin Chen <chenxiemin at gmail.com> wrote:
> 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
> "libavcodec-55.so"...
>
> 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
> _ZN7android11MediaSource10setBuffersERKNS_6VectorIPNS_11MediaBufferEEE
> 003a319c t _ZN7android11MediaSource5pauseEv
> U _ZN7android11MediaSourceC2Ev
> U _ZN7android11MediaSourceD0Ev
> U _ZN7android11MediaSourceD1Ev
> U _ZN7android11MediaSourceD2Ev
> 003a31d0 t
> _ZN8FFSource4readEPPN7android11MediaBufferEPKNS0_11MediaSource11ReadOptionsE
> 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.
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
More information about the Libav-user
mailing list