Recherche avancée

Médias (1)

Mot : - Tags -/Christian Nold

Autres articles (94)

  • Installation en mode ferme

    4 février 2011, par

    Le mode ferme permet d’héberger plusieurs sites de type MediaSPIP en n’installant qu’une seule fois son noyau fonctionnel.
    C’est la méthode que nous utilisons sur cette même plateforme.
    L’utilisation en mode ferme nécessite de connaïtre un peu le mécanisme de SPIP contrairement à la version standalone qui ne nécessite pas réellement de connaissances spécifique puisque l’espace privé habituel de SPIP n’est plus utilisé.
    Dans un premier temps, vous devez avoir installé les mêmes fichiers que l’installation (...)

  • Organiser par catégorie

    17 mai 2013, par

    Dans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
    Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
    Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)

  • 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 (8422)

  • vp9/x86 : save one register on 32bit idct32x32.

    16 décembre 2014, par Ronald S. Bultje
    vp9/x86 : save one register on 32bit idct32x32.
    

    Fixes build on win32.

    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/x86/vp9itxfm.asm
  • 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&#39;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, &amp;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&#39;T KNOW WHY
    filestream->close;
    SDL_SaveBMP(screen, filepointer);
  • Revision 28898 : - Voir l’objet site (synication) dans la page de récapitulation des notes.

    30 mai 2009, par marcimat@… — Log

    Voir l’objet site (synication) dans la page de récapitulation des notes.