summaryrefslogtreecommitdiff
path: root/examples/simple_talker
diff options
context:
space:
mode:
authorJean-Baptiste Maillet <jean-baptiste.maillet@parrot.com>2014-11-27 17:58:55 +0100
committerJean-Baptiste Maillet <jean-baptiste.maillet@parrot.com>2014-11-27 17:58:55 +0100
commit90df5d417efa130a3d0515ef96c32b9380dd0ca2 (patch)
treeabbf2ccd2777c6d225991f41507bccb179ea5d79 /examples/simple_talker
parente574a9cb806ca37ccbb33f1edb3be7088f92b06c (diff)
downloadOpen-AVB-90df5d417efa130a3d0515ef96c32b9380dd0ca2.tar.gz
talkers / listerners: remove useless includes and macros
Diffstat (limited to 'examples/simple_talker')
-rwxr-xr-xexamples/simple_talker/simple_talker.c40
1 files changed, 7 insertions, 33 deletions
diff --git a/examples/simple_talker/simple_talker.c b/examples/simple_talker/simple_talker.c
index 864a2b13..d62743ec 100755
--- a/examples/simple_talker/simple_talker.c
+++ b/examples/simple_talker/simple_talker.c
@@ -31,42 +31,23 @@
******************************************************************************/
-#include <unistd.h>
+#include <errno.h>
#include <fcntl.h>
-#include <stdlib.h>
+#include <math.h>
+#include <signal.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-#include <syslog.h>
-#include <signal.h>
-#include <errno.h>
#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <sys/resource.h>
#include <sys/mman.h>
-#include <sys/user.h>
-#include <pci/pci.h>
#include <sys/socket.h>
#include <linux/if.h>
-#include <netpacket/packet.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <arpa/inet.h>
-#include <net/ethernet.h>
-#include <sys/un.h>
-#include <pthread.h>
-#include <poll.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-#include <fcntl.h>
+#include <pci/pci.h>
#include "igb.h"
#include "talker_mrp_client.h"
-#include <math.h>
-#include <endian.h>
-#include <stdint.h>
-
typedef struct {
int64_t ml_phoffset;
int64_t ls_phoffset;
@@ -87,21 +68,14 @@ typedef struct {
#define SAMPLES_PER_CYCLE (SAMPLES_PER_SECOND/FREQUENCY)
#define GAIN (.5)
-#define L16_PAYLOAD_TYPE 96 /* Should be negotiated via RTSP */
-#define ID_B_HDR_EXT_ID 0 /* Should be negotiated via RTSP */
+#define L16_PAYLOAD_TYPE 96 /* for layer 4 transport - should be negotiated via RTSP */
+#define ID_B_HDR_EXT_ID 0 /* for layer 4 transport - should be negotiated via RTSP */
-#define CD_SUBTYPE 0x02 /* for simple audio format */
-#define SV_VER_MR_RS_GV_TV 0x81
-#define RS_TU 0x00
-#define SAMPLE_FORMAT_NON_INTR_FLOAT 0x02
-#define NOMINAL_SAMPLE_RATE 0x09
-#define LINEAR_SAMPLE_MSB 0x20
#define SAMPLE_SIZE 4 /* 4 bytes */
#define L2_SAMPLES_PER_FRAME 6
#define L4_SAMPLES_PER_FRAME 60
#define L4_SAMPLE_SIZE 2
#define CHANNELS 2
-#define PAYLOAD_SIZE SAMPLE_SIZE*SAMPLES_PER_FRAME*CHANNELS /* 6*4 * 2 channels = 48 bytes */
#define RTP_SUBNS_SCALE_NUM 20000000
#define RTP_SUBNS_SCALE_DEN 4656613