Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[video-player] upgraded video_player_interface to use pigeon #2617

Merged
merged 4 commits into from May 7, 2020

Conversation

gaaclarke
Copy link
Member

Description

Upgraded to use pigeon, child commit: #2544

Related Issues

Related: flutter/flutter#32930

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@gaaclarke gaaclarke force-pushed the video-player-interface-pigeon branch from edd1067 to c6740f8 Compare April 28, 2020 21:54
@gaaclarke gaaclarke marked this pull request as ready for review April 30, 2020 18:38
@gaaclarke gaaclarke requested a review from cyanglaz April 30, 2020 18:38
@gaaclarke
Copy link
Member Author

@cyanglaz CI is failing because of a warning on breaking changes. @amirh just said we have to ignore it if we want to submit it. This is a breaking change because it changes the format of the messages, the actual API doesn't change at all.

@gaaclarke
Copy link
Member Author

@cyanglaz Alternatively we could publish this as a whole different package if it makes getting through CI easier. This could be video_player_interface_pigeon.

@xster
Copy link
Member

xster commented May 5, 2020

LGTM

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

int textureId;
// ignore: unused_element
Map<dynamic, dynamic> _toMap() {
final Map<dynamic, dynamic> pigeonMap = <dynamic, dynamic>{};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it is possible for pigeon to know the type of the parameters and generate the map with different params.
It's not necessary tho.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to change it to Map<String, dynamic>, i just haven't gotten around to it. I'm kind of stuck with what the standard codec supports.

'dev.flutter.pigeon.VideoPlayerApi.initialize', StandardMessageCodec());

final Map<dynamic, dynamic> replyMap = await channel.send(null);
if (replyMap == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits:
can just be

if (xx) {
  throw e1;
}
if (yy) {
  throw e2;
}

and remove the noop else

'dev.flutter.pigeon.VideoPlayerApi.create', StandardMessageCodec());

final Map<dynamic, dynamic> replyMap = await channel.send(requestMap);
if (replyMap == null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits:
same here

if
      throw
if 
      throw
return..

@gaaclarke
Copy link
Member Author

Landing red as is the protocol that was described to me by @amirh. Look at ecdeb4f to see this passing most CI except the following:

  1. Tests, those are expected to be broken until video_player is updated (which can't happen until this publishes).
  2. Warning about version prerelease versioning which we've always disregarded.
  3. Warning about avoiding incrementing the major version, which we are doing here on purpose.

@gaaclarke gaaclarke merged commit f5acfe5 into flutter:master May 7, 2020
stuartmorgan pushed a commit to stuartmorgan/plugins that referenced this pull request May 11, 2020
…#2617)

* [video-player] upgraded video_player_interface to use pigeon
EdwinRomelta pushed a commit to EdwinRomelta/plugins that referenced this pull request Jun 11, 2020
…#2617)

* [video-player] upgraded video_player_interface to use pigeon
jorgefspereira pushed a commit to jorgefspereira/plugins_flutter that referenced this pull request Oct 10, 2020
…#2617)

* [video-player] upgraded video_player_interface to use pigeon
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
…#2617)

* [video-player] upgraded video_player_interface to use pigeon
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants