
Recherche avancée
Autres articles (35)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Librairies et logiciels spécifiques aux médias
10 décembre 2010, parPour un fonctionnement correct et optimal, plusieurs choses sont à prendre en considération.
Il est important, après avoir installé apache2, mysql et php5, d’installer d’autres logiciels nécessaires dont les installations sont décrites dans les liens afférants. Un ensemble de librairies multimedias (x264, libtheora, libvpx) utilisées pour l’encodage et le décodage des vidéos et sons afin de supporter le plus grand nombre de fichiers possibles. Cf. : ce tutoriel ; FFMpeg avec le maximum de décodeurs et (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ;
Sur d’autres sites (5204)
-
How to allocate and assign memory to AVFrame in FFMPEG application ?
23 janvier, par wangt13I am working on a video player in an embedded Linux system (5.10.200), I am using FFMPEG-4.4.4 libraries to build the player.


Now, I want to assign pre-allocated
buffer
toAVFrame
to capture the decoded data. So I did followings.

#define FRM_WIDTH 1920
#define FRM_HEIGHT 1080
AVFrame myframe;
uint8_t *buffer;

int init_frame_buffer(void)
{
 int num_bytes = av_image_get_buffer_size(AV_PIX_FMT_RGB32, FRM_WIDTH, FRM_HEIGHT, 1);

 buffer = (uint8_t *)av_malloc(num_bytes * sizeof(uint8_t));
 av_image_fill_arrays(myframe.data, myframe.linesize, buffer, AV_PIX_FMT_RGB32, FRM_WIDTH, FRM_HEIGHT, 1);
....
}

int process_decoded_frame(AVFrame *pframe)
{
 // Can use buffer to process the decoded frame?
}

int process_packet(AVCodecContext *codectx, AVPacket *pkt)
{
 int ret = avcodec_send_packet(codectx, pkt);
 AVFrame *pframe = &myframe;

 if (ret < 0) {
 fprintf(stderr, "Error sending packet for decoding\n");
 return ret;
 }

 while (ret >= 0) {
 ret = avcodec_receive_frame(codectx, pframe);
 if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
 break;
 } else if (ret < 0) {
 fprintf(stderr, "Error during decoding\n");
 goto out;
 }
 process_decoded_frame(pframe); //// <<<<
 }
}



- 

- Allocate a
buffer
; - Assign it to
myframe
; - Use
myframe
inavcodec_receive_frame
, hoping to capture decoded frame intomyframe
andbuffer
. - Process the decoded data directly with
buffer
.










So is it possible for me to do above steps to assign pre-allocated
buffer
to a frame and process decoded data directly withbuffer
?

- Allocate a
-
Is it feasible to dynamically add specific headers to a single page within an Angular SPA application when served from the server ?
18 octobre 2024, par gokul mI'm concerned that since Angular's routing is handled client-side, this might not be directly possible or is it ?


I attempted to add headers on my local Angular server as follows :




 "options": {
 "headers": {
 "Cross-Origin-Embedder-Policy": "require-corp",
 "Cross-Origin-Opener-Policy": "same-origin"
 }
 }



This resulted in CORS errors for all app resources loading from different origins. Given that Angular routers operate client-side, I'm exploring options to achieve server-side rendering for a specific single page. I need to apply the above headers to that path both locally and when deploying with Cloudflare.


-
Anomalie #4135 (Nouveau) : url_absolue et protocoles spécifiques d’ouverture d’application…
4 mai 2018Bonjour,
On vient de nous signaler un souci, à l’origine assez simple : Une url de type `whatsapp ://send ?text=xxxx` qui passe dans la fonction `url_absolue()`
se transforme en une url `http://domain.tld/whatsapp:/` … Elle n’est pas reconnue comme url absolue déjà valide donc.Le problème vient de la fonction `suivre_lien` qui limite le protocole (uri scheme) entre 3 et 7 caractères pour être considéré valide.
Cette limitation, assez logique pour ce qu’on trouve comme URL habituellement sur les internets, ne l’est pas dans le cadre de ces utilisations.
Il semblerait qu’il n’y ait pas de limitation de taille pour le nom d’uri sheme normalement (https://stackoverflow.com/questions/39927628/is-there-a-maximum-length-for-a-protocol-name)Il faudrait donc changer la (les) regexp de suivre_lien `preg_match(’ ;^((? :[a-z]3,7 :) ?//.* ?)(/.*) ?$ ;iS’, $lien, $r)`
peut être en changeant `3,7` en `3,` ?