transcoding: use actual callback in SimulatedTranscoder
bug: 154734285
test: unit testing
Change-Id: I39f17e95e9cc9ea73a60828b00a3c79ccf11dbf2
diff --git a/services/mediatranscoding/SimulatedTranscoder.h b/services/mediatranscoding/SimulatedTranscoder.h
index 9054b4c..0eb74c8 100644
--- a/services/mediatranscoding/SimulatedTranscoder.h
+++ b/services/mediatranscoding/SimulatedTranscoder.h
@@ -42,6 +42,7 @@
enum Type { NoEvent, Start, Pause, Resume, Stop, Finished, Failed } type;
ClientIdType clientId;
JobIdType jobId;
+ std::function<void()> runnable;
};
static constexpr int64_t kJobDurationUs = 1000000;
@@ -67,7 +68,8 @@
int64_t mJobProcessingTimeMs = kJobDurationUs / 1000;
static const char* toString(Event::Type type);
- void queueEvent(Event::Type type, ClientIdType clientId, JobIdType jobId);
+ void queueEvent(Event::Type type, ClientIdType clientId, JobIdType jobId,
+ std::function<void()> runnable);
void threadLoop();
};