Re: [FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread David Varghese
Thanks for the SONAME info . It was bugging me all this time .

You are correct . The SONAME of my shared object (libx264.so.142) was not
same as my filename (libx264.so) . I'm running on Android , and linking is
done there at runtime . Don't know whether I have handle to linking
commands there.

Anyways thank you very much for the critical lead .
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread Moritz Barsnick
On Tue, Aug 05, 2014 at 13:07:36 +, Carl Eugen Hoyos wrote:
> Do I understand correctly that you built a binary of x264 
> that has an incorrect so name? Is it perhaps sufficient to 
> rename the library?

If the Android toolchain behaves like a normal Linux/Unix toolchain,
the (ffmpeg) linking process picks up the soname from the SONAME field
_within_ the dynamic library, not from the filename. (Perhaps from the
filename if said field does not exist.)

In the linking stage of the x264 _library_, you can give the linker a
flag to determine the soname:

http://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_3.html

So you may need to build your libx264.so.142, remove this file, run
"make -n" to identify the final linking command line, and modify this
command line with the corresponding ld flag.

Check with:
$ objdump -p libx264.so | grep SONAME

You may be able to do binary patching to change this name. The tool
patchelf is capable ob binary ELF patching, but unfortunately doesn't
handle this field.

Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread Carl Eugen Hoyos
David Varghese  gmail.com> writes:

> Using configure option "--target-os=android" is 
> generating shared object files which has extension 
> supported by android (.so) .

Thank you for testing this!

> But when I use "--enable -libx264" option the libavutil.so 
> (which is generated after building ffmpeg) is having a 
> dynamic dependency to the shared object file libx264.so.142

Do I understand correctly that you built a binary of x264 
that has an incorrect so name? Is it perhaps sufficient to 
rename the library?

Carl Eugen


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread David Varghese
One more thing I wanted to add was libx264 's configure does not provide an
option similar to "--target-os=android" . Thats why I'm not able to make a
shared object file with extension .so (It generates with extension .so.142).
I expect may be just renaming of .so. to .so will work . But still
for that to work ffmpeg 's "--enable -libx264" need to generate shared
objects which are dynamically linked to an extension format .so and not
.so. .
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread David Varghese
Thanks .

Using configure option "--target-os=android" is generating shared object
files which has extension supported by android (.so) .

But when I use "--enable -libx264" option the libavutil.so (which is
generated after building ffmpeg) is having a dynamic dependency to the
shared object file libx264.so.142 , but what I need is a dependency to
something like libx264.so ..ie, The file extension for the required
dependency shared object is not android compatible even if we use
"--target-os=android".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread Phil Rhodes
> You (of course!) cannot get support here if you edit your configure file. 

Why is this obvious?

PO
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread Carl Eugen Hoyos
David Varghese  gmail.com> writes:

> I have edited the actual configure file

You (of course!) cannot get support here if you 
edit your configure file. Instead, please report 
what does not work with the unchanged source so 
we can fix it.
If you want to compile for Android, please use 
the configure option "--target-os=android" (this 
should stop FFmpeg from building shared libraries 
with major version in the file name).

Please do not top-post here.

Carl Eugen


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread David Varghese
Thanks .

I have edited the actual configure file by replacing the following lines ,

SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'

 LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'

 SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'

 SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'




with the below lines,

SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'

LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'

SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'

SLIB_INSTALL_LINKS='$(SLIBNAME)'



My intention was to generate shared object files with extension .so rather than with the extension format
libavcodec.so. . This is because android's binary generating
system only supports .so format .

When running ffmpeg configure with --enable-libx264 option the generated
shared object files (eg : libavutil) has dynamic dependency with
libx264.so. . But I want to make this dependency to .so extension format so that android binary packaging system will be
able to package shared object for libx264 .






On Tue, Aug 5, 2014 at 4:22 PM, Carl Eugen Hoyos  wrote:

> David Varghese  gmail.com> writes:
>
> > 2) Build ffmpeg v 2.3
>
> If you need support on this mailing list, please
> provide the actual configure line you are using
> (not an external script) and the problem you have
> with that configure line.
> If you believe that our configure script misses
> some feature necessary for a particular OS (like
> Android) please report this here!
>
> If you have problems building x264, I am not sure
> this is the right place to ask.
>
> Carl Eugen
>
>
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 
Thanks and Regards ,
David Varghese
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


Re: [FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread Carl Eugen Hoyos
David Varghese  gmail.com> writes:

> 2) Build ffmpeg v 2.3

If you need support on this mailing list, please 
provide the actual configure line you are using 
(not an external script) and the problem you have 
with that configure line.
If you believe that our configure script misses 
some feature necessary for a particular OS (like 
Android) please report this here!

If you have problems building x264, I am not sure 
this is the right place to ask.

Carl Eugen


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user


[FFmpeg-user] How to integrate shared object file of libx264 while using ffmpeg for android?

2014-08-05 Thread David Varghese
Hi,

I am working with integrating ffmpeg for android .

Since I needed H.264 encoding I need to integrate libx264 with ffmpeg .
Given below are the steps I followed .

1) Build the latest libx264 using android compiler tool-chain to obtain
libx264.so.142 .

2) Build ffmpeg v 2.3 referring to this
 with --enable
-libx264 option while configuring ffmpeg . The method explained in the blog
included some editing in configure file of ffmpeg to generate shared object
files with format [lib name].so rather than the generating shared object
file with format [lib name].so.[version] (Since android build system
supports files with extension .so only).

The building process was successful but since the generated .so files
(after building ffmpeg) has dynamic dependency with libx264.so.142,I need
to package libx264.so.142 also with the android .apk file . But since the
above format (.so.142) is not supported with android apk building system I
cannot package it with the .apk .

So I think the only option I have is to make some changes in configure file
of ffmpeg to change the dynamic dependency of libx264.so.142 to libx264.so
. Am I right??

What changes do I need to make to ffmpeg configure file to achieve this?


-- 
Thanks and Regards ,
David Varghese
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user