Mercurial > libavformat.hg
comparison movenc.c @ 1238:eb749ae2b181 libavformat
only set fields for mov, reserved for 3gp, mp4
author | bcoudurier |
---|---|
date | Mon, 07 Aug 2006 14:18:43 +0000 |
parents | fbe88f238d0d |
children | 18130af77b09 |
comparison
equal
deleted
inserted
replaced
1237:fbe88f238d0d | 1238:eb749ae2b181 |
---|---|
603 put_be16(pb, 0); /* Reserved */ | 603 put_be16(pb, 0); /* Reserved */ |
604 put_be16(pb, 1); /* Data-reference index */ | 604 put_be16(pb, 1); /* Data-reference index */ |
605 | 605 |
606 put_be16(pb, 0); /* Codec stream version */ | 606 put_be16(pb, 0); /* Codec stream version */ |
607 put_be16(pb, 0); /* Codec stream revision (=0) */ | 607 put_be16(pb, 0); /* Codec stream revision (=0) */ |
608 if (track->mode == MODE_MOV) { | |
608 put_tag(pb, "FFMP"); /* Vendor */ | 609 put_tag(pb, "FFMP"); /* Vendor */ |
609 if(track->enc->codec_id == CODEC_ID_RAWVIDEO) { | 610 if(track->enc->codec_id == CODEC_ID_RAWVIDEO) { |
610 put_be32(pb, 0); /* Temporal Quality */ | 611 put_be32(pb, 0); /* Temporal Quality */ |
611 put_be32(pb, 0x400); /* Spatial Quality = lossless*/ | 612 put_be32(pb, 0x400); /* Spatial Quality = lossless*/ |
612 } else { | 613 } else { |
613 put_be32(pb, 0x200); /* Temporal Quality = normal */ | 614 put_be32(pb, 0x200); /* Temporal Quality = normal */ |
614 put_be32(pb, 0x200); /* Spatial Quality = normal */ | 615 put_be32(pb, 0x200); /* Spatial Quality = normal */ |
615 } | 616 } |
617 } else { | |
618 put_be32(pb, 0); /* Reserved */ | |
619 put_be32(pb, 0); /* Reserved */ | |
620 put_be32(pb, 0); /* Reserved */ | |
621 } | |
616 put_be16(pb, track->enc->width); /* Video width */ | 622 put_be16(pb, track->enc->width); /* Video width */ |
617 put_be16(pb, track->enc->height); /* Video height */ | 623 put_be16(pb, track->enc->height); /* Video height */ |
618 put_be32(pb, 0x00480000); /* Horizontal resolution 72dpi */ | 624 put_be32(pb, 0x00480000); /* Horizontal resolution 72dpi */ |
619 put_be32(pb, 0x00480000); /* Vertical resolution 72dpi */ | 625 put_be32(pb, 0x00480000); /* Vertical resolution 72dpi */ |
620 put_be32(pb, 0); /* Data size (= 0) */ | 626 put_be32(pb, 0); /* Data size (= 0) */ |
621 put_be16(pb, 1); /* Frame count (= 1) */ | 627 put_be16(pb, 1); /* Frame count (= 1) */ |
622 | 628 |
623 memset(compressor_name,0,32); | 629 memset(compressor_name,0,32); |
624 if (track->enc->codec && track->enc->codec->name) | 630 /* FIXME not sure, ISO 14496-1 draft where it shall be set to 0 */ |
631 if (track->mode == MODE_MOV && track->enc->codec && track->enc->codec->name) | |
625 strncpy(compressor_name,track->enc->codec->name,31); | 632 strncpy(compressor_name,track->enc->codec->name,31); |
626 put_byte(pb, strlen(compressor_name)); | 633 put_byte(pb, strlen(compressor_name)); |
627 put_buffer(pb, compressor_name, 31); | 634 put_buffer(pb, compressor_name, 31); |
628 | 635 |
629 put_be16(pb, 0x18); /* Reserved */ | 636 put_be16(pb, 0x18); /* Reserved */ |