
Recherche avancée
Autres articles (48)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (9583)
-
clang++ : error : linker command failed with exit code 1 (use -v to see invocation) in cpp with ffmpeg
6 avril 2020, par Pradeep Simbaclang++: error: linker command failed with exit code 1 (use -v to see invocation)




I saw this link and link2. But, it not done.



My jni folder :






Android.mk file



LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_C_INCLUDES += ./include
LOCAL_MODULE := native-lib
LOCAL_CFLAGS := -DSTDC_HEADERS -std=c99
LOCAL_CFLAGS := -Wno-pointer-sign
LOCAL_ARM_MODE := arm
APP_OPTIM := release
LOCAL_SRC_FILES := \
./native-lib.cpp
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)




native-lib.cpp file



#include 
#include <string>

extern "C"
{
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavutil/opt.h"
}

extern "C" JNIEXPORT jstring JNICALL
Java_com_example_m_MainActivity_stringFromJNI(
JNIEnv* env,
jobject /* this */) {
std::string hello = "Hello from C++";
av_register_all();
return env->NewStringUTF(hello.c_str());
}
</string>



When I build ndk this error occurs.



D:\Github\n>ndk-build
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-16.
[arm64-v8a] Compile++ : native-lib <= native-lib.cpp
[arm64-v8a] SharedLibrary : libnative-lib.so
./obj/local/arm64-v8a/objs/native-lib/./libmp3lame/native-lib.o: In function `Java_com_example_m_MainActivity_stringFromJNI':
D:\Github\n/jni/./libmp3lame/native-lib.cpp:16: undefined reference to `av_register_all'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [D:/install/sdk/ndk/21.0.6113669/build//../build/core/build-binary.mk:725: obj/local/arm64-v8a/libnative-lib.so] Error 1

D:\Github\n>ndk-build -v
GNU Make 4.2.1
Built for x86_64-w64-mingw32
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later /gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

D:\Github\n>




why it comes like this
native-lib.cpp:16: undefined reference av_register_all
?


I added all the required libs in my jni folder but, why this error and this
native-lib.cpp:16: undefined reference av_register_all
comes ?
How can I solve this ?

-
clang++ : error : linker command failed with exit code 1 (use -v to see invocation) [duplicate]
1er avril 2020, par Pradeep SimbaWhen I build ndk with ffmpeg it occurs error.






Android.mk file



LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_C_INCLUDES += ./include
LOCAL_MODULE := native-lib
LOCAL_CFLAGS := -DSTDC_HEADERS -std=c99
LOCAL_CFLAGS := -Wno-pointer-sign
LOCAL_ARM_MODE := arm
APP_OPTIM := release
LOCAL_SRC_FILES := \
./native-lib.cpp
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)




native-lib.cpp file



#include 
#include <string>

extern "C"
{
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
#include "libavutil/opt.h"
}

extern "C" JNIEXPORT jstring JNICALL
Java_com_example_m_MainActivity_stringFromJNI(
 JNIEnv* env,
 jobject /* this */) {
std::string hello = "Hello from C++";
av_register_all();
return env->NewStringUTF(hello.c_str());
}
</string>



When I build ndk this error occurs.






D:\Github\n>ndk-build
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-16.
[arm64-v8a] Compile++ : native-lib <= native-lib.cpp
[arm64-v8a] SharedLibrary : libnative-lib.so
./obj/local/arm64-v8a/objs/native-lib/./libmp3lame/native-lib.o: In function `Java_com_example_m_MainActivity_stringFromJNI':
D:\Github\n/jni/./libmp3lame/native-lib.cpp:16: undefined reference to `av_register_all'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [D:/install/sdk/ndk/21.0.6113669/build//../build/core/build-binary.mk:725: obj/local/arm64-v8a/libnative-lib.so] Error 1

D:\Github\n>ndk-build -v
GNU Make 4.2.1
Built for x86_64-w64-mingw32
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later /gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

D:\Github\n>




why it comes like this
native-lib.cpp:16: undefined reference av_register_all
?


I added all the required libs in my jni folder . but, why this error and this native-lib.cpp:16 : undefined reference av_register_all comes ?



How can I solve this ?


-
ffplay does not exit in forked child
6 septembre 2019, par user12030145ffplay -autoexit
does not exit in a forked childI need to pipe my application (stdout) to
ffplay
(stdin). I do this by forkingffplay
as a child and using-i pipe:0
as argument.#include
#include
#include <sys></sys>types.h>
#include <sys></sys>wait.h>
int main(int argc, const char** argv)
{
int tube[2];
int c;
FILE* f = fopen(argv[1], "rb");
pid_t pid;
if (argc < 2) return -1;
if (pipe(tube)) {
perror("Pipe");
return -1;
}
// main process cats a .mlp file to stdout, sent to a child ffplay stdin through a pipe
char* const arg[] = {"-i", "pipe:0", "-f", "mlp", "-nodisp", "-autoexit", NULL};
switch (pid = fork()) {
case -1:
fprintf(stderr,"%s\n", "Could not launch ffplay");
break;
case 0:
close(tube[1]);
dup2(tube[0], STDIN_FILENO);
execv("/usr/bin/ffplay", arg);
fprintf(stderr, "%s\n", "Runtime failure in ffplay child process");
return -2;
default:
close(tube[0]);
dup2(tube[1], STDOUT_FILENO);
}
// Here the main process code sending the .mlp file to stdout...
while ((c = fgetc(f)) != EOF) putchar(c);
waitpid(pid, NULL, 0);
fclose(f);
// main never returns
return 0;
}The issue is that in this context,
ffplay -autoexit
never exits (GNU-Linux platform). In a main process,ffplay -autoexit
always exits at the end of a media file.
Is there a pure C workaround without usingsystem
,popen
or scripting ?
Is this a feature or a bug offfplay
(I cannot tell) ?