
Recherche avancée
Autres articles (54)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains 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 ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (11059)
-
mpeg12 : propagate more real return values through chunk decode error return and fix...
3 septembre 2011, par Dustin Brodympeg12 : propagate more real return values through chunk decode error return and fix...
-
mpeg12 : propagate more real return values through chunk decode error return and fix...
3 septembre 2011, par Dustin Brodympeg12 : propagate more real return values through chunk decode error return and fix...
-
Custom real-time input for ffmpeg in C
10 août 2016, par Victor.dMdBI’m implementing a custom io with avformat_alloc_context and avio_alloc_context to be able to read the output of another function in real-time. A buffer is populated by this function in a boost asio thread, while ffmpeg is reading this buffer from another thread.
I initialise an io buffer where this function writes into, and which ffmpeg reads :
BufferData input_buffer = {0};
input_buffer.size = 65536;
input_buffer.ptr = (uint8_t *) av_malloc(buf_size);
memset(input_buffer.ptr,'0',100);
fprintf(stdout, "initialisation: buffer pointer %p buffer data pointer: %p\n", &input_buffer, input_buffer.ptr);Why i do the memset is explained here.
Then to test out the pointer address I did :BufferData * decode_buffer;
decode_buffer->size = 65536;
decode_buffer->ptr = (uint8_t *) av_malloc(decode_buffer->size);
AVIOContext * av_io_ctx = avio_alloc_context(decode_buffer->ptr, decode_buffer->size, 0, &input_buffer, &read_function, NULL, NULL);
AVFormatContext *av_fmt_ctx = avformat_alloc_context();
av_fmt_ctx->pb = av_io_ctx;
BufferData * tmpPtr = (BufferData * ) video_input_file->av_io_ctx->opaque;
fprintf(stdout, "video decoder before: buffer pointer %p, buffer data pointer: %p\n", tmpPtr, tmpPtr->ptr);
open_res = avformat_open_input(&av_fmt_ctx, "anyname", in_fmt, options ? &options : NULL);
fprintf(stdout, "video decoder after: buffer pointer %p, buffer data pointer: %p\n", tmpPtr, tmpPtr->ptr);For reference
typedef struct {
uint8_t *ptr;
size_t size;
} BufferData;The read function
static int read_function(void* opaque, uint8_t* buf, int buf_size) {
BufferData *bd = (BufferData *) opaque;
buf_size = FFMIN(buf_size, bd->size);
memcpy(buf, bd->ptr, buf_size);
bd->ptr += buf_size; //This seemed to cause the problem
bd->size -= buf_size;
return buf_size;
}And the result will be :
initialisation: buffer pointer 0x7f2c4a613620, buffer data pointer: 0x7f2c48c56040
video decoder before: buffer pointer 0x7f2c4a613620, buffer data pointer: 0x7f2c48c56040
video decoder after: buffer pointer 0x7f2c4a613620, buffer data pointer: 0x7f2c49e24b50Is it a normal behaviour that the buffer data ptr is changed by avformat_open_input ? since I would like to keep the initial pointer address given I am using it in another function, and have malloced it the required memory.