In my jni folder, I have ffmpeg library , Android.mk , FFmpegTest.c .
I made some changes in Android.mk after some research about ndk. but I
couldnt compile the test code with ndk. I think Android.mk file is
wrong. here is my android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
I will be so glad, if you give some example codes about android.mk and
ffmpeg. I created the .a and .so files but I couldn't use them. I only
need main Android.mk and test code using ffmpeg library.
> In my jni folder, I have ffmpeg library , Android.mk , FFmpegTest.c .
> I made some changes in Android.mk after some research about ndk. but I
> couldnt compile the test code with ndk. I think Android.mk file is
> wrong. here is my android.mk
> LOCAL_PATH := $(call my-dir)
> include $(CLEAR_VARS)
> I will be so glad, if you give some example codes about android.mk and
> ffmpeg. I created the .a and .so files but I couldn't use them. I only
> need main Android.mk and test code using ffmpeg library.
jint Java_com_test_Test_decodeVideo(JNIEnv* env, jobject
javaThis,jstring filename) {
AVFormatContext *pFormatCtx;
int i, videoStream;
AVCodecContext *pCodecCtx;
AVCodec *pCodec;
AVFrame *pFrame;
AVFrame *pFrameRGB;
AVPacket packet;
int frameFinished;
int numBytes;
uint8_t *buffer;
// Register all formats and codecs
av_register_all();
// Open video file
if(av_open_input_file(&pFormatCtx, filename, NULL, 0, NULL)!=0)
return -1; // Couldn't open file
// Retrieve stream information
if(av_find_stream_info(pFormatCtx)<0)
return -1; // Couldn't find stream information
// Dump information about file onto standard error
dump_format(pFormatCtx, 0, filename, 0);
// Find the first video stream
videoStream=-1;
for(i=0; i<pFormatCtx->nb_streams; i++)
if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) {
videoStream=i;
break;
}
if(videoStream==-1)
return -1; // Didn't find a video stream
// Get a pointer to the codec context for the video stream
pCodecCtx=pFormatCtx->streams[videoStream]->codec;
// Find the decoder for the video stream
pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
if(pCodec==NULL) {
fprintf(stderr, "Unsupported codec!\n");
return -1; // Codec not found
}
// Open codec
if(avcodec_open(pCodecCtx, pCodec)<0)
return -1; // Could not open codec
// Allocate video frame
pFrame=avcodec_alloc_frame();
// Allocate an AVFrame structure
pFrameRGB=avcodec_alloc_frame();
if(pFrameRGB==NULL)
return -1;
// Assign appropriate parts of buffer to image planes in pFrameRGB
// Note that pFrameRGB is an AVFrame, but AVFrame is a superset
// of AVPicture
avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
pCodecCtx->width, pCodecCtx->height);
// Read frames and save first five frames to disk
i=0;
while(av_read_frame(pFormatCtx, &packet)>=0) {
// Is this a packet from the video stream?
if(packet.stream_index==videoStream) {
// Decode video frame
avcodec_decode_video(pCodecCtx, pFrame, &frameFinished,
packet.data, packet.size);
// Did we get a video frame?
if(frameFinished) {
// Convert the image from its native format to RGB
img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24,
(AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx-
> > In my jni folder, I have ffmpeg library , Android.mk , FFmpegTest.c .
> > I made some changes in Android.mk after some research about ndk. but I
> > couldnt compile the test code with ndk. I think Android.mk file is
> > wrong. here is my android.mk
> > LOCAL_PATH := $(call my-dir)
> > include $(CLEAR_VARS)
> > I will be so glad, if you give some example codes about android.mk and
> > ffmpeg. I created the .a and .so files but I couldn't use them. I only
> > need main Android.mk and test code using ffmpeg library.
Try putting the include all-subdir-makefiles at the end of your Android.mk, otherwise LOCAL_PATH will be redefined to a different value and your later module declaration will not find the sources in the correct location.
See the description of the my-dir function in docs/ANDROID-MK.html for more details
> jint Java_com_test_Test_decodeVideo(JNIEnv* env, jobject > javaThis,jstring filename) { > AVFormatContext *pFormatCtx; > int i, videoStream; > AVCodecContext *pCodecCtx; > AVCodec *pCodec; > AVFrame *pFrame; > AVFrame *pFrameRGB; > AVPacket packet; > int frameFinished; > int numBytes; > uint8_t *buffer;
> // Register all formats and codecs > av_register_all();
> // Open video file > if(av_open_input_file(&pFormatCtx, filename, NULL, 0, NULL)!=0) > return -1; // Couldn't open file
> // Retrieve stream information > if(av_find_stream_info(pFormatCtx)<0) > return -1; // Couldn't find stream information
> // Dump information about file onto standard error > dump_format(pFormatCtx, 0, filename, 0);
> // Find the first video stream > videoStream=-1; > for(i=0; i<pFormatCtx->nb_streams; i++) > if(pFormatCtx->streams[i]->codec->codec_type==CODEC_TYPE_VIDEO) { > videoStream=i; > break; > } > if(videoStream==-1) > return -1; // Didn't find a video stream
> // Get a pointer to the codec context for the video stream > pCodecCtx=pFormatCtx->streams[videoStream]->codec;
> // Find the decoder for the video stream > pCodec=avcodec_find_decoder(pCodecCtx->codec_id); > if(pCodec==NULL) { > fprintf(stderr, "Unsupported codec!\n"); > return -1; // Codec not found > } > // Open codec > if(avcodec_open(pCodecCtx, pCodec)<0) > return -1; // Could not open codec
> // Allocate video frame > pFrame=avcodec_alloc_frame();
> // Assign appropriate parts of buffer to image planes in pFrameRGB > // Note that pFrameRGB is an AVFrame, but AVFrame is a superset > // of AVPicture > avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, > pCodecCtx->width, pCodecCtx->height);
> // Read frames and save first five frames to disk > i=0; > while(av_read_frame(pFormatCtx, &packet)>=0) { > // Is this a packet from the video stream? > if(packet.stream_index==videoStream) { > // Decode video frame > avcodec_decode_video(pCodecCtx, pFrame, &frameFinished, > packet.data, packet.size);
> // Did we get a video frame? > if(frameFinished) { > // Convert the image from its native format to RGB > img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24, > (AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx- > >width, > pCodecCtx->height);
> // Free the packet that was allocated by av_read_frame > av_free_packet(&packet); > }
> // Free the RGB image > av_free(buffer); > av_free(pFrameRGB);
> // Free the YUV frame > av_free(pFrame);
> // Close the codec > avcodec_close(pCodecCtx);
> // Close the video file > av_close_input_file(pFormatCtx);
> return 0; > }
> On 31 Aralık, 11:21, alan <a...@birtles.org.uk> wrote: > > "I couldnt compile the test code with ndk" isn't very useful, what is > > the exact problem you are having? what error messages are displayed
> > On Dec 30, 3:49 pm, baris atbas <barisat...@gmail.com> wrote:
> > > Hi everyone,
> > > I have a little knowledege about android ndk. In my application, I > > > will use FFmpeg library.
> > > I am able to configure FFmpeg library and create the libffmpeg.so by > > > the following link :
> > > In my jni folder, I have ffmpeg library , Android.mk , FFmpegTest.c .
> > > I made some changes in Android.mk after some research about ndk. but I > > > couldnt compile the test code with ndk. I think Android.mk file is > > > wrong. here is my android.mk
> > > I will be so glad, if you give some example codes about android.mk and > > > ffmpeg. I created the .a and .so files but I couldn't use them. I only > > > need main Android.mk and test code using ffmpeg library.
> -- > You received this message because you are subscribed to the Google Groups > "android-ndk" group. > To post to this group, send email to android-ndk@googlegroups.com. > To unsubscribe from this group, send email to > android-ndk+unsubscribe@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com> > . > For more options, visit this group at > http://groups.google.com/group/android-ndk?hl=en.
baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
make: *** No rule to make target `/FFmpegTest.c', needed by `/home/
baris/workspace/FFmpegTest/obj/local/armeabi/objs/ffmpg/
FFmpegTest.o'. Stop.
I got this error when I put the include all-subdir-makefiles at the
end of my Android.mk ...
On 31 Aralık, 12:17, David Turner <di...@android.com> wrote:
> Try putting the include all-subdir-makefiles at the end of your Android.mk,
> otherwise LOCAL_PATH will be redefined to a different value and your later
> module declaration will not find the sources in the correct location.
> See the description of the my-dir function in docs/ANDROID-MK.html for more
> details
> On Fri, Dec 31, 2010 at 10:58 AM, baris atbas <barisat...@gmail.com> wrote:
> > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
> > Install : libffmpeg.so => /home/baris/workspace/FFmpegTest/libs/
> > armeabi
> > make: *** No rule to make target `/home/baris/workspace/FFmpegTest/jni/
> > ffmpeg/libswscale/FFmpegTest.c', needed by `/home/baris/workspace/
> > FFmpegTest/obj/local/armeabi/objs/ffmpg/FFmpegTest.o'. Stop.
> > baris@ubuntu:~/workspace/FFmpegTest$
> > it is the error. I think ndk is searching my native code in wrong
> > place.
> > // Assign appropriate parts of buffer to image planes in pFrameRGB
> > // Note that pFrameRGB is an AVFrame, but AVFrame is a superset
> > // of AVPicture
> > avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
> > pCodecCtx->width, pCodecCtx->height);
> > // Read frames and save first five frames to disk
> > i=0;
> > while(av_read_frame(pFormatCtx, &packet)>=0) {
> > // Is this a packet from the video stream?
> > if(packet.stream_index==videoStream) {
> > // Decode video frame
> > avcodec_decode_video(pCodecCtx, pFrame, &frameFinished,
> > packet.data, packet.size);
> > // Did we get a video frame?
> > if(frameFinished) {
> > // Convert the image from its native format to RGB
> > img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24,
> > (AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx-
> > >width,
> > pCodecCtx->height);
> > // Close the codec
> > avcodec_close(pCodecCtx);
> > // Close the video file
> > av_close_input_file(pFormatCtx);
> > return 0;
> > }
> > On 31 Aralık, 11:21, alan <a...@birtles.org.uk> wrote:
> > > "I couldnt compile the test code with ndk" isn't very useful, what is
> > > the exact problem you are having? what error messages are displayed
> > > On Dec 30, 3:49 pm, baris atbas <barisat...@gmail.com> wrote:
> > > > Hi everyone,
> > > > I have a little knowledege about android ndk. In my application, I
> > > > will use FFmpeg library.
> > > > I am able to configure FFmpeg library and create the libffmpeg.so by
> > > > the following link :
> > > > In my jni folder, I have ffmpeg library , Android.mk , FFmpegTest.c .
> > > > I made some changes in Android.mk after some research about ndk. but I
> > > > couldnt compile the test code with ndk. I think Android.mk file is
> > > > wrong. here is my android.mk
> > > > I will be so glad, if you give some example codes about android.mk and
> > > > ffmpeg. I created the .a and .so files but I couldn't use them. I only
> > > > need main Android.mk and test code using ffmpeg library.
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-ndk" group.
> > To post to this group, send email to android-ndk@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-ndk+unsubscribe@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/android-ndk?hl=en.
On Fri, Dec 31, 2010 at 11:30 AM, baris atbas <barisat...@gmail.com> wrote: > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > make: *** No rule to make target `/FFmpegTest.c', needed by `/home/ > baris/workspace/FFmpegTest/obj/local/armeabi/objs/ffmpg/ > FFmpegTest.o'. Stop.
> I got this error when I put the include all-subdir-makefiles at the > end of my Android.mk ...
> On 31 Aralık, 12:17, David Turner <di...@android.com> wrote: > > Try putting the include all-subdir-makefiles at the end of your > Android.mk, > > otherwise LOCAL_PATH will be redefined to a different value and your > later > > module declaration will not find the sources in the correct location.
> > See the description of the my-dir function in docs/ANDROID-MK.html for > more > > details
> > On Fri, Dec 31, 2010 at 10:58 AM, baris atbas <barisat...@gmail.com> > wrote: > > > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > > > Install : libffmpeg.so => /home/baris/workspace/FFmpegTest/libs/ > > > armeabi > > > make: *** No rule to make target `/home/baris/workspace/FFmpegTest/jni/ > > > ffmpeg/libswscale/FFmpegTest.c', needed by `/home/baris/workspace/ > > > FFmpegTest/obj/local/armeabi/objs/ffmpg/FFmpegTest.o'. Stop. > > > baris@ubuntu:~/workspace/FFmpegTest$
> > > it is the error. I think ndk is searching my native code in wrong > > > place.
> > > // Assign appropriate parts of buffer to image planes in pFrameRGB > > > // Note that pFrameRGB is an AVFrame, but AVFrame is a superset > > > // of AVPicture > > > avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24, > > > pCodecCtx->width, pCodecCtx->height);
> > > // Read frames and save first five frames to disk > > > i=0; > > > while(av_read_frame(pFormatCtx, &packet)>=0) { > > > // Is this a packet from the video stream? > > > if(packet.stream_index==videoStream) { > > > // Decode video frame > > > avcodec_decode_video(pCodecCtx, pFrame, &frameFinished, > > > packet.data, packet.size);
> > > // Did we get a video frame? > > > if(frameFinished) { > > > // Convert the image from its native format to RGB > > > img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24, > > > (AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx- > > > >width, > > > pCodecCtx->height);
> > > // Close the codec > > > avcodec_close(pCodecCtx);
> > > // Close the video file > > > av_close_input_file(pFormatCtx);
> > > return 0; > > > }
> > > On 31 Aralık, 11:21, alan <a...@birtles.org.uk> wrote: > > > > "I couldnt compile the test code with ndk" isn't very useful, what is > > > > the exact problem you are having? what error messages are displayed
> > > > On Dec 30, 3:49 pm, baris atbas <barisat...@gmail.com> wrote:
> > > > > Hi everyone,
> > > > > I have a little knowledege about android ndk. In my application, I > > > > > will use FFmpeg library.
> > > > > I am able to configure FFmpeg library and create the libffmpeg.so > by > > > > > the following link :
> > > > > In my jni folder, I have ffmpeg library , Android.mk , FFmpegTest.c > .
> > > > > I made some changes in Android.mk after some research about ndk. > but I > > > > > couldnt compile the test code with ndk. I think Android.mk file is > > > > > wrong. here is my android.mk
> > > > > I will be so glad, if you give some example codes about android.mkand > > > > > ffmpeg. I created the .a and .so files but I couldn't use them. I > only > > > > > need main Android.mk and test code using ffmpeg library.
> > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "android-ndk" group. > > > To post to this group, send email to android-ndk@googlegroups.com. > > > To unsubscribe from this group, send email to > > > android-ndk+unsubscribe@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com> > <android-ndk%2Bunsubscribe@googlegr oups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/android-ndk?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "android-ndk" group. > To post to this group, send email to android-ndk@googlegroups.com. > To unsubscribe from this group, send email to > android-ndk+unsubscribe@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com> > . > For more options, visit this group at > http://groups.google.com/group/android-ndk?hl=en.
> It looks like your LOCAL_PATH is not defined. Did you keep the "LOCAL_PATH
> := $(call my-dir)" line at the top of your Android.mk ?
> On Fri, Dec 31, 2010 at 11:30 AM, baris atbas <barisat...@gmail.com> wrote:
> > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
> > make: *** No rule to make target `/FFmpegTest.c', needed by `/home/
> > baris/workspace/FFmpegTest/obj/local/armeabi/objs/ffmpg/
> > FFmpegTest.o'. Stop.
> > I got this error when I put the include all-subdir-makefiles at the
> > end of my Android.mk ...
> > On 31 Aralık, 12:17, David Turner <di...@android.com> wrote:
> > > Try putting the include all-subdir-makefiles at the end of your
> > Android.mk,
> > > otherwise LOCAL_PATH will be redefined to a different value and your
> > later
> > > module declaration will not find the sources in the correct location.
> > > See the description of the my-dir function in docs/ANDROID-MK.html for
> > more
> > > details
> > > On Fri, Dec 31, 2010 at 10:58 AM, baris atbas <barisat...@gmail.com>
> > wrote:
> > > > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
> > > > Install : libffmpeg.so => /home/baris/workspace/FFmpegTest/libs/
> > > > armeabi
> > > > make: *** No rule to make target `/home/baris/workspace/FFmpegTest/jni/
> > > > ffmpeg/libswscale/FFmpegTest.c', needed by `/home/baris/workspace/
> > > > FFmpegTest/obj/local/armeabi/objs/ffmpg/FFmpegTest.o'. Stop.
> > > > baris@ubuntu:~/workspace/FFmpegTest$
> > > > it is the error. I think ndk is searching my native code in wrong
> > > > place.
> > > > // Assign appropriate parts of buffer to image planes in pFrameRGB
> > > > // Note that pFrameRGB is an AVFrame, but AVFrame is a superset
> > > > // of AVPicture
> > > > avpicture_fill((AVPicture *)pFrameRGB, buffer, PIX_FMT_RGB24,
> > > > pCodecCtx->width, pCodecCtx->height);
> > > > // Read frames and save first five frames to disk
> > > > i=0;
> > > > while(av_read_frame(pFormatCtx, &packet)>=0) {
> > > > // Is this a packet from the video stream?
> > > > if(packet.stream_index==videoStream) {
> > > > // Decode video frame
> > > > avcodec_decode_video(pCodecCtx, pFrame, &frameFinished,
> > > > packet.data, packet.size);
> > > > // Did we get a video frame?
> > > > if(frameFinished) {
> > > > // Convert the image from its native format to RGB
> > > > img_convert((AVPicture *)pFrameRGB, PIX_FMT_RGB24,
> > > > (AVPicture*)pFrame, pCodecCtx->pix_fmt, pCodecCtx-
> > > > >width,
> > > > pCodecCtx->height);
> > > > // Close the codec
> > > > avcodec_close(pCodecCtx);
> > > > // Close the video file
> > > > av_close_input_file(pFormatCtx);
> > > > return 0;
> > > > }
> > > > On 31 Aralık, 11:21, alan <a...@birtles.org.uk> wrote:
> > > > > "I couldnt compile the test code with ndk" isn't very useful, what is
> > > > > the exact problem you are having? what error messages are displayed
> > > > > On Dec 30, 3:49 pm, baris atbas <barisat...@gmail.com> wrote:
> > > > > > Hi everyone,
> > > > > > I have a little knowledege about android ndk. In my application, I
> > > > > > will use FFmpeg library.
> > > > > > I am able to configure FFmpeg library and create the libffmpeg.so
> > by
> > > > > > the following link :
> > > > > > In my jni folder, I have ffmpeg library , Android.mk , FFmpegTest.c
> > .
> > > > > > I made some changes in Android.mk after some research about ndk.
> > but I
> > > > > > couldnt compile the test code with ndk. I think Android.mk file is
> > > > > > wrong. here is my android.mk
> > > > > > I will be so glad, if you give some example codes about android.mkand
> > > > > > ffmpeg. I created the .a and .so files but I couldn't use them. I
> > only
> > > > > > need main Android.mk and test code using ffmpeg library.
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "android-ndk" group.
> > > > To post to this group, send email to android-ndk@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > android-ndk+unsubscribe@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > <android-ndk%2Bunsubscribe@googlegr oups.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-ndk?hl=en.
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-ndk" group.
> > To post to this group, send email to android-ndk@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-ndk+unsubscribe@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/android-ndk?hl=en.
mmm, can you try a "ndk-build clean" first then try to build again. It might be related to a bad dependency file that was generated on a previous pass.
On Fri, Dec 31, 2010 at 11:55 AM, baris atbas <barisat...@gmail.com> wrote: > yes, I only changed the location of include all subdir files command.
> LOCAL_PATH := $(call my-dir) > include $(CLEAR_VARS) > LOCAL_MODULE := ffmpg > LOCAL_SRC_FILES := FFmpegTest.c > LOCAL_LDLIBS := -libffmpeg > include $(BUILD_SHARED_LIBRARY) > include $(all-subdir-makefiles)
> On 31 Aralık, 12:48, David Turner <di...@android.com> wrote: > > It looks like your LOCAL_PATH is not defined. Did you keep the > "LOCAL_PATH > > := $(call my-dir)" line at the top of your Android.mk ?
> > On Fri, Dec 31, 2010 at 11:30 AM, baris atbas <barisat...@gmail.com> > wrote: > > > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > > > make: *** No rule to make target `/FFmpegTest.c', needed by `/home/ > > > baris/workspace/FFmpegTest/obj/local/armeabi/objs/ffmpg/ > > > FFmpegTest.o'. Stop.
> > > I got this error when I put the include all-subdir-makefiles at the > > > end of my Android.mk ...
> > > On 31 Aralık, 12:17, David Turner <di...@android.com> wrote: > > > > Try putting the include all-subdir-makefiles at the end of your > > > Android.mk, > > > > otherwise LOCAL_PATH will be redefined to a different value and your > > > later > > > > module declaration will not find the sources in the correct location.
> > > > See the description of the my-dir function in docs/ANDROID-MK.html > for > > > more > > > > details
> > > > On Fri, Dec 31, 2010 at 10:58 AM, baris atbas <barisat...@gmail.com> > > > wrote: > > > > > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > > > > > Install : libffmpeg.so => > /home/baris/workspace/FFmpegTest/libs/ > > > > > armeabi > > > > > make: *** No rule to make target > `/home/baris/workspace/FFmpegTest/jni/ > > > > > ffmpeg/libswscale/FFmpegTest.c', needed by `/home/baris/workspace/ > > > > > FFmpegTest/obj/local/armeabi/objs/ffmpg/FFmpegTest.o'. Stop. > > > > > baris@ubuntu:~/workspace/FFmpegTest$
> > > > > it is the error. I think ndk is searching my native code in wrong > > > > > place.
> > > > > // Close the codec > > > > > avcodec_close(pCodecCtx);
> > > > > // Close the video file > > > > > av_close_input_file(pFormatCtx);
> > > > > return 0; > > > > > }
> > > > > On 31 Aralık, 11:21, alan <a...@birtles.org.uk> wrote: > > > > > > "I couldnt compile the test code with ndk" isn't very useful, > what is > > > > > > the exact problem you are having? what error messages are > displayed
> > > > > > On Dec 30, 3:49 pm, baris atbas <barisat...@gmail.com> wrote:
> > > > > > > Hi everyone,
> > > > > > > I have a little knowledege about android ndk. In my > application, I > > > > > > > will use FFmpeg library.
> > > > > > > I am able to configure FFmpeg library and create the > libffmpeg.so > > > by > > > > > > > the following link :
> > > > > > > In my jni folder, I have ffmpeg library , Android.mk , > FFmpegTest.c > > > .
> > > > > > > I made some changes in Android.mk after some research about > ndk. > > > but I > > > > > > > couldnt compile the test code with ndk. I think Android.mk file > is > > > > > > > wrong. here is my android.mk
> > > > > > > I will be so glad, if you give some example codes about > android.mkand > > > > > > > ffmpeg. I created the .a and .so files but I couldn't use them. > I > > > only > > > > > > > need main Android.mk and test code using ffmpeg library.
> > > > > -- > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "android-ndk" group. > > > > > To post to this group, send email to android-ndk@googlegroups.com. > > > > > To unsubscribe from this group, send email to > > > > > android-ndk+unsubscribe@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com> > <android-ndk%2Bunsubscribe@googlegr oups.com> > > > <android-ndk%2Bunsubscribe@googlegr oups.com> > > > > > . > > > > > For more options, visit this group at > > > > >http://groups.google.com/group/android-ndk?hl=en.
> > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "android-ndk" group. > > > To post to this group, send email to android-ndk@googlegroups.com. > > > To unsubscribe from this group, send email to
I got this errors. Files that compiler couldnt find exist in the
ffmpeg folder.
baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c
In file included from /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c:1:
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
30:33: error: libavcore/samplefmt.h: No such file or directory
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
31:30: error: libavutil/avutil.h: No such file or directory
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
32:27: error: libavutil/cpu.h: No such file or directory
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
437:36: error: libavcore/audioconvert.h: No such file or directory
In file included from /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c:1:
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:779:
error: expected specifier-qualifier-list before 'int16_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1048:
error: expected specifier-qualifier-list before 'int64_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1102:
error: expected specifier-qualifier-list before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1117:
error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2801:
error: field 'type' has incomplete type
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2805:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2819:
error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2849:
error: field 'type' has incomplete type
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2863:
error: field 'pix_fmt' has incomplete type
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2887:
error: expected ';', ',' or ')' before '*' token
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2900:
error: expected ';' before 'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2928:
error: expected specifier-qualifier-list before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2955:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'attribute_deprecated'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3001:
error: expected specifier-qualifier-list before 'uint16_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3014:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3078:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'ReSampleContext'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102:
warning: 'enum AVSampleFormat' declared inside parameter list
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102:
warning: its scope is only this definition or declaration, which is
probably not what you want
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3181:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3217:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'enum'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3234:
error: expected '=', ',', ';', 'asm' or '__attribute__' before
'av_get_codec_tag_string'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3285:
error: expected ')' before 'pix_fmt_mask'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3293:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3347:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3490:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3544:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3588:
error: expected declaration specifiers or '...' before 'int16_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3659:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3691:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3693:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3714:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3729:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3731:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3778:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3785:
error: expected specifier-qualifier-list before 'int64_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3916:
error: expected ';', ',' or ')' before '*' token
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3918:
error: expected ';' before 'void'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3930:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3967:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3968:
error: expected ';', ',' or ')' before '*' token
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3974:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3975:
error: expected ';', ',' or ')' before '*' token
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3992:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3993:
error: expected ';', ',' or ')' before '*' token
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3994:
error: expected ';' before 'void'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4002:
error: expected declaration specifiers or '...' before 'uint8_t'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4003:
error: expected ';', ',' or ')' before '*' token
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4036:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4074:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4081:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
In file included from /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c:2:
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h:
106:32: error: libavcodec/avcodec.h: No such file or directory
In file included from /home/baris/workspace/FFmpegTest/jni/ffmpeg/
libavformat/avformat.h:108,
from /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c:2:
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:33:30:
error: libavutil/common.h: No such file or directory
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:34:27:
error: libavutil/log.h: No such file or directory
In file included from /home/baris/workspace/FFmpegTest/jni/ffmpeg/
libavformat/avformat.h:108,
from /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c:2:
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:273:
error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:293:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:298:
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
In file included from /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c:2:
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h:
206: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'int'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h:
225: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'void'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h:
293: error: expected specifier-qualifier-list before 'AVRational'
In file included from /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c:2:
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h:
436: error: expected specifier-qualifier-list before
'attribute_deprecated'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h:
543: error: expected specifier-qualifier-list before 'AVRational'
/home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h:
694: error: expected specifier-qualifier-list before
...
By default, source files will be searched under $(LOCAL_PATH), so if you have files elsewhere, you should set LOCAL_C_INCLUDES to point to the corresponding directory.
If these are part of an imported module, consider using LOCAL_EXPORT_C_INCLUDES when declaring the module itself so that other modules that use it have the corresponding paths added to their own LOCAL_C_INCLUDES automatically.
On Fri, Dec 31, 2010 at 12:41 PM, baris atbas <barisat...@gmail.com> wrote: > I got this errors. Files that compiler couldnt find exist in the > ffmpeg folder.
> baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/ > FFmpegTest.c > In file included from /home/baris/workspace/FFmpegTest/jni/ > FFmpegTest.c:1: > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > 30:33: error: libavcore/samplefmt.h: No such file or directory > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > 31:30: error: libavutil/avutil.h: No such file or directory > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > 32:27: error: libavutil/cpu.h: No such file or directory > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > 437:36: error: libavcore/audioconvert.h: No such file or directory > In file included from /home/baris/workspace/FFmpegTest/jni/ > FFmpegTest.c:1: > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:779: > error: expected specifier-qualifier-list before 'int16_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1048: > error: expected specifier-qualifier-list before 'int64_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1102: > error: expected specifier-qualifier-list before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1117: > error: expected ':', ',', ';', '}' or '__attribute__' before '*' token > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2801: > error: field 'type' has incomplete type > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2805: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2819: > error: expected ':', ',', ';', '}' or '__attribute__' before '*' token > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2849: > error: field 'type' has incomplete type > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2863: > error: field 'pix_fmt' has incomplete type > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2887: > error: expected ';', ',' or ')' before '*' token > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2900: > error: expected ';' before 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2928: > error: expected specifier-qualifier-list before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2955: > error: expected '=', ',', ';', 'asm' or '__attribute__' before > 'attribute_deprecated' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3001: > error: expected specifier-qualifier-list before 'uint16_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3014: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3078: > error: expected '=', ',', ';', 'asm' or '__attribute__' before > 'ReSampleContext' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102: > warning: 'enum AVSampleFormat' declared inside parameter list > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102: > warning: its scope is only this definition or declaration, which is > probably not what you want > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3181: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3217: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'enum' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3234: > error: expected '=', ',', ';', 'asm' or '__attribute__' before > 'av_get_codec_tag_string' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3285: > error: expected ')' before 'pix_fmt_mask' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3293: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3347: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3490: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3544: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3588: > error: expected declaration specifiers or '...' before 'int16_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3659: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3691: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3693: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3714: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3729: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3731: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3778: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3785: > error: expected specifier-qualifier-list before 'int64_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3916: > error: expected ';', ',' or ')' before '*' token > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3918: > error: expected ';' before 'void' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3930: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3967: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3968: > error: expected ';', ',' or ')' before '*' token > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3974: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3975: > error: expected ';', ',' or ')' before '*' token > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3992: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3993: > error: expected ';', ',' or ')' before '*' token > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3994: > error: expected ';' before 'void' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4002: > error: expected declaration specifiers or '...' before 'uint8_t' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4003: > error: expected ';', ',' or ')' before '*' token > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4036: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4074: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4081: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > In file included from /home/baris/workspace/FFmpegTest/jni/ > FFmpegTest.c:2: > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h: > 106:32: error: libavcodec/avcodec.h: No such file or directory > In file included from /home/baris/workspace/FFmpegTest/jni/ffmpeg/ > libavformat/avformat.h:108, > from /home/baris/workspace/FFmpegTest/jni/ > FFmpegTest.c:2: > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:33:30: > error: libavutil/common.h: No such file or directory > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:34:27: > error: libavutil/log.h: No such file or directory > In file included from /home/baris/workspace/FFmpegTest/jni/ffmpeg/ > libavformat/avformat.h:108, > from /home/baris/workspace/FFmpegTest/jni/ > FFmpegTest.c:2: > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:273: > error: expected ':', ',', ';', '}' or '__attribute__' before '*' token > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:293: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avio.h:298: > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > In file included from /home/baris/workspace/FFmpegTest/jni/ > FFmpegTest.c:2: > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h: > 206: error: expected '=', ',', ';', 'asm' or '__attribute__' before > 'int' > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavformat/avformat.h: > 225: error: expected '=', ',', ';', 'asm' or '__attribute__' before > 'void'
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ffmpg
LOCAL_SRC_FILES := FFmpegTest.c
LOCAL_LDLIBS := -libffmpeg
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/
include $(BUILD_SHARED_LIBRARY)
include $(all-subdir-makefiles)
but still there are errors.
baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c: In function
'Java_com_test_Test_decodeVideo':
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:103: warning:
'avcodec_decode_video' is deprecated (declared at /home/baris/
workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606)
SharedLibrary : libffmpg.so
/home/baris/ndk/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/../lib/gcc/
arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: cannot find -libffmpeg
collect2: ld returned 1 exit status
make: *** [/home/baris/workspace/FFmpegTest/obj/local/armeabi/
libffmpg.so] Error 1
On 31 Aralık, 13:43, David Turner <di...@android.com> wrote:
> By default, source files will be searched under $(LOCAL_PATH), so if you
> have files elsewhere, you should set LOCAL_C_INCLUDES to point to the
> corresponding directory.
> If these are part of an imported module, consider using
> LOCAL_EXPORT_C_INCLUDES when declaring the module itself so that other
> modules that use it have the corresponding paths added to their own
> LOCAL_C_INCLUDES automatically.
> On Fri, Dec 31, 2010 at 12:41 PM, baris atbas <barisat...@gmail.com> wrote:
> > I got this errors. Files that compiler couldnt find exist in the
> > ffmpeg folder.
> > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
> > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/
> > FFmpegTest.c
> > In file included from /home/baris/workspace/FFmpegTest/jni/
> > FFmpegTest.c:1:
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
> > 30:33: error: libavcore/samplefmt.h: No such file or directory
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
> > 31:30: error: libavutil/avutil.h: No such file or directory
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
> > 32:27: error: libavutil/cpu.h: No such file or directory
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
> > 437:36: error: libavcore/audioconvert.h: No such file or directory
> > In file included from /home/baris/workspace/FFmpegTest/jni/
> > FFmpegTest.c:1:
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:779:
> > error: expected specifier-qualifier-list before 'int16_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1048:
> > error: expected specifier-qualifier-list before 'int64_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1102:
> > error: expected specifier-qualifier-list before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1117:
> > error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2801:
> > error: field 'type' has incomplete type
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2805:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2819:
> > error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2849:
> > error: field 'type' has incomplete type
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2863:
> > error: field 'pix_fmt' has incomplete type
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2887:
> > error: expected ';', ',' or ')' before '*' token
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2900:
> > error: expected ';' before 'int'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2928:
> > error: expected specifier-qualifier-list before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2955:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before
> > 'attribute_deprecated'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3001:
> > error: expected specifier-qualifier-list before 'uint16_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3014:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3078:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before
> > 'ReSampleContext'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102:
> > warning: 'enum AVSampleFormat' declared inside parameter list
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102:
> > warning: its scope is only this definition or declaration, which is
> > probably not what you want
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3181:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3217:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'enum'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3234:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before
> > 'av_get_codec_tag_string'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3285:
> > error: expected ')' before 'pix_fmt_mask'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3293:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3347:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3490:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3544:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3588:
> > error: expected declaration specifiers or '...' before 'int16_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3659:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3691:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3693:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3714:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3729:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3731:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3778:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3785:
> > error: expected specifier-qualifier-list before 'int64_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3916:
> > error: expected ';', ',' or ')' before '*' token
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3918:
> > error: expected ';' before 'void'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3930:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3967:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3968:
> > error: expected ';', ',' or ')' before '*' token
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3974:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3975:
> > error: expected ';', ',' or ')' before '*' token
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3992:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3993:
> > error: expected ';', ',' or ')' before '*' token
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3994:
> > error: expected ';' before 'void'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4002:
> > error: expected declaration specifiers or '...' before 'uint8_t'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4003:
> > error: expected ';', ',' or ')' before '*' token
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4036:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4074:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
> > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:4081:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
> > In file included from /home/baris/workspace/FFmpegTest/jni/
> > FFmpegTest.c:2:
On Fri, Dec 31, 2010 at 5:26 PM, baris atbas <barisat...@gmail.com> wrote: > I changed the Android.mk like that :
> LOCAL_PATH := $(call my-dir) > include $(CLEAR_VARS) > LOCAL_MODULE := ffmpg > LOCAL_SRC_FILES := FFmpegTest.c > LOCAL_LDLIBS := -libffmpeg > LOCAL_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/ > include $(BUILD_SHARED_LIBRARY) > include $(all-subdir-makefiles)
> but still there are errors. > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/ > FFmpegTest.c > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c: In function > 'Java_com_test_Test_decodeVideo': > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:103: warning: > 'avcodec_decode_video' is deprecated (declared at /home/baris/ > workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606) > SharedLibrary : libffmpg.so > /home/baris/ndk/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/../lib/gcc/ > arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: cannot find -libffmpeg > collect2: ld returned 1 exit status > make: *** [/home/baris/workspace/FFmpegTest/obj/local/armeabi/ > libffmpg.so] Error 1
> On 31 Aralık, 13:43, David Turner <di...@android.com> wrote: > > By default, source files will be searched under $(LOCAL_PATH), so if you > > have files elsewhere, you should set LOCAL_C_INCLUDES to point to the > > corresponding directory.
> > If these are part of an imported module, consider using > > LOCAL_EXPORT_C_INCLUDES when declaring the module itself so that other > > modules that use it have the corresponding paths added to their own > > LOCAL_C_INCLUDES automatically.
> > On Fri, Dec 31, 2010 at 12:41 PM, baris atbas <barisat...@gmail.com> > wrote: > > > I got this errors. Files that compiler couldnt find exist in the > > > ffmpeg folder.
> > > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > > > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/ > > > FFmpegTest.c > > > In file included from /home/baris/workspace/FFmpegTest/jni/ > > > FFmpegTest.c:1: > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > > > 30:33: error: libavcore/samplefmt.h: No such file or directory > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > > > 31:30: error: libavutil/avutil.h: No such file or directory > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > > > 32:27: error: libavutil/cpu.h: No such file or directory > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > > > 437:36: error: libavcore/audioconvert.h: No such file or directory > > > In file included from /home/baris/workspace/FFmpegTest/jni/ > > > FFmpegTest.c:1: > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:779: > > > error: expected specifier-qualifier-list before 'int16_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1048: > > > error: expected specifier-qualifier-list before 'int64_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1102: > > > error: expected specifier-qualifier-list before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1117: > > > error: expected ':', ',', ';', '}' or '__attribute__' before '*' token > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2801: > > > error: field 'type' has incomplete type > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2805: > > > error: expected declaration specifiers or '...' before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2819: > > > error: expected ':', ',', ';', '}' or '__attribute__' before '*' token > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2849: > > > error: field 'type' has incomplete type > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2863: > > > error: field 'pix_fmt' has incomplete type > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2887: > > > error: expected ';', ',' or ')' before '*' token > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2900: > > > error: expected ';' before 'int' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2928: > > > error: expected specifier-qualifier-list before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2955: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before > > > 'attribute_deprecated' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3001: > > > error: expected specifier-qualifier-list before 'uint16_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3014: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3078: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before > > > 'ReSampleContext' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102: > > > warning: 'enum AVSampleFormat' declared inside parameter list > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102: > > > warning: its scope is only this definition or declaration, which is > > > probably not what you want > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3181: > > > error: expected declaration specifiers or '...' before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3217: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'enum' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3234: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before > > > 'av_get_codec_tag_string' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3285: > > > error: expected ')' before 'pix_fmt_mask' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3293: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3347: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3490: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3544: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3588: > > > error: expected declaration specifiers or '...' before 'int16_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3659: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3691: > > > error: expected declaration specifiers or '...' before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3693: > > > error: expected declaration specifiers or '...' before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3714: > > > error: expected declaration specifiers or '...' before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3729: > > > error: expected declaration specifiers or '...' before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3731: > > > error: expected declaration specifiers or '...' before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3778: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3785: > > > error: expected specifier-qualifier-list before 'int64_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3916: > > > error: expected ';', ',' or ')' before '*' token > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3918: > > > error: expected ';' before 'void' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3930: > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3967: > > > error: expected declaration specifiers or '...' before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3968: > > > error: expected ';', ',' or ')' before '*' token > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3974: > > > error: expected declaration specifiers or '...' before 'uint8_t' > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3975: > > > error: expected ';', ',' or ')' before
I added the local shared lib statement but there are still errors :
baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/
FFmpegTest.c
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c: In function
'Java_com_test_Test_decodeVideo':
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:104: warning:
'avcodec_decode_video' is deprecated (declared at /home/baris/
workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606)
SharedLibrary : libffmpg.so
/home/baris/workspace/FFmpegTest/obj/local/armeabi/objs/ffmpg/
FFmpegTest.o: In function `Java_com_test_Test_decodeVideo':
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:43: undefined
reference to `av_register_all'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:46: undefined
reference to `av_open_input_file'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:50: undefined
reference to `av_find_stream_info'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:54: undefined
reference to `dump_format'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:70: undefined
reference to `avcodec_find_decoder'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:76: undefined
reference to `avcodec_open'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:80: undefined
reference to `avcodec_alloc_frame'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:83: undefined
reference to `avcodec_alloc_frame'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:88: undefined
reference to `avpicture_get_size'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:90: undefined
reference to `av_malloc'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:95: undefined
reference to `avpicture_fill'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:121: undefined
reference to `av_free_packet'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:100: undefined
reference to `av_read_frame'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:125: undefined
reference to `av_free'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:126: undefined
reference to `av_free'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:129: undefined
reference to `av_free'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:132: undefined
reference to `avcodec_close'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:135: undefined
reference to `av_close_input_file'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:104: undefined
reference to `avcodec_decode_video'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:110: undefined
reference to `img_convert'
collect2: ld returned 1 exit status
make: *** [/home/baris/workspace/FFmpegTest/obj/local/armeabi/
libffmpg.so] Error 1
here is my last Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
# Here we give our module name and source file(s)
LOCAL_MODULE := ffmpg
LOCAL_SRC_FILES := FFmpegTest.c
LOCAL_SHARED_LIBRARIES := ffmpeg
LOCAL_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/
LOCAL_LDLIBS += -lz -llog
include $(BUILD_SHARED_LIBRARY)
include $(all-subdir-makefiles)
On 31 Aralık, 14:41, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > but still there are errors.
> > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
> > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/
> > FFmpegTest.c
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c: In function
> > 'Java_com_test_Test_decodeVideo':
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:103: warning:
> > 'avcodec_decode_video' is deprecated (declared at /home/baris/
> > workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606)
> > SharedLibrary : libffmpg.so
> > /home/baris/ndk/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/../lib/gcc/
> > arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: cannot find -libffmpeg
> > collect2: ld returned 1 exit status
> > make: *** [/home/baris/workspace/FFmpegTest/obj/local/armeabi/
> > libffmpg.so] Error 1
> > On 31 Aralık, 13:43, David Turner <di...@android.com> wrote:
> > > By default, source files will be searched under $(LOCAL_PATH), so if you
> > > have files elsewhere, you should set LOCAL_C_INCLUDES to point to the
> > > corresponding directory.
> > > If these are part of an imported module, consider using
> > > LOCAL_EXPORT_C_INCLUDES when declaring the module itself so that other
> > > modules that use it have the corresponding paths added to their own
> > > LOCAL_C_INCLUDES automatically.
> > > On Fri, Dec 31, 2010 at 12:41 PM, baris atbas <barisat...@gmail.com>
> > wrote:
> > > > I got this errors. Files that compiler couldnt find exist in the
> > > > ffmpeg folder.
> > > > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
> > > > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/
> > > > FFmpegTest.c
> > > > In file included from /home/baris/workspace/FFmpegTest/jni/
> > > > FFmpegTest.c:1:
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
> > > > 30:33: error: libavcore/samplefmt.h: No such file or directory
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
> > > > 31:30: error: libavutil/avutil.h: No such file or directory
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
> > > > 32:27: error: libavutil/cpu.h: No such file or directory
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:
> > > > 437:36: error: libavcore/audioconvert.h: No such file or directory
> > > > In file included from /home/baris/workspace/FFmpegTest/jni/
> > > > FFmpegTest.c:1:
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:779:
> > > > error: expected specifier-qualifier-list before 'int16_t'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1048:
> > > > error: expected specifier-qualifier-list before 'int64_t'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1102:
> > > > error: expected specifier-qualifier-list before 'uint8_t'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:1117:
> > > > error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2801:
> > > > error: field 'type' has incomplete type
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2805:
> > > > error: expected declaration specifiers or '...' before 'uint8_t'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2819:
> > > > error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2849:
> > > > error: field 'type' has incomplete type
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2863:
> > > > error: field 'pix_fmt' has incomplete type
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2887:
> > > > error: expected ';', ',' or ')' before '*' token
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2900:
> > > > error: expected ';' before 'int'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2928:
> > > > error: expected specifier-qualifier-list before 'uint8_t'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:2955:
> > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before
> > > > 'attribute_deprecated'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3001:
> > > > error: expected specifier-qualifier-list before 'uint16_t'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3014:
> > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3078:
> > > > error: expected '=', ',', ';', 'asm' or '__attribute__' before
> > > > 'ReSampleContext'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102:
> > > > warning: 'enum AVSampleFormat' declared inside parameter list
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3102:
> > > > warning: its scope is only this definition or declaration, which is
> > > > probably not what you want
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3181:
> > > > error: expected declaration specifiers or '...' before 'uint8_t'
> > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3217:
> > > > error: expected '=', ',', ';', 'asm' or
include $(CLEAR_VARS) # Here we give our module name and source file(s) LOCAL_MODULE := ffmpg LOCAL_SRC_FILES := FFmpegTest.c LOCAL_SHARED_LIBRARIES := ffmpeg LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/ LOCAL_LDLIBS += -lz -llog include $(BUILD_SHARED_LIBRARY) include $(all-subdir-makefiles)
On Fri, Dec 31, 2010 at 9:24 PM, baris atbas <barisat...@gmail.com> wrote: > I added the local shared lib statement but there are still errors :
> baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/ > FFmpegTest.c > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c: In function > 'Java_com_test_Test_decodeVideo': > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:104: warning: > 'avcodec_decode_video' is deprecated (declared at /home/baris/ > workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606) > SharedLibrary : libffmpg.so > /home/baris/workspace/FFmpegTest/obj/local/armeabi/objs/ffmpg/ > FFmpegTest.o: In function `Java_com_test_Test_decodeVideo': > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:43: undefined > reference to `av_register_all' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:46: undefined > reference to `av_open_input_file' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:50: undefined > reference to `av_find_stream_info' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:54: undefined > reference to `dump_format' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:70: undefined > reference to `avcodec_find_decoder' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:76: undefined > reference to `avcodec_open' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:80: undefined > reference to `avcodec_alloc_frame' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:83: undefined > reference to `avcodec_alloc_frame' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:88: undefined > reference to `avpicture_get_size' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:90: undefined > reference to `av_malloc' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:95: undefined > reference to `avpicture_fill' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:121: undefined > reference to `av_free_packet' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:100: undefined > reference to `av_read_frame' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:125: undefined > reference to `av_free' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:126: undefined > reference to `av_free' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:129: undefined > reference to `av_free' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:132: undefined > reference to `avcodec_close' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:135: undefined > reference to `av_close_input_file' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:104: undefined > reference to `avcodec_decode_video' > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:110: undefined > reference to `img_convert' > collect2: ld returned 1 exit status > make: *** [/home/baris/workspace/FFmpegTest/obj/local/armeabi/ > libffmpg.so] Error 1
> here is my last Android.mk
> LOCAL_PATH := $(call my-dir) > include $(CLEAR_VARS) > # Here we give our module name and source file(s) > LOCAL_MODULE := ffmpg > LOCAL_SRC_FILES := FFmpegTest.c > LOCAL_SHARED_LIBRARIES := ffmpeg > LOCAL_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/ > LOCAL_LDLIBS += -lz -llog > include $(BUILD_SHARED_LIBRARY) > include $(all-subdir-makefiles)
> On 31 Aralık, 14:41, Udayakumar Rayala <uday.ray...@gmail.com> wrote: > > You would have to specify LOCAL_SHARED_LIBRARIES parameter instead of > > LOCAL_LDLIBS.
> > LOCAL_SHARED_LIBRARIES := ffmpeg
> > Assuming that in the sub directories, you are building a shared library > with > > module name ffmpeg (as mentioned inhttp:// > androidcore.com/android-programming-tutorials/641-how-to-compi... > > ).
> > Below is an example of Android.mk, i have done in one my projects:
> > > but still there are errors. > > > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > > > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/ > > > FFmpegTest.c > > > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c: In function > > > 'Java_com_test_Test_decodeVideo': > > > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:103: warning: > > > 'avcodec_decode_video' is deprecated (declared at /home/baris/ > > > workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606) > > > SharedLibrary : libffmpg.so > > > /home/baris/ndk/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/../lib/gcc/ > > > arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: cannot find -libffmpeg > > > collect2: ld returned 1 exit status > > > make: *** [/home/baris/workspace/FFmpegTest/obj/local/armeabi/ > > > libffmpg.so] Error 1
> > > On 31 Aralık, 13:43, David Turner <di...@android.com> wrote: > > > > By default, source files will be searched under $(LOCAL_PATH), so if > you > > > > have files elsewhere, you should set LOCAL_C_INCLUDES to point to the > > > > corresponding directory.
> > > > If these are part of an imported module, consider using > > > > LOCAL_EXPORT_C_INCLUDES when declaring the module itself so that > other > > > > modules that use it have the corresponding paths added to their own > > > > LOCAL_C_INCLUDES automatically.
> > > > On Fri, Dec 31, 2010 at 12:41 PM, baris atbas <barisat...@gmail.com> > > > wrote: > > > > > I got this errors. Files that compiler couldnt find exist in the > > > > > ffmpeg folder.
> > > > > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > > > > > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/ > > > > > FFmpegTest.c > > > > > In file included from /home/baris/workspace/FFmpegTest/jni/ > > > > > FFmpegTest.c:1: > > > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > > > > > 30:33: error: libavcore/samplefmt.h: No such file or directory > > > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > > > > > 31:30: error: libavutil/avutil.h: No such file or directory > > > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > > > > > 32:27: error: libavutil/cpu.h: No such file or directory > > > > > /home/baris/workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h: > > > > > 437:36: error: libavcore/audioconvert.h: No such file or directory > > > > > In file included from /home/baris/workspace/FFmpegTest/jni/ > > > > > FFmpegTest.c:1:
> include $(CLEAR_VARS)
> # Here we give our module name and source file(s)
> LOCAL_MODULE := ffmpg
> LOCAL_SRC_FILES := FFmpegTest.c
> LOCAL_SHARED_LIBRARIES := ffmpeg
> LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/
> LOCAL_LDLIBS += -lz -llog
> include $(BUILD_SHARED_LIBRARY)
> include $(all-subdir-makefiles)
> On Fri, Dec 31, 2010 at 9:24 PM, baris atbas <barisat...@gmail.com> wrote:
> > I added the local shared lib statement but there are still errors :
> > baris@ubuntu:~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
> > Compile thumb : ffmpg <= /home/baris/workspace/FFmpegTest/jni/
> > FFmpegTest.c
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c: In function
> > 'Java_com_test_Test_decodeVideo':
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:104: warning:
> > 'avcodec_decode_video' is deprecated (declared at /home/baris/
> > workspace/FFmpegTest/jni/ffmpeg/libavcodec/avcodec.h:3606)
> > SharedLibrary : libffmpg.so
> > /home/baris/workspace/FFmpegTest/obj/local/armeabi/objs/ffmpg/
> > FFmpegTest.o: In function `Java_com_test_Test_decodeVideo':
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:43: undefined
> > reference to `av_register_all'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:46: undefined
> > reference to `av_open_input_file'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:50: undefined
> > reference to `av_find_stream_info'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:54: undefined
> > reference to `dump_format'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:70: undefined
> > reference to `avcodec_find_decoder'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:76: undefined
> > reference to `avcodec_open'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:80: undefined
> > reference to `avcodec_alloc_frame'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:83: undefined
> > reference to `avcodec_alloc_frame'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:88: undefined
> > reference to `avpicture_get_size'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:90: undefined
> > reference to `av_malloc'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:95: undefined
> > reference to `avpicture_fill'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:121: undefined
> > reference to `av_free_packet'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:100: undefined
> > reference to `av_read_frame'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:125: undefined
> > reference to `av_free'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:126: undefined
> > reference to `av_free'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:129: undefined
> > reference to `av_free'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:132: undefined
> > reference to `avcodec_close'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:135: undefined
> > reference to `av_close_input_file'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:104: undefined
> > reference to `avcodec_decode_video'
> > /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:110: undefined
> > reference to `img_convert'
> > collect2: ld returned 1 exit status
> > make: *** [/home/baris/workspace/FFmpegTest/obj/local/armeabi/
> > libffmpg.so] Error 1
> > here is my last Android.mk
> > LOCAL_PATH := $(call my-dir)
> > include $(CLEAR_VARS)
> > # Here we give our module name and source file(s)
> > LOCAL_MODULE := ffmpg
> > LOCAL_SRC_FILES := FFmpegTest.c
> > LOCAL_SHARED_LIBRARIES := ffmpeg
> > LOCAL_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/
> > LOCAL_LDLIBS += -lz -llog
> > include $(BUILD_SHARED_LIBRARY)
> > include $(all-subdir-makefiles)
> > On 31 Aralık, 14:41, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > > You would have to specify LOCAL_SHARED_LIBRARIES parameter instead of
> > > LOCAL_LDLIBS.
> > > LOCAL_SHARED_LIBRARIES := ffmpeg
> > > Assuming that in the sub directories, you are building a shared library
> > with
> > > module name ffmpeg (as mentioned inhttp://
> > androidcore.com/android-programming-tutorials/641-how-to-compi...
> > > ).
> > > Below is an example of Android.mk, i have done in one my projects:
I tried modifying my Android.mk file to include $(all-subdir-makefiles) at the end of the file but it didnt work. I had to add it before my module definition. I am surprised it worked for you.
I usually delete obj and libs folders before doing ndk-build or use -B option with ndk-build so that it doesnt use the files from the previous compile. I see from your log output that libffmpeg is not build in this run. Does your Android.mk files look exactly the one which are posted in the previous link?
> On 1 Ocak, 03:52, Udayakumar Rayala <uday.ray...@gmail.com> wrote: > > Try ndk-build with V=1 command line option. This will show the exact > command > > executed to compile.
> > Most probably, the LOCAL_C_INCLUDES might not have been set properly. > That > > is the reason why i had to create a variable called MY_LOCAL_PATH.
> > Try the following build file. If this doesnt work post the log file from > > this command *~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build V=1*
> > include $(CLEAR_VARS) > > # Here we give our module name and source file(s) > > LOCAL_MODULE := ffmpg > > LOCAL_SRC_FILES := FFmpegTest.c > > LOCAL_SHARED_LIBRARIES := ffmpeg > > LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/ > > LOCAL_LDLIBS += -lz -llog > > include $(BUILD_SHARED_LIBRARY) > > include $(all-subdir-makefiles)
> > On Fri, Dec 31, 2010 at 9:24 PM, baris atbas <barisat...@gmail.com> > wrote: > > > I added the local shared lib statement but there are still errors :
> > > LOCAL_PATH := $(call my-dir) > > > include $(CLEAR_VARS) > > > # Here we give our module name and source file(s) > > > LOCAL_MODULE := ffmpg > > > LOCAL_SRC_FILES := FFmpegTest.c > > > LOCAL_SHARED_LIBRARIES := ffmpeg > > > LOCAL_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/ > > > LOCAL_LDLIBS += -lz -llog > > > include $(BUILD_SHARED_LIBRARY) > > > include $(all-subdir-makefiles)
> > > On 31 Aralık, 14:41, Udayakumar Rayala <uday.ray...@gmail.com> wrote: > > > > You would have to specify LOCAL_SHARED_LIBRARIES parameter instead of > > > > LOCAL_LDLIBS.
> > > > LOCAL_SHARED_LIBRARIES := ffmpeg
> > > > Assuming that in the sub directories, you are building a shared > library > > > with > > > > module name ffmpeg (as mentioned inhttp:// > > > androidcore.com/android-programming-tutorials/641-how-to-compi... > > > > ).
> > > > Below is an example of Android.mk, i have done in one my projects:
I tried to change my android.mk like yours. and it looks like that :
MY_LOCAL_PATH := $(call my-dir)
include $(MY_LOCAL_PATH)/ffmpeg/Android.mk
LOCAL_PATH := $(MY_LOCAL_PATH)
include $(CLEAR_VARS)
# Here we give our module name and source file(s)
LOCAL_MODULE := ffmpg
LOCAL_SRC_FILES := FFmpegTest.c
LOCAL_SHARED_LIBRARIES := ffmpeg
LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/
LOCAL_LDLIBS += -lz -llog
include $(BUILD_SHARED_LIBRARY)
then ndk-build command :
....
Compile thumb : swscale <= utils.c
Compile thumb : swscale <= yuv2rgb.c
StaticLibrary : libswscale.a
SharedLibrary : libffmpeg.so
Install : libffmpeg.so => libs/armeabi/libffmpeg.so
SharedLibrary : libffmpg.so
/home/baris/workspace/FFmpegTest/obj/local/armeabi/objs/ffmpg/
FFmpegTest.o: In function `Java_com_test_Test_decodeVideo':
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:17: undefined
reference to `av_register_all'
/home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:19: undefined
reference to `av_open_input_file'
collect2: ld returned 1 exit status
make: *** [/home/baris/workspace/FFmpegTest/obj/local/armeabi/
libffmpg.so] Error 1
same error occured. maybe in native function I dont use ffmpeg
correctly. and last time I post you include all subdir makefiles
command is at the end of the android.mk
On 1 Ocak, 12:23, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> I tried modifying my Android.mk file to include $(all-subdir-makefiles) at
> the end of the file but it didnt work. I had to add it before my module
> definition. I am surprised it worked for you.
> I usually delete obj and libs folders before doing ndk-build or use -B
> option with ndk-build so that it doesnt use the files from the previous
> compile. I see from your log output that libffmpeg is not build in this run.
> Does your Android.mk files look exactly the one which are posted in the
> previous link?
> - Uday,
> On Sat, Jan 1, 2011 at 2:13 PM, baris atbas <barisat...@gmail.com> wrote:
> > I optimized my ffmpeg test code to understand where is the error:
> > On 1 Ocak, 03:52, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > > Try ndk-build with V=1 command line option. This will show the exact
> > command
> > > executed to compile.
> > > Most probably, the LOCAL_C_INCLUDES might not have been set properly.
> > That
> > > is the reason why i had to create a variable called MY_LOCAL_PATH.
> > > Try the following build file. If this doesnt work post the log file from
> > > this command *~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build V=1*
> > > include $(CLEAR_VARS)
> > > # Here we give our module name and source file(s)
> > > LOCAL_MODULE := ffmpg
> > > LOCAL_SRC_FILES := FFmpegTest.c
> > > LOCAL_SHARED_LIBRARIES := ffmpeg
> > > LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/
> > > LOCAL_LDLIBS += -lz -llog
> > > include $(BUILD_SHARED_LIBRARY)
> > > include $(all-subdir-makefiles)
> > > On Fri, Dec 31, 2010 at 9:24 PM, baris atbas <barisat...@gmail.com>
> > wrote:
> > > > I added the local shared lib statement but there are still errors :
> I tried to change my android.mk like yours. and it looks like that :
> MY_LOCAL_PATH := $(call my-dir)
> include $(MY_LOCAL_PATH)/ffmpeg/Android.mk
> LOCAL_PATH := $(MY_LOCAL_PATH)
> include $(CLEAR_VARS)
> # Here we give our module name and source file(s)
> LOCAL_MODULE := ffmpg
> LOCAL_SRC_FILES := FFmpegTest.c
> LOCAL_SHARED_LIBRARIES := ffmpeg
> LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/
> LOCAL_LDLIBS += -lz -llog
> include $(BUILD_SHARED_LIBRARY)
> then ndk-build command :
> ....
> Compile thumb : swscale <= utils.c
> Compile thumb : swscale <= yuv2rgb.c
> StaticLibrary : libswscale.a
> SharedLibrary : libffmpeg.so
> Install : libffmpeg.so => libs/armeabi/libffmpeg.so
> SharedLibrary : libffmpg.so
> /home/baris/workspace/FFmpegTest/obj/local/armeabi/objs/ffmpg/
> FFmpegTest.o: In function `Java_com_test_Test_decodeVideo':
> /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:17: undefined
> reference to `av_register_all'
> /home/baris/workspace/FFmpegTest/jni/FFmpegTest.c:19: undefined
> reference to `av_open_input_file'
> collect2: ld returned 1 exit status
> make: *** [/home/baris/workspace/FFmpegTest/obj/local/armeabi/
> libffmpg.so] Error 1
> same error occured. maybe in native function I dont use ffmpeg
> correctly. and last time I post you include all subdir makefiles
> command is at the end of the android.mk
> On 1 Ocak, 12:23, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > I tried modifying my Android.mk file to include $(all-subdir-makefiles) at
> > the end of the file but it didnt work. I had to add it before my module
> > definition. I am surprised it worked for you.
> > I usually delete obj and libs folders before doing ndk-build or use -B
> > option with ndk-build so that it doesnt use the files from the previous
> > compile. I see from your log output that libffmpeg is not build in this run.
> > Does your Android.mk files look exactly the one which are posted in the
> > previous link?
> > - Uday,
> > On Sat, Jan 1, 2011 at 2:13 PM, baris atbas <barisat...@gmail.com> wrote:
> > > I optimized my ffmpeg test code to understand where is the error:
> > > On 1 Ocak, 03:52, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > > > Try ndk-build with V=1 command line option. This will show the exact
> > > command
> > > > executed to compile.
> > > > Most probably, the LOCAL_C_INCLUDES might not have been set properly.
> > > That
> > > > is the reason why i had to create a variable called MY_LOCAL_PATH.
> > > > Try the following build file. If this doesnt work post the log file from
> > > > this command *~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build V=1*
> > > > include $(CLEAR_VARS)
> > > > # Here we give our module name and source file(s)
> > > > LOCAL_MODULE := ffmpg
> > > > LOCAL_SRC_FILES := FFmpegTest.c
> > > > LOCAL_SHARED_LIBRARIES := ffmpeg
> > > > LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/
> > > > LOCAL_LDLIBS += -lz -llog
> > > > include $(BUILD_SHARED_LIBRARY)
> > > > include $(all-subdir-makefiles)
> > > > On Fri, Dec 31, 2010 at 9:24 PM, baris atbas <barisat...@gmail.com>
> > > wrote:
> > > > > I added the local shared lib statement but there are still errors :
Could you please post your Android.mk file how it looks like now?
Because I have a the same problem and don`t know how to fix it. I
tried out to take your makefile from the post before but I also get
always the "undefined reference" errors.
For further information, I also followed the tutorial from your 1st
post.
> > same error occured. maybe in native function I dont use ffmpeg
> > correctly. and last time I post you include all subdir makefiles
> > command is at the end of the android.mk
> > On 1 Ocak, 12:23, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > > I tried modifying my Android.mk file to include $(all-subdir-makefiles) at
> > > the end of the file but it didnt work. I had to add it before my module
> > > definition. I am surprised it worked for you.
> > > I usually delete obj and libs folders before doing ndk-build or use -B
> > > option with ndk-build so that it doesnt use the files from the previous
> > > compile. I see from your log output that libffmpeg is not build in this run.
> > > Does your Android.mk files look exactly the one which are posted in the
> > > previous link?
> > > - Uday,
> > > On Sat, Jan 1, 2011 at 2:13 PM, baris atbas <barisat...@gmail.com> wrote:
> > > > I optimized my ffmpeg test code to understand where is the error:
> > > > On 1 Ocak, 03:52, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > > > > Try ndk-build with V=1 command line option. This will show the exact
> > > > command
> > > > > executed to compile.
> > > > > Most probably, the LOCAL_C_INCLUDES might not have been set properly.
> > > > That
> > > > > is the reason why i had to create a variable called MY_LOCAL_PATH.
> > > > > Try the following build file. If this doesnt work post the log file from
> > > > > this command *~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build V=1*
> > > > > include $(CLEAR_VARS)
> > > > > # Here we give our module name and source file(s)
> > > > > LOCAL_MODULE := ffmpg
> > > > > LOCAL_SRC_FILES := FFmpegTest.c
> > > > > LOCAL_SHARED_LIBRARIES := ffmpeg
> > > > > LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/
> > > > > LOCAL_LDLIBS += -lz -llog
> > > > > include $(BUILD_SHARED_LIBRARY)
> > > > > include $(all-subdir-makefiles)
> > > > > On Fri, Dec 31, 2010 at 9:24 PM, baris atbas <barisat...@gmail.com>
> > > > wrote:
> > > > > > I added the local shared lib statement but there are still errors :
On Wed, Jan 5, 2011 at 2:05 PM, soulseek <markus.brou...@gmail.com> wrote: > Could you please post your Android.mk file how it looks like now? > Because I have a the same problem and don`t know how to fix it. I > tried out to take your makefile from the post before but I also get > always the "undefined reference" errors.
> For further information, I also followed the tutorial from your 1st > post.
> > > same error occured. maybe in native function I dont use ffmpeg > > > correctly. and last time I post you include all subdir makefiles > > > command is at the end of the android.mk
> > > > I tried modifying my Android.mk file to include > $(all-subdir-makefiles) at > > > > the end of the file but it didnt work. I had to add it before my > module > > > > definition. I am surprised it worked for you.
> > > > I usually delete obj and libs folders before doing ndk-build or use > -B > > > > option with ndk-build so that it doesnt use the files from the > previous > > > > compile. I see from your log output that libffmpeg is not build in > this run. > > > > Does your Android.mk files look exactly the one which are posted in > the > > > > previous link?
> > > > - Uday,
> > > > On Sat, Jan 1, 2011 at 2:13 PM, baris atbas <barisat...@gmail.com> > wrote: > > > > > I optimized my ffmpeg test code to understand where is the error:
Thank very much for your help! But I still get the same error
messages. But I found out that when I download
http://rockplayer.freecoder.org/download/rockplayer_ffmpeg.zip,
extract it into the ffmpeg folder in the jni folder and take your make
files, than everything compiles fin :-) So thanks again!
> 5. Compile with ndk-build. It will generate 2 shared libraries libffmpeg.so
> and libmediaServer.so.
> If you are still getting the errors, post the output of ndk-build with V=1
> command line option.
> - Uday.
> On Wed, Jan 5, 2011 at 2:05 PM, soulseek <markus.brou...@gmail.com> wrote:
> > Could you please post your Android.mk file how it looks like now?
> > Because I have a the same problem and don`t know how to fix it. I
> > tried out to take your makefile from the post before but I also get
> > always the "undefined reference" errors.
> > For further information, I also followed the tutorial from your 1st
> > post.
I am trying similar type of library usage. But I get following issue.
/cygdrive/e/Android/FFMppegg/jni/Android.mk:3: /cygdrive/e/Android/
FFMppegg/jni/
ffmpeg/Android.mk: No such file or directory
make: *** No rule to make target `/cygdrive/e/Android/FFMppegg/jni/
ffmpeg/Androi
d.mk'. Stop.
Implying something is wrong with Android.mk file. Can you please help.
Nikhil Dhavale
On Jan 2, 2:41 am, baris atbas <barisat...@gmail.com> wrote:
> > same error occured. maybe in native function I dont use ffmpeg
> > correctly. and last time I post you include all subdir makefiles
> > command is at the end of the android.mk
> > On 1 Ocak, 12:23, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > > I tried modifying my Android.mk file to include $(all-subdir-makefiles) at
> > > the end of the file but it didnt work. I had to add it before my module
> > > definition. I am surprised it worked for you.
> > > I usually delete obj and libs folders before doing ndk-build or use -B
> > > option with ndk-build so that it doesnt use the files from the previous
> > > compile. I see from your log output that libffmpeg is not build in this run.
> > > Does your Android.mk files look exactly the one which are posted in the
> > > previous link?
> > > - Uday,
> > > On Sat, Jan 1, 2011 at 2:13 PM, baris atbas <barisat...@gmail.com> wrote:
> > > > I optimized my ffmpeg test code to understand where is the error:
> > > > On 1 Ocak, 03:52, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > > > > Try ndk-build with V=1 command line option. This will show the exact
> > > > command
> > > > > executed to compile.
> > > > > Most probably, the LOCAL_C_INCLUDES might not have been set properly.
> > > > That
> > > > > is the reason why i had to create a variable called MY_LOCAL_PATH.
> > > > > Try the following build file. If this doesnt work post the log file from
> > > > > this command *~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build V=1*
> > > > > include $(CLEAR_VARS)
> > > > > # Here we give our module name and source file(s)
> > > > > LOCAL_MODULE := ffmpg
> > > > > LOCAL_SRC_FILES := FFmpegTest.c
> > > > > LOCAL_SHARED_LIBRARIES := ffmpeg
> > > > > LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/
> > > > > LOCAL_LDLIBS += -lz -llog
> > > > > include $(BUILD_SHARED_LIBRARY)
> > > > > include $(all-subdir-makefiles)
> > > > > On Fri, Dec 31, 2010 at 9:24 PM, baris atbas <barisat...@gmail.com>
> > > > wrote:
> > > > > > I added the local shared lib statement but there are still errors :
Can you pleas post your /cygdrive/e/Android/FFMppegg/jni/Android.mk
and `/cygdrive/e/Android/FFMppegg/jni/ffmpeg/Android.mk' files?
and is this file `/cygdrive/e/Android/FFMppegg/jni/ffmpeg/Android.mk'
in the ffmpeg folder? Because I had sometimes this message "No rule to
make target" when the file I wanted to include was missing ;-)
On 4 Feb., 12:11, Nikhil Dhavale <nikhildhavale...@gmail.com> wrote:
> I am trying similar type of library usage. But I get following issue.
> /cygdrive/e/Android/FFMppegg/jni/Android.mk:3: /cygdrive/e/Android/
> FFMppegg/jni/
> ffmpeg/Android.mk: No such file or directory
> make: *** No rule to make target `/cygdrive/e/Android/FFMppegg/jni/
> ffmpeg/Androi
> d.mk'. Stop.
> Implying something is wrong with Android.mk file. Can you please help.
> Nikhil Dhavale
> On Jan 2, 2:41 am, baris atbas <barisat...@gmail.com> wrote:
> > Thanks to your useful comments, Problem is solved :)
> > On 1 Ocak, 13:05, baris atbas <barisat...@gmail.com> wrote:
> > > I tried to change my android.mk like yours. and it looks like that :
> > > MY_LOCAL_PATH := $(call my-dir)
> > > include $(MY_LOCAL_PATH)/ffmpeg/Android.mk
> > > LOCAL_PATH := $(MY_LOCAL_PATH)
> > > include $(CLEAR_VARS)
> > > # Here we give our module name and source file(s)
> > > LOCAL_MODULE := ffmpg
> > > LOCAL_SRC_FILES := FFmpegTest.c
> > > LOCAL_SHARED_LIBRARIES := ffmpeg
> > > LOCAL_C_INCLUDES := $(MY_LOCAL_PATH)/ffmpeg/
> > > LOCAL_LDLIBS += -lz -llog
> > > include $(BUILD_SHARED_LIBRARY)
> > > same error occured. maybe in native function I dont use ffmpeg
> > > correctly. and last time I post you include all subdir makefiles
> > > command is at the end of the android.mk
> > > > I tried modifying my Android.mk file to include $(all-subdir-makefiles) at
> > > > the end of the file but it didnt work. I had to add it before my module
> > > > definition. I am surprised it worked for you.
> > > > I usually delete obj and libs folders before doing ndk-build or use -B
> > > > option with ndk-build so that it doesnt use the files from the previous
> > > > compile. I see from your log output that libffmpeg is not build in this run.
> > > > Does your Android.mk files look exactly the one which are posted in the
> > > > previous link?
> > > > - Uday,
> > > > On Sat, Jan 1, 2011 at 2:13 PM, baris atbas <barisat...@gmail.com> wrote:
> > > > > I optimized my ffmpeg test code to understand where is the error:
> > > > > On 1 Ocak, 03:52, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> > > > > > Try ndk-build with V=1 command line option. This will show the exact
> > > > > command
> > > > > > executed to compile.
> > > > > > Most probably, the LOCAL_C_INCLUDES might not have been set properly.
> > > > > That
> > > > > > is the reason why i had to create a variable called MY_LOCAL_PATH.
> > > > > > Try the following build file. If this doesnt work post the log file from
> > > > > > this command *~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build V=1*
> > > > > > On Fri, Dec 31, 2010 at 9:24 PM, baris atbas <barisat...@gmail.com>
> > > > > wrote:
> > > > > > > I added the local shared lib statement but there are still errors :
On Fri, Feb 4, 2011 at 4:51 PM, soulseek <markus.brou...@gmail.com> wrote: > Can you pleas post your /cygdrive/e/Android/FFMppegg/jni/Android.mk > and `/cygdrive/e/Android/FFMppegg/jni/ffmpeg/Android.mk' files? > and is this file `/cygdrive/e/Android/FFMppegg/jni/ffmpeg/Android.mk' > in the ffmpeg folder? Because I had sometimes this message "No rule to > make target" when the file I wanted to include was missing ;-)
> On 4 Feb., 12:11, Nikhil Dhavale <nikhildhavale...@gmail.com> wrote: > > I am trying similar type of library usage. But I get following issue. > > /cygdrive/e/Android/FFMppegg/jni/Android.mk:3: /cygdrive/e/Android/ > > FFMppegg/jni/ > > ffmpeg/Android.mk: No such file or directory > > make: *** No rule to make target `/cygdrive/e/Android/FFMppegg/jni/ > > ffmpeg/Androi > > d.mk'. Stop. > > Implying something is wrong with Android.mk file. Can you please help. > > Nikhil Dhavale
> > On Jan 2, 2:41 am, baris atbas <barisat...@gmail.com> wrote:
> > > Thanks to your useful comments, Problem is solved :)
> > > On 1 Ocak, 13:05, baris atbas <barisat...@gmail.com> wrote:
> > > > I tried to change my android.mk like yours. and it looks like that :
> > > > same error occured. maybe in native function I dont use ffmpeg > > > > correctly. and last time I post you include all subdir makefiles > > > > command is at the end of the android.mk
> > > > > I tried modifying my Android.mk file to include > $(all-subdir-makefiles) at > > > > > the end of the file but it didnt work. I had to add it before my > module > > > > > definition. I am surprised it worked for you.
> > > > > I usually delete obj and libs folders before doing ndk-build or use > -B > > > > > option with ndk-build so that it doesnt use the files from the > previous > > > > > compile. I see from your log output that libffmpeg is not build in > this run. > > > > > Does your Android.mk files look exactly the one which are posted in > the > > > > > previous link?
> > > > > - Uday,
> > > > > On Sat, Jan 1, 2011 at 2:13 PM, baris atbas <barisat...@gmail.com> > wrote: > > > > > > I optimized my ffmpeg test code to understand where is the error:
> > > > > > On 1 Ocak, 03:52, Udayakumar Rayala <uday.ray...@gmail.com> > wrote: > > > > > > > Try ndk-build with V=1 command line option. This will show the > exact > > > > > > command > > > > > > > executed to compile.
> > > > > > > Most probably, the LOCAL_C_INCLUDES might not have been set > properly. > > > > > > That > > > > > > > is the reason why i had to create a variable called > MY_LOCAL_PATH.
> > > > > > > Try the following build file. If this doesnt work post the log > file from > > > > > > > this command *~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build > V=1*
> > > > > > > On Fri, Dec 31, 2010 at 9:24 PM, baris atbas < > barisat...@gmail.com> > > > > > > wrote: > > > > > > > > I added the local shared lib statement but there are still > errors :
Could you also upload your ffmpeg folder with all files somewhere
please? Because, I cant replicate your error. I have to delete the
cmdutils.c from the local source files in the jni/ffmpeg/Android.mk
because I have no version.h and when I use my config.sh I get some
other errors (like: error: expected ';', ',' or ')' before 'v1' but I
think it has to do with my config.sh script)
But it starts to compile as you can see:
jni $ ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : ffmpeg <= ffmpeg.c
./jni/ffmpeg/ffmpeg.c: In function 'do_video_out':
./jni/ffmpeg/ffmpeg.c:1085: warning: passing argument 2 of 'sws_scale'
from incompatible pointer type
./jni/ffmpeg/libswscale/swscale.h:195: note: expected 'const uint8_t *
const*' but argument is of type 'uint8_t **'
Compile thumb : avformat <= 4xm.c
Compile thumb : avformat <= adtsenc.c
.
.
.
On 4 Feb., 09:05, Udayakumar Rayala <uday.ray...@gmail.com> wrote:
> On Fri, Feb 4, 2011 at 4:51 PM, soulseek <markus.brou...@gmail.com> wrote:
> > Can you pleas post your /cygdrive/e/Android/FFMppegg/jni/Android.mk
> > and `/cygdrive/e/Android/FFMppegg/jni/ffmpeg/Android.mk' files?
> > and is this file `/cygdrive/e/Android/FFMppegg/jni/ffmpeg/Android.mk'
> > in the ffmpeg folder? Because I had sometimes this message "No rule to
> > make target" when the file I wanted to include was missing ;-)
> > On 4 Feb., 12:11, Nikhil Dhavale <nikhildhavale...@gmail.com> wrote:
> > > I am trying similar type of library usage. But I get following issue.
> > > /cygdrive/e/Android/FFMppegg/jni/Android.mk:3: /cygdrive/e/Android/
> > > FFMppegg/jni/
> > > ffmpeg/Android.mk: No such file or directory
> > > make: *** No rule to make target `/cygdrive/e/Android/FFMppegg/jni/
> > > ffmpeg/Androi
> > > d.mk'. Stop.
> > > Implying something is wrong with Android.mk file. Can you please help.
> > > Nikhil Dhavale
> > > On Jan 2, 2:41 am, baris atbas <barisat...@gmail.com> wrote:
> > > > Thanks to your useful comments, Problem is solved :)
> > > > On 1 Ocak, 13:05, baris atbas <barisat...@gmail.com> wrote:
> > > > > I tried to change my android.mk like yours. and it looks like that :
> > > > > same error occured. maybe in native function I dont use ffmpeg
> > > > > correctly. and last time I post you include all subdir makefiles
> > > > > command is at the end of the android.mk
> > > > > > I tried modifying my Android.mk file to include
> > $(all-subdir-makefiles) at
> > > > > > the end of the file but it didnt work. I had to add it before my
> > module
> > > > > > definition. I am surprised it worked for you.
> > > > > > I usually delete obj and libs folders before doing ndk-build or use
> > -B
> > > > > > option with ndk-build so that it doesnt use the files from the
> > previous
> > > > > > compile. I see from your log output that libffmpeg is not build in
> > this run.
> > > > > > Does your Android.mk files look exactly the one which are posted in
> > the
> > > > > > previous link?
> > > > > > - Uday,
> > > > > > On Sat, Jan 1, 2011 at 2:13 PM, baris atbas <barisat...@gmail.com>
> > wrote:
> > > > > > > I optimized my ffmpeg test code to understand where is the error:
> > > > > > > On 1 Ocak, 03:52, Udayakumar Rayala <uday.ray...@gmail.com>
> > wrote:
> > > > > > > > Try ndk-build with V=1 command line option. This will show the
> > exact
> > > > > > > command
> > > > > > > > executed to compile.
> > > > > > > > Most probably, the LOCAL_C_INCLUDES might not have been set
> > properly.
> > > > > > > That
> > > > > > > > is the reason why i had to create a variable called
> > MY_LOCAL_PATH.
> > > > > > > > Try the following build file. If this doesnt work post the log
> > file from
> > > > > > > > this command *~/workspace/FFmpegTest$ /home/baris/ndk/ndk-build
> > V=1*