Recherche avancée

Médias (0)

Mot : - Tags -/acrobat

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (72)

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

  • Récupération d’informations sur le site maître à l’installation d’une instance

    26 novembre 2010, par

    Utilité
    Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
    Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...)

  • Contribute to a better visual interface

    13 avril 2011

    MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
    Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.

Sur d’autres sites (5226)

  • libvpxdec : remove pre-1.4.0 checks

    18 novembre 2017, par James Zern
    libvpxdec : remove pre-1.4.0 checks
    

    Reviewed-by : James Almer <jamrial@gmail.com>
    Signed-off-by : James Zern <jzern@google.com>

    • [DH] libavcodec/libvpxdec.c
  • libvpx : remove pre-1.4.0 checks

    18 novembre 2017, par James Zern
    libvpx : remove pre-1.4.0 checks
    

    Reviewed-by : James Almer <jamrial@gmail.com>
    Signed-off-by : James Zern <jzern@google.com>

    • [DH] libavcodec/libvpx.c
  • Display FFMPEG decoded frame in a GLFW window

    17 juin 2020, par Infecto

    I am implementing the client program of a game where the server sends encoded frames of the game to the client (via UDP), while the client decodes them (via FFMPEG) and displays them in a GLFW window. &#xA;My program has two threads :

    &#xA;&#xA;

      &#xA;
    1. Thread 1 : renders the content of the uint8_t* variable dataToRender
    2. &#xA;

    3. Thread 2 : keeps obtaining frames from the server, decodes them and updates dataToRender accordingly
    4. &#xA;

    &#xA;&#xA;

    Thread 1 does the typical rendering of a GLFW window in a while-loop. I have already tried to display some dummy frame data (a completely red frame) and it worked :

    &#xA;&#xA;

    while (!glfwWindowShouldClose(window)) {&#xA;    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&#xA;    ...&#xA;&#xA;    glBindTexture(GL_TEXTURE_2D, tex_handle);&#xA;    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, window_width, window_height, 0, GL_RGB, GL_UNSIGNED_BYTE, dataToRender);&#xA;    ...&#xA;    glfwSwapBuffers(window);&#xA;}&#xA;

    &#xA;&#xA;

    Thread 2 is where I am having trouble. I am unable to properly store the decoded frame into my dataToRender variable. On top if it, the frame data is originally in YUV format and needs to be converted to RGB. I use FFMPEG's sws_scale for that, which also gives me a bad dst image pointers error output in the console. Here's the code snippet responsible for that part :

    &#xA;&#xA;

            size_t data_size = frameBuffer.size();  // frameBuffer is a std::vector where I accumulate the frame data chunks&#xA;        uint8_t* data = frameBuffer.data();  // convert the vector to a pointer&#xA;        picture->format = AV_PIX_FMT_RGB24;&#xA;        av_frame_get_buffer(picture, 1);&#xA;        while (data_size > 0) {&#xA;            int ret = av_parser_parse2(parser, c, &amp;pkt->data, &amp;pkt->size,&#xA;                data, data_size, AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0);&#xA;            if (ret &lt; 0) {&#xA;                fprintf(stderr, "Error while parsing\n");&#xA;                exit(1);&#xA;            }&#xA;            data &#x2B;= ret;&#xA;            data_size -= ret;&#xA;&#xA;            if (pkt->size) {&#xA;                swsContext = sws_getContext(&#xA;                    c->width, c->height,&#xA;                    AV_PIX_FMT_YUV420P, c->width, c->height,&#xA;                    AV_PIX_FMT_RGB24, SWS_BILINEAR, NULL, NULL, NULL&#xA;                );&#xA;                uint8_t* rgb24[1] = { data };&#xA;                int rgb24_stride[1] = { 3 * c->width };&#xA;                sws_scale(swsContext, rgb24, rgb24_stride, 0, c->height, picture->data, picture->linesize);&#xA;&#xA;                decode(c, picture, pkt, outname);&#xA;                // TODO: copy content of picture->data[0] to "dataToRender" maybe?&#xA;            }&#xA;        }&#xA;

    &#xA;&#xA;

    I have already tried doing another sws_scale to copy the content to dataToRender and I cannot get rid of the bad dst image pointers error. Any advice or solution to the problem would be greatly appreciated as I have been stuck for days on this.

    &#xA;