static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)

{

    AVCodecContext *VideoCodec = s->streams[0]->codec;

    AVCodecContext *AudioCodec = s->streams[1]->codec;

    int AudioRate = AudioCodec->sample_rate;

    int FrameRate = ((VideoCodec->time_base.den) * (0x10000))/ (VideoCodec->time_base.num);

    int audio_kbitrate= AudioCodec->bit_rate / 1000;

    int video_kbitrate= FFMIN(VideoCodec->bit_rate / 1000, 800 - audio_kbitrate);



    put_be32(pb, 0x94 ); /* size */

    put_tag(pb, "uuid");

    put_tag(pb, "PROF");



    put_be32(pb, 0x21d24fce ); /* 96 bit UUID */

    put_be32(pb, 0xbb88695c );

    put_be32(pb, 0xfac9c740 );



    put_be32(pb, 0x0 );  /* ? */

    put_be32(pb, 0x3 );  /* 3 sections ? */



    put_be32(pb, 0x14 ); /* size */

    put_tag(pb, "FPRF");

    put_be32(pb, 0x0 );  /* ? */

    put_be32(pb, 0x0 );  /* ? */

    put_be32(pb, 0x0 );  /* ? */



    put_be32(pb, 0x2c );  /* size */

    put_tag(pb, "APRF");   /* audio */

    put_be32(pb, 0x0 );

    put_be32(pb, 0x2 );   /* TrackID */

    put_tag(pb, "mp4a");

    put_be32(pb, 0x20f );

    put_be32(pb, 0x0 );

    put_be32(pb, audio_kbitrate);

    put_be32(pb, audio_kbitrate);

    put_be32(pb, AudioRate );

    put_be32(pb, AudioCodec->channels );



    put_be32(pb, 0x34 );  /* size */

    put_tag(pb, "VPRF");   /* video */

    put_be32(pb, 0x0 );

    put_be32(pb, 0x1 );    /* TrackID */

    put_tag(pb, "mp4v");

    put_be32(pb, 0x103 );

    put_be32(pb, 0x0 );

    put_be32(pb, video_kbitrate);

    put_be32(pb, video_kbitrate);

    put_be32(pb, FrameRate);

    put_be32(pb, FrameRate);

    put_be16(pb, VideoCodec->width);

    put_be16(pb, VideoCodec->height);

    put_be32(pb, 0x010001); /* ? */

}

static void mov_write_uuidprof_tag(ByteIOContext *pb, AVFormatContext *s)

{

    AVCodecContext *VideoCodec = s->streams[0]->codec;

    AVCodecContext *AudioCodec = s->streams[1]->codec;

    int AudioRate = AudioCodec->sample_rate;

    int FrameRate = ((VideoCodec->time_base.den) * (0x10000))/ (VideoCodec->time_base.num);

    int audio_kbitrate= AudioCodec->bit_rate / 1000;

    int video_kbitrate= FFMIN(VideoCodec->bit_rate / 1000, 800 - audio_kbitrate);



    put_be32(pb, 0x94 ); 

    put_tag(pb, "uuid");

    put_tag(pb, "PROF");



    put_be32(pb, 0x21d24fce ); 

    put_be32(pb, 0xbb88695c );

    put_be32(pb, 0xfac9c740 );



    put_be32(pb, 0x0 );  

    put_be32(pb, 0x3 );  



    put_be32(pb, 0x14 ); 

    put_tag(pb, "FPRF");

    put_be32(pb, 0x0 );  

    put_be32(pb, 0x0 );  

    put_be32(pb, 0x0 );  



    put_be32(pb, 0x2c );  

    put_tag(pb, "APRF");   

    put_be32(pb, 0x0 );

    put_be32(pb, 0x2 );   

    put_tag(pb, "mp4a");

    put_be32(pb, 0x20f );

    put_be32(pb, 0x0 );

    put_be32(pb, audio_kbitrate);

    put_be32(pb, audio_kbitrate);

    put_be32(pb, AudioRate );

    put_be32(pb, AudioCodec->channels );



    put_be32(pb, 0x34 );  

    put_tag(pb, "VPRF");   

    put_be32(pb, 0x0 );

    put_be32(pb, 0x1 );    

    put_tag(pb, "mp4v");

    put_be32(pb, 0x103 );

    put_be32(pb, 0x0 );

    put_be32(pb, video_kbitrate);

    put_be32(pb, video_kbitrate);

    put_be32(pb, FrameRate);

    put_be32(pb, FrameRate);

    put_be16(pb, VideoCodec->width);

    put_be16(pb, VideoCodec->height);

    put_be32(pb, 0x010001); 

}

static void FUNC_0(ByteIOContext *VAR_0, AVFormatContext *VAR_1)

