Recherche avancée

Médias (0)

Mot : - Tags -/serveur

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

Autres articles (37)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • MediaSPIP Player : problèmes potentiels

    22 février 2011, par

    Le lecteur ne fonctionne pas sur Internet Explorer
    Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
    Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (7257)

  • [Aug-Sept 2013] Piwik 2.0 Development Update !

    3 octobre 2013, par Fabian Becker — Development

    This Development Update is the first in a new series of posts we’ll be writing to keep you, our loyal users, informed of our efforts. We hope these updates keep you excited about Piwik’s future, and if you’re a developer, we hope they inspire and challenge you to accomplish more yourself !

    Despite this being our first update, it will probably be one of our biggest. We’ve gotten a lot done as we race towards the Piwik 2.0 release ! Just see for yourself :

    What we’ve accomplished

    Theming

    Piwik now supports theming, a feature that was requested often in the past. Because of our switch to the Twig template engine and other major code changes it is now possible to change the way Piwik looks. Additionally, developers can use the dynamic stylesheet language LESS, instead of CSS. Piwik will automatically transform the LESS code into CSS.

    Piwik 2.0 will ship with a new dark theme called PleineLune (french for Full Moon) that makes use of the new theming feature. Another theme with a left-aligned menu was created during the Piwik Meetup in Paris. Both of these themes were created by Thomas Zilliox, a very talented designer and CSS expert.

    left-menuplein-lune

    PHP 5.3 Namespaces

    For Piwik 2.0 we decided to make use of namespaces, a feature introduced in PHP 5.3. The usage of namespaces makes our code more readable and allows us to better modularize the platform. This is in part why we are raising the required minimum PHP version to 5.3 for Piwik 2.0. (Remember to update your server !)

    Translations in JSON

    All translations are now stored in JSON files which makes storing translations in Piwik a lot cleaner that the giant PHP array we previously used.

    Side note : if you’d like to make Piwik available to more languages, please sign up at translations.piwik.org. We’d love to have your help !

    UI Tests

    We now use UI tests to make sure that changes to the code don’t break the UI. UI tests use PhantomJS and CutyCapt and are automatically executed on Travis CI. Whenever an integration test fails the script produces a screenshot diff that shows the difference. Learn more.

    UIIntegrationTest_actions_downloads

    AnonymizeIP supports IPv6

    The AnonymizeIP plugin now masks IPv6 addresses. The concept of the config option ‘ip_address_mask_length’ has now changed to reflect the level of masking that should be applied to the IP. With a masking level of 1 Piwik will mask the last octet of an IPv4 address and the last 80 bits of an IPv6 address.

    All Websites Dashboard usable with 20,000+ Websites

    The All Websites Dashboard is now usable even if you track many thousands of websites in your Piwik instance. We rewrote parts of the archiving process in order to make this possible. Making Piwik fast and memory efficient is a constant concern for core developers.

    Plugins can now add new Visualizations

    Piwik Plugins and Themes can now create new visualizations for your report data. They can also specify their own ViewDataTable footer icons or modify existing ones. This will allow plugin developers to create new ways for you to view your data, customize existing reports so they look great in new visualizations and provide extra analytics functionality accessible in each of your reports.

    The new TreemapVisualization plugin makes use of this feature to let you view your reports as treemaps. It serves as an example of this new functionality.

    Piwik Marketplace

    The Piwik Marketplace is a new platform developers can use to publish their plugins and themes so all Piwik users can easily access them. The marketplace is hosted at plugins.piwik.org and is currently in an early development state, but we’re already able to host plugins !

    Developers can easily publish their plugins by adding a commit hook to their Github repositories. Every time you push a new tag, the marketplace will make a new version of your plugin available. The marketplace will provide a centralized platform to search for plugins and also provide statistics on plugin usage.

    Install Plugins and Themes in one click from within Piwik

    Piwik has offered since the beginning the much-loved “one click update” feature. We are bringing the same functionnality to the Marketplace : you will be able to install Plugins and Themes in one click directly within the Piwik interface ! Similarly to WordPress or Firefox, Piwik will let you extend the functionnality of your analytics platform.

    Conclusion

    In Piwik 2.0 you will be able to install plugins and themes from the marketplace. And, if you’re so inclined, you will be able to create and host your own plugins/themes on the marketplace so everyone can use them. This is by far the accomplishment we are most excited by… the possibilities it opens up for Piwik’s future are truly unlimited. We hope you share our excitement !

    Au revoir, until next time !

    PS : our mission is to liberate web analytics ; thank you for sharing the word about Piwik 2.0 !

  • Spotlight : Alwaysdata.com the company behind Piwik.org web hosting [Interview]

    11 avril 2013, par matt — About, Community

    Piwik is the result of the work of many talented individuals and companies. Today we’d like to showcase Alwaysdata.com, the awesome web hosting company providing managed hosting for all Piwik.org websites and services.

    I recently met and asked a few questions to Cyril, co-founder of Alwaysdata.com and Piwik core developer. Learn more in the interview below !

    What is Alwaysdata ?

    We are a French web hosting company created in 2006. If you need to host a website — a Piwik installation, for example — or even your domains/emails, we provide infrastructure and maintenance services.

    Who are your customers and what kind of work do you do ?

    We have several types of clients :

    • Individuals who need hosting for their personal site and who benefit from storage space with direct SSH access.
    • Web agencies who need hosting for their clients’ sites.
    • The largest customers, often on dedicated servers, for hosting their site/infrastructure.

    Our work falls into three categories :

    1. Support (via administration, telephone, Twitter, IRC, etc.)
    2. Development (in Python), primarily to add new features
    3. System administration, either for maintenance (e.g. adding servers), or for preparing new features

    What sets Alwaysdata apart from the large web hosting competition ?

    Two things :

    • Availability. We are a small team and often know our customers quite well. We are all on IRC, so you can contact us directly if you need any assistance.
    • Features. We are halfway between traditional web hosting and the cloud, combining the advantages of both.

    Are you using Piwik internally or with customers ? If so, how are you using Piwik ?

    All of our customers can view statistics for their sites via our global Piwik installation, without having to configure anything.

    To provide these analytics reports to our customers, we implemented import of the raw access logs in Piwik. The Log import toolkit is now a feature included in Piwik.

    What is the next big thing for Alwaysdata ?

    We are going to upgrade our pricing : instead of fixed costs, each of our clients will now pay exactly what they consume. This allows our clients the benefit of a very high quality service for the lowest possible price.

    We are also going to add native support for more technologies : Java, Node.js, ZeroMQ, etc.

    Thank you for your time and all the best to Alwaysdata for the future !

    Note from Matt, Piwik founder : Cyril and the team at Alwaysdata.com have been consistently great in their system administration work for Piwik.org services, providing a fast and reliable web hosting experience with top notch support and security practises. They also handled the migration of all services from our old servers with total piece of mind.

    Alwaysdata contributed to Piwik the popular Log Analytics toolkit. They are great software developers and system administrators with a passion for their work. Since 2006, they have been maintaining optimized hosting services for the entire web infrastructure (websites, domains, emails, databases, etc.), from the simplest to the most exotic. We do recommend their managed hosting services.

    Learn more

  • Is this deadlocked ?

    25 juillet 2017, par Gathros

    I’m writing test code to make a video player in c++. I had a lot of issues with the sound making cracking sounds, so I though I’m not sending enough data to the audio thread. Then I got the code and tried to make a player without audio but the decoding was happening in another thread ; while the main thread can just handle SDL2 windows and textures. But then I run the code the program just stops (not closed, so nothing happens but it is running) at a mutex lock with no errors.

    my code :

    extern "C"{
    //FFmpeg libraries
    #include <libavcodec></libavcodec>avcodec.h>
    #include <libavformat></libavformat>avformat.h>
    #include <libswscale></libswscale>swscale.h>

    //SDL2 libraries
    #include <sdl2></sdl2>SDL.h>
    }

    #ifdef __MINGW32__
    #undef main /* Prevents SDL from overriding main() */
    #endif

    //C++ libraries
    #include
    #include <iostream>
    #include <chrono>
    #include <thread>
    #include <atomic>
    #include <mutex>
    #include
    #include <future>

    // compatibility with newer API
    #if LIBAVCODEC_VERSION_INT &lt; AV_VERSION_INT(55,28,1)
    #define av_frame_alloc avcodec_alloc_frame
    #define av_frame_free avcodec_free_frame
    #endif

    typedef struct PacketQueue {
       AVPacketList *first_pkt, *last_pkt;
    } PacketQueue;

    AVCodecContext *pCodecCtx = nullptr;
    PacketQueue videoq;

    std::mutex mtx;
    std::condition_variable convar;
    std::atomic_int videoStream;
    std::atomic<bool> quitting (false);

    int packet_queue_put(PacketQueue *q, AVPacket *pkt){
       AVPacketList *pkt1;
       if(av_dup_packet(pkt) &lt; 0){
           return -1;
       }
       pkt1 = (AVPacketList*) av_malloc(sizeof(AVPacketList));
       if(!pkt1){
           return -1;
       }
       pkt1->pkt = *pkt;
       pkt1->next = NULL;

       std::lock_guard lock(mtx);

       if (!q->last_pkt){
           q->first_pkt = pkt1;
       }else{
           q->last_pkt->next = pkt1;
       }
       q->last_pkt = pkt1;
       convar.notify_all();
       return 0;
    }

    static int packet_queue_get(PacketQueue *q, AVPacket *pkt, int block){
       AVPacketList *pkt1;
       int ret;


       std::unique_lock lk(mtx);

       while(1){

           if(quitting) {
               ret = -1;
               break;
           }

           pkt1 = q->first_pkt;
           if(pkt1){
               q->first_pkt = pkt1->next;
               if(!q->first_pkt){
                   q->last_pkt = NULL;
               }
               *pkt = pkt1->pkt;
               av_free(pkt1);
               ret = 1;
               break;
           } else if (!block) {
               ret = 0;
               break;
           } else {
               convar.wait(lk);
           }
       }
       return ret;
    }

    void decoderThreadFunc(char *fileurl){
    AVFormatContext *pFormatCtx = nullptr;
    AVCodecContext *pCodecCtxOrig = nullptr;
    AVCodec *pCodec = nullptr;
    AVPacket packet;

    // Register all formats and codecs
    av_register_all();

    // Open video file
    if(avformat_open_input(&amp;pFormatCtx, fileurl, NULL, NULL) != 0){
       fprintf(stderr, "Couldn't open file\n");
       goto CleanDecoder; // Couldn't open file
    }

    // Retrieve stream information
    if(avformat_find_stream_info(pFormatCtx, NULL) &lt; 0){
       fprintf(stderr, "Couldn't find stream info\n");
       goto CleanDecoder; // Couldn't find stream information
    }

    // Find the first video stream
    videoStream = av_find_best_stream(pFormatCtx, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
    if(videoStream &lt; 0){
       fprintf(stderr, "Couldn't not find a video stream\n");
       goto CleanDecoder; // Didn't find a video stream
    }

    // Get a pointer to the codec context for the video stream
    pCodecCtxOrig = pFormatCtx->streams[videoStream]->codec;
    // Find the decoder for the video stream
    pCodec = avcodec_find_decoder(pCodecCtxOrig->codec_id);
    if(pCodec == NULL){
       fprintf(stderr, "Couldn't find a codec\n");
       goto CleanDecoder; // Codec not found
    }

    // Copy context
    pCodecCtx = avcodec_alloc_context3(pCodec);
    if(avcodec_copy_context(pCodecCtx, pCodecCtxOrig) != 0){
       fprintf(stderr, "Couldn't copy codec context\n");
       goto CleanDecoder; // Error copying codec context
    }

    // Open codec
    if(avcodec_open2(pCodecCtx, pCodec, NULL) &lt; 0){
       fprintf(stderr, "Couldn't open codec\n");
       goto CleanDecoder;  // Could not open codec
    }

    // Init packet queue
    memset(&amp;videoq, 0, sizeof(PacketQueue));

    convar.notify_all();

    while(av_read_frame(pFormatCtx, &amp;packet) >= 0 &amp;&amp; !quitting){
       // Is this a packet from the video stream?
       if(packet.stream_index == videoStream){
           packet_queue_put(&amp;videoq, &amp;packet);
       }else {
           // Free the packet that was allocated by av_read_frame
           av_free_packet(&amp;packet);
       }
    }

    CleanDecoder:
    quitting = true;

    // Close the codec
    avcodec_close(pCodecCtx);
    avcodec_close(pCodecCtxOrig);

    // Close the video file
    avformat_close_input(&amp;pFormatCtx);
    }

    int main(int argc, char *argv[]){
    struct SwsContext *sws_ctx = nullptr;
    AVFrame *pFrame = nullptr;
    AVPacket packet;
    int frameFinished;
    SDL_Event event;
    SDL_Window *screen;
    SDL_Renderer *renderer;
    SDL_Texture *texture;
    Uint8 *yPlane, *uPlane, *vPlane;
    size_t yPlaneSz, uvPlaneSz;
    int uvPitch;

    if(argc != 2){
       fprintf(stderr, "Usage: %s <file>\n", argv[0]);
       return 0;
    }

    std::thread decoderThread(decoderThreadFunc, argv[1]);

    std::unique_lock lk(mtx, std::adopt_lock);
    convar.wait(lk);

    if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER)){
       fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
       goto CleanMain;
    }

    // Init packet queue
    memset(&amp;videoq, 0, sizeof(PacketQueue));

    // Make a screen to put our video
    screen = SDL_CreateWindow("Video Player", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, pCodecCtx->width, pCodecCtx->height, 0);

    if(!screen){
       fprintf(stderr, "SDL: could not create window - exiting\n");
       goto CleanMain;
    }

    renderer = SDL_CreateRenderer(screen, -1, 0);
    if(!renderer){
       fprintf(stderr, "SDL: could not create renderer - exiting\n");
       goto CleanMain;
    }

    // Allocate a place to put our YUV image on that screen
    texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_YV12, SDL_TEXTUREACCESS_STREAMING, pCodecCtx->width, pCodecCtx->height);
    if(!texture){
       fprintf(stderr, "SDL: could not create texture - exiting\n");
       goto CleanMain;
    }

    // Allocate video frame
    pFrame = av_frame_alloc();

    // initialize SWS context for software scaling
    sws_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height, pCodecCtx->pix_fmt, pCodecCtx->width,
           pCodecCtx->height, PIX_FMT_YUV420P, SWS_BILINEAR, NULL, NULL, NULL);

    // set up YV12 pixel array (12 bits per pixel)
    yPlaneSz = pCodecCtx->width * pCodecCtx->height;
    uvPlaneSz = pCodecCtx->width * pCodecCtx->height / 4;
    yPlane = (Uint8*)malloc(yPlaneSz);
    uPlane = (Uint8*)malloc(uvPlaneSz);
    vPlane = (Uint8*)malloc(uvPlaneSz);
    uvPitch = pCodecCtx->width / 2;

    if(!yPlane || !uPlane || !vPlane){
       fprintf(stderr, "Could not allocate pixel buffers - exiting\n");
       goto CleanMain;
    }

    while(!quitting){
       // Get packet
       if(packet_queue_get(&amp;videoq, &amp;packet, 1) &lt; 0){
           continue;
       }

       // Is this a packet from the video stream?
       if(packet.stream_index == videoStream){
           // Decode video frame
           avcodec_decode_video2(pCodecCtx, pFrame, &amp;frameFinished, &amp;packet);

           // Did we get a video frame?
           if(frameFinished){
               AVPicture pict;
               pict.data[0] = yPlane;
               pict.data[1] = uPlane;
               pict.data[2] = vPlane;
               pict.linesize[0] = pCodecCtx->width;
               pict.linesize[1] = uvPitch;
               pict.linesize[2] = uvPitch;

               // 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_UpdateYUVTexture(texture, NULL, yPlane, pCodecCtx->width, uPlane, uvPitch, vPlane, uvPitch);

               SDL_RenderClear(renderer);
               SDL_RenderCopy(renderer, texture, NULL, NULL);
               SDL_RenderPresent(renderer);

           }
       }

       // Free the packet that was allocated by av_read_frame
       av_free_packet(&amp;packet);
       SDL_PollEvent(&amp;event);
       switch(event.type){
       case SDL_QUIT:
           quitting = true;
           break;
       default:
           break;
       }

    }

    CleanMain:
    quitting = true;
    decoderThread.join();

    //Cleaning up SDL2
    SDL_DestroyTexture(texture);
    SDL_DestroyRenderer(renderer);
    SDL_DestroyWindow(screen);
    SDL_Quit();

    // Free the YUV frame
    av_frame_free(&amp;pFrame);
    free(yPlane);
    free(uPlane);
    free(vPlane);

    return 0;
    }
    </file></bool></future></mutex></atomic></thread></chrono></iostream>

    I’m using this site and this post as a guide.

    Update

    I debugged the program after some comments and found that, now when getting packets from videoq ; it’s empty when I’m debugging packet_queue_get. If I debug the function packet_queue_put, it’s working fine is putting packets into videoq.