Permalink
Browse files

disallow cache on http live stream ApMediaStreamer

  • Loading branch information...
1 parent 6c84ff2 commit f237038adb43c234a6f601056b0c3454a5e670e6 Joshua Semar committed Aug 22, 2011
Showing with 11 additions and 7 deletions.
  1. +2 −0 webservice_tools/lib/ApMediaStreamServer/ap_streamer/core.py
  2. BIN webservice_tools/lib/ilbc_decode/._FrameClassify.c
  3. BIN webservice_tools/lib/ilbc_decode/._FrameClassify.h
  4. BIN webservice_tools/lib/ilbc_decode/._LPCdecode.c
  5. BIN webservice_tools/lib/ilbc_decode/._LPCdecode.h
  6. BIN webservice_tools/lib/ilbc_decode/._LPCencode.c
  7. BIN webservice_tools/lib/ilbc_decode/._LPCencode.h
  8. BIN webservice_tools/lib/ilbc_decode/._StateConstructW.c
  9. BIN webservice_tools/lib/ilbc_decode/._StateConstructW.h
  10. BIN webservice_tools/lib/ilbc_decode/._StateSearchW.c
  11. BIN webservice_tools/lib/ilbc_decode/._StateSearchW.h
  12. BIN webservice_tools/lib/ilbc_decode/._anaFilter.c
  13. BIN webservice_tools/lib/ilbc_decode/._anaFilter.h
  14. BIN webservice_tools/lib/ilbc_decode/._constants.c
  15. BIN webservice_tools/lib/ilbc_decode/._constants.h
  16. BIN webservice_tools/lib/ilbc_decode/._createCB.c
  17. BIN webservice_tools/lib/ilbc_decode/._createCB.h
  18. BIN webservice_tools/lib/ilbc_decode/._doCPLC.c
  19. BIN webservice_tools/lib/ilbc_decode/._doCPLC.h
  20. BIN webservice_tools/lib/ilbc_decode/._enhancer.c
  21. BIN webservice_tools/lib/ilbc_decode/._enhancer.h
  22. BIN webservice_tools/lib/ilbc_decode/._filter.c
  23. BIN webservice_tools/lib/ilbc_decode/._filter.h
  24. BIN webservice_tools/lib/ilbc_decode/._gainquant.c
  25. BIN webservice_tools/lib/ilbc_decode/._gainquant.h
  26. BIN webservice_tools/lib/ilbc_decode/._getCBvec.c
  27. BIN webservice_tools/lib/ilbc_decode/._getCBvec.h
  28. BIN webservice_tools/lib/ilbc_decode/._helpfun.c
  29. BIN webservice_tools/lib/ilbc_decode/._helpfun.h
  30. BIN webservice_tools/lib/ilbc_decode/._hpInput.c
  31. BIN webservice_tools/lib/ilbc_decode/._hpInput.h
  32. BIN webservice_tools/lib/ilbc_decode/._hpOutput.c
  33. BIN webservice_tools/lib/ilbc_decode/._hpOutput.h
  34. BIN webservice_tools/lib/ilbc_decode/._iCBConstruct.c
  35. BIN webservice_tools/lib/ilbc_decode/._iCBConstruct.h
  36. BIN webservice_tools/lib/ilbc_decode/._iCBSearch.c
  37. BIN webservice_tools/lib/ilbc_decode/._iCBSearch.h
  38. BIN webservice_tools/lib/ilbc_decode/._iLBC_decode.h
  39. BIN webservice_tools/lib/ilbc_decode/._iLBC_define.h
  40. BIN webservice_tools/lib/ilbc_decode/._iLBC_encode.c
  41. BIN webservice_tools/lib/ilbc_decode/._iLBC_encode.h
  42. BIN webservice_tools/lib/ilbc_decode/._iLBC_test.c
  43. BIN webservice_tools/lib/ilbc_decode/._lsf.c
  44. BIN webservice_tools/lib/ilbc_decode/._lsf.h
  45. BIN webservice_tools/lib/ilbc_decode/._packing.c
  46. BIN webservice_tools/lib/ilbc_decode/._packing.h
  47. BIN webservice_tools/lib/ilbc_decode/._syntFilter.c
  48. BIN webservice_tools/lib/ilbc_decode/._syntFilter.h
  49. BIN webservice_tools/lib/ilbc_decode/._wholething.lbc
  50. BIN webservice_tools/lib/ilbc_decode/._wholething_no_header.lbc
  51. +9 −7 webservice_tools/lib/ilbc_decode/py_ilbc.c
@@ -158,6 +158,7 @@ class Indexer(Element):
TARGET_DURATION_TAG = '#EXT-X-TARGETDURATION:%i\n'
EXT_TAG = '#EXTM3U\n'
END_TAG = '#EXT-X-ENDLIST\n'
+ NO_CACHE_ALLOW = '#EXT-X-ALLOW-CACHE:NO\n'
def __init__(self, index_file_path=None, segment_name = None, active_limit=3, delete_inactive_segments=True, target_duration=10):
"""
@@ -209,6 +210,7 @@ def _update_index_file(self, closed=False):
lines.append(self.EXT_TAG)
lines.append(self.TARGET_DURATION_TAG % self.target_duration)
lines.append(self.MEDIA_SEQ_TAG % sequence)
+ lines.append(self.NO_CACHE_ALLOW)
for segment in segments:
lines.append(self.URI_TAG % (self.target_duration, ''))
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -31,24 +31,26 @@ static PyObject *decode(PyObject *self, PyObject *args) {
//create a new buffer to store the decoded data in. BLOCKL_MAX is the maximum data that can be returned
//from the decode function.
- int max_data = BLOCKL_MAX*size/Dec_Inst.no_of_bytes*sizeof(short);
+ int max_data = BLOCKL_MAX*size/Dec_Inst.no_of_bytes;
short *decoded_buffer = PyMem_Malloc(max_data);
if (decoded_buffer==NULL){
PyErr_SetString(ILBCError, "Memory allocation failed for decoded_buffer");
return NULL;
}
- int arrayCopyNdx;
+// int arrayCopyNdx;
while(inpos < size) {
len = decode_prep(&Dec_Inst, decoded_data, (short *) &data[inpos]); //decode the first chunk
inpos += Dec_Inst.no_of_bytes; //increment index by size of current decoder's blocks
- arrayCopyNdx = 0;
- while(arrayCopyNdx < len*sizeof(short)){
- decoded_buffer[outpos+arrayCopyNdx] = decoded_data[arrayCopyNdx];
- arrayCopyNdx ++;
- }
+ memcpy(&decoded_buffer[outpos], decoded_data, len*sizeof(short));
+
+// arrayCopyNdx = 0;
+// while(arrayCopyNdx < len*sizeof(short)){
+// decoded_buffer[outpos+arrayCopyNdx] = decoded_data[arrayCopyNdx];
+// arrayCopyNdx ++;
+// }
outpos += len;
}
//Make a Python Object to return

0 comments on commit f237038

Please sign in to comment.