Mercurial > libavformat.hg
comparison raw.c @ 3729:ed875181c3fa libavformat
Surround AVInputFormat declarations with format-specific #ifdefs.
author | diego |
---|---|
date | Fri, 15 Aug 2008 17:28:20 +0000 |
parents | 83ddeeaae767 |
children | ee001685e4e5 |
comparison
equal
deleted
inserted
replaced
3728:83ddeeaae767 | 3729:ed875181c3fa |
---|---|
505 } | 505 } |
506 | 506 |
507 | 507 |
508 /* Note: Do not forget to add new entries to the Makefile as well. */ | 508 /* Note: Do not forget to add new entries to the Makefile as well. */ |
509 | 509 |
510 #ifdef CONFIG_AAC_DEMUXER | |
510 AVInputFormat aac_demuxer = { | 511 AVInputFormat aac_demuxer = { |
511 "aac", | 512 "aac", |
512 NULL_IF_CONFIG_SMALL("ADTS AAC"), | 513 NULL_IF_CONFIG_SMALL("ADTS AAC"), |
513 0, | 514 0, |
514 NULL, | 515 NULL, |
516 raw_read_partial_packet, | 517 raw_read_partial_packet, |
517 .flags= AVFMT_GENERIC_INDEX, | 518 .flags= AVFMT_GENERIC_INDEX, |
518 .extensions = "aac", | 519 .extensions = "aac", |
519 .value = CODEC_ID_AAC, | 520 .value = CODEC_ID_AAC, |
520 }; | 521 }; |
522 #endif | |
521 | 523 |
522 #ifdef CONFIG_AC3_DEMUXER | 524 #ifdef CONFIG_AC3_DEMUXER |
523 AVInputFormat ac3_demuxer = { | 525 AVInputFormat ac3_demuxer = { |
524 "ac3", | 526 "ac3", |
525 NULL_IF_CONFIG_SMALL("raw AC-3"), | 527 NULL_IF_CONFIG_SMALL("raw AC-3"), |
546 raw_write_packet, | 548 raw_write_packet, |
547 .flags= AVFMT_NOTIMESTAMPS, | 549 .flags= AVFMT_NOTIMESTAMPS, |
548 }; | 550 }; |
549 #endif | 551 #endif |
550 | 552 |
553 #ifdef CONFIG_DIRAC_DEMUXER | |
551 AVInputFormat dirac_demuxer = { | 554 AVInputFormat dirac_demuxer = { |
552 "dirac", | 555 "dirac", |
553 NULL_IF_CONFIG_SMALL("raw Dirac"), | 556 NULL_IF_CONFIG_SMALL("raw Dirac"), |
554 0, | 557 0, |
555 dirac_probe, | 558 dirac_probe, |
556 video_read_header, | 559 video_read_header, |
557 raw_read_partial_packet, | 560 raw_read_partial_packet, |
558 .flags= AVFMT_GENERIC_INDEX, | 561 .flags= AVFMT_GENERIC_INDEX, |
559 .value = CODEC_ID_DIRAC, | 562 .value = CODEC_ID_DIRAC, |
560 }; | 563 }; |
564 #endif | |
561 | 565 |
562 #ifdef CONFIG_DIRAC_MUXER | 566 #ifdef CONFIG_DIRAC_MUXER |
563 AVOutputFormat dirac_muxer = { | 567 AVOutputFormat dirac_muxer = { |
564 "dirac", | 568 "dirac", |
565 NULL_IF_CONFIG_SMALL("raw Dirac"), | 569 NULL_IF_CONFIG_SMALL("raw Dirac"), |
572 raw_write_packet, | 576 raw_write_packet, |
573 .flags= AVFMT_NOTIMESTAMPS, | 577 .flags= AVFMT_NOTIMESTAMPS, |
574 }; | 578 }; |
575 #endif | 579 #endif |
576 | 580 |
581 #ifdef CONFIG_DTS_DEMUXER | |
577 AVInputFormat dts_demuxer = { | 582 AVInputFormat dts_demuxer = { |
578 "dts", | 583 "dts", |
579 NULL_IF_CONFIG_SMALL("raw DTS"), | 584 NULL_IF_CONFIG_SMALL("raw DTS"), |
580 0, | 585 0, |
581 dts_probe, | 586 dts_probe, |
583 raw_read_partial_packet, | 588 raw_read_partial_packet, |
584 .flags= AVFMT_GENERIC_INDEX, | 589 .flags= AVFMT_GENERIC_INDEX, |
585 .extensions = "dts", | 590 .extensions = "dts", |
586 .value = CODEC_ID_DTS, | 591 .value = CODEC_ID_DTS, |
587 }; | 592 }; |
593 #endif | |
588 | 594 |
589 #ifdef CONFIG_DTS_MUXER | 595 #ifdef CONFIG_DTS_MUXER |
590 AVOutputFormat dts_muxer = { | 596 AVOutputFormat dts_muxer = { |
591 "dts", | 597 "dts", |
592 NULL_IF_CONFIG_SMALL("raw DTS"), | 598 NULL_IF_CONFIG_SMALL("raw DTS"), |
599 raw_write_packet, | 605 raw_write_packet, |
600 .flags= AVFMT_NOTIMESTAMPS, | 606 .flags= AVFMT_NOTIMESTAMPS, |
601 }; | 607 }; |
602 #endif | 608 #endif |
603 | 609 |
610 #ifdef CONFIG_FLAC_DEMUXER | |
604 AVInputFormat flac_demuxer = { | 611 AVInputFormat flac_demuxer = { |
605 "flac", | 612 "flac", |
606 NULL_IF_CONFIG_SMALL("raw FLAC"), | 613 NULL_IF_CONFIG_SMALL("raw FLAC"), |
607 0, | 614 0, |
608 flac_probe, | 615 flac_probe, |
610 raw_read_partial_packet, | 617 raw_read_partial_packet, |
611 .flags= AVFMT_GENERIC_INDEX, | 618 .flags= AVFMT_GENERIC_INDEX, |
612 .extensions = "flac", | 619 .extensions = "flac", |
613 .value = CODEC_ID_FLAC, | 620 .value = CODEC_ID_FLAC, |
614 }; | 621 }; |
622 #endif | |
615 | 623 |
616 #ifdef CONFIG_FLAC_MUXER | 624 #ifdef CONFIG_FLAC_MUXER |
617 AVOutputFormat flac_muxer = { | 625 AVOutputFormat flac_muxer = { |
618 "flac", | 626 "flac", |
619 NULL_IF_CONFIG_SMALL("raw FLAC"), | 627 NULL_IF_CONFIG_SMALL("raw FLAC"), |
626 raw_write_packet, | 634 raw_write_packet, |
627 .flags= AVFMT_NOTIMESTAMPS, | 635 .flags= AVFMT_NOTIMESTAMPS, |
628 }; | 636 }; |
629 #endif | 637 #endif |
630 | 638 |
639 #ifdef CONFIG_GSM_DEMUXER | |
631 AVInputFormat gsm_demuxer = { | 640 AVInputFormat gsm_demuxer = { |
632 "gsm", | 641 "gsm", |
633 NULL_IF_CONFIG_SMALL("GSM"), | 642 NULL_IF_CONFIG_SMALL("GSM"), |
634 0, | 643 0, |
635 NULL, | 644 NULL, |
637 raw_read_partial_packet, | 646 raw_read_partial_packet, |
638 .flags= AVFMT_GENERIC_INDEX, | 647 .flags= AVFMT_GENERIC_INDEX, |
639 .extensions = "gsm", | 648 .extensions = "gsm", |
640 .value = CODEC_ID_GSM, | 649 .value = CODEC_ID_GSM, |
641 }; | 650 }; |
642 | 651 #endif |
652 | |
653 #ifdef CONFIG_H261_DEMUXER | |
643 AVInputFormat h261_demuxer = { | 654 AVInputFormat h261_demuxer = { |
644 "h261", | 655 "h261", |
645 NULL_IF_CONFIG_SMALL("raw H.261"), | 656 NULL_IF_CONFIG_SMALL("raw H.261"), |
646 0, | 657 0, |
647 h261_probe, | 658 h261_probe, |
649 raw_read_partial_packet, | 660 raw_read_partial_packet, |
650 .flags= AVFMT_GENERIC_INDEX, | 661 .flags= AVFMT_GENERIC_INDEX, |
651 .extensions = "h261", | 662 .extensions = "h261", |
652 .value = CODEC_ID_H261, | 663 .value = CODEC_ID_H261, |
653 }; | 664 }; |
665 #endif | |
654 | 666 |
655 #ifdef CONFIG_H261_MUXER | 667 #ifdef CONFIG_H261_MUXER |
656 AVOutputFormat h261_muxer = { | 668 AVOutputFormat h261_muxer = { |
657 "h261", | 669 "h261", |
658 NULL_IF_CONFIG_SMALL("raw H.261"), | 670 NULL_IF_CONFIG_SMALL("raw H.261"), |
665 raw_write_packet, | 677 raw_write_packet, |
666 .flags= AVFMT_NOTIMESTAMPS, | 678 .flags= AVFMT_NOTIMESTAMPS, |
667 }; | 679 }; |
668 #endif | 680 #endif |
669 | 681 |
682 #ifdef CONFIG_H263_DEMUXER | |
670 AVInputFormat h263_demuxer = { | 683 AVInputFormat h263_demuxer = { |
671 "h263", | 684 "h263", |
672 NULL_IF_CONFIG_SMALL("raw H.263"), | 685 NULL_IF_CONFIG_SMALL("raw H.263"), |
673 0, | 686 0, |
674 h263_probe, | 687 h263_probe, |
676 raw_read_partial_packet, | 689 raw_read_partial_packet, |
677 .flags= AVFMT_GENERIC_INDEX, | 690 .flags= AVFMT_GENERIC_INDEX, |
678 // .extensions = "h263", //FIXME remove after writing mpeg4_probe | 691 // .extensions = "h263", //FIXME remove after writing mpeg4_probe |
679 .value = CODEC_ID_H263, | 692 .value = CODEC_ID_H263, |
680 }; | 693 }; |
694 #endif | |
681 | 695 |
682 #ifdef CONFIG_H263_MUXER | 696 #ifdef CONFIG_H263_MUXER |
683 AVOutputFormat h263_muxer = { | 697 AVOutputFormat h263_muxer = { |
684 "h263", | 698 "h263", |
685 NULL_IF_CONFIG_SMALL("raw H.263"), | 699 NULL_IF_CONFIG_SMALL("raw H.263"), |
692 raw_write_packet, | 706 raw_write_packet, |
693 .flags= AVFMT_NOTIMESTAMPS, | 707 .flags= AVFMT_NOTIMESTAMPS, |
694 }; | 708 }; |
695 #endif | 709 #endif |
696 | 710 |
711 #ifdef CONFIG_H264_DEMUXER | |
697 AVInputFormat h264_demuxer = { | 712 AVInputFormat h264_demuxer = { |
698 "h264", | 713 "h264", |
699 NULL_IF_CONFIG_SMALL("raw H.264 video format"), | 714 NULL_IF_CONFIG_SMALL("raw H.264 video format"), |
700 0, | 715 0, |
701 h264_probe, | 716 h264_probe, |
703 raw_read_partial_packet, | 718 raw_read_partial_packet, |
704 .flags= AVFMT_GENERIC_INDEX, | 719 .flags= AVFMT_GENERIC_INDEX, |
705 .extensions = "h26l,h264,264", //FIXME remove after writing mpeg4_probe | 720 .extensions = "h26l,h264,264", //FIXME remove after writing mpeg4_probe |
706 .value = CODEC_ID_H264, | 721 .value = CODEC_ID_H264, |
707 }; | 722 }; |
723 #endif | |
708 | 724 |
709 #ifdef CONFIG_H264_MUXER | 725 #ifdef CONFIG_H264_MUXER |
710 AVOutputFormat h264_muxer = { | 726 AVOutputFormat h264_muxer = { |
711 "h264", | 727 "h264", |
712 NULL_IF_CONFIG_SMALL("raw H.264 video format"), | 728 NULL_IF_CONFIG_SMALL("raw H.264 video format"), |
719 raw_write_packet, | 735 raw_write_packet, |
720 .flags= AVFMT_NOTIMESTAMPS, | 736 .flags= AVFMT_NOTIMESTAMPS, |
721 }; | 737 }; |
722 #endif | 738 #endif |
723 | 739 |
740 #ifdef CONFIG_INGENIENT_DEMUXER | |
724 AVInputFormat ingenient_demuxer = { | 741 AVInputFormat ingenient_demuxer = { |
725 "ingenient", | 742 "ingenient", |
726 NULL_IF_CONFIG_SMALL("Ingenient MJPEG"), | 743 NULL_IF_CONFIG_SMALL("Ingenient MJPEG"), |
727 0, | 744 0, |
728 NULL, | 745 NULL, |
730 ingenient_read_packet, | 747 ingenient_read_packet, |
731 .flags= AVFMT_GENERIC_INDEX, | 748 .flags= AVFMT_GENERIC_INDEX, |
732 .extensions = "cgi", // FIXME | 749 .extensions = "cgi", // FIXME |
733 .value = CODEC_ID_MJPEG, | 750 .value = CODEC_ID_MJPEG, |
734 }; | 751 }; |
735 | 752 #endif |
753 | |
754 #ifdef CONFIG_M4V_DEMUXER | |
736 AVInputFormat m4v_demuxer = { | 755 AVInputFormat m4v_demuxer = { |
737 "m4v", | 756 "m4v", |
738 NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"), | 757 NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"), |
739 0, | 758 0, |
740 mpeg4video_probe, /** probing for MPEG-4 data */ | 759 mpeg4video_probe, /** probing for MPEG-4 data */ |
742 raw_read_partial_packet, | 761 raw_read_partial_packet, |
743 .flags= AVFMT_GENERIC_INDEX, | 762 .flags= AVFMT_GENERIC_INDEX, |
744 .extensions = "m4v", //FIXME remove after writing mpeg4_probe | 763 .extensions = "m4v", //FIXME remove after writing mpeg4_probe |
745 .value = CODEC_ID_MPEG4, | 764 .value = CODEC_ID_MPEG4, |
746 }; | 765 }; |
766 #endif | |
747 | 767 |
748 #ifdef CONFIG_M4V_MUXER | 768 #ifdef CONFIG_M4V_MUXER |
749 AVOutputFormat m4v_muxer = { | 769 AVOutputFormat m4v_muxer = { |
750 "m4v", | 770 "m4v", |
751 NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"), | 771 NULL_IF_CONFIG_SMALL("raw MPEG-4 video format"), |
758 raw_write_packet, | 778 raw_write_packet, |
759 .flags= AVFMT_NOTIMESTAMPS, | 779 .flags= AVFMT_NOTIMESTAMPS, |
760 }; | 780 }; |
761 #endif | 781 #endif |
762 | 782 |
783 #ifdef CONFIG_MJPEG_DEMUXER | |
763 AVInputFormat mjpeg_demuxer = { | 784 AVInputFormat mjpeg_demuxer = { |
764 "mjpeg", | 785 "mjpeg", |
765 NULL_IF_CONFIG_SMALL("MJPEG video"), | 786 NULL_IF_CONFIG_SMALL("MJPEG video"), |
766 0, | 787 0, |
767 NULL, | 788 NULL, |
769 raw_read_partial_packet, | 790 raw_read_partial_packet, |
770 .flags= AVFMT_GENERIC_INDEX, | 791 .flags= AVFMT_GENERIC_INDEX, |
771 .extensions = "mjpg,mjpeg", | 792 .extensions = "mjpg,mjpeg", |
772 .value = CODEC_ID_MJPEG, | 793 .value = CODEC_ID_MJPEG, |
773 }; | 794 }; |
795 #endif | |
774 | 796 |
775 #ifdef CONFIG_MJPEG_MUXER | 797 #ifdef CONFIG_MJPEG_MUXER |
776 AVOutputFormat mjpeg_muxer = { | 798 AVOutputFormat mjpeg_muxer = { |
777 "mjpeg", | 799 "mjpeg", |
778 NULL_IF_CONFIG_SMALL("MJPEG video"), | 800 NULL_IF_CONFIG_SMALL("MJPEG video"), |
785 raw_write_packet, | 807 raw_write_packet, |
786 .flags= AVFMT_NOTIMESTAMPS, | 808 .flags= AVFMT_NOTIMESTAMPS, |
787 }; | 809 }; |
788 #endif | 810 #endif |
789 | 811 |
812 #ifdef CONFIG_MLP_DEMUXER | |
790 AVInputFormat mlp_demuxer = { | 813 AVInputFormat mlp_demuxer = { |
791 "mlp", | 814 "mlp", |
792 NULL_IF_CONFIG_SMALL("raw MLP"), | 815 NULL_IF_CONFIG_SMALL("raw MLP"), |
793 0, | 816 0, |
794 NULL, | 817 NULL, |
796 raw_read_partial_packet, | 819 raw_read_partial_packet, |
797 .flags= AVFMT_GENERIC_INDEX, | 820 .flags= AVFMT_GENERIC_INDEX, |
798 .extensions = "mlp", | 821 .extensions = "mlp", |
799 .value = CODEC_ID_MLP, | 822 .value = CODEC_ID_MLP, |
800 }; | 823 }; |
824 #endif | |
801 | 825 |
802 #ifdef CONFIG_MPEG1VIDEO_MUXER | 826 #ifdef CONFIG_MPEG1VIDEO_MUXER |
803 AVOutputFormat mpeg1video_muxer = { | 827 AVOutputFormat mpeg1video_muxer = { |
804 "mpeg1video", | 828 "mpeg1video", |
805 NULL_IF_CONFIG_SMALL("MPEG video"), | 829 NULL_IF_CONFIG_SMALL("MPEG video"), |
827 raw_write_packet, | 851 raw_write_packet, |
828 .flags= AVFMT_NOTIMESTAMPS, | 852 .flags= AVFMT_NOTIMESTAMPS, |
829 }; | 853 }; |
830 #endif | 854 #endif |
831 | 855 |
856 #ifdef CONFIG_MPEGVIDEO_DEMUXER | |
832 AVInputFormat mpegvideo_demuxer = { | 857 AVInputFormat mpegvideo_demuxer = { |
833 "mpegvideo", | 858 "mpegvideo", |
834 NULL_IF_CONFIG_SMALL("MPEG video"), | 859 NULL_IF_CONFIG_SMALL("MPEG video"), |
835 0, | 860 0, |
836 mpegvideo_probe, | 861 mpegvideo_probe, |
837 video_read_header, | 862 video_read_header, |
838 raw_read_partial_packet, | 863 raw_read_partial_packet, |
839 .flags= AVFMT_GENERIC_INDEX, | 864 .flags= AVFMT_GENERIC_INDEX, |
840 .value = CODEC_ID_MPEG1VIDEO, | 865 .value = CODEC_ID_MPEG1VIDEO, |
841 }; | 866 }; |
867 #endif | |
842 | 868 |
843 #ifdef CONFIG_NULL_MUXER | 869 #ifdef CONFIG_NULL_MUXER |
844 AVOutputFormat null_muxer = { | 870 AVOutputFormat null_muxer = { |
845 "null", | 871 "null", |
846 NULL_IF_CONFIG_SMALL("null video format"), | 872 NULL_IF_CONFIG_SMALL("null video format"), |
857 null_write_packet, | 883 null_write_packet, |
858 .flags = AVFMT_NOFILE | AVFMT_RAWPICTURE | AVFMT_NOTIMESTAMPS, | 884 .flags = AVFMT_NOFILE | AVFMT_RAWPICTURE | AVFMT_NOTIMESTAMPS, |
859 }; | 885 }; |
860 #endif | 886 #endif |
861 | 887 |
888 #ifdef CONFIG_RAWVIDEO_DEMUXER | |
862 AVInputFormat rawvideo_demuxer = { | 889 AVInputFormat rawvideo_demuxer = { |
863 "rawvideo", | 890 "rawvideo", |
864 NULL_IF_CONFIG_SMALL("raw video format"), | 891 NULL_IF_CONFIG_SMALL("raw video format"), |
865 0, | 892 0, |
866 NULL, | 893 NULL, |
868 rawvideo_read_packet, | 895 rawvideo_read_packet, |
869 .flags= AVFMT_GENERIC_INDEX, | 896 .flags= AVFMT_GENERIC_INDEX, |
870 .extensions = "yuv,cif,qcif,rgb", | 897 .extensions = "yuv,cif,qcif,rgb", |
871 .value = CODEC_ID_RAWVIDEO, | 898 .value = CODEC_ID_RAWVIDEO, |
872 }; | 899 }; |
900 #endif | |
873 | 901 |
874 #ifdef CONFIG_RAWVIDEO_MUXER | 902 #ifdef CONFIG_RAWVIDEO_MUXER |
875 AVOutputFormat rawvideo_muxer = { | 903 AVOutputFormat rawvideo_muxer = { |
876 "rawvideo", | 904 "rawvideo", |
877 NULL_IF_CONFIG_SMALL("raw video format"), | 905 NULL_IF_CONFIG_SMALL("raw video format"), |
899 roq_write_header, | 927 roq_write_header, |
900 raw_write_packet, | 928 raw_write_packet, |
901 }; | 929 }; |
902 #endif | 930 #endif |
903 | 931 |
932 #ifdef CONFIG_SHORTEN_DEMUXER | |
904 AVInputFormat shorten_demuxer = { | 933 AVInputFormat shorten_demuxer = { |
905 "shn", | 934 "shn", |
906 NULL_IF_CONFIG_SMALL("raw Shorten"), | 935 NULL_IF_CONFIG_SMALL("raw Shorten"), |
907 0, | 936 0, |
908 NULL, | 937 NULL, |
910 raw_read_partial_packet, | 939 raw_read_partial_packet, |
911 .flags= AVFMT_GENERIC_INDEX, | 940 .flags= AVFMT_GENERIC_INDEX, |
912 .extensions = "shn", | 941 .extensions = "shn", |
913 .value = CODEC_ID_SHORTEN, | 942 .value = CODEC_ID_SHORTEN, |
914 }; | 943 }; |
915 | 944 #endif |
945 | |
946 #ifdef CONFIG_VC1_DEMUXER | |
916 AVInputFormat vc1_demuxer = { | 947 AVInputFormat vc1_demuxer = { |
917 "vc1", | 948 "vc1", |
918 NULL_IF_CONFIG_SMALL("raw VC-1"), | 949 NULL_IF_CONFIG_SMALL("raw VC-1"), |
919 0, | 950 0, |
920 NULL /* vc1_probe */, | 951 NULL /* vc1_probe */, |
921 video_read_header, | 952 video_read_header, |
922 raw_read_partial_packet, | 953 raw_read_partial_packet, |
923 .extensions = "vc1", | 954 .extensions = "vc1", |
924 .value = CODEC_ID_VC1, | 955 .value = CODEC_ID_VC1, |
925 }; | 956 }; |
957 #endif | |
926 | 958 |
927 /* PCM formats */ | 959 /* PCM formats */ |
928 | 960 |
929 #define PCMINPUTDEF(name, long_name, ext, codec) \ | 961 #define PCMINPUTDEF(name, long_name, ext, codec) \ |
930 AVInputFormat pcm_ ## name ## _demuxer = {\ | 962 AVInputFormat pcm_ ## name ## _demuxer = {\ |