25 #ifndef AAMPCLIHARVESTOR_H
26 #define AAMPCLIHARVESTOR_H
34 #include <mach-o/dyld.h>
39 #define PROC_SELF_EXE "/proc/self/path/a.out"
41 #define PROC_SELF_EXE "/proc/self/exe"
50 int harvestFragmentsCount;
51 int harvesterrorCount;
52 int harvestFailureCount;
60 static bool mHarvestReportFlag;
61 static const int mHarvestCommandLength = 4096;
62 static const int mHarvestSlaveThreadCount = 50;
63 static char exePathName[PATH_MAX];
64 static std::string mHarvestPath;
65 static std::map<std::thread::id, harvestProfileDetails> mHarvestInfo;
66 static std::vector<std::thread::id> mHarvestThreadId;
69 std::thread mMasterHarvestorThreadID;
70 std::thread mSlaveHarvestorThreadID;
71 std::thread mReportThread;
72 std::thread mSlaveIFrameThread;
73 std::thread mSlaveVideoThreads[mHarvestSlaveThreadCount];
74 std::thread mSlaveAudioThreads[mHarvestSlaveThreadCount];
76 static void masterHarvestor(
void * arg);
77 static void slaveHarvestor(
void * arg);
78 static void slaveDataOutput(
void * arg);
79 long getNumberFromString(std::string buffer);
80 void startHarvestReport(
char * arg);
81 bool getHarvestReportDetails(
char *buffer);
84 static void harvestTerminateHandler(
int signal);
85 void getExecutablePath();
91 #endif // AAMPCLIHARVESTOR_H