Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (41)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (5916)

  • Revision 33458 : retablir le pied de la dist

    1er décembre 2009, par cedric@… — Log

    retablir le pied de la dist

  • [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 !

  • C++ ffmpeg lib version 7.0 - runtime error

    1er septembre 2024, par Chris P

    I want to make a C++ lib named cppdub which will mimic the python module pydub.

    


    One main function is to export the AudioSegment to a file with a specific format (example : mp3).

    


    The code is :

    


    void check_av_error(int error_code, const std::string&amp; msg) {&#xA;    if (error_code &lt; 0) {&#xA;        char errbuf[AV_ERROR_MAX_STRING_SIZE];&#xA;        av_strerror(error_code, errbuf, sizeof(errbuf));&#xA;        throw std::runtime_error(msg &#x2B; ": " &#x2B; errbuf);&#xA;    }&#xA;}&#xA;&#xA;std::string av_err2str_(int errnum) {&#xA;    char buf[AV_ERROR_MAX_STRING_SIZE];&#xA;    av_strerror(errnum, buf, sizeof(buf));&#xA;    return std::string(buf);&#xA;}&#xA;&#xA;void log_error(const std::string&amp; msg) {&#xA;    std::cerr &lt;&lt; "Error: " &lt;&lt; msg &lt;&lt; std::endl;&#xA;}&#xA;&#xA;std::ofstream cppdub::AudioSegment::export_segment(&#xA;    std::string&amp; out_f,&#xA;    const std::string&amp; format,&#xA;    const std::string&amp; codec,&#xA;    const std::string&amp; bitrate,&#xA;    const std::vector&amp; parameters,&#xA;    const std::map&amp; tags,&#xA;    const std::string&amp; id3v2_version,&#xA;    const std::string&amp; cover) {&#xA;&#xA;    av_log_set_level(AV_LOG_DEBUG);&#xA;    avformat_network_init();&#xA;&#xA;    AVFormatContext* format_ctx = nullptr;&#xA;    int ret = avformat_alloc_output_context2(&amp;format_ctx, nullptr, format.c_str(), out_f.c_str());&#xA;    check_av_error(ret, "Could not allocate format context");&#xA;&#xA;    if (!(format_ctx->oformat->flags &amp; AVFMT_NOFILE)) {&#xA;        ret = avio_open(&amp;format_ctx->pb, out_f.c_str(), AVIO_FLAG_WRITE);&#xA;        check_av_error(ret, "Could not open output file");&#xA;    }&#xA;&#xA;    AVStream* stream = avformat_new_stream(format_ctx, nullptr);&#xA;    if (!stream) {&#xA;        avformat_free_context(format_ctx);&#xA;        throw std::runtime_error("Could not allocate stream");&#xA;    }&#xA;&#xA;    const AVCodec* codec_obj = avcodec_find_encoder_by_name(codec.c_str());&#xA;    if (!codec_obj) {&#xA;        avformat_free_context(format_ctx);&#xA;        throw std::runtime_error("Codec not found");&#xA;    }&#xA;&#xA;    AVCodecContext* codec_ctx = avcodec_alloc_context3(codec_obj);&#xA;    if (!codec_ctx) {&#xA;        avformat_free_context(format_ctx);&#xA;        throw std::runtime_error("Could not allocate codec context");&#xA;    }&#xA;&#xA;    codec_ctx->sample_rate = this->get_frame_rate();&#xA;    AVChannelLayout ch_layout_1;&#xA;    av_channel_layout_uninit(&amp;ch_layout_1);&#xA;    av_channel_layout_default(&amp;ch_layout_1, 2);&#xA;    codec_ctx->ch_layout = ch_layout_1; // Adjust based on your needs&#xA;    codec_ctx->bit_rate = std::stoi(bitrate);&#xA;    codec_ctx->sample_fmt = codec_obj->sample_fmts[0];&#xA;&#xA;    if (format_ctx->oformat->flags &amp; AVFMT_GLOBALHEADER) {&#xA;        codec_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;&#xA;    }&#xA;&#xA;    ret = avcodec_open2(codec_ctx, codec_obj, nullptr);&#xA;    check_av_error(ret, "Could not open codec");&#xA;&#xA;    stream->time_base = { 1, codec_ctx->sample_rate };&#xA;    ret = avcodec_parameters_from_context(stream->codecpar, codec_ctx);&#xA;    check_av_error(ret, "Could not set codec parameters");&#xA;&#xA;    ret = avformat_write_header(format_ctx, nullptr);&#xA;    check_av_error(ret, "Error occurred when writing header");&#xA;&#xA;    AVPacket pkt;&#xA;    av_init_packet(&amp;pkt);&#xA;    pkt.data = nullptr;&#xA;    pkt.size = 0;&#xA;&#xA;    int frame_size = av_samples_get_buffer_size(nullptr, codec_ctx->ch_layout.nb_channels,&#xA;        codec_ctx->frame_size, codec_ctx->sample_fmt, 0);&#xA;    check_av_error(frame_size, "Could not calculate frame size");&#xA;&#xA;    AVFrame* frame = av_frame_alloc();&#xA;    if (!frame) {&#xA;        avcodec_free_context(&amp;codec_ctx);&#xA;        avformat_free_context(format_ctx);&#xA;        throw std::runtime_error("Error allocating frame");&#xA;    }&#xA;&#xA;    frame->format = codec_ctx->sample_fmt;&#xA;    frame->ch_layout = codec_ctx->ch_layout;&#xA;    frame->sample_rate = codec_ctx->sample_rate;&#xA;    frame->nb_samples = codec_ctx->frame_size;&#xA;&#xA;    ret = av_frame_get_buffer(frame, 0);&#xA;    if (ret &lt; 0) {&#xA;        av_frame_free(&amp;frame);&#xA;        avcodec_free_context(&amp;codec_ctx);&#xA;        avformat_free_context(format_ctx);&#xA;        throw std::runtime_error("Error allocating frame buffer: " &#x2B; av_err2str_(ret));&#xA;    }&#xA;&#xA;    size_t data_offset = 0;&#xA;&#xA;    while (data_offset &lt; this->raw_data().size()) {&#xA;        int samples_to_process = std::min(frame_size, static_cast<int>(this->raw_data().size()) - static_cast<int>(data_offset));&#xA;&#xA;        // Fill the frame with audio data&#xA;        ret = avcodec_fill_audio_frame(frame, codec_ctx->ch_layout.nb_channels, codec_ctx->sample_fmt,&#xA;            reinterpret_cast<const>(this->raw_data().data()) &#x2B; data_offset,&#xA;            samples_to_process, 0);&#xA;        if (ret &lt; 0) {&#xA;            log_error("Error filling audio frame: " &#x2B; av_err2str_(ret));&#xA;            av_frame_free(&amp;frame);&#xA;            avcodec_free_context(&amp;codec_ctx);&#xA;            avformat_free_context(format_ctx);&#xA;            throw std::runtime_error("Error filling audio frame: " &#x2B; av_err2str_(ret));&#xA;        }&#xA;&#xA;        data_offset &#x2B;= samples_to_process;&#xA;&#xA;        ret = avcodec_send_frame(codec_ctx, frame);&#xA;        if (ret &lt; 0) {&#xA;            log_error("Error sending frame for encoding: " &#x2B; av_err2str_(ret));&#xA;            av_frame_free(&amp;frame);&#xA;            avcodec_free_context(&amp;codec_ctx);&#xA;            avformat_free_context(format_ctx);&#xA;            throw std::runtime_error("Error sending frame for encoding: " &#x2B; av_err2str_(ret));&#xA;        }&#xA;&#xA;        while (ret >= 0) {&#xA;            ret = avcodec_receive_packet(codec_ctx, &amp;pkt);&#xA;            if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {&#xA;                break;&#xA;            }&#xA;            check_av_error(ret, "Error receiving packet");&#xA;&#xA;            pkt.stream_index = stream->index;&#xA;&#xA;            ret = av_interleaved_write_frame(format_ctx, &amp;pkt);&#xA;            check_av_error(ret, "Error writing encoded frame to output file");&#xA;&#xA;            av_packet_unref(&amp;pkt);&#xA;        }&#xA;    }&#xA;&#xA;    // Flush the encoder&#xA;    avcodec_send_frame(codec_ctx, nullptr);&#xA;    while (avcodec_receive_packet(codec_ctx, &amp;pkt) == 0) {&#xA;        pkt.stream_index = stream->index;&#xA;        av_interleaved_write_frame(format_ctx, &amp;pkt);&#xA;        av_packet_unref(&amp;pkt);&#xA;    }&#xA;&#xA;    av_write_trailer(format_ctx);&#xA;&#xA;    av_frame_free(&amp;frame);&#xA;    avcodec_free_context(&amp;codec_ctx);&#xA;    avformat_free_context(format_ctx);&#xA;&#xA;    return std::ofstream(out_f, std::ios::binary);&#xA;}&#xA;</const></int></int>

    &#xA;

    The runtime error is :

    &#xA;

    Exception thrown at 0x00007FF945137C9B (avcodec-61.dll) in cppdub_test.exe : 0xC0000005 : Access violation reading location 0x0000024CBCD25080.

    &#xA;

    for line :

    &#xA;

        ret = avcodec_send_frame(codec_ctx, frame);&#xA;

    &#xA;

    Call stack :

    &#xA;

        avcodec-61.dll!00007ff945137c9b()   Unknown&#xA;    avcodec-61.dll!00007ff9451381bb()   Unknown&#xA;    avcodec-61.dll!00007ff945139679()   Unknown&#xA;    avcodec-61.dll!00007ff94371521d()   Unknown&#xA;    avcodec-61.dll!00007ff9434a80c2()   Unknown&#xA;    avcodec-61.dll!00007ff9434a84a6()   Unknown&#xA;    avcodec-61.dll!00007ff9434a8749()   Unknown&#xA;>   cppdub_test.exe!cppdub::AudioSegment::export_segment(std::string &amp; out_f, const std::string &amp; format, const std::string &amp; codec, const std::string &amp; bitrate, const std::vector> &amp; parameters, const std::map,std::allocator>> &amp; tags, const std::string &amp; id3v2_version, const std::string &amp; cover) Line 572  C&#x2B;&#x2B;&#xA;    cppdub_test.exe!main() Line 33  C&#x2B;&#x2B;&#xA;    [External Code] &#xA;&#xA;

    &#xA;

    Autos :

    &#xA;

    &#x2B;       this    0x000000d3a08ff690 {data_="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0... ...} cppdub::AudioSegment *&#xA;&#x2B;       bitrate "128000"    const std::string &amp;&#xA;&#x2B;       ch_layout_1 {order=AV_CHANNEL_ORDER_NATIVE (1) nb_channels=2 u={mask=3 map=0x0000000000000003 {id=??? name=... opaque=...} } ...}   AVChannelLayout&#xA;&#x2B;       codec   "libmp3lame"    const std::string &amp;&#xA;&#x2B;       codec_ctx   0x0000024cbc78c240 {av_class=avcodec-61.dll!0x00007ff94789c760 {class_name=0x00007ff94789c740 "AVCodecContext" ...} ...}    AVCodecContext *&#xA;&#x2B;       codec_obj   avcodec-61.dll!0x00007ff9477fa4c0 (load symbols for additional information) {name=0x00007ff9477fa47c "libmp3lame" ...}  const AVCodec *&#xA;&#x2B;       cover   ""  const std::string &amp;&#xA;        data_offset 9216    unsigned __int64&#xA;&#x2B;       format  "mp3"   const std::string &amp;&#xA;&#x2B;       format_ctx  0x0000024cbc788a40 {av_class=avformat-61.dll!0x00007ff99eb09fe0 {class_name=0x00007ff99eb09fc0 "AVFormatContext" ...} ...}  AVFormatContext *&#xA;&#x2B;       frame   0x0000024cbc787380 {data=0x0000024cbc787380 {0x0000024cbcd25080 <error reading="reading" characters="characters" of="of">, ...} ...}    AVFrame *&#xA;        frame_size  9216    int&#xA;&#x2B;       id3v2_version   "4" const std::string &amp;&#xA;&#x2B;       out_f   "ha-ha-ha.mp3"  std::string &amp;&#xA;&#x2B;       parameters  { size=0 }  const std::vector> &amp;&#xA;&#x2B;       pkt {buf=0x0000000000000000 <null> pts=-9223372036854775808 dts=-9223372036854775808 ...}   AVPacket&#xA;        ret 9216    int&#xA;        samples_to_process  9216    int&#xA;&#x2B;       stream  0x0000024cbc789bc0 {av_class=avformat-61.dll!0x00007ff99eb09840 {class_name=0x00007ff99eb09820 "AVStream" ...} ...} AVStream *&#xA;&#x2B;       tags    { size=0 }  const std::map,std::allocator>> &amp;&#xA;</null></error>

    &#xA;