[FFmpeg-devel] [Bulk] [PATCH 4/4] avformat/movenc: set pretty compressor name for XDCAM

Michael Niedermayer michaelni at gmx.at
Sat Oct 12 01:57:24 CEST 2013


On Wed, Oct 09, 2013 at 11:35:54AM +0200, Michael Niedermayer wrote:
> On Wed, Oct 09, 2013 at 07:48:51AM +0100, Tim Nicholson wrote:
> > On 07/10/13 17:22, Michael Niedermayer wrote:
> > > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > > ---
> > >  libavformat/movenc.c |   30 ++++++++++++++++++++++++++++--
> > >  1 file changed, 28 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> > > index cc8800b..c820dd5 100644
> > > --- a/libavformat/movenc.c
> > > +++ b/libavformat/movenc.c
> > > @@ -1139,6 +1139,33 @@ static int mov_write_pasp_tag(AVIOContext *pb, MOVTrack *track)
> > >      return 16;
> > >  }
> > >  
> > > +static void find_compressor(char * compressor_name, int len, MOVTrack *track)
> > > +{
> > > +    int xdcam_res =  (track->enc->width == 1280 && track->enc->height == 720)
> > > +                  || (track->enc->width == 1440 && track->enc->height == 1080)
> > > +                  || (track->enc->width == 1920 && track->enc->height == 1080);
> > > +
> > > +    if (track->mode == MODE_MOV && track->enc->codec && track->enc->codec->name) {
> > > +        av_strlcpy(compressor_name, track->enc->codec->name, 32);
> > > +    } else if (track->enc->codec_id == AV_CODEC_ID_MPEG2VIDEO && xdcam_res) {
> > > +        int interlaced = track->enc->field_order != AV_FIELD_UNKNOWN
> > > +                      && track->enc->field_order != AV_FIELD_PROGRESSIVE;
> > 
> > 
> > Just a query on style and consistency with current code. Since
> > AV_FIELD_* are from AVFieldOrder enum currently elsewhere (rawdec.c,
> > avuienc.c) the test is formed as:-
> > 
> > ...->field_order > AV_FIELD_PROGRESSIVE
> 
> locally changed the 2 i found to this for consistency

and applied

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131012/a9405e20/attachment.asc>


More information about the ffmpeg-devel mailing list