Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: add single file mode

2014-07-22 Thread Eli Kara

> HLS version 4 offers the possibility to keep the media file whole instead of 
> splitting it. In that case, segments are specified with byte ranges.

> We introduce a new '-hls_flags' option for the hlsenc muxer, with a single 
> flag for the time being, 'single_file'.

Nicolas, just out of curiosity - is there a valid use case for a single video 
file in HLS? After all, the whole point of the protocol is to allow adaptive
streaming, theoretically allowing switching resolutions and bitrates on-the-fly.

I'll be the last one to oppose adding something from the standard but I'm just 
curious.

Eli

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Inconsistent UDP output packet size - patch

2014-07-22 Thread Konstantin Shpinev
Following https://trac.ffmpeg.org/ticket/2748


0001-fix-flush_buffer-in-aviobuf.c-to-produce-constant-pa.patch
Description: Binary data
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf/segment: do not allow to create segments with no key-frames

2014-07-22 Thread Stefano Sabatini
On date Friday 2014-07-18 16:05:35 +0200, Michael Niedermayer encoded:
> On Thu, Jul 17, 2014 at 08:39:16PM +0200, Stefano Sabatini wrote:
> > Fix trac ticket #3749.
> > ---
> >  libavformat/segment.c | 16 +---
> >  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> probably ok

Applied, thanks.
-- 
FFmpeg = Feasting and Fascinating Mastering Purposeless Eccentric Goblin
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] lavf/segment: sanitize segment end time in case last packet didn't have a defined duration

2014-07-22 Thread Stefano Sabatini
On date Thursday 2014-07-17 20:39:21 +0200, Stefano Sabatini encoded:
> In particular, avoids to set segments with a 0 duration (e.g. segment
> with a single reference frame for which duration is undefined).
> ---
>  libavformat/segment.c | 6 ++
>  1 file changed, 6 insertions(+)

Applied.
-- 
FFmpeg = Fiendish and Furious Mystic Picky Ephemeral God
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/7] avformat/hlsenc: correctly compute target duration

2014-07-22 Thread Stefano Sabatini
On date Friday 2014-07-18 10:57:41 +0200, Nicolas Martyanoff encoded:
> With HLS, the duration of all segments must be lower or equal to the target
> duration. Therefore floor(duration + 0.5) yields incorrect results.
> 
> For example, for duration = 1.35, floor(duration + 0.5) yields 1.0, but the
> correct result is 2.0.
> ---
>  libavformat/hlsenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index 86447d8..388a23a 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -141,7 +141,7 @@ static int hls_window(AVFormatContext *s, int last)
>  
>  for (en = hls->list; en; en = en->next) {
>  if (target_duration < en->duration)
> -target_duration = (int) floor(en->duration + 0.5);
> +target_duration = ceil(en->duration);
>  }

LGTM.
-- 
FFmpeg = Formidable & Free Most Pitiless Extroverse Gadget
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] Inconsistent UDP output packet size - patch

2014-07-22 Thread Benoit Fouet
Hi,

> From a9d25569645e4031cd789ddbf696baaf6918f9dc Mon Sep 17 00:00:00 2001
> From: Konstantin Shpinev 
> Date: Tue, 22 Jul 2014 17:06:07 +0600
> Subject: [PATCH] fix flush_buffer in aviobuf.c to produce constant packet
>  size, see https://trac.ffmpeg.org/ticket/2748
> 
> ---
>  libavformat/aviobuf.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> index 738459e..38bf4e2 100644
> --- a/libavformat/aviobuf.c
> +++ b/libavformat/aviobuf.c
> @@ -138,7 +138,7 @@ static void writeout(AVIOContext *s, const uint8_t *data, 
> int len)
>  
>  static void flush_buffer(AVIOContext *s)
>  {
> -if (s->buf_ptr > s->buffer) {
> +if (s->buf_ptr > s->buffer && (!s->max_packet_size || s->buf_ptr - 
> s->buffer == s->max_packet_size)) {
>  writeout(s, s->buffer, s->buf_ptr - s->buffer);
>  if (s->update_checksum) {
>  s->checksum = s->update_checksum(s->checksum, 
> s->checksum_ptr,
> @@ -146,7 +146,9 @@ static void flush_buffer(AVIOContext *s)
>  s->checksum_ptr = s->buffer;
>  }
>  }
> -s->buf_ptr = s->buffer;
> +if (s->buf_ptr - s->buffer == 0 || !s->max_packet_size || s->buf_ptr - 
> s->buffer == s->max_packet_size) {
> +s->buf_ptr = s->buffer;
> +}
> 

I think you can drop the first clause as it is a noop.

-- 
Ben
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] mjpegdec: add 0x14121200 pixel format support

2014-07-22 Thread Przemysław Sobala

Hello
   Patch adds support for 0x14121200 pixel format to MJPEG decoder. I
can deliver a sample image but don't know where upload to?

--
psze...@wp-sa.pl

[http://i.wp.pl/a/i/sg/mail/all/logo_wp.png]  [Nowy 
lider polskiego internetu]

Główne Spółki Grupy Wirtualna Polska:

Wirtualna Polska Holding Spółka Akcyjna z siedzibą w Warszawie, ul. Jutrzenki 
137 A, 02-231 Warszawa, wpisana do Krajowego Rejestru Sądowego - Rejestru 
Przedsiębiorców prowadzonego przez Sąd Rejonowy dla m.st. Warszawy w Warszawie 
pod nr KRS: 407130, kapitał zakładowy: 378.000,00 zł (w całości wpłacony), 
Numer Identyfikacji Podatkowej (NIP): 521-31-11-513

Grupa Wirtualna Polska Spółka z ograniczoną odpowiedzialnością z siedzibą w 
Warszawie, ul. Jutrzenki 137 A, 02-231 Warszawa, wpisana do Krajowego Rejestru 
Sądowego - Rejestru Przedsiębiorców prowadzonego przez Sąd Rejonowy dla m.st. 
Warszawy w Warszawie pod nr KRS: 373814, kapitał zakładowy: 311.005.000,00 
zł, Numer Identyfikacji Podatkowej (NIP): 527-26-45-593

Wirtualna Polska Spółka Akcyjna z siedzibą w Gdańsku, ul. Romualda Traugutta 
115 C, 80-226 Gdańsk, wpisana do Krajowego Rejestru Sądowego - Rejestru 
Przedsiębiorców prowadzonego przez Sąd Rejonowy Gdańsk - Północ w Gdańsku pod 
nr KRS: 068548, kapitał zakładowy: 67.980.024,00 złotych (w całości 
wpłacony), Numer Identyfikacji Podatkowej (NIP): 957-07-51-216

>From 7db6d738d74295757d5eca2e9ed1da484b4d8b78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Przemys=C5=82aw=20Sobala?= 
Date: Tue, 22 Jul 2014 15:52:41 +0200
Subject: [PATCH] [mjpegdec] add pix_fmt: 0x14121200

---
 libavcodec/mjpegdec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 1a774dd..ea84d9a 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -485,6 +485,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
 s->avctx->pix_fmt = AV_PIX_FMT_GRAY16;
 break;
 case 0x1200:
+case 0x14121200:
 case 0x22211100:
 case 0x22112100:
 if (s->bits <= 8) s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV440P : AV_PIX_FMT_YUVJ440P;
-- 
1.7.11.3

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] mjpegdec: add 0x14121200 pixel format support

2014-07-22 Thread Carl Eugen Hoyos
Przemysław Sobala  wp-sa.pl> writes:

> Patch adds support for 0x14121200 pixel format 
> to MJPEG decoder.

> I can deliver a sample image but don't know 
> where upload to?

Please provide a sample, either upload to 
http://www.datafilehost.com/ or read 
https://ffmpeg.org/bugreports.html (there is 
no filesize limit).

