apps/streamer/str.h

Go to the documentation of this file.
00001 #ifndef STR_H
00002 #define STR_H
00003 //#include <linux/if_packet.h>
00004 #include <netpacket/packet.h>
00005 
00006 typedef int32_t fd_t;
00007 
00008 struct param {
00009     uint16_t            width;          // Image width
00010     uint16_t            height;         // Image height
00011     struct in_addr      src_addr4;      // Source IP in binary representation
00012     struct in_addr      dst_addr4;      // Destination IP in binary representation
00013     struct in_addr      src_netmask4;   // Source netmask
00014     int8_t              *src;           // Source IP in numbers-and-dots notation or host name
00015     int8_t              *dst;           // Destination IP in numbers-and-dots notation or host name
00016     uint16_t            dport;          // Destination port
00017     uint8_t             ttl;
00018     uint8_t             mac[6];         // MAC address of local interface
00019     uint8_t             dst_mac[6];     // MAC address of destination (or gateway) interface
00020     int32_t             eth_index;      // Local Ethernet interface's index 
00021     uint8_t             meth;           // Access data method. May be MMAP or READ
00022     uint8_t             raw;            // If =1 send data by-passing UDP/IP stack
00023     uint32_t            vbitrt;         // Stream bitrate (as rule = 90000)
00024     double              fps;            // System fps
00025     int32_t             fps_soft;       // Software fps (for decreasing unnecessary network trafic)
00026     fd_t                fd;             // Local socket descriptor
00027     uint32_t            my_ssrc;        // RTP session SSRC
00028     uint16_t            rtp_seq;        // 
00029     int16_t             ip_id;          // Number of sended ip packets
00030     uint32_t            start_timestamp;
00031     uint8_t             payload_num;    // Video stream's payload (26 for JPEG)
00032     uint32_t            web;            // If >0 then every WEB seconds generates jpeg file in public-accessed directory
00033     uint32_t            zero;
00034     uint8_t             verbose;        // if !=0 print statistical information
00035     uint32_t            rtsp;           // if !=0 use simple rtsp server
00036     uint32_t            rtsp_port;      // rtsp server port for listen incomming connections
00037     uint32_t            rtsp_use_cmd_port; // if !=0 dest PORT will got from command line, not from rtsp request
00038     uint32_t            rtsp_use_cmd_addr; // if !=0 dest IP will got from command line, not from rtsp request
00039     uint32_t            rtsp_qt_compat; //QT compatible mode
00040     int8_t              *program_name;  // This program name (argv[0])
00041         fd_t                    fd_udp;
00042         fd_t                    fd_raw;
00043         struct msghdr   msg;
00044     struct sockaddr_ll s_ll;
00045         uint32_t                hw_fps;
00046 };
00047 
00048 int8_t write_sdp(struct param * p, int save, int8_t *sdp);
00049 
00050 extern int32_t str_setup;
00051 extern int32_t str_play;
00052 extern int32_t str_teardown;
00053 extern int32_t str_stop;
00054 extern int32_t str_count;
00055 
00056 extern int32_t ismulticast(struct param *p);
00057 
00058 #endif

Generated on Fri Nov 28 00:06:23 2008 for elphel by  doxygen 1.5.1