mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-07 09:54:55 +00:00
Renames for clarity.
This commit is contained in:
parent
2e415a17b2
commit
7a68bb1d44
@ -275,14 +275,14 @@ IDataStream* Transcoder::TranscodeAndWait(
|
||||
else {
|
||||
IBlockingEncoder* blockingEncoder = dynamic_cast<IBlockingEncoder*>(encoder);
|
||||
if (blockingEncoder) {
|
||||
bool waitForExisting = false;
|
||||
bool alreadyTranscoding = false;
|
||||
{
|
||||
/* see if there's already a blocking transcoder running for the specified
|
||||
uri. if there is, wait for it to complete. if there's not, add it to the
|
||||
running set */
|
||||
std::unique_lock<std::mutex> lock(transcoderMutex);
|
||||
waitForExisting = runningBlockingTranscoders.find(uri) != runningBlockingTranscoders.end();
|
||||
if (waitForExisting) {
|
||||
alreadyTranscoding = runningBlockingTranscoders.find(uri) != runningBlockingTranscoders.end();
|
||||
if (alreadyTranscoding) {
|
||||
while (runningBlockingTranscoders.find(uri) != runningBlockingTranscoders.end()) {
|
||||
waitForTranscode.wait(lock);
|
||||
}
|
||||
@ -292,7 +292,7 @@ IDataStream* Transcoder::TranscodeAndWait(
|
||||
}
|
||||
}
|
||||
|
||||
if (!waitForExisting) {
|
||||
if (!alreadyTranscoding) {
|
||||
BlockingTranscoder blockingTranscoder(
|
||||
context, blockingEncoder, uri, tempFilename, expectedFilename, bitrate);
|
||||
|
||||
|
@ -64,6 +64,7 @@ class Transcoder {
|
||||
size_t bitrate,
|
||||
const std::string& format);
|
||||
|
||||
private:
|
||||
static IDataStream* TranscodeOnDemand(
|
||||
Context& context,
|
||||
IStreamingEncoder* encoder,
|
||||
@ -71,7 +72,6 @@ class Transcoder {
|
||||
size_t bitrate,
|
||||
const std::string& format);
|
||||
|
||||
private:
|
||||
Transcoder() { }
|
||||
~Transcoder() { }
|
||||
};
|
Loading…
Reference in New Issue
Block a user