New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

movie: Add Qt Movie feature #3922

Merged
merged 4 commits into from Aug 26, 2018

Conversation

Projects
None yet
7 participants
@zhaowenlan1779
Member

zhaowenlan1779 commented Jul 8, 2018

This got rid of the settings abuse, and I have kinda refactored the core/movie module, now it more looks like a separate module instead of a submodule of System. I also added some validation and message boxes.
Screenshot:
image


This change is Reviewable

@@ -715,6 +722,11 @@ void GMainWindow::BootGame(const QString& filename) {
}
void GMainWindow::ShutdownGame() {
bool was_recording = Core::Movie::GetInstance().IsRecordingInput();

This comment has been minimized.

@lioncash

lioncash Jul 8, 2018

Member

const bool

@@ -1182,6 +1200,77 @@ void GMainWindow::OnCreateGraphicsSurfaceViewer() {
graphicsSurfaceViewerWidget->show();
}
void GMainWindow::OnRecordMovie() {
QString path =

This comment has been minimized.

@lioncash

lioncash Jul 8, 2018

Member

const QString path

}
void GMainWindow::OnPlayMovie() {
QString path =

This comment has been minimized.

@lioncash

lioncash Jul 8, 2018

Member

const QString

}
void GMainWindow::OnStopRecordingPlayback() {
bool was_recording = Core::Movie::GetInstance().IsRecordingInput();

This comment has been minimized.

@lioncash

lioncash Jul 8, 2018

Member

const bool

std::function<void()> completion_callback) {
LOG_INFO(Movie, "Loading Movie for playback");
FileUtil::IOFile save_record(movie_file, "rb");
u64 size = save_record.GetSize();

This comment has been minimized.

@lioncash

lioncash Jul 8, 2018

Member

const u64

Movie::ValidationResult Movie::ValidateMovie(const std::string& movie_file) const {
LOG_INFO(Movie, "Validating Movie file '{}'", movie_file);
FileUtil::IOFile save_record(movie_file, "rb");
u64 size = save_record.GetSize();

This comment has been minimized.

@lioncash

lioncash Jul 8, 2018

Member

const u64

@@ -74,14 +84,12 @@ class Movie {
* When playing: Replaces the given input states with the ones stored in the playback file
*/
void HandleExtraHidResponse(Service::IR::ExtraHIDResponse& extra_hid_response);
bool IsPlayingInput();

This comment has been minimized.

@lioncash

lioncash Jul 8, 2018

Member

Preexisting issue, so feel free to ignore it if you want, but these can both be const member functions.

FileUtil::IOFile save_record(movie_file, "rb");
u64 size = save_record.GetSize();
if (save_record.IsGood() && size > sizeof(CTMHeader)) {

This comment has been minimized.

@lioncash

lioncash Jul 8, 2018

Member

This can just be:

if (!save_record || size <= sizeof(CTMHeader)) {
  return ValidationResult::Invalid;
}

CTMHeader header;
save_record.ReadArray(&header, 1);
return ValidateHeader(header);

@zhaowenlan1779 zhaowenlan1779 force-pushed the zhaowenlan1779:qt-movie branch from 5dc260a to bd07df1 Jul 8, 2018

@cluezbot

This comment has been minimized.

cluezbot commented Jul 8, 2018

Hi, this is neobot, using neobrain's account. I'm keeping an archive of versions of this PR:

2018-07-08T10:07:03Z: c1580c4...zhaowenlan1779:bd07df181a0ce9af2b0b93d1fe55f6ae4caf530b

@zhaowenlan1779

This comment has been minimized.

Member

zhaowenlan1779 commented Jul 8, 2018

@lioncash Fixed up all the issues and put them in proper commits.

@zhaowenlan1779 zhaowenlan1779 force-pushed the zhaowenlan1779:qt-movie branch from bd07df1 to 4899685 Jul 8, 2018

@cluezbot

This comment has been minimized.

cluezbot commented Jul 8, 2018

Hi, this is neobot, using neobrain's account. I'm keeping an archive of versions of this PR:

2018-07-08T13:00:30Z: 610acf2...zhaowenlan1779:48996859e63c2e13f3c15b6131d36a60ad135e71

@legoj15

This comment has been minimized.

legoj15 commented Jul 23, 2018

Hey, as someone who'd love a way to record inputs (for a TAS), I'd like to see this merged sometime soon.

@jroweboy

This comment has been minimized.

Member

jroweboy commented Jul 25, 2018

@legoj15 this is just adding an easy way to use it. the actual movie feature is already in citra (and has been for a long time now)

@legoj15

This comment has been minimized.

legoj15 commented Jul 25, 2018

Thanks @jroweboy, didn't know that.

@wwylele

This comment has been minimized.

Member

wwylele commented Aug 3, 2018

Please resolve conflicts

@zhaowenlan1779 zhaowenlan1779 force-pushed the zhaowenlan1779:qt-movie branch from 4899685 to 6588234 Aug 4, 2018

@cluezbot

This comment has been minimized.

cluezbot commented Aug 4, 2018

Hi, this is neobot, using neobrain's account. I'm keeping an archive of versions of this PR:

2018-08-04T02:13:07Z: 5bc72cc...zhaowenlan1779:6588234b92da218d294140012473baf106a68261

@zhaowenlan1779 zhaowenlan1779 force-pushed the zhaowenlan1779:qt-movie branch from 6588234 to 694b2d3 Aug 4, 2018

@cluezbot

This comment has been minimized.

cluezbot commented Aug 4, 2018

Hi, this is neobot, using neobrain's account. I'm keeping an archive of versions of this PR:

2018-08-04T02:18:37Z: 5bc72cc...zhaowenlan1779:694b2d32b6d3b8b5714b59d3bdc7324593053857

@zhaowenlan1779

This comment has been minimized.

Member

zhaowenlan1779 commented Aug 4, 2018

@wwylele Done. I shouldn't have made anything wrong (hopefully)

@cluezbot

This comment has been minimized.

cluezbot commented Aug 8, 2018

Hi, this is neobot, using neobrain's account. I'm keeping an archive of versions of this PR:

2018-08-08T15:42:56Z: 5bc72cc...zhaowenlan1779:ffa27aacc2fecf8ab9699b9a80b658f7d7c6737d

@cluezbot

This comment has been minimized.

cluezbot commented Aug 9, 2018

Hi, this is neobot, using neobrain's account. I'm keeping an archive of versions of this PR:

2018-08-09T00:02:33Z: 84fc8ea...zhaowenlan1779:c07c9e6594f5bff283d63724a614365b5d09459d

@zhaowenlan1779 zhaowenlan1779 force-pushed the zhaowenlan1779:qt-movie branch from ffa27aa to c07c9e6 Aug 9, 2018

@cluezbot

This comment has been minimized.

cluezbot commented Aug 12, 2018

Hi, this is neobot, using neobrain's account. I'm keeping an archive of versions of this PR:

2018-08-12T12:26:34Z: 84fc8ea...zhaowenlan1779:a9691a80a6aaa0dde86384a49e03c7bae177a31f

@B3n30 B3n30 removed the canary-merge label Aug 20, 2018

@B3n30

This comment has been minimized.

Contributor

B3n30 commented Aug 20, 2018

removed from canary due to conflicts with master

@FearlessTobi FearlessTobi force-pushed the zhaowenlan1779:qt-movie branch from a9691a8 to 9d05628 Aug 20, 2018

@B3n30 B3n30 added the canary-merge label Aug 20, 2018

@jroweboy jroweboy merged commit 13262c1 into citra-emu:master Aug 26, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zhaowenlan1779 zhaowenlan1779 deleted the zhaowenlan1779:qt-movie branch Aug 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment