Added more logs to track issue ref #355
This commit is contained in:
@@ -56,10 +56,12 @@ namespace Av
|
|||||||
if (_estimatedContentLength)
|
if (_estimatedContentLength)
|
||||||
response.setContentLength(*_estimatedContentLength);
|
response.setContentLength(*_estimatedContentLength);
|
||||||
response.setMimeType(_transcoder.getOutputMimeType());
|
response.setMimeType(_transcoder.getOutputMimeType());
|
||||||
LMS_LOG(TRANSCODE, DEBUG) << "Set mime type to " << _transcoder.getOutputMimeType();
|
LMS_LOG(TRANSCODE, DEBUG) << "Transcoder finished = " << _transcoder.finished() << ", total served bytes = " << _totalServedByteCount << ", mime type = " << _transcoder.getOutputMimeType();
|
||||||
|
|
||||||
if (_bytesReadyCount > 0)
|
if (_bytesReadyCount > 0)
|
||||||
{
|
{
|
||||||
|
LMS_LOG(TRANSCODE, DEBUG) << "Writing " << _bytesReadyCount << " bytes back to client";
|
||||||
|
|
||||||
response.out().write(reinterpret_cast<const char *>(&_buffer[0]), _bytesReadyCount);
|
response.out().write(reinterpret_cast<const char *>(&_buffer[0]), _bytesReadyCount);
|
||||||
_totalServedByteCount += _bytesReadyCount;
|
_totalServedByteCount += _bytesReadyCount;
|
||||||
_bytesReadyCount = 0;
|
_bytesReadyCount = 0;
|
||||||
@@ -71,6 +73,8 @@ namespace Av
|
|||||||
continuation->waitForMoreData();
|
continuation->waitForMoreData();
|
||||||
_transcoder.asyncRead(_buffer.data(), _buffer.size(), [=](std::size_t nbBytesRead)
|
_transcoder.asyncRead(_buffer.data(), _buffer.size(), [=](std::size_t nbBytesRead)
|
||||||
{
|
{
|
||||||
|
LMS_LOG(TRANSCODE, DEBUG) << "Have " << nbBytesRead << " more bytes to send back";
|
||||||
|
|
||||||
assert(_bytesReadyCount == 0);
|
assert(_bytesReadyCount == 0);
|
||||||
_bytesReadyCount = nbBytesRead;
|
_bytesReadyCount = nbBytesRead;
|
||||||
continuation->haveMoreData();
|
continuation->haveMoreData();
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ ChildProcess::asyncRead(std::byte* data, std::size_t bufferSize, ReadCallback ca
|
|||||||
boost::asio::async_read(_childStdout, boost::asio::buffer(data, bufferSize),
|
boost::asio::async_read(_childStdout, boost::asio::buffer(data, bufferSize),
|
||||||
[this, callback {std::move(callback)}](const boost::system::error_code& error, std::size_t bytesTransferred)
|
[this, callback {std::move(callback)}](const boost::system::error_code& error, std::size_t bytesTransferred)
|
||||||
{
|
{
|
||||||
LMS_LOG(CHILDPROCESS, DEBUG) << "Async read cb - ec = '" << error.message() << "', bytesTransferred = " << bytesTransferred;
|
LMS_LOG(CHILDPROCESS, DEBUG) << "Async read cb - ec = '" << error.message() << "' (" << error.value() << "), bytesTransferred = " << bytesTransferred;
|
||||||
|
|
||||||
ReadResult readResult {ReadResult::Success};
|
ReadResult readResult {ReadResult::Success};
|
||||||
if (error)
|
if (error)
|
||||||
|
|||||||
Reference in New Issue
Block a user