
Recherche avancée
Autres articles (59)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...) -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.
Sur d’autres sites (13267)
-
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) ?