[UI] First working mobile version
This commit is contained in:
@@ -70,7 +70,8 @@ AvConvTranscoder::AvConvTranscoder(const Parameters& parameters)
|
||||
_source(_outputPipe.source, boost::iostreams::close_handle),
|
||||
_is(_source),
|
||||
_in(&_is),
|
||||
_isComplete(false)
|
||||
_isComplete(false),
|
||||
_outputBytes(0)
|
||||
{
|
||||
|
||||
if (!boost::filesystem::exists(_parameters.getInputMediaFile().getPath())) {
|
||||
@@ -179,6 +180,7 @@ AvConvTranscoder::process(std::vector<unsigned char>& output, std::size_t maxSiz
|
||||
while(readDataSize < maxSize && _in && _in.get(ch)) {
|
||||
output.push_back(ch);
|
||||
readDataSize++;
|
||||
_outputBytes++; // stats
|
||||
}
|
||||
|
||||
if (!_in || _in.fail() || _in.eof()) {
|
||||
|
||||
@@ -50,6 +50,7 @@ class AvConvTranscoder
|
||||
void process(std::vector<unsigned char>& output, std::size_t maxSize);
|
||||
|
||||
bool isComplete(void) const { return _isComplete;};
|
||||
std::size_t getOutputBytes(void) const { return _outputBytes; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -72,6 +73,7 @@ class AvConvTranscoder
|
||||
static boost::filesystem::path _avConvPath;
|
||||
|
||||
bool _isComplete;
|
||||
std::size_t _outputBytes; // Bytes produced so far
|
||||
};
|
||||
|
||||
} // naspace Transcode
|
||||
|
||||
@@ -72,7 +72,7 @@ Parameters::getOutputBitrate(Stream::Type type) const
|
||||
{
|
||||
std::map<Stream::Type, std::size_t>::const_iterator it = _outputBitrate.find(type);
|
||||
|
||||
if (it != _inputStreams.end())
|
||||
if (it != _outputBitrate.end())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user