Carl Eugen

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] mjpegdec: add 0x14121200 pixel format support

2014-07-22 Thread Przemysław Sobala

W dniu 22.07.2014 17:03, Carl Eugen Hoyos pisze:

Przemysław Sobala  wp-sa.pl> writes:


Patch adds support for 0x14121200 pixel format
to MJPEG decoder.



I can deliver a sample image but don't know
where upload to?


Please provide a sample, either upload to
http://www.datafilehost.com/ or read
https://ffmpeg.org/bugreports.html (there is
no filesize limit).

Carl Eugen


sample input file:
http://www.datafilehost.com/d/8ef264ae

--
Przemysław Sobala

[http://i.wp.pl/a/i/sg/mail/all/logo_wp.png]  [Nowy 
lider polskiego internetu]

Główne Spółki Grupy Wirtualna Polska:

Wirtualna Polska Holding Spółka Akcyjna z siedzibą w Warszawie, ul. Jutrzenki 
137 A, 02-231 Warszawa, wpisana do Krajowego Rejestru Sądowego - Rejestru 
Przedsiębiorców prowadzonego przez Sąd Rejonowy dla m.st. Warszawy w Warszawie 
pod nr KRS: 407130, kapitał zakładowy: 378.000,00 zł (w całości wpłacony), 
Numer Identyfikacji Podatkowej (NIP): 521-31-11-513

Grupa Wirtualna Polska Spółka z ograniczoną odpowiedzialnością z siedzibą w 
Warszawie, ul. Jutrzenki 137 A, 02-231 Warszawa, wpisana do Krajowego Rejestru 
Sądowego - Rejestru Przedsiębiorców prowadzonego przez Sąd Rejonowy dla m.st. 
Warszawy w Warszawie pod nr KRS: 373814, kapitał zakładowy: 311.005.000,00 
zł, Numer Identyfikacji Podatkowej (NIP): 527-26-45-593

Wirtualna Polska Spółka Akcyjna z siedzibą w Gdańsku, ul. Romualda Traugutta 
115 C, 80-226 Gdańsk, wpisana do Krajowego Rejestru Sądowego - Rejestru 
Przedsiębiorców prowadzonego przez Sąd Rejonowy Gdańsk - Północ w Gdańsku pod 
nr KRS: 068548, kapitał zakładowy: 67.980.024,00 złotych (w całości 
wpłacony), Numer Identyfikacji Podatkowej (NIP): 957-07-51-216

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]Print a warning if the invalid tiff tag type 0 is found in an exif tag

2014-07-22 Thread Carl Eugen Hoyos
Hi!

FFmpeg currently requests a sample if an exif tag with tag type 0 is found.
Attached patch prints a warning instead, fixes ticket #3792.

Please comment, Carl Eugen
diff --git a/libavcodec/exif.c b/libavcodec/exif.c
index a980da2..fa30f05 100644
--- a/libavcodec/exif.c
+++ b/libavcodec/exif.c
@@ -47,6 +47,11 @@ static int exif_add_metadata(AVCodecContext *avctx, int 
count, int type,
  AVDictionary **metadata)
 {
 switch(type) {
+case 0:
+av_log(avctx, AV_LOG_WARNING,
+   "Invalid TIFF tag type 0 found for %s with size %d\n",
+   name, count);
+return 0;
 case TIFF_DOUBLE   : return ff_tadd_doubles_metadata(count, name, sep, gb, 
le, metadata);
 case TIFF_SSHORT   : return ff_tadd_shorts_metadata(count, name, sep, gb, 
le, 1, metadata);
 case TIFF_SHORT: return ff_tadd_shorts_metadata(count, name, sep, gb, 
le, 0, metadata);
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avutil/opt: set_string_number(): remove unneeded copy

2014-07-22 Thread Michael Niedermayer
On Mon, Jul 21, 2014 at 11:39:43PM -0700, Muhammad Faiz wrote:
> also remove unused variables
> 
> thanks

> 
> ---
>  libavutil/opt.c | 21 ++---
>  1 file changed, 10 insertions(+), 11 deletions(-)

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] mjpegdec: add 0x14121200 pixel format support

2014-07-22 Thread Michael Niedermayer
On Tue, Jul 22, 2014 at 05:08:53PM +0200, Przemysław Sobala wrote:
> W dniu 22.07.2014 17:03, Carl Eugen Hoyos pisze:
> >Przemysław Sobala  wp-sa.pl> writes:
> >
> >>Patch adds support for 0x14121200 pixel format
> >>to MJPEG decoder.
> >
> >>I can deliver a sample image but don't know
> >>where upload to?
> >
> >Please provide a sample, either upload to
> >http://www.datafilehost.com/ or read
> >https://ffmpeg.org/bugreports.html (there is
> >no filesize limit).
> >
> >Carl Eugen
> 
> sample input file:
> http://www.datafilehost.com/d/8ef264ae

patch applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] mjpegdec: add 0x14121200 pixel format support

2014-07-22 Thread Carl Eugen Hoyos
Przemysław Sobala  wp-sa.pl> writes:

> sample input file:
> http://www.datafilehost.com/d/8ef264ae

Uploaded as http://samples.ffmpeg.org/image-samples/14121200.jpg

Thank you, Carl Eugen

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] hevc: wait proper position for tmvp

2014-07-22 Thread Michael Niedermayer
On Sun, Jul 20, 2014 at 10:00:11AM +0200, Christophe Gisquet wrote:
> The old code might have been detrimental as it was potentially
> checking a CTB line below what's needed.
> 
> -- 
> Christophe

>  hevc_mvs.c |6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 15611a6cd3a2bdcae431481d14c32e974631d983  
> 0001-hevc-wait-proper-position-for-tmvp.patch
> From 575c7afd134ed3acfc826b247fefdd3fe3ba1b40 Mon Sep 17 00:00:00 2001
> From: Christophe Gisquet 
> Date: Sun, 20 Jul 2014 09:34:58 +0200
> Subject: [PATCH 1/2] hevc: wait proper position for tmvp
> 
> The position is either rounded or not checked, so delay the wait to
> check the proper value.

reviewed by mraulet

applied

thanks

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2] hevc: use different thread wait/report for tmvp

2014-07-22 Thread Christophe Gisquet
Hi,

2014-07-21 11:11 GMT+02:00 Christophe Gisquet :
> The change makes sense by itself, but it doesn't seem worth it. I'd
> still like to see if Mickaël can provide more meaningful numbers.