{

    AVCodecContext *VideoCodec = VAR_1->streams[0]->codec;

    AVCodecContext *AudioCodec = VAR_1->streams[1]->codec;

    int VAR_2 = AudioCodec->sample_rate;

    int VAR_3 = ((VideoCodec->time_base.den) * (0x10000))/ (VideoCodec->time_base.num);

    int VAR_4= AudioCodec->bit_rate / 1000;

    int VAR_5= FFMIN(VideoCodec->bit_rate / 1000, 800 - VAR_4);



    put_be32(VAR_0, 0x94 ); 

    put_tag(VAR_0, "uuid");

    put_tag(VAR_0, "PROF");



    put_be32(VAR_0, 0x21d24fce ); 

    put_be32(VAR_0, 0xbb88695c );

    put_be32(VAR_0, 0xfac9c740 );



    put_be32(VAR_0, 0x0 );  

    put_be32(VAR_0, 0x3 );  



    put_be32(VAR_0, 0x14 ); 

    put_tag(VAR_0, "FPRF");

    put_be32(VAR_0, 0x0 );  

    put_be32(VAR_0, 0x0 );  

    put_be32(VAR_0, 0x0 );  



    put_be32(VAR_0, 0x2c );  

    put_tag(VAR_0, "APRF");   

    put_be32(VAR_0, 0x0 );

    put_be32(VAR_0, 0x2 );   

    put_tag(VAR_0, "mp4a");

    put_be32(VAR_0, 0x20f );

    put_be32(VAR_0, 0x0 );

    put_be32(VAR_0, VAR_4);

    put_be32(VAR_0, VAR_4);

    put_be32(VAR_0, VAR_2 );

    put_be32(VAR_0, AudioCodec->channels );



    put_be32(VAR_0, 0x34 );  

    put_tag(VAR_0, "VPRF");   

    put_be32(VAR_0, 0x0 );

    put_be32(VAR_0, 0x1 );    

    put_tag(VAR_0, "mp4v");

    put_be32(VAR_0, 0x103 );

    put_be32(VAR_0, 0x0 );

    put_be32(VAR_0, VAR_5);

    put_be32(VAR_0, VAR_5);

    put_be32(VAR_0, VAR_3);

    put_be32(VAR_0, VAR_3);

    put_be16(VAR_0, VideoCodec->width);

    put_be16(VAR_0, VideoCodec->height);

    put_be32(VAR_0, 0x010001); 

}

static void FUNC_0(ByteIOContext *VAR_0, AVFormatContext *VAR_1)
{ AVCodecContext *VideoCodec = VAR_1->streams[0]->codec; AVCodecContext *AudioCodec = VAR_1->streams[1]->codec; int VAR_2 = AudioCodec->sample_rate; int VAR_3 = ((VideoCodec->time_base.den) * (0x10000))/ (VideoCodec->time_base.num); int VAR_4= AudioCodec->bit_rate / 1000; int VAR_5= FFMIN(VideoCodec->bit_rate / 1000, 800 - VAR_4); put_be32(VAR_0, 0x94 ); put_tag(VAR_0, "uuid"); put_tag(VAR_0, "PROF"); put_be32(VAR_0, 0x21d24fce ); put_be32(VAR_0, 0xbb88695c ); put_be32(VAR_0, 0xfac9c740 ); put_be32(VAR_0, 0x0 ); put_be32(VAR_0, 0x3 ); put_be32(VAR_0, 0x14 ); put_tag(VAR_0, "FPRF"); put_be32(VAR_0, 0x0 ); put_be32(VAR_0, 0x0 ); put_be32(VAR_0, 0x0 ); put_be32(VAR_0, 0x2c ); put_tag(VAR_0, "APRF"); put_be32(VAR_0, 0x0 ); put_be32(VAR_0, 0x2 ); put_tag(VAR_0, "mp4a"); put_be32(VAR_0, 0x20f ); put_be32(VAR_0, 0x0 ); put_be32(VAR_0, VAR_4); put_be32(VAR_0, VAR_4); put_be32(VAR_0, VAR_2 ); put_be32(VAR_0, AudioCodec->channels ); put_be32(VAR_0, 0x34 ); put_tag(VAR_0, "VPRF"); put_be32(VAR_0, 0x0 ); put_be32(VAR_0, 0x1 ); put_tag(VAR_0, "mp4v"); put_be32(VAR_0, 0x103 ); put_be32(VAR_0, 0x0 ); put_be32(VAR_0, VAR_5); put_be32(VAR_0, VAR_5); put_be32(VAR_0, VAR_3); put_be32(VAR_0, VAR_3); put_be16(VAR_0, VideoCodec->width); put_be16(VAR_0, VideoCodec->height); put_be32(VAR_0, 0x010001); }