Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-29 Thread Reimar Döffinger
On Tue, Jun 16, 2015 at 09:18:13PM +0200, Hendrik Leppkes wrote:
 On Tue, Jun 16, 2015 at 8:33 PM, wm4 nfx...@googlemail.com wrote:
  On Tue, 16 Jun 2015 13:29:55 +
  Paul B Mahol one...@gmail.com wrote:
 
  Also fixes clash with smv audio codec.
 
  Signed-off-by: Paul B Mahol one...@gmail.com
  ---
   libavcodec/codec_desc.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
 
  diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
  index c1694f3..f32843a 100644
  --- a/libavcodec/codec_desc.c
  +++ b/libavcodec/codec_desc.c
  @@ -1178,7 +1178,7 @@ static const AVCodecDescriptor codec_descriptors[] = 
  {
   {
   .id= AV_CODEC_ID_SMVJPEG,
   .type  = AVMEDIA_TYPE_VIDEO,
  -.name  = smv,
  +.name  = smvjpeg,
   .long_name = NULL_IF_CONFIG_SMALL(Sigmatel Motion Video),
   },
 
 
  An incompatible API change should come with a major bump.
 
 
 Strings in the codec descriptor are API now?

I have to admit there is precedence that it is not, as we changed names
before.
On the other hand I would like to point out that we have functions
to select by this name, and as such - and the fact that these renames
usually break _something_ - I would strongly prefer to consider this
API changes.
If nothing else because we shouldn't cause people trouble for a change
that is of no particular significance.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread Michael Niedermayer
On Tue, Jun 16, 2015 at 01:29:55PM +, Paul B Mahol wrote:
 Also fixes clash with smv audio codec.
 
 Signed-off-by: Paul B Mahol one...@gmail.com
 ---
  libavcodec/codec_desc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

LGTM

thanks

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

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras


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


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread wm4
On Tue, 16 Jun 2015 13:29:55 +
Paul B Mahol one...@gmail.com wrote:

 Also fixes clash with smv audio codec.
 
 Signed-off-by: Paul B Mahol one...@gmail.com
 ---
  libavcodec/codec_desc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
 index c1694f3..f32843a 100644
 --- a/libavcodec/codec_desc.c
 +++ b/libavcodec/codec_desc.c
 @@ -1178,7 +1178,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
  {
  .id= AV_CODEC_ID_SMVJPEG,
  .type  = AVMEDIA_TYPE_VIDEO,
 -.name  = smv,
 +.name  = smvjpeg,
  .long_name = NULL_IF_CONFIG_SMALL(Sigmatel Motion Video),
  },
  

An incompatible API change should come with a major bump.

(I guess my absolutely terrible mail client ate the previous mail I
sent.)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread wm4
On Tue, 16 Jun 2015 21:18:13 +0200
Hendrik Leppkes h.lepp...@gmail.com wrote:

 On Tue, Jun 16, 2015 at 8:33 PM, wm4 nfx...@googlemail.com wrote:
  On Tue, 16 Jun 2015 13:29:55 +
  Paul B Mahol one...@gmail.com wrote:
 
  Also fixes clash with smv audio codec.
 
  Signed-off-by: Paul B Mahol one...@gmail.com
  ---
   libavcodec/codec_desc.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
 
  diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
  index c1694f3..f32843a 100644
  --- a/libavcodec/codec_desc.c
  +++ b/libavcodec/codec_desc.c
  @@ -1178,7 +1178,7 @@ static const AVCodecDescriptor codec_descriptors[] = 
  {
   {
   .id= AV_CODEC_ID_SMVJPEG,
   .type  = AVMEDIA_TYPE_VIDEO,
  -.name  = smv,
  +.name  = smvjpeg,
   .long_name = NULL_IF_CONFIG_SMALL(Sigmatel Motion Video),
   },
 
 
  An incompatible API change should come with a major bump.
 
 
 Strings in the codec descriptor are API now?

Of course. Just like AVOptions, filter names, etc.

(The patch was pushed anyway. Who needs reviews. Or stable APIs.)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread Hendrik Leppkes
On Tue, Jun 16, 2015 at 9:23 PM, wm4 nfx...@googlemail.com wrote:
 On Tue, 16 Jun 2015 21:18:13 +0200
 Hendrik Leppkes h.lepp...@gmail.com wrote:

 On Tue, Jun 16, 2015 at 8:33 PM, wm4 nfx...@googlemail.com wrote:
  On Tue, 16 Jun 2015 13:29:55 +
  Paul B Mahol one...@gmail.com wrote:
 
  Also fixes clash with smv audio codec.
 
  Signed-off-by: Paul B Mahol one...@gmail.com
  ---
   libavcodec/codec_desc.c | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
 
  diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
  index c1694f3..f32843a 100644
  --- a/libavcodec/codec_desc.c
  +++ b/libavcodec/codec_desc.c
  @@ -1178,7 +1178,7 @@ static const AVCodecDescriptor codec_descriptors[] 
  = {
   {
   .id= AV_CODEC_ID_SMVJPEG,
   .type  = AVMEDIA_TYPE_VIDEO,
  -.name  = smv,
  +.name  = smvjpeg,
   .long_name = NULL_IF_CONFIG_SMALL(Sigmatel Motion Video),
   },
 
 
  An incompatible API change should come with a major bump.
 

 Strings in the codec descriptor are API now?

 Of course. Just like AVOptions, filter names, etc.

 (The patch was pushed anyway. Who needs reviews. Or stable APIs.)

If you want to go down that route, you could argue that any return
value from any function is part of the API, and if it changes, it
needs a major bump.
.. and that would mean you cannot change anything ever at all.

I see no reason these strings should be considered API. They are
descriptive names, not option tokens or anything.
If you want a reliable static way to identify a codec, use the id.

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


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread wm4
On Tue, 16 Jun 2015 21:31:26 +0200
Hendrik Leppkes h.lepp...@gmail.com wrote:

 On Tue, Jun 16, 2015 at 9:23 PM, wm4 nfx...@googlemail.com wrote:
  On Tue, 16 Jun 2015 21:18:13 +0200
  Hendrik Leppkes h.lepp...@gmail.com wrote:
 
  On Tue, Jun 16, 2015 at 8:33 PM, wm4 nfx...@googlemail.com wrote:
   On Tue, 16 Jun 2015 13:29:55 +
   Paul B Mahol one...@gmail.com wrote:
  
   Also fixes clash with smv audio codec.
  
   Signed-off-by: Paul B Mahol one...@gmail.com
   ---
libavcodec/codec_desc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
  
   diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
   index c1694f3..f32843a 100644
   --- a/libavcodec/codec_desc.c
   +++ b/libavcodec/codec_desc.c
   @@ -1178,7 +1178,7 @@ static const AVCodecDescriptor 
   codec_descriptors[] = {
{
.id= AV_CODEC_ID_SMVJPEG,
.type  = AVMEDIA_TYPE_VIDEO,
   -.name  = smv,
   +.name  = smvjpeg,
.long_name = NULL_IF_CONFIG_SMALL(Sigmatel Motion Video),
},
  
  
   An incompatible API change should come with a major bump.
  
 
  Strings in the codec descriptor are API now?
 
  Of course. Just like AVOptions, filter names, etc.
 
  (The patch was pushed anyway. Who needs reviews. Or stable APIs.)
 
 If you want to go down that route, you could argue that any return
 value from any function is part of the API, and if it changes, it
 needs a major bump.
 .. and that would mean you cannot change anything ever at all.
 
 I see no reason these strings should be considered API. They are
 descriptive names, not option tokens or anything.
 If you want a reliable static way to identify a codec, use the id.

Using strings for codec IDs is pretty flexible and convenient, and I
don't want to give up on it. But more importantly, these are being used
by many scripts and user interfaces which make use of libavcodec. Can
you imagine the chaos if you renamed the h264 codec to avc? Do you
suppose applications should have their own lookup tables for
AV_CODEC_IDs? They'd have to update it all the time. And it wouldn't
work for scripts using ffmpeg.c (which makes ffmpeg.c an API user
relying on codec strings not changing randomly).

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


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread Hendrik Leppkes
On Tue, Jun 16, 2015 at 9:45 PM, wm4 nfx...@googlemail.com wrote:
 On Tue, 16 Jun 2015 21:31:26 +0200
 Hendrik Leppkes h.lepp...@gmail.com wrote:

 On Tue, Jun 16, 2015 at 9:23 PM, wm4 nfx...@googlemail.com wrote:
  On Tue, 16 Jun 2015 21:18:13 +0200
  Hendrik Leppkes h.lepp...@gmail.com wrote:
 
  On Tue, Jun 16, 2015 at 8:33 PM, wm4 nfx...@googlemail.com wrote:
   On Tue, 16 Jun 2015 13:29:55 +
   Paul B Mahol one...@gmail.com wrote:
  
   Also fixes clash with smv audio codec.
  
   Signed-off-by: Paul B Mahol one...@gmail.com
   ---
libavcodec/codec_desc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
  
   diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
   index c1694f3..f32843a 100644
   --- a/libavcodec/codec_desc.c
   +++ b/libavcodec/codec_desc.c
   @@ -1178,7 +1178,7 @@ static const AVCodecDescriptor 
   codec_descriptors[] = {
{
.id= AV_CODEC_ID_SMVJPEG,
.type  = AVMEDIA_TYPE_VIDEO,
   -.name  = smv,
   +.name  = smvjpeg,
.long_name = NULL_IF_CONFIG_SMALL(Sigmatel Motion Video),
},
  
  
   An incompatible API change should come with a major bump.
  
 
  Strings in the codec descriptor are API now?
 
  Of course. Just like AVOptions, filter names, etc.
 
  (The patch was pushed anyway. Who needs reviews. Or stable APIs.)

 If you want to go down that route, you could argue that any return
 value from any function is part of the API, and if it changes, it
 needs a major bump.
 .. and that would mean you cannot change anything ever at all.

 I see no reason these strings should be considered API. They are
 descriptive names, not option tokens or anything.
 If you want a reliable static way to identify a codec, use the id.

 Using strings for codec IDs is pretty flexible and convenient, and I
 don't want to give up on it. But more importantly, these are being used
 by many scripts and user interfaces which make use of libavcodec. Can
 you imagine the chaos if you renamed the h264 codec to avc? Do you
 suppose applications should have their own lookup tables for
 AV_CODEC_IDs? They'd have to update it all the time. And it wouldn't
 work for scripts using ffmpeg.c (which makes ffmpeg.c an API user
 relying on codec strings not changing randomly).


But this is not the name of the decoder that was changed, which I
would agree would be bad, since you can use it to select the decoder
you want, but the codec descriptor.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread Paul B Mahol
On 6/16/15, Andreas Cadhalpun andreas.cadhal...@googlemail.com wrote:
 On 16.06.2015 21:31, Hendrik Leppkes wrote:
 I see no reason these strings should be considered API. They are
 descriptive names, not option tokens or anything.
 If you want a reliable static way to identify a codec, use the id.

 At least currently using the codec id is the only way to reliably
 identify codecs, because there are decoders with the same name,
 but different codec ids.
 (name: iff, id: AV_CODEC_ID_IFF_ILBM or AV_CODEC_ID_IFF_BYTERUN1)

 However, I think that is broken, but I'm not sure how that can be fixed.

That used to be two different decoders but now are both same decoder,
my plan is to rename one to AV_CODEC_ID_IFF and deprecate other.


 Best regards,
 Andreas
 ___
 ffmpeg-devel mailing list
 ffmpeg-devel@ffmpeg.org
 http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

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


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread Hendrik Leppkes
On Tue, Jun 16, 2015 at 8:33 PM, wm4 nfx...@googlemail.com wrote:
 On Tue, 16 Jun 2015 13:29:55 +
 Paul B Mahol one...@gmail.com wrote:

 Also fixes clash with smv audio codec.

 Signed-off-by: Paul B Mahol one...@gmail.com
 ---
  libavcodec/codec_desc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
 index c1694f3..f32843a 100644
 --- a/libavcodec/codec_desc.c
 +++ b/libavcodec/codec_desc.c
 @@ -1178,7 +1178,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
  {
  .id= AV_CODEC_ID_SMVJPEG,
  .type  = AVMEDIA_TYPE_VIDEO,
 -.name  = smv,
 +.name  = smvjpeg,
  .long_name = NULL_IF_CONFIG_SMALL(Sigmatel Motion Video),
  },


 An incompatible API change should come with a major bump.


Strings in the codec descriptor are API now?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread Andreas Cadhalpun
On 16.06.2015 21:31, Hendrik Leppkes wrote:
 I see no reason these strings should be considered API. They are
 descriptive names, not option tokens or anything.
 If you want a reliable static way to identify a codec, use the id.

At least currently using the codec id is the only way to reliably
identify codecs, because there are decoders with the same name,
but different codec ids.
(name: iff, id: AV_CODEC_ID_IFF_ILBM or AV_CODEC_ID_IFF_BYTERUN1)

However, I think that is broken, but I'm not sure how that can be fixed.

Best regards,
Andreas
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread Andreas Cadhalpun
On 16.06.2015 22:29, Paul B Mahol wrote:
 On 6/16/15, Andreas Cadhalpun andreas.cadhal...@googlemail.com wrote:
 On 16.06.2015 21:31, Hendrik Leppkes wrote:
 I see no reason these strings should be considered API. They are
 descriptive names, not option tokens or anything.
 If you want a reliable static way to identify a codec, use the id.

 At least currently using the codec id is the only way to reliably
 identify codecs, because there are decoders with the same name,
 but different codec ids.
 (name: iff, id: AV_CODEC_ID_IFF_ILBM or AV_CODEC_ID_IFF_BYTERUN1)

 However, I think that is broken, but I'm not sure how that can be fixed.
 
 That used to be two different decoders but now are both same decoder,
 my plan is to rename one to AV_CODEC_ID_IFF and deprecate other.

Ah, I see. Doing that would be good, but definitely requires a soversion bump.

Best regards,
Andreas

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


Re: [FFmpeg-devel] [PATCH] avcodec/codec_desc: rename smv video codec name to smvjpeg to match decoder name

2015-06-16 Thread wm4
On Tue, 16 Jun 2015 21:55:13 +0200
Hendrik Leppkes h.lepp...@gmail.com wrote:

 On Tue, Jun 16, 2015 at 9:45 PM, wm4 nfx...@googlemail.com wrote:
  On Tue, 16 Jun 2015 21:31:26 +0200
  Hendrik Leppkes h.lepp...@gmail.com wrote:
 
  On Tue, Jun 16, 2015 at 9:23 PM, wm4 nfx...@googlemail.com wrote:
   On Tue, 16 Jun 2015 21:18:13 +0200
   Hendrik Leppkes h.lepp...@gmail.com wrote:
  
   On Tue, Jun 16, 2015 at 8:33 PM, wm4 nfx...@googlemail.com wrote:
On Tue, 16 Jun 2015 13:29:55 +
Paul B Mahol one...@gmail.com wrote:
   
Also fixes clash with smv audio codec.
   
Signed-off-by: Paul B Mahol one...@gmail.com
---
 libavcodec/codec_desc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
   
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index c1694f3..f32843a 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1178,7 +1178,7 @@ static const AVCodecDescriptor 
codec_descriptors[] = {
 {
 .id= AV_CODEC_ID_SMVJPEG,
 .type  = AVMEDIA_TYPE_VIDEO,
-.name  = smv,
+.name  = smvjpeg,
 .long_name = NULL_IF_CONFIG_SMALL(Sigmatel Motion Video),
 },
   
   
An incompatible API change should come with a major bump.
   
  
   Strings in the codec descriptor are API now?
  
   Of course. Just like AVOptions, filter names, etc.
  
   (The patch was pushed anyway. Who needs reviews. Or stable APIs.)
 
  If you want to go down that route, you could argue that any return
  value from any function is part of the API, and if it changes, it
  needs a major bump.
  .. and that would mean you cannot change anything ever at all.
 
  I see no reason these strings should be considered API. They are
  descriptive names, not option tokens or anything.
  If you want a reliable static way to identify a codec, use the id.
 
  Using strings for codec IDs is pretty flexible and convenient, and I
  don't want to give up on it. But more importantly, these are being used
  by many scripts and user interfaces which make use of libavcodec. Can
  you imagine the chaos if you renamed the h264 codec to avc? Do you
  suppose applications should have their own lookup tables for
  AV_CODEC_IDs? They'd have to update it all the time. And it wouldn't
  work for scripts using ffmpeg.c (which makes ffmpeg.c an API user
  relying on codec strings not changing randomly).
 
 
 But this is not the name of the decoder that was changed, which I
 would agree would be bad, since you can use it to select the decoder
 you want, but the codec descriptor.

Well, libx264 (and libx264rgb) is the name of the encoder, while
h264 is the name of the codec (dictated by the codec descriptor). I
claim you can't rename either without breaking users.

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