Lines Matching refs:readBytes
931 int32_t boundaryLen, leftLen, readBytes;
947 readBytes = data.readInputData(data.inputHandle, s->readBuf + s->readBufOff, s->readBufLen);
948 if (-1 == readBytes || readBytes < s->readBufLen) {
988 int32_t boundaryLen, leftLen, readBytes;
1005 readBytes = data.readInputData(data.inputHandle, s->readBuf + s->readBufOff, s->readBufLen);
1006 if (-1 == readBytes || readBytes < s->readBufLen) {
1313 int32_t readBytes;
1322 readBytes = s->contentLength - offset;
1324 readBytes = mediaBufLen;
1327 memcpy(mediaBuf, s->rawContent + offset, readBytes);
1329 memcpy(mediaBuf, s->rawContent + s->contentOffset + offset, readBytes);
1331 return readBytes;
1339 int32_t readBytes = 0;
1342 readBytes = ((T_DRM_DM_Base64_Node *)(s->infoStruct))->b64DecodeDataLen - offset;
1343 memcpy(mediaBuf, s->rawContent + offset, readBytes);
1351 readBytes = mediaBufLen;
1352 memcpy(mediaBuf, ((T_DRM_DM_Base64_Node *)(s->infoStruct))->b64DecodeData + firstBytes, readBytes);
1353 return readBytes;
1356 readBytes = DRM_B64_DEC_BLOCK - firstBytes;
1357 memcpy(mediaBuf, ((T_DRM_DM_Base64_Node *)(s->infoStruct))->b64DecodeData + firstBytes, readBytes);
1361 leftLen = mediaBufLen - readBytes;
1417 if (0 == readBytes)
1429 memcpy(mediaBuf + readBytes, decBuf, decLen);
1430 readBytes += decLen;
1434 memcpy(mediaBuf + readBytes, decBuf, leftLen);
1435 readBytes += leftLen;
1442 return readBytes;
1447 int32_t readBytes;
1451 readBytes = drm_readContentFromBuf(s, offset, mediaBuf, mediaBufLen);
1455 readBytes = mediaBufLen;
1456 memcpy(mediaBuf, s->rawContent + offset, readBytes);
1458 readBytes = drm_readB64ContentFromInputStream(s, offset, mediaBuf, mediaBufLen);
1460 readBytes = drm_readB64ContentFromInputStream(s, offset, mediaBuf, mediaBufLen);
1462 return readBytes;
1467 int32_t res = 0, readBytes = 0;
1471 readBytes = DRM_MAX_MALLOC_LEN - s->contentOffset - offset;
1472 memcpy(mediaBuf, s->rawContent + s->contentOffset + offset, readBytes);
1477 leftLen = mediaBufLen - readBytes;
1484 readBytes += leftLen;
1490 readBytes += s->readBufLen;
1496 res = s->readInputDataFunc(s->inputHandle, mediaBuf + readBytes, mediaBufLen - readBytes);
1501 readBytes += res;
1502 res = drm_scanEndBoundary(mediaBuf, readBytes, ((T_DRM_DM_Binary_Node *)(s->infoStruct))->boundary);
1507 char* pTmp = memrchr(mediaBuf, '\r', readBytes);
1519 off = readBytes - ((uint8_t *)pTmp - mediaBuf);
1536 readBytes = (uint8_t *)pTmp - mediaBuf; /* yes, it is the end boundary */
1540 if (res >= 0 && res < readBytes) {
1541 readBytes = res;
1547 if (0 == readBytes)
1551 return readBytes;
1556 int32_t readBytes;
1559 readBytes = drm_readContentFromBuf(s, offset, mediaBuf, mediaBufLen);
1563 readBytes = mediaBufLen;
1564 memcpy(mediaBuf, s->rawContent + s->contentOffset + offset, readBytes);
1566 readBytes = drm_readBinaryContentFromInputStream(s, offset, mediaBuf, mediaBufLen);
1568 readBytes = drm_readBinaryContentFromInputStream(s, offset, mediaBuf, mediaBufLen);
1570 return readBytes;
1577 int32_t readBytes = 0;
1594 readBytes = s->contentLength - offset;
1596 readBytes = mediaBufLen;
1599 piece = (offset + readBytes - 1) / DRM_ONE_AES_BLOCK_LEN - offset / DRM_ONE_AES_BLOCK_LEN + 2;
1604 leftBytes = readBytes;
1639 readBytes += copyBytes;
1642 leftBytes = mediaBufLen - readBytes;
1644 return readBytes;
1648 offset += readBytes;
1651 mediaBufOff = readBytes;
1678 readBytes += copyBytes;
1687 if (0 == readBytes)
1692 return readBytes;
1699 int32_t readBytes;
1715 readBytes = drm_readBase64Content(s, offset, mediaBuf, mediaBufLen);
1717 readBytes = drm_readBinaryContent(s, offset, mediaBuf, mediaBufLen);
1721 readBytes = drm_readAesContent(s, offset, mediaBuf, mediaBufLen);
1727 return readBytes;