On Thu, May 3, 2012 at 1:39 PM, Wagner Patriota <[email protected]> wrote: > Hey guys, sorry... but it's VERY VERY simple... I did it in about 10 or 15 > minutes after I figured out how URLProtocol works... > > I just rewrote the URLProtocol... that's it... I created a new one, based on > file.c and then I rewrote all the functions to write in my socket... it > worked right in the first time.
Are you using ffmpeg (the command line) or libavcodec (the library in your own program)? If you're using ffmpeg, Andrey Utkin's point was that ffmpeg already supports outputting to a socket. petroxp:mydev mjbshaw$ ffmpeg -protocols ffmpeg version N-39731-g0cd17a6 Copyright (c) 2000-2012 the FFmpeg developers built on May 1 2012 11:57:41 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3) configuration: --enable-libopenjpeg libavutil 51. 46.100 / 51. 46.100 libavcodec 54. 14.101 / 54. 14.101 libavformat 54. 3.100 / 54. 3.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 67.101 / 2. 67.101 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 11.100 / 0. 11.100 Supported file protocols: Input: applehttp cache concat crypto file gopher hls http httpproxy mmsh mmst pipe rtmp rtp tcp udp Output: file gopher http httpproxy md5 pipe rtmp rtp tcp udp Notice http, tcp, and udp are all supported as output. Even if you were using libavcodec and not ffmpeg, you could still use the http, tcp, udp, or whatever else you needed protocols, as they're already completed. If you need your own custom network protocol, then yes, you do need a custom URLProtocol. --Michael _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
