Backup.
This commit is contained in:
parent
918210d695
commit
5fccf8f991
|
@ -76,6 +76,10 @@ std::string MediaTask::GetThumbnailNameForSaving(const std::string &targetName)
|
|||
std::string unknowFile = "unknow";
|
||||
return unknowFile;
|
||||
}
|
||||
int MediaTask::GetVideoDuration_ms(void)
|
||||
{
|
||||
return DEFAULT_VIDEO_DURATION_MS;
|
||||
}
|
||||
void MediaTask::Response(const std::vector<MediaTaskResponse> &response)
|
||||
{
|
||||
LogInfo("Response handle.\n");
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
constexpr unsigned int MEDIA_TASK_TIMEOUT_MS = 1000 * 60;
|
||||
constexpr int DEFAULT_VIDEO_DURATION_MS = 1000 * 10;
|
||||
typedef struct media_task_info
|
||||
{
|
||||
const std::vector<MediaTaskResponse> mResponse;
|
||||
|
@ -42,6 +43,7 @@ public:
|
|||
virtual unsigned int GetTaskTimeOutMs(void);
|
||||
std::string GetTargetNameForSaving(void) override;
|
||||
std::string GetThumbnailNameForSaving(const std::string &targetName) override;
|
||||
int GetVideoDuration_ms(void) override;
|
||||
void Response(const std::vector<MediaTaskResponse> &response) override;
|
||||
|
||||
private:
|
||||
|
|
|
@ -59,6 +59,7 @@ public:
|
|||
virtual const MediaTaskType GetTaskType(void);
|
||||
virtual std::string GetTargetNameForSaving(void);
|
||||
virtual std::string GetThumbnailNameForSaving(const std::string &targetName);
|
||||
virtual int GetVideoDuration_ms(void);
|
||||
virtual void Response(const std::vector<MediaTaskResponse> &response);
|
||||
virtual bool IsTaskFinished(void);
|
||||
virtual const signed int GetIsNight(void);
|
||||
|
|
|
@ -40,6 +40,11 @@ std::string VMediaTask::GetThumbnailNameForSaving(const std::string &targetName)
|
|||
const std::string fileName = "Undefined";
|
||||
return fileName;
|
||||
}
|
||||
int VMediaTask::GetVideoDuration_ms(void)
|
||||
{
|
||||
constexpr int DURATION_MS = 0;
|
||||
return DURATION_MS;
|
||||
}
|
||||
void VMediaTask::Response(const std::vector<MediaTaskResponse> &response)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -39,7 +39,8 @@ StatusCode RecordMp4::Init(void)
|
|||
}
|
||||
std::string videoPath = mRecordTask->GetTargetNameForSaving();
|
||||
std::string thumbnailPath = mRecordTask->GetThumbnailNameForSaving(videoPath);
|
||||
OutputFileInfo fileInfo = {.mDuration_ms = 5000, .mFinished = &mIsRecordingFinished};
|
||||
const unsigned int duration_ms = mRecordTask->GetVideoDuration_ms();
|
||||
OutputFileInfo fileInfo = {.mDuration_ms = duration_ms, .mFinished = &mIsRecordingFinished};
|
||||
if (OUTPUT_FILE_NAME_MAX >= videoPath.size()) {
|
||||
memcpy(fileInfo.mFileName, videoPath.c_str(), videoPath.size());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user