Rename main_frame_timestamp to cover_frame_timestamp.

This commit is contained in:
levlam 2024-07-27 21:13:49 +03:00
parent 536893f50b
commit f6e97f83a6
2 changed files with 7 additions and 7 deletions

View File

@ -4209,9 +4209,9 @@ inputStoryAreas areas:vector<inputStoryArea> = InputStoryAreas;
//@minithumbnail Video minithumbnail; may be null
//@thumbnail Video thumbnail in JPEG or MPEG4 format; may be null
//@preload_prefix_size Size of file prefix, which is supposed to be preloaded, in bytes
//@main_frame_timestamp Timestamp of the frame, used as video thumbnail
//@cover_frame_timestamp Timestamp of the frame used as video thumbnail
//@video File containing the video
storyVideo duration:double width:int32 height:int32 has_stickers:Bool is_animation:Bool minithumbnail:minithumbnail thumbnail:thumbnail preload_prefix_size:int32 main_frame_timestamp:double video:file = StoryVideo;
storyVideo duration:double width:int32 height:int32 has_stickers:Bool is_animation:Bool minithumbnail:minithumbnail thumbnail:thumbnail preload_prefix_size:int32 cover_frame_timestamp:double video:file = StoryVideo;
//@class StoryContent @description Contains the content of a story
@ -4237,9 +4237,9 @@ inputStoryContentPhoto photo:InputFile added_sticker_file_ids:vector<int32> = In
//@video Video to be sent. The video size must be 720x1280. The video must be streamable and stored in MPEG4 format, after encoding with x265 codec and key frames added each second
//@added_sticker_file_ids File identifiers of the stickers added to the video, if applicable
//@duration Precise duration of the video, in seconds; 0-60
//@main_frame_timestamp Timestamp of the frame, which will be used as video thumbnail
//@cover_frame_timestamp Timestamp of the frame, which will be used as video thumbnail
//@is_animation True, if the video has no sound
inputStoryContentVideo video:InputFile added_sticker_file_ids:vector<int32> duration:double main_frame_timestamp:double is_animation:Bool = InputStoryContent;
inputStoryContentVideo video:InputFile added_sticker_file_ids:vector<int32> duration:double cover_frame_timestamp:double is_animation:Bool = InputStoryContent;
//@class StoryList @description Describes a list of stories

View File

@ -285,8 +285,8 @@ Result<unique_ptr<StoryContent>> get_input_story_content(
if (input_story->duration_ < 0 || input_story->duration_ > 60.0) {
return Status::Error(400, "Invalid video duration specified");
}
if (input_story->main_frame_timestamp_ < 0.0) {
return Status::Error(400, "Wrong main frame timestamp specified");
if (input_story->cover_frame_timestamp_ < 0.0) {
return Status::Error(400, "Wrong cover timestamp specified");
}
file_id =
td->file_manager_->copy_file_id(file_id, FileType::VideoStory, owner_dialog_id, "get_input_story_content");
@ -297,7 +297,7 @@ Result<unique_ptr<StoryContent>> get_input_story_content(
std::move(sticker_file_ids), "story.mp4", "video/mp4",
static_cast<int32>(std::ceil(input_story->duration_)), input_story->duration_,
get_dimensions(720, 1280, nullptr), true, input_story->is_animation_, 0,
input_story->main_frame_timestamp_, false);
input_story->cover_frame_timestamp_, false);
return make_unique<StoryContentVideo>(file_id, FileId());
}