
Recherche avancée
Autres articles (46)
-
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (7709)
-
ffmpeg code does not link (undefined reference to avcodec_register_all
28 janvier 2013, par SriramI am trying to compile a simple introductory program using
ffmpeg
that tries to check if themp3
codec is available. While the code compiles OK, I am facing difficulty in solving linker errors. Here is the code :#include
#include
#include <libavcodec></libavcodec>avcodec.h>
float *generateSinusoid(unsigned int sampleRate, unsigned int nSecondsAudio) {
unsigned int nsamples = (nSecondsAudio * sampleRate);
float *arr;
arr = (float*) malloc(sizeof(float) * nsamples);
int i = 0;
for(i = 0; i < nsamples; i++) {
arr[i] = 20 * sin(2.f * (M_PI) * (330/sampleRate) * i); /*frequency of 330H
z*/
}
return arr;
}
int main(int argc, char *argv[]) {
avcodec_register_all();
AVCodec *codec;
unsigned int sampleRate = 22050; /*assumed.*/
unsigned int nSecondsAudio = 4;
float *arr;
arr = (float *) malloc(sizeof(float) * nSecondsAudio * sampleRate);
/*Step 1. Generate sinusoid.*/
arr = generateSinusoid(sampleRate, nSecondsAudio);
/* Step 2. See if encoder exists.*/
/*codec = avcodec_find_encoder(AV_CODEC_ID_MP3);*/
if(!codec) { /*codec = NULL.*/
printf("MP3 codec not found!!!!");
} else {
printf("MP3 codec found!!!");
}
return 0;
}The code is compiled and linked like so :
encoding_mp3: encoding_mp3.o
gcc encoding_mp3.o -o encoding_mp3 -L/cygdrive/c/Users/Desktop/webserver/cygnus/lib/w32api -L/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/lib -lm -luser32 -lpthread -lavcodec
encoding_mp3.o: encoding_mp3.c
gcc -I/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/include -I/cygdrive/c/Users/Desktop/webserver/cygnus/usr/include -g -c encoding_mp3.c -o encoding_mp3.o
clean:
rm encoding_mp3.o encoding_mp3Linking gives the following error :
gcc -I/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/include -I/cygdrive/c/Users/Desktop/webserver/cygnus/usr/include -g -c encoding_mp3.c -o encoding_mp3.o
gcc encoding_mp3.o -o encoding_mp3 -L/cygdrive/c/Users/Desktop/webserver/cygnus/lib/w32api -L/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/ffmpeg_dev/lib -lm -luser32 -lpthread -lavcodec
encoding_mp3.o: In function `main':
/cygdrive/c/Users/Desktop/webserver/cygnus/ffmpeg/work/encoding_mp3.c:31: undefined reference to `_avcodec_register_all'
collect2: ld returned 1 exit status
make: *** [encoding_mp3] Error 1I have gone through most of the threads on SO regarding this problem and here is what I have tried so far :
Put libraries at the end of all non-option arguments
Commented out code that references functions. This seems to work. The
undefined reference
errors go away after all function calls are removed, though the presence of a structAVCodec
does not cause any problems.Any help on this is most welcome.
-
wav : Add check for ’fmt’ tag in SMV code
16 juillet 2012, par Derek Buitenhuiswav : Add check for ’fmt’ tag in SMV code
-
Fix code under #if CONFIG_INTERNAL_STATS.
1er juin 2011, par Ronald S. BultjeFix code under #if CONFIG_INTERNAL_STATS.