No strong reason behind this, but let's drop that patch.

-- 
Christophe
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat: Add image3 demuxers with format autodetection

2014-07-22 Thread Andreas Cadhalpun

On 22.07.2014 05:25, Michael Niedermayer wrote:

On Tue, Jul 22, 2014 at 03:34:45AM +0200, Andreas Cadhalpun wrote:

Subject: [PATCH] libavformat/img2dec.c: Add a long_name to the piped image
  demuxers

This fixes segfaults in gst-libav1.0 compiled against FFmpeg 2.3.


applied, also locally backported to release/2.3
having a long name is better than not having one ...


Thanks.


but note, long_name can be NULL that is perfectly legal
and is the case with --enable-small


Indeed. So that is a genuine bug in gstreamer-libav, which I reported 
now [1].


Best regards,
Andreas


1: https://bugs.debian.org/755717

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/3] web/download: Fix link for linux static builds 64-bit kernel 2.6.32 and above

2014-07-22 Thread Lou Logan
On Mon, 21 Jul 2014 20:37:35 +0200, db0company wrote:

> ---
>  src/download |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/download b/src/download
> index 7ddb4e4..fb30ed0 100644
> --- a/src/download
> +++ b/src/download
> @@ -72,7 +72,7 @@
>  
> href="http://ffmpeg.gusari.org/static/";>32-bit and
>  64-bit with kernel 3.2.x and above
> -   href="http://ffmpeg.gusari.org/static/";>64-bit
> +   href="http://johnvansickle.com/ffmpeg/";>64-bit
>  with kernel 2.6.32 and above
>   
>  

Looks good. Thanks!
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/3] web/download: Rename builds anchors so old links posted elsewhere still work

2014-07-22 Thread Lou Logan
On Mon, 21 Jul 2014 20:37:36 +0200, db0company wrote:

> ---
>  htdocs/js/download.js |   10 +-
>  src/download  |   13 +++--
>  src/less/style.less   |   12 ++--
>  3 files changed, 18 insertions(+), 17 deletions(-)
> 
> diff --git a/htdocs/js/download.js b/htdocs/js/download.js
> index b4807b5..7ac9c91 100644
> --- a/htdocs/js/download.js
> +++ b/htdocs/js/download.js
> @@ -1,15 +1,15 @@
>  
>  $(document).ready(function() {
> - $('#build-windows').removeClass('active');
> - $('#build-mac').removeClass('active');
> + $('#WindowsBuilds').removeClass('active');
> + $('#MacOSXBuilds').removeClass('active');
>  
>   var f = function (e) {
>   e.preventDefault()
>   $(this).tab('show')
>   };
> - $('a[href="#build-linux"]').hover(f);
> - $('a[href="#build-windows"]').hover(f);
> - $('a[href="#build-mac"]').hover(f);
> + $('a[href="#LinuxBuilds"]').hover(f);
> + $('a[href="#WindowsBuilds"]').hover(f);
> + $('a[href="#MacOSXBuilds"]').hover(f);
>  
>   $("#get-sources").height($("#get-packages").height());
>   $("#get-packages").height($("#get-packages").height());
> diff --git a/src/download b/src/download
> index fb30ed0..ad54ad3 100644
> --- a/src/download
> +++ b/src/download
> @@ -31,17 +31,17 @@
>  
>
>  
> -  
> +  
>  
>
>   
>  
> -  
> +  
>  
>
>   
>  
> -  
> +  
>  
>
>   
> @@ -49,7 +49,7 @@
>   
>  
>  
> -  
> +  
>  
>  Linux Packages
>  
> @@ -77,7 +77,7 @@
>   
>  
> 
> -  
> +  
>  
>  Windows Packages
>  
> @@ -88,7 +88,7 @@
>   
>  
> 
> -  
> +  
>  
>  Mac OS X Packages

The "Mac" should be removed from this title since Apple dropped that
from the OS X naming schemes. I know it's in the anchors, but we can
keep it in those for link preservation.

No other comments from me.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 3/3] web/download: Rename builds anchors so old links posted elsewhere still work

2014-07-22 Thread Lou Logan
On Tue, 22 Jul 2014 10:34:13 -0800, Lou Logan wrote:

> The "Mac" should be removed from this title since Apple dropped that
> from the OS X naming schemes. I know it's in the anchors, but we can
> keep it in those for link preservation.

...but this can be ignored, addressed in another patch, or fixed later
since it isn't really relevant to this patch. I just wanted to mention
it.

> No other comments from me.

...meaning LGTM!
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/3] web/download: Fix redundant git word on snapshot button

2014-07-22 Thread Lou Logan
On Mon, 21 Jul 2014 20:37:34 +0200, db0company wrote:

> ---
>  src/download |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/download b/src/download
> index 5eb0b0c..7ddb4e4 100644
> --- a/src/download
> +++ b/src/download
> @@ -137,7 +137,7 @@
>   
>  
>
> -  Git Snapshot
> +  Snapshot
>    
>  http://git.videolan.org/?p=ffmpeg.git;a=tree"; 
> class="btn btn-success">
>Browse

Fine with me.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH]Fix compilation with nasm

2014-07-22 Thread Carl Eugen Hoyos
Hi!

Attached patch fixes compilation with nasm (and passes fate) here, 
sorry if it is complete nonsense.

Please review, Carl Eugen
diff --git a/libavcodec/x86/hevc_deblock.asm b/libavcodec/x86/hevc_deblock.asm
index 395b20e..01a5250 100644
--- a/libavcodec/x86/hevc_deblock.asm
+++ b/libavcodec/x86/hevc_deblock.asm
@@ -355,7 +355,7 @@ ALIGN 16
 %if %1 > 8
 shl betaq, %1 - 8
 %endif
-movdm13, betaq
+movqm13, betaq
 SPLATW  m13, m13, 0
 ;end beta calculations
 
@@ -619,7 +619,7 @@ ALIGN 16
 paddw   m15, m2; p1'
 
 ;beta calculations
-movdm10, betaq
+movqm10, betaq
 SPLATW  m10, m10, 0
 
 movdm13, r7d; 1dp0 + 1dp3
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Fix compilation with nasm

2014-07-22 Thread Ronald S. Bultje
Hi,


On Tue, Jul 22, 2014 at 5:45 PM, Carl Eugen Hoyos  wrote:

> Hi!
>
> Attached patch fixes compilation with nasm (and passes fate) here,
> sorry if it is complete nonsense.
>

You probably want "movd m13, betad", not "movq m13, betaq".

Ronald
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Fix compilation with nasm

2014-07-22 Thread Carl Eugen Hoyos
On Wednesday 23 July 2014 12:43:06 am Ronald S. Bultje wrote:
> Hi,
>
> On Tue, Jul 22, 2014 at 5:45 PM, Carl Eugen Hoyos  wrote:
> > Hi!
> >
> > Attached patch fixes compilation with nasm (and passes fate) here,
> > sorry if it is complete nonsense.
>
> You probably want "movd m13, betad", not "movq m13, betaq".

I had tried "betaqd" first...

New patch attached, thank you, Carl Eugen
From f437354e0ce05183aeffd7bb2ce2e844b3bd31cc Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos 
Date: Wed, 23 Jul 2014 00:51:29 +0200
Subject: [PATCH] avcodec/x86/hevc_deblock: Fix compilation with nasm.

---
 libavcodec/x86/hevc_deblock.asm |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/x86/hevc_deblock.asm b/libavcodec/x86/hevc_deblock.asm
index 395b20e..b263dca 100644
--- a/libavcodec/x86/hevc_deblock.asm
+++ b/libavcodec/x86/hevc_deblock.asm
@@ -355,7 +355,7 @@ ALIGN 16
 %if %1 > 8
 shl betaq, %1 - 8
 %endif
-movdm13, betaq
+movdm13, betad
 SPLATW  m13, m13, 0
 ;end beta calculations
 
@@ -619,7 +619,7 @@ ALIGN 16
 paddw   m15, m2; p1'
 
 ;beta calculations
-movdm10, betaq
+movdm10, betad
 SPLATW  m10, m10, 0
 
 movdm13, r7d; 1dp0 + 1dp3
-- 
1.7.10.4

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] libavformat/icecast.c Add icecast protocol

2014-07-22 Thread epirat07
From: ePirat 

Add Icecast protocol, a convenience wrapper for the HTTP protocol

---
 Changelog|  1 +
 configure|  1 +
 doc/general.texi |  1 +
 doc/protocols.texi   | 42 ++
 libavformat/Makefile |  1 +
 libavformat/allformats.c |  1 +
 libavformat/version.h|  4 ++--
 7 files changed, 49 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index 07cf1cf..54bb6ba 100644
--- a/Changelog
+++ b/Changelog
@@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest 
within each release,
 releases are sorted from youngest to oldest.
 
 version 2.3:
+- Icecast protocol
 - AC3 fixed-point decoding
 - shuffleplanes filter
 - subfile protocol
diff --git a/configure b/configure
index b4ec1e6..a0b2354 100755
--- a/configure
+++ b/configure
@@ -2483,6 +2483,7 @@ gopher_protocol_select="network"
 http_protocol_select="tcp_protocol"
 httpproxy_protocol_select="tcp_protocol"
 https_protocol_select="tls_protocol"
+icecast_protocol_select="http"
 librtmp_protocol_deps="librtmp"
 librtmpe_protocol_deps="librtmp"
 librtmps_protocol_deps="librtmp"
diff --git a/doc/general.texi b/doc/general.texi
index 35db917..9ce0b31 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -1055,6 +1055,7 @@ performance on systems without hardware floating point 
support).
 @item HLS  @tab X
 @item HTTP @tab X
 @item HTTPS@tab X
+@item Icecast  @tab X
 @item MMSH @tab X
 @item MMST @tab X
 @item pipe @tab X
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 1cd96cc..cb75d92 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -293,6 +293,48 @@ The required syntax to play a stream specifying a cookie 
is:
 ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" 
http://somedomain.com/somestream.m3u8
 @end example
 
+@section Icecast
+
+Icecast protocol
+
+@table @option
+@item ice_genre
+Set the genre of the stream.
+
+@item ice_name
+Set the name of the stream.
+
+@item ice_description
+Set the description of the stream.
+
+@item ice_url
+Set the stream website url.
+
+@item ice_public
+Set if the stream should be public.
+Default is 0 (not public).
+
+@item ice_password
+Password for the mountpoint.
+
+@item legacy_icecast
+If set to 1, enable support for legacy Icecast (Version < 2.4), using the 
SOURCE method
+instead of the PUT method.
+
+@item content_type
+Set a specific content type for the stream.
+This MUST be set if streaming else than audio/mpeg
+
+@item user_agent
+Override the User-Agent header. If not specified the protocol will use a
+string describing the libavformat build. ("Lavf/")
+
+@end table
+
+@example
+icecast://[@var{username}[:@var{password}]@@]@var{server}:@var{port}/@var{mountpoint}
+@end example
+
 @section mmst
 
 MMS (Microsoft Media Server) protocol over TCP.
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 9017e06..4f64c94 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -484,6 +484,7 @@ OBJS-$(CONFIG_HLS_PROTOCOL)  += hlsproto.o
 OBJS-$(CONFIG_HTTP_PROTOCOL) += http.o httpauth.o urldecode.o
 OBJS-$(CONFIG_HTTPPROXY_PROTOCOL)+= http.o httpauth.o urldecode.o
 OBJS-$(CONFIG_HTTPS_PROTOCOL)+= http.o httpauth.o urldecode.o
+OBJS-$(CONFIG_ICECAST_PROTOCOL) += icecast.o
 OBJS-$(CONFIG_MMSH_PROTOCOL) += mmsh.o mms.o asf.o
 OBJS-$(CONFIG_MMST_PROTOCOL) += mmst.o mms.o asf.o
 OBJS-$(CONFIG_MD5_PROTOCOL)  += md5proto.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 00de817..5599bae 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -347,6 +347,7 @@ void av_register_all(void)
 REGISTER_PROTOCOL(HTTP, http);
 REGISTER_PROTOCOL(HTTPPROXY,httpproxy);
 REGISTER_PROTOCOL(HTTPS,https);
+REGISTER_PROTOCOL(ICECAST,  icecast);
 REGISTER_PROTOCOL(MMSH, mmsh);
 REGISTER_PROTOCOL(MMST, mmst);
 REGISTER_PROTOCOL(MD5,  md5);
diff --git a/libavformat/version.h b/libavformat/version.h
index 4e28112..053109e 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -30,8 +30,8 @@
 #include "libavutil/version.h"
 
 #define LIBAVFORMAT_VERSION_MAJOR 55
-#define LIBAVFORMAT_VERSION_MINOR 48
-#define LIBAVFORMAT_VERSION_MICRO 101
+#define LIBAVFORMAT_VERSION_MINOR 49
+#define LIBAVFORMAT_VERSION_MICRO 0
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
-- 
1.8.5.2 (Apple Git-48)

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Fix compilation with nasm

2014-07-22 Thread Michael Niedermayer
On Wed, Jul 23, 2014 at 12:52:48AM +0200, Carl Eugen Hoyos wrote:
> On Wednesday 23 July 2014 12:43:06 am Ronald S. Bultje wrote:
> > Hi,
> >
> > On Tue, Jul 22, 2014 at 5:45 PM, Carl Eugen Hoyos  wrote:
> > > Hi!
> > >
> > > Attached patch fixes compilation with nasm (and passes fate) here,
> > > sorry if it is complete nonsense.
> >
> > You probably want "movd m13, betad", not "movq m13, betaq".
> 
> I had tried "betaqd" first...
> 
> New patch attached, thank you, Carl Eugen

>  hevc_deblock.asm |4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 0744658c6ddf8c4cc16dd06608f003b705d792ed  
> 0001-avcodec-x86-hevc_deblock-Fix-compilation-with-nasm.patch
> From f437354e0ce05183aeffd7bb2ce2e844b3bd31cc Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos 
> Date: Wed, 23 Jul 2014 00:51:29 +0200
> Subject: [PATCH] avcodec/x86/hevc_deblock: Fix compilation with nasm.

LGTM

[...

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] libavformat/icecast.c Add icecast protocol

2014-07-22 Thread epirat07
From: ePirat 

Here the actual patch, including the icecast.c, forgot to add it to my local 
git.

---

Add Icecast protocol, a convenience wrapper for the HTTP protocol 

---
 Changelog|   1 +
 configure|   1 +
 doc/general.texi |   1 +
 doc/protocols.texi   |  42 +
 libavformat/Makefile |   1 +
 libavformat/allformats.c |   1 +
 libavformat/icecast.c| 224 +++
 libavformat/version.h|   4 +-
 8 files changed, 273 insertions(+), 2 deletions(-)
 create mode 100644 libavformat/icecast.c

diff --git a/Changelog b/Changelog
index 07cf1cf..54bb6ba 100644
--- a/Changelog
+++ b/Changelog
@@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest 
within each release,
 releases are sorted from youngest to oldest.
 
 version 2.3:
+- Icecast protocol
 - AC3 fixed-point decoding
 - shuffleplanes filter
 - subfile protocol
diff --git a/configure b/configure
index b4ec1e6..a0b2354 100755
--- a/configure
+++ b/configure
@@ -2483,6 +2483,7 @@ gopher_protocol_select="network"
 http_protocol_select="tcp_protocol"
 httpproxy_protocol_select="tcp_protocol"
 https_protocol_select="tls_protocol"
+icecast_protocol_select="http"
 librtmp_protocol_deps="librtmp"
 librtmpe_protocol_deps="librtmp"
 librtmps_protocol_deps="librtmp"
diff --git a/doc/general.texi b/doc/general.texi
index 35db917..9ce0b31 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -1055,6 +1055,7 @@ performance on systems without hardware floating point 
support).
 @item HLS  @tab X
 @item HTTP @tab X
 @item HTTPS@tab X
+@item Icecast  @tab X
 @item MMSH @tab X
 @item MMST @tab X
 @item pipe @tab X
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 1cd96cc..cb75d92 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -293,6 +293,48 @@ The required syntax to play a stream specifying a cookie 
is:
 ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" 
http://somedomain.com/somestream.m3u8
 @end example
 
+@section Icecast
+
+Icecast protocol
+
+@table @option
+@item ice_genre
+Set the genre of the stream.
+
+@item ice_name
+Set the name of the stream.
+
+@item ice_description
+Set the description of the stream.
+
+@item ice_url
+Set the stream website url.
+
+@item ice_public
+Set if the stream should be public.
+Default is 0 (not public).
+
+@item ice_password
+Password for the mountpoint.
+
+@item legacy_icecast
+If set to 1, enable support for legacy Icecast (Version < 2.4), using the 
SOURCE method
+instead of the PUT method.
+
+@item content_type
+Set a specific content type for the stream.
+This MUST be set if streaming else than audio/mpeg
+
+@item user_agent
+Override the User-Agent header. If not specified the protocol will use a
+string describing the libavformat build. ("Lavf/")
+
+@end table
+
+@example
+icecast://[@var{username}[:@var{password}]@@]@var{server}:@var{port}/@var{mountpoint}
+@end example
+
 @section mmst
 
 MMS (Microsoft Media Server) protocol over TCP.
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 9017e06..4f64c94 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -484,6 +484,7 @@ OBJS-$(CONFIG_HLS_PROTOCOL)  += hlsproto.o
 OBJS-$(CONFIG_HTTP_PROTOCOL) += http.o httpauth.o urldecode.o
 OBJS-$(CONFIG_HTTPPROXY_PROTOCOL)+= http.o httpauth.o urldecode.o
 OBJS-$(CONFIG_HTTPS_PROTOCOL)+= http.o httpauth.o urldecode.o
+OBJS-$(CONFIG_ICECAST_PROTOCOL) += icecast.o
 OBJS-$(CONFIG_MMSH_PROTOCOL) += mmsh.o mms.o asf.o
 OBJS-$(CONFIG_MMST_PROTOCOL) += mmst.o mms.o asf.o
 OBJS-$(CONFIG_MD5_PROTOCOL)  += md5proto.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 00de817..5599bae 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -347,6 +347,7 @@ void av_register_all(void)
 REGISTER_PROTOCOL(HTTP, http);
 REGISTER_PROTOCOL(HTTPPROXY,httpproxy);
 REGISTER_PROTOCOL(HTTPS,https);
+REGISTER_PROTOCOL(ICECAST,  icecast);
 REGISTER_PROTOCOL(MMSH, mmsh);
 REGISTER_PROTOCOL(MMST, mmst);
 REGISTER_PROTOCOL(MD5,  md5);
diff --git a/libavformat/icecast.c b/libavformat/icecast.c
new file mode 100644
index 000..f17203a
--- /dev/null
+++ b/libavformat/icecast.c
@@ -0,0 +1,224 @@
+/*
+ * Icecast protocol for Libav
+ * Copyright (c) 2014 Marvin Scholz
+ *
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * M

[FFmpeg-devel] [PATCH] libavformat/icecast.c Add Icecast protocol

2014-07-22 Thread epirat07
From: ePirat 

Fixed license header

---

Add Icecast protocol, a convenience wrapper for the HTTP protocol 

---
 Changelog|   1 +
 configure|   1 +
 doc/general.texi |   1 +
 doc/protocols.texi   |  42 +
 libavformat/Makefile |   1 +
 libavformat/allformats.c |   1 +
 libavformat/icecast.c| 230 +++
 libavformat/version.h|   4 +-
 8 files changed, 279 insertions(+), 2 deletions(-)
 create mode 100644 libavformat/icecast.c

diff --git a/Changelog b/Changelog
index 07cf1cf..54bb6ba 100644
--- a/Changelog
+++ b/Changelog
@@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest 
within each release,
 releases are sorted from youngest to oldest.
 
 version 2.3:
+- Icecast protocol
 - AC3 fixed-point decoding
 - shuffleplanes filter
 - subfile protocol
diff --git a/configure b/configure
index b4ec1e6..a0b2354 100755
--- a/configure
+++ b/configure
@@ -2483,6 +2483,7 @@ gopher_protocol_select="network"
 http_protocol_select="tcp_protocol"
 httpproxy_protocol_select="tcp_protocol"
 https_protocol_select="tls_protocol"
+icecast_protocol_select="http"
 librtmp_protocol_deps="librtmp"
 librtmpe_protocol_deps="librtmp"
 librtmps_protocol_deps="librtmp"
diff --git a/doc/general.texi b/doc/general.texi
index 35db917..9ce0b31 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -1055,6 +1055,7 @@ performance on systems without hardware floating point 
support).
 @item HLS  @tab X
 @item HTTP @tab X
 @item HTTPS@tab X
+@item Icecast  @tab X
 @item MMSH @tab X
 @item MMST @tab X
 @item pipe @tab X
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 1cd96cc..cb75d92 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -293,6 +293,48 @@ The required syntax to play a stream specifying a cookie 
is:
 ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" 
http://somedomain.com/somestream.m3u8
 @end example
 
+@section Icecast
+
+Icecast protocol
+
+@table @option
+@item ice_genre
+Set the genre of the stream.
+
+@item ice_name
+Set the name of the stream.
+
+@item ice_description
+Set the description of the stream.
+
+@item ice_url
+Set the stream website url.
+
+@item ice_public
+Set if the stream should be public.
+Default is 0 (not public).
+
+@item ice_password
+Password for the mountpoint.
+
+@item legacy_icecast
+If set to 1, enable support for legacy Icecast (Version < 2.4), using the 
SOURCE method
+instead of the PUT method.
+
+@item content_type
+Set a specific content type for the stream.
+This MUST be set if streaming else than audio/mpeg
+
+@item user_agent
+Override the User-Agent header. If not specified the protocol will use a
+string describing the libavformat build. ("Lavf/")
+
+@end table
+
+@example
+icecast://[@var{username}[:@var{password}]@@]@var{server}:@var{port}/@var{mountpoint}
+@end example
+
 @section mmst
 
 MMS (Microsoft Media Server) protocol over TCP.
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 9017e06..4f64c94 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -484,6 +484,7 @@ OBJS-$(CONFIG_HLS_PROTOCOL)  += hlsproto.o
 OBJS-$(CONFIG_HTTP_PROTOCOL) += http.o httpauth.o urldecode.o
 OBJS-$(CONFIG_HTTPPROXY_PROTOCOL)+= http.o httpauth.o urldecode.o
 OBJS-$(CONFIG_HTTPS_PROTOCOL)+= http.o httpauth.o urldecode.o
+OBJS-$(CONFIG_ICECAST_PROTOCOL) += icecast.o
 OBJS-$(CONFIG_MMSH_PROTOCOL) += mmsh.o mms.o asf.o
 OBJS-$(CONFIG_MMST_PROTOCOL) += mmst.o mms.o asf.o
 OBJS-$(CONFIG_MD5_PROTOCOL)  += md5proto.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 00de817..5599bae 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -347,6 +347,7 @@ void av_register_all(void)
 REGISTER_PROTOCOL(HTTP, http);
 REGISTER_PROTOCOL(HTTPPROXY,httpproxy);
 REGISTER_PROTOCOL(HTTPS,https);
+REGISTER_PROTOCOL(ICECAST,  icecast);
 REGISTER_PROTOCOL(MMSH, mmsh);
 REGISTER_PROTOCOL(MMST, mmst);
 REGISTER_PROTOCOL(MD5,  md5);
diff --git a/libavformat/icecast.c b/libavformat/icecast.c
new file mode 100644
index 000..700bd97
--- /dev/null
+++ b/libavformat/icecast.c
@@ -0,0 +1,230 @@
+/*
+ * Icecast Protocol Handler
+ * Copyright (c) 2014 Marvin Scholz
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 

Re: [FFmpeg-devel] [PATCH] libavformat/icecast.c Add icecast protocol

2014-07-22 Thread James Darnley
On 2014-07-23 01:35, epira...@gmail.com wrote:
>  OBJS-$(CONFIG_HTTPS_PROTOCOL)+= http.o httpauth.o urldecode.o
> +OBJS-$(CONFIG_ICECAST_PROTOCOL)   += icecast.o
>  OBJS-$(CONFIG_MMSH_PROTOCOL) += mmsh.o mms.o asf.o

These should line up.

> + * Icecast protocol for Libav
> + * Copyright (c) 2014 Marvin Scholz
> + *
> + * This file is part of Libav.

This isn't Libav but I see you've already taken care of this.

>  #define LIBAVFORMAT_VERSION_MAJOR 55
> -#define LIBAVFORMAT_VERSION_MINOR 48
> -#define LIBAVFORMAT_VERSION_MICRO 101
> +#define LIBAVFORMAT_VERSION_MINOR 49
> +#define LIBAVFORMAT_VERSION_MICRO 0

FFmpeg's micro versions start at 100.

P.S.  I first started writing this before we spoke on IRC.




signature.asc
Description: OpenPGP digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] libavformat/icecast.c Add Icecast protocol

2014-07-22 Thread epirat07
From: ePirat 

Fixed Makefile and micro version

---

Add Icecast protocol, a convenience wrapper for the HTTP protocol 

---
 Changelog|   1 +
 configure|   1 +
 doc/general.texi |   1 +
 doc/protocols.texi   |  42 +
 libavformat/Makefile |   1 +
 libavformat/allformats.c |   1 +
 libavformat/icecast.c| 230 +++
 libavformat/version.h|   4 +-
 8 files changed, 279 insertions(+), 2 deletions(-)
 create mode 100644 libavformat/icecast.c

diff --git a/Changelog b/Changelog
index 07cf1cf..54bb6ba 100644
--- a/Changelog
+++ b/Changelog
@@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest 
within each release,
 releases are sorted from youngest to oldest.
 
 version 2.3:
+- Icecast protocol
 - AC3 fixed-point decoding
 - shuffleplanes filter
 - subfile protocol
diff --git a/configure b/configure
index b4ec1e6..a0b2354 100755
--- a/configure
+++ b/configure
@@ -2483,6 +2483,7 @@ gopher_protocol_select="network"
 http_protocol_select="tcp_protocol"
 httpproxy_protocol_select="tcp_protocol"
 https_protocol_select="tls_protocol"
+icecast_protocol_select="http"
 librtmp_protocol_deps="librtmp"
 librtmpe_protocol_deps="librtmp"
 librtmps_protocol_deps="librtmp"
diff --git a/doc/general.texi b/doc/general.texi
index 35db917..9ce0b31 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -1055,6 +1055,7 @@ performance on systems without hardware floating point 
support).
 @item HLS  @tab X
 @item HTTP @tab X
 @item HTTPS@tab X
+@item Icecast  @tab X
 @item MMSH @tab X
 @item MMST @tab X
 @item pipe @tab X
diff --git a/doc/protocols.texi b/doc/protocols.texi
index 1cd96cc..cb75d92 100644
--- a/doc/protocols.texi
+++ b/doc/protocols.texi
@@ -293,6 +293,48 @@ The required syntax to play a stream specifying a cookie 
is:
 ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" 
http://somedomain.com/somestream.m3u8
 @end example
 
+@section Icecast
+
+Icecast protocol
+
+@table @option
+@item ice_genre
+Set the genre of the stream.
+
+@item ice_name
+Set the name of the stream.
+
+@item ice_description
+Set the description of the stream.
+
+@item ice_url
+Set the stream website url.
+
+@item ice_public
+Set if the stream should be public.
+Default is 0 (not public).
+
+@item ice_password
+Password for the mountpoint.
+
+@item legacy_icecast
+If set to 1, enable support for legacy Icecast (Version < 2.4), using the 
SOURCE method
+instead of the PUT method.
+
+@item content_type
+Set a specific content type for the stream.
+This MUST be set if streaming else than audio/mpeg
+
+@item user_agent
+Override the User-Agent header. If not specified the protocol will use a
+string describing the libavformat build. ("Lavf/")
+
+@end table
+
+@example
+icecast://[@var{username}[:@var{password}]@@]@var{server}:@var{port}/@var{mountpoint}
+@end example
+
 @section mmst
 
 MMS (Microsoft Media Server) protocol over TCP.
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 9017e06..d2d0d87 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -484,6 +484,7 @@ OBJS-$(CONFIG_HLS_PROTOCOL)  += hlsproto.o
 OBJS-$(CONFIG_HTTP_PROTOCOL) += http.o httpauth.o urldecode.o
 OBJS-$(CONFIG_HTTPPROXY_PROTOCOL)+= http.o httpauth.o urldecode.o
 OBJS-$(CONFIG_HTTPS_PROTOCOL)+= http.o httpauth.o urldecode.o
+OBJS-$(CONFIG_ICECAST_PROTOCOL)  += icecast.o
 OBJS-$(CONFIG_MMSH_PROTOCOL) += mmsh.o mms.o asf.o
 OBJS-$(CONFIG_MMST_PROTOCOL) += mmst.o mms.o asf.o
 OBJS-$(CONFIG_MD5_PROTOCOL)  += md5proto.o
diff --git a/libavformat/allformats.c b/libavformat/allformats.c
index 00de817..5599bae 100644
--- a/libavformat/allformats.c
+++ b/libavformat/allformats.c
@@ -347,6 +347,7 @@ void av_register_all(void)
 REGISTER_PROTOCOL(HTTP, http);
 REGISTER_PROTOCOL(HTTPPROXY,httpproxy);
 REGISTER_PROTOCOL(HTTPS,https);
+REGISTER_PROTOCOL(ICECAST,  icecast);
 REGISTER_PROTOCOL(MMSH, mmsh);
 REGISTER_PROTOCOL(MMST, mmst);
 REGISTER_PROTOCOL(MD5,  md5);
diff --git a/libavformat/icecast.c b/libavformat/icecast.c
new file mode 100644
index 000..700bd97
--- /dev/null
+++ b/libavformat/icecast.c
@@ -0,0 +1,230 @@
+/*
+ * Icecast Protocol Handler
+ * Copyright (c) 2014 Marvin Scholz
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU

[FFmpeg-devel] [PATCH] web/projects: move projects to wiki

2014-07-22 Thread Lou Logan
This allows users to add their own project to the list.
---
A redirect would be nicer, but I'm feeling lazy. I may address that
later, but for now I just wanted to update the links since I already
made the page on the wiki.

 src/projects   | 166 +
 src/template_head2 |   2 +-
 2 files changed, 4 insertions(+), 164 deletions(-)

diff --git a/src/projects b/src/projects
index 51f8310..26ba17f 100644
--- a/src/projects
+++ b/src/projects
@@ -1,165 +1,5 @@
 
-  These are some of the free projects and programs known to incorporate work 
from
-  FFmpeg. If you would like to see another project added here, please send
-  an email to the ffmpeg-devel mailing list.
+This page has been moved to the
+http://trac.ffmpeg.org/wiki/Projects";>Projects page on the
+http://trac.ffmpeg.org/";>FFmpeg Wiki.
 
-
-
-
-
-  
-
-  http://sourceforge.net/projects/ac3encode/";>ac3encode
-  http://alembik.sourceforge.net/";>Alembik
-  http://code.google.com/p/amv-codec-tools/";>AMV codec tools
-  http://atglas.sourceforge.net/";>AtGLas
-  http://code.google.com/p/avbin/";>AVbin
-  http://avifile.sourceforge.net/";>avifile
-  http://gatos.sourceforge.net/avview.php";>Avview
-  http://www.bebits.com/app/2575";>BeOS 
FFmpeg decoders
-  http://www.bebits.com/app/2867";>BeOS 
HybridDivx
-  http://bino3d.org/";>Bino
-  http://www.independentsounds.de/";>Blaze
-  http://www.blender.org/";>Blender
-  http://www.chromium.org/";>Chromium
-  http://www.google.com/chrome";>Google 
Chrome
-  http://sourceforge.net/projects/chronictv/";>chronictv
-  http://cinelerra.org/";>Cinelerra
-  http://ccv.nuigroup.com/";>Community 
Core Vision
-  http://www.corecodec.com/products/coreplayer";>CorePlayer
-  http://datura.sourceforge.net/";>Datura
-  http://sourceforge.net/projects/divxtodvd/";>DivXtoDVD
-  http://labs.divx.com/DrDivX";>Dr. 
Divx
-  http://code.google.com/p/drag2dv/";>Drag2DV
-  http://dvbcut.sourceforge.net/";>dvbcut
-  http://www.dvdflick.net/";>DVDFlick
-  http://sites.google.com/site/dvrmstompeg/dvr-mstompegconverter";>DVR-MS to 
MPEG Converter
-  http://sourceforge.net/projects/easyvob2divx/";>Easy VOB 2 DivX
-  http://www.easywma.com/";>EasyWMA
-  http://www.easywma.com/wmv/";>EasyWMV
-  http://www.electricsheep.org";>Electric 
Sheep
-  http://dcunningham.net/applications/encodehd/";>EncodeHD
-  http://sourceforge.net/projects/ffdshow/";>ffdshow
-  http://ffdshow-tryout.sourceforge.net/";>ffdshow-tryouts
-  http://corz.org/windows/software/ffe/";>ffe
-  http://code.google.com/p/ffmbc/";>FFmedia Broadcast
-  http://www.thilobrai.onlinehome.de/ffmpegGUI.htm";>ffmpeg-GUI
-  http://ffmpeg-php.sourceforge.net/";>ffmpeg-php
-  http://www.v2v.cc/~j/ffmpeg2theora/";>ffmpeg2theora
-  http://code.google.com/p/ffmpeg4iphone/";>ffmpeg4iphone
-  http://sourceforge.net/projects/qt-ffmpeg/";>FFMPEG for QT
-  https://github.com/wseemann/FFmpegMediaMetadataRetriever";>FFmpegMediaMetadataRetriever
-  http://code.google.com/p/ffmpegthumbnailer/";>FFMpegThumbnailer
-  http://www.ffmpegx.com/";>ffmpegX for 
Mac OS X
-  http://ffmpegyag.sourceforge.net";>FFmpegYAG
-  http://colabti.org/convertx/ffrecord.html";>FFRecord
-  http://www.tagtraum.com/ffsampledsp/";>FFSampledSP - Java Sound for Win/OS 
X
-  http://fftv.sourceforge.net/";>fftv
-  http://aldorandenet.free.fr/codecs/";>FFusion, Alternative Codecs for Mac 
OS X
-  http://firefogg.org";>Firefogg
-  http://fmj.sourceforge.net/";>FMJ
-  http://fobs.sourceforge.net/";>Fobs
-  http://freej.org/";>FreeJ
-  http://frogger.rules.pl/";>Frogger
-  http://galleryproject.org/";>Gallery
-  https://github.com/lano1106/glcs";>glcs
-  http://gmerlin.sourceforge.net/";>gmerlin
-  http://gnashdev.org/";>Gnash
-  http://gpac.sourceforge.net/";>GPAC
-  http://gstreamer.freedesktop.org";>GStreamer
-  http://handbrake.fr/";>HandBrake
-  http://www.homer-conferencing.com";>Homer Conferencing
-  http://sourceforge.net/projects/hypervideoconve/";>Hyper Video 
Converter
-  http://www.eingrad.com/products/internet-radio-box/";>Internet Radio 
Box
-  http://jffmpeg.sourceforge.net/";>Jffmpeg
-  http://www.jwplayer.com/hosting-and-streaming/";>JW Platform
-  http://www.kdenlive.org/";>Kdenlive
-  http://code.google.com/p/kmediafactory/";>KMediaFactory
-  http://savannah.nongnu.org/projects/kinetophone";>Kinetophone
-  http://ktoon.net/";>KTooN
-  http://libdlna.geexbox.org/";>libdlna
-  http://libquicktime.sourceforge.net/";>libquicktime
-  http://sourcey.com/libsourcey/";>LibSourcey
-  http://lightspark.github.io/";>Lightspark
-  http://lives.sourceforge.net/";>LiVES
-  http://lulop2.sourceforge.net/";>LULOP2
-  http://lumiera.org/";>Lumiera
-  http://lynkeos.sourceforg

Re: [FFmpeg-devel] [PATCH] web/projects: move projects to wiki

2014-07-22 Thread Timothy Gu
On Tue, Jul 22, 2014 at 5:26 PM, Lou Logan  wrote:
> This allows users to add their own project to the list.
> ---
> A redirect would be nicer, but I'm feeling lazy. I may address that
> later, but for now I just wanted to update the links since I already
> made the page on the wiki.
>
>  src/projects   | 166 
> +
>  src/template_head2 |   2 +-
>  2 files changed, 4 insertions(+), 164 deletions(-)

[...]

> diff --git a/src/template_head2 b/src/template_head2
> index e7eda54..31c4dda 100644
> --- a/src/template_head2
> +++ b/src/template_head2
> @@ -28,7 +28,7 @@
>Forums
>Bug Reports
>http://trac.ffmpeg.org";>Wiki
> -  Projects
> +   href="http://trac.ffmpeg.org/wiki/Projects";>Projects
>  
>
>Developers

I would simply remove the menu item, but feel free to push with it.

Timothy
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] libavformat/icecast.c Add Icecast protocol

2014-07-22 Thread Michael Niedermayer
On Wed, Jul 23, 2014 at 02:12:16AM +0200, epira...@gmail.com wrote:
> From: ePirat 
> 
> Fixed Makefile and micro version
> 
> ---
> 
> Add Icecast protocol, a convenience wrapper for the HTTP protocol 
> 
> ---
>  Changelog|   1 +
>  configure|   1 +
>  doc/general.texi |   1 +
>  doc/protocols.texi   |  42 +
>  libavformat/Makefile |   1 +
>  libavformat/allformats.c |   1 +
>  libavformat/icecast.c| 230 
> +++
>  libavformat/version.h|   4 +-
>  8 files changed, 279 insertions(+), 2 deletions(-)
>  create mode 100644 libavformat/icecast.c
> 
> diff --git a/Changelog b/Changelog
> index 07cf1cf..54bb6ba 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest 
> within each release,
>  releases are sorted from youngest to oldest.
>  
>  version 2.3:
> +- Icecast protocol
>  - AC3 fixed-point decoding

Its not in 2.3, please add it to version :


[...]
> diff --git a/libavformat/icecast.c b/libavformat/icecast.c
> new file mode 100644
> index 000..700bd97
> --- /dev/null
> +++ b/libavformat/icecast.c
> @@ -0,0 +1,230 @@
> +/*
> + * Icecast Protocol Handler
> + * Copyright (c) 2014 Marvin Scholz
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
> + */
> +
> +/**
> + * @file
> + * Icecast Protocol Handler
> + * http://icecast.org
> + */
> +
> +
> +#include "libavutil/avstring.h"
> +#include "libavutil/opt.h"
> +
> +#include "avformat.h"
> +#include "network.h"
> +
> +
> +typedef struct IcecastContext {
> +const AVClass *class;
> +URLContext *hd;
> +char *content_type;
> +char *description;
> +char *genre;
> +char *headers;
> +int legacy_icecast;
> +char *name;
> +char *pass;
> +int public;
> +int send_started;
> +char *url;
> +char *user;
> +char *user_agent;
> +} IcecastContext;
> +
> +#define DEFAULT_ICE_USER "source"
> +
> +#define NOT_EMPTY(s) (s && s[0] != '\0')
> +
> +#define OFFSET(x) offsetof(IcecastContext, x)

> +#define D AV_OPT_FLAG_DECODING_PARAM

unused


> +#define E AV_OPT_FLAG_ENCODING_PARAM
> +
> +static const AVOption options[] = {
> +{ "ice_genre", "set stream genre", OFFSET(genre), AV_OPT_TYPE_STRING, { 
> 0 }, 0, 0, E },
> +{ "ice_name", "set stream description", OFFSET(name), 
> AV_OPT_TYPE_STRING, { 0 }, 0, 0, E },
> +{ "ice_description", "set stream description", OFFSET(description), 
> AV_OPT_TYPE_STRING, { 0 }, 0, 0, E },
> +{ "ice_url", "set stream website", OFFSET(url), AV_OPT_TYPE_STRING, { 0 
> }, 0, 0, E },
> +{ "ice_public", "set if stream is public", OFFSET(public), 
> AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, E },
> +{ "user_agent", "override User-Agent header", OFFSET(user_agent), 
> AV_OPT_TYPE_STRING, { 0 }, 0, 0, E },
> +{ "ice_password", "set password", OFFSET(pass), AV_OPT_TYPE_STRING, { 0 
> }, 0, 0, E },
> +{ "content_type", "set content-type, MUST be set if not audio/mpeg", 
> OFFSET(content_type), AV_OPT_TYPE_STRING, { 0 }, 0, 0, E },
> +{ "legacy_icecast", "use legacy SOURCE method, for Icecast < v2.4", 
> OFFSET(legacy_icecast), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, E },

the string ones should be {.str = NULL}


> +{ NULL }
> +};
> +
> +
> +static char *cat_header(char buf[], const char key[], const char value[])
> +{
> +int len = strlen(key) + strlen(value) + 5;
> +int is_first = !buf;
> +
> +if (buf)
> +len += strlen(buf);

> +if (!(buf = av_realloc(buf, len)))
> +return NULL;

this leaks on error, as the caller doesnt seem to free it

also using libavutil/bprint.h may be simpler
or maybe AV_DICT_APPEND could be used


> +if (is_first)
> +*buf = '\0';
> +
> +av_strlcatf(buf, len, "%s: %s\r\n", key, value);
> +return buf;
> +}
> +
> +static int icecast_close(URLContext *h)
> +{
> +IcecastContext *s = h->priv_data;
> +if (s->hd)
> +ffurl_close(s->hd);
> +return 0;
> +}
> +
> +static int icecast_open(URLContext *h, const char *uri, int flags)
> +{
> +IcecastContext *s = h->priv_data;
> +
> +// Dict to set options that we pass to the HTTP protocol
> +AVDictionary *opt_dict =