Revision 03dca3bf

View differences:

Makefile
16 16

  
17 17
NAPA ?= ../../NAPA-BASELIBS
18 18
GRAPES ?= ../../GRAPES
19
ULPLAYER ?= ../StreamerPlayerChunker
20
ULPLAYER_EXTERNAL_LIBS ?= external_libs
19 21

  
20 22
CPPFLAGS = -I$(NAPA)/include
21 23
CPPFLAGS += -I$(GRAPES)/include
......
52 54
endif
53 55

  
54 56
OBJS += streaming.o
57
ifndef HTTPIO
55 58
OBJS += input.o
56 59
OBJS += output.o 
60
else
61
OBJS += input-http.o
62
OBJS += output-http.o
63
endif
57 64
OBJS += net_helpers.o 
58 65
OBJS += topology.o
59 66
OBJS += chunk_signaling.o
......
74 81
endif
75 82

  
76 83
ifndef DUMMY
84
ifndef HTTPIO
77 85
OBJS += Chunkiser/input-stream-avs.o out-stream-avf.o
78 86
CPPFLAGS += -I$(FFMPEG_DIR)/include
79 87
LDFLAGS += -L$(FFMPEG_DIR)/lib
......
82 90
LDLIBS += $(call ld-option, -lz)
83 91
LDLIBS += $(call ld-option, -lbz2)
84 92
else
93
CPPFLAGS += -DHTTPIO
94
OBJS += $(ULPLAYER)/chunker_player/chunk_puller.o
95
OBJS += $(ULPLAYER)/chunker_streamer/chunk_pusher_curl.o
96
CPPFLAGS += -I$(ULPLAYER) -I$(ULPLAYER)/chunk_transcoding
97
CFLAGS += -pthread
98
LDFLAGS += -pthread
99

  
100
LOCAL_MHD=$(ULPLAYER)/$(ULPLAYER_EXTERNAL_LIBS)/libmicrohttpd
101
CPPFLAGS += -I$(LOCAL_MHD) -I$(LOCAL_MHD)/src/daemon -I$(LOCAL_MHD)/src/include
102
LDFLAGS += -L$(LOCAL_MHD)/src/daemon
103
LDLIBS += $(LOCAL_MHD)/src/daemon/.libs/libmicrohttpd.a
104

  
105
LOCAL_CURL=$(ULPLAYER)/$(ULPLAYER_EXTERNAL_LIBS)/curl-7.21.0/temp_curl_install
106
LDLIBS += $(LOCAL_CURL)/lib/libcurl.a -lrt
107
endif
108
else
85 109
OBJS += input-stream-dummy.o out-stream-dummy.o
86 110
endif
87 111

  
......
97 121
ifdef THREADS
98 122
EXECTARGET := $(EXECTARGET)-threads
99 123
endif
124
ifdef HTTPIO
125
EXECTARGET := $(EXECTARGET)-http
126
endif
100 127

  
101 128
ifdef STATIC
102 129
LDFLAGS += -static -v
loop.c
28 28
static struct timeval period = {0, 500000};
29 29
static struct timeval tnext;
30 30

  
31
#ifdef HTTPIO
32
extern pthread_mutex_t cb_mutex;
33
#endif
34

  
31 35
void tout_init(struct timeval *tv)
32 36
{
33 37
  struct timeval tnow;
......
77 81
          break;
78 82
        case MSG_TYPE_CHUNK:
79 83
          dprintf("Chunk message received:\n");
84
#ifdef HTTPIO
85
          pthread_mutex_lock(&cb_mutex);
86
#endif
80 87
          received_chunk(remote, buff, len);
88
#ifdef HTTPIO
89
          pthread_mutex_unlock(&cb_mutex);
90
#endif
81 91
          break;
82 92
        case MSG_TYPE_SIGNALLING:
83 93
          sigParseData(remote, buff, len);
......
119 129
    int len, res;
120 130
    struct timeval tv;
121 131

  
132
#ifdef HTTPIO
133
    res = wait4data(s, NULL, NULL);
134
#else
122 135
    tout_init(&tv);
123 136
    res = wait4data(s, &tv, NULL);
137
#endif
124 138
    if (res > 0) {
125 139
      const struct nodeID *remote;
126 140

  
streaming.c
41 41
  uint16_t hopcount;
42 42
} __attribute__((packed));
43 43

  
44
static struct chunk_buffer *cb;
44
struct chunk_buffer *cb;
45 45
static struct input_desc *input;
46 46
static int cb_size;
47 47
static int transid=0;

Also available in: Unified diff