Recherche avancée

Médias (33)

Mot : - Tags -/creative commons

Autres articles (111)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (7666)

  • How to save an SDL bitmap to memory and load it back ?

    19 novembre 2012, par Nav

    I have a bunch of RWops functions :

    static int myseekfunc(SDL_RWops *context, int offset, int whence) { SDL_SetError("Can't seek in this kind of RWops"); return(-1); }
    static int myreadfunc(SDL_RWops *context, void *ptr, int size, int maxnum) { memset(ptr,0,size*maxnum); return(maxnum); }
    static int mywritefunc(SDL_RWops *context, const void *ptr, int size, int num) { return(num); }
    static int myclosefunc(SDL_RWops *context)
    {
     if(context->type != 0xdeadbeef) { SDL_SetError("Wrong kind of RWops for myclosefunc()"); return(-1); }
     free(context->hidden.unknown.data1);
     SDL_FreeRW(context);
     return(0);
    }

    // Note that this function is NOT static -- we want it directly callable from other source files
    SDL_RWops *MyCustomRWop()
    {
     SDL_RWops *c=SDL_AllocRW();
     if(c==NULL) return(NULL);

     c->seek =myseekfunc;
     c->read =myreadfunc;
     c->write=mywritefunc;
     c->close=myclosefunc;
     c->type =0xdeadbeef;
     printf("deadbeef=%d\n",c->type);
     c->hidden.unknown.data1=malloc(256);//IS THIS CORRECT?
     return(c);
    }

    with which I'm trying to write a BMP into memory and then extract it back. The below code is from tutorial02.
    Two problems I'm facing are :
    1. Unless I call SDL_DisplayYUVOverlay, the SDL_SaveBMP function outputs a blank BMP file to the hard disk. How can I output a BMP file without having to call SDL_DisplayYUVOverlay ?
    2. Although I'm able to save the BMP to memory with SDL_SaveBMP_RW and free the memory with filestream->close, I'm unable to load the BMP back from memory with SDL_SaveBMP. The application crashes while trying to load it. Is it because of the c->hidden.unknown.data1=malloc(256); code above ? What would be the right way of allocating this memory ?

     AVFormatContext *pFormatCtx = NULL;
     int             i, videoStream;
     AVCodecContext  *pCodecCtx = NULL;
     AVCodec         *pCodec = NULL;
     AVFrame         *pFrame = NULL;
     AVPacket        packet;
     SDL_Overlay     *bmp = NULL;
     SDL_Surface     *screen = NULL;
     SDL_Surface     *screen2 = NULL;
     SDL_Rect        rect;
    ....
    ....    
    if(frameFinished)

    {
    SDL_LockYUVOverlay(bmp);//-----------lock

    AVPicture pict;
    pict.data[0] = bmp->pixels[0];
    pict.data[1] = bmp->pixels[2];
    pict.data[2] = bmp->pixels[1];

    pict.linesize[0] = bmp->pitches[0];
    pict.linesize[1] = bmp->pitches[2];
    pict.linesize[2] = bmp->pitches[1];

    // Convert the image into YUV format that SDL uses
    sws_scale( sws_ctx, (uint8_t const * const *)pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pict.data, pict.linesize );

    SDL_UnlockYUVOverlay(bmp);//-----------unlock

    rect.x = 0;
    rect.y = 0;
    rect.w = pCodecCtx->width;
    rect.h = pCodecCtx->height;
    SDL_DisplayYUVOverlay(bmp, &rect);
    ++i;

    SDL_RWops *filestream = MyCustomRWop();//SDL_AllocRW();
    SDL_SaveBMP_RW (screen, filestream, i);
    screen2 = SDL_LoadBMP_RW(filestream,1);//LOADING IS THE PROBLEM HERE. DON'T KNOW WHY
    filestream->close;
    SDL_SaveBMP(screen, filepointer);
  • MPEG-DASH not working. MPD validation fails

    16 novembre 2017, par Marko36

    I am trying to serve video using MPEG-DASH. No success. I have tried the following :

    Following the instructions on webproject.org, using FFMPEG, I have created several variants of the original video and the DASH MPD manifest, containing metadata. However, the manifest does not validate using http://dashif.org/conformance.html. This validator itself is quite useless, as it provides unusable info about the error. I have found in a post from 2014, that one of the errors generated by FFMPEG is capital letters in some metadata (not a critical one, but could have been fixed for years !). Other errors detected, but not described. No tangible info from any of these other validators either : http://www-itec.uni-klu.ac.at/dash/?page_id=605 (produces rubbish info), https://github.com/Eyevinn/dash-validator-js (throws an exception)

    Following instructions on mozilla.org, produces the same non-working result, as the instructions are nearly identical (including same resolution*bitrate sets), except that Mozilla omits the use of dash.js, which is deemed necessary by the rest of the internet.

    This guide on Bitmovin, utilizing x264 and MP4Box does not work either. Going by the instructions, I have to recode the original x264 video twice. The final version of videos are in some cases twice the size of their intermediate versions and 720p video is actually larger than its 1080p, higher bitrate counterpart. No need to go further. (Yet, this is the only way that actually produced segments..)

    I have spent 3 days on the above, read about all there is on the web from the other frustrated adopters, and ran out of options. I would really apreciate some pro tips ! Thanks !

  • Evolution #4699 (Nouveau) : CVT multi-étapes : un moyen de forcer la validation finale (passer à t...

    22 mars 2021, par RastaPopoulos ♥

    Une personne sur IRC demandait comment faire un bouton pour aller à une étape précise. Ça c’est bien indiqué dans la doc :
    https://www.spip.net/fr_article5386.html#Les-squelettes-de-chaque-page

    name="_retour_etape_X"

    Mais en fait le but c’est pas d’aller à une des étapes qui est numérotée, mais bien de valider la toute fin, donc de passer à traiter(), en pouvant sauter certaines étapes qui sont facultatives !

    Si on fait un bouton submit basique : ça va uniquement passer à l’étape suivante (si on est à l’étape 2, ça va à l’étape 3).

    Mais donc comment faire si je suis à l’étape 2, pour valider complètement ?

    Est-ce qu’il y a un manque ? ou bien ça existe et faut compléter la doc ?