Recherche avancée

Médias (91)

Autres articles (84)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

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

Sur d’autres sites (4848)

  • test/index.html : use code syntax.

    15 novembre 2013, par XhmikosR
    test/index.html : use code syntax.
  • How to implement encrypt mp4 by FFmpeg in code ? [on hold]

    17 septembre 2018, par Eric Cui

    I can find some information on how to encryption by using FFmpeg command-line(here).

    However, after a long time searching on net, I still can’t find how to implement it in code.

    Any tips is appreciate. A simple example is best.

  • How to understand the given ffplay C code snippet ?

    20 juillet 2015, par Jerikc XIONG

    The following code snippet is from ffplay :

    static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
       int got_frame = 0;

       do {
           int ret = -1;

           if (d->queue->abort_request)
               return -1;

           if (!d->packet_pending || d->queue->serial != d->pkt_serial) {
               AVPacket pkt;
               do {
                   if (d->queue->nb_packets == 0)
                       SDL_CondSignal(d->empty_queue_cond);
                   if (packet_queue_get(d->queue, &pkt, 1, &d->pkt_serial) < 0)
                       return -1;
                   if (pkt.data == flush_pkt.data) {
                       avcodec_flush_buffers(d->avctx);
                       d->finished = 0;
                       d->next_pts = d->start_pts;
                       d->next_pts_tb = d->start_pts_tb;
                   }
               } while (pkt.data == flush_pkt.data || d->queue->serial != d->pkt_serial);
               av_free_packet(&d->pkt);
               d->pkt_temp = d->pkt = pkt;
               d->packet_pending = 1;
           }

           switch (d->avctx->codec_type) {
               case AVMEDIA_TYPE_VIDEO:
                   ret = avcodec_decode_video2(d->avctx, frame, &got_frame, &d->pkt_temp);
                   if (got_frame) {
                       if (decoder_reorder_pts == -1) {
                           frame->pts = av_frame_get_best_effort_timestamp(frame);
                       } else if (decoder_reorder_pts) {
                           frame->pts = frame->pkt_pts;
                       } else {
                           frame->pts = frame->pkt_dts;
                       }
                   }
                   break;
               case AVMEDIA_TYPE_AUDIO:
                   ret = avcodec_decode_audio4(d->avctx, frame, &got_frame, &d->pkt_temp);
                   if (got_frame) {
                       AVRational tb = (AVRational){1, frame->sample_rate};
                       if (frame->pts != AV_NOPTS_VALUE)
                           frame->pts = av_rescale_q(frame->pts, d->avctx->time_base, tb);
                       else if (frame->pkt_pts != AV_NOPTS_VALUE)
                           frame->pts = av_rescale_q(frame->pkt_pts, av_codec_get_pkt_timebase(d->avctx), tb);
                       else if (d->next_pts != AV_NOPTS_VALUE)
                           frame->pts = av_rescale_q(d->next_pts, d->next_pts_tb, tb);
                       if (frame->pts != AV_NOPTS_VALUE) {
                           d->next_pts = frame->pts + frame->nb_samples;
                           d->next_pts_tb = tb;
                       }
                   }
                   break;
               case AVMEDIA_TYPE_SUBTITLE:
                   ret = avcodec_decode_subtitle2(d->avctx, sub, &got_frame, &d->pkt_temp);
                   break;
           }

           if (ret < 0) {
               d->packet_pending = 0;
           } else {
               d->pkt_temp.dts =
               d->pkt_temp.pts = AV_NOPTS_VALUE;
               if (d->pkt_temp.data) {
                   if (d->avctx->codec_type != AVMEDIA_TYPE_AUDIO)
                       ret = d->pkt_temp.size;
                   d->pkt_temp.data += ret;
                   d->pkt_temp.size -= ret;
                   if (d->pkt_temp.size <= 0)
                       d->packet_pending = 0;
               } else {
                   if (!got_frame) {
                       d->packet_pending = 0;
                       d->finished = d->pkt_serial; // FLAG
                   }
               }
           }
       } while (!got_frame && !d->finished);

       return got_frame;
    }

    It’s difficult for me to understand the following code :

    d->finished = d->pkt_serial; // FLAG

    Can anyone help me ?

    Thanks.