[Libav-user] How to redirect FFMPEG output to a socket

Denis info at denisgottardello.it
Thu May 10 08:45:30 CEST 2012


In data martedì 08 maggio 2012 21:02:24, Denis ha scritto:
> I don't understand. I have placed a file called "bufferptocolo.c" in 
> "ffmpeg-0.10.2/libavformat/" folder. Then in the 
> "ffmpeg-0.10.2/libavformat/makefile" file I have added this row 
> "OBJS-$(CONFIG_BUFFER_PROTOCOL)             += bufferprotocol.o"
> but the file is not compiled. No error has reported.
> 
> The file contains this:
> 
> 
> #if CONFIG_BUFFER_PROTOCOL
> 
> static int buffer_open(URLContext *h, const char *filename, int flags)
> {
>     printf("buffer_open\n");
>     return 0;
> }
> 
> static int buffer_read(URLContext *h, unsigned char *buf, int size)
> {
>     printf("buffer_read\n");
>     return (-1 == r)?AVERROR(errno):r;
> }
> 
> static int buffer_write(URLContext *h, const unsigned char *buf, int size)
> {
>     printf("buffer_write\n");
>     return (-1 == r)?AVERROR(errno):r;
> }
> 
> static int64_t buffer_seek(URLContext *h, int64_t pos, int whence)
> {
>     printf("buffer_seek\n");
>     return 0;
> }
> 
> static int buffer_close(URLContext *h)
> {
>     printf("buffer_seek\n");
>     return 0;
> }
> 
> static int buffer_get_handle(URLContext *h)
> {
>     printf("buffer_get_handle\n");
>     return (intptr_t) h->priv_data;
> }
> 
> static int buffer_check(URLContext *h, int mask)
> {
>     printf("buffer_check\n");
>     return 0;
> }
> 
> URLProtocol ff_buffer_protocol = {
>     .name                = "buffer",
>     .url_open            = buffer_open,
>     .url_read            = buffer_read,
>     .url_write           = buffer_write,
>     .url_seek            = buffer_seek,
>     .url_close           = buffer_close,
>     .url_get_file_handle = buffer_get_handle,
>     .url_check           = buffer_check,
> };
> 
> #endif /* CONFIG_BUFFER_PROTOCOL */
> 
> 
> Have you got any idea?


Up!


-- 
www.denisgottardello.it
Skype: mrdebug
Videosurveillance and home automation! 
http://www.denisgottardello.it/DomusBoss/DomusBossIndice.php


More information about the Libav-user mailing list