| 5 | |
| 6 | |
| 7 | void SourceMedium::Runner() |
| 8 | { |
| 9 | srt::ThreadName::set("SourceRN"); |
| 10 | |
| 11 | Verb() << VerbLock << "Starting SourceMedium: " << this; |
| 12 | for (;;) |
| 13 | { |
| 14 | auto input = med->Read(chunksize_); |
| 15 | if (input.payload.empty() && med->End()) |
| 16 | { |
| 17 | Verb() << VerbLock << "Exiting SourceMedium: " << this; |
| 18 | return; |
| 19 | } |
| 20 | LOGP(applog.Debug, "SourceMedium(", typeid(*med).name(), "): [", input.payload.size(), "] MEDIUM -> BUFFER. signal(", &ready, ")"); |
| 21 | |
| 22 | lock_guard<std::mutex> g(buffer_lock); |
| 23 | buffer.push_back(input); |
| 24 | ready.notify_one(); |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | MediaPacket SourceMedium::Extract() |
| 29 | { |
nothing calls this directly
no test coverage detected