Skip to content

Commit af9792e

Browse files
authored
[ogg_opus_player] support windows and linux (#83)
* refactor app to ffi plugin. * support windows * fix play on Windows. * support current time * fix play * fix linux link * fix windows build warning * add dart api * support ended callback * revert macos/ios * remove log. * fix windows. * update changelog. * update changelog.
1 parent cd545e8 commit af9792e

File tree

174 files changed

+53483
-429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+53483
-429
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This repo contains the source code for Flutter plugins which used in [Mixin Mess
88
|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|-----------------------|
99
| [desktop_drop](./packages/desktop_drop) | [![pub package](https://img.shields.io/pub/v/desktop_drop.svg)](https://pub.dev/packages/desktop_drop) | [![likes](https://badges.bar/desktop_drop/likes)](https://pub.dev/packages/desktop_drop/score) | Windows, Linux, macOS |
1010
| [desktop_lifecycle](./packages/desktop_lifecycle) | [![pub package](https://img.shields.io/pub/v/desktop_lifecycle.svg)](https://pub.dev/packages/desktop_lifecycle) | [![likes](https://badges.bar/desktop_lifecycle/likes)](https://pub.dev/packages/desktop_lifecycle/score) | Windows, Linux, macOS |
11-
| [ogg_opus_player](./packages/ogg_opus_player) | [![pub package](https://img.shields.io/pub/v/ogg_opus_player.svg)](https://pub.dev/packages/ogg_opus_player) | [![likes](https://badges.bar/ogg_opus_player/likes)](https://pub.dev/packages/ogg_opus_player/score) | macOS, iOS |
11+
| [ogg_opus_player](./packages/ogg_opus_player) | [![pub package](https://img.shields.io/pub/v/ogg_opus_player.svg)](https://pub.dev/packages/ogg_opus_player) | [![likes](https://badges.bar/ogg_opus_player/likes)](https://pub.dev/packages/ogg_opus_player/score) | Windows, Linux, macOS, iOS |
1212
| [pasteboard](./packages/pasteboard) | [![Pub](https://img.shields.io/pub/v/pasteboard.svg)](https://pub.dev/packages/pasteboard) | [![likes](https://badges.bar/pasteboard/likes)](https://pub.dev/packages/pasteboard/score) | Windows, Linux, macOS |
1313
| [win_toast](./packages/win_toast) | [![pub package](https://img.shields.io/pub/v/win_toast.svg)](https://pub.dev/packages/win_toast) | [![likes](https://badges.bar/win_toast/likes)](https://pub.dev/packages/win_toast/score) | Windows |
1414
| [desktop_webview_window](./packages/desktop_webview_window) | [![pub package](https://img.shields.io/pub/v/desktop_webview_window.svg)](https://pub.dev/packages/desktop_webview_window) | [![likes](https://badges.bar/desktop_webview_window/likes)](https://pub.dev/packages/desktop_webview_window/score) | Windows, Linux, macOS |

packages/ogg_opus_player/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
migrate_working_dir/
1112

1213
# IntelliJ related
1314
*.iml
@@ -28,4 +29,4 @@
2829
.packages
2930
build/
3031

31-
.fvm
32+
src/cmake-build-*/

packages/ogg_opus_player/.metadata

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled and should not be manually edited.
4+
# This file should be version controlled.
55

66
version:
7-
revision: 9aa829460dceb9976b5b838df7237628257c4f55
7+
revision: 2015143fbf80a1fefd3a222f1d6a264b4d68003d
88
channel: master
99

10-
project_type: plugin
10+
project_type: plugin_ffi
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 2015143fbf80a1fefd3a222f1d6a264b4d68003d
17+
base_revision: 2015143fbf80a1fefd3a222f1d6a264b4d68003d
18+
- platform: linux
19+
create_revision: 2015143fbf80a1fefd3a222f1d6a264b4d68003d
20+
base_revision: 2015143fbf80a1fefd3a222f1d6a264b4d68003d
21+
22+
# User provided section
23+
24+
# List of Local paths (relative to this file) that should be
25+
# ignored by the migrate tool.
26+
#
27+
# Files that are not part of the templates will be ignored by default.
28+
unmanaged_files:
29+
- 'lib/main.dart'
30+
- 'ios/Runner.xcodeproj/project.pbxproj'

packages/ogg_opus_player/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.0
2+
3+
support windows and linux.
4+
15
## 0.2.0
26

37
suppport macos arm64

packages/ogg_opus_player/LICENSE

Lines changed: 1 addition & 196 deletions
Original file line numberDiff line numberDiff line change
@@ -1,196 +1 @@
1-
----
2-
3-
ogg_opus_player
4-
5-
----
6-
7-
8-
MIT License
9-
10-
Copyright (c) 2021 Mixin Network
11-
12-
Permission is hereby granted, free of charge, to any person obtaining a copy
13-
of this software and associated documentation files (the "Software"), to deal
14-
in the Software without restriction, including without limitation the rights
15-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16-
copies of the Software, and to permit persons to whom the Software is
17-
furnished to do so, subject to the following conditions:
18-
19-
The above copyright notice and this permission notice shall be included in all
20-
copies or substantial portions of the Software.
21-
22-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28-
SOFTWARE.
29-
30-
31-
------
32-
33-
libipusenc
34-
35-
------
36-
37-
Copyright (c) 1994-2013 Xiph.Org Foundation and contributors
38-
Copyright (c) 2017 Jean-Marc Valin
39-
40-
Redistribution and use in source and binary forms, with or without
41-
modification, are permitted provided that the following conditions
42-
are met:
43-
44-
- Redistributions of source code must retain the above copyright
45-
notice, this list of conditions and the following disclaimer.
46-
47-
- Redistributions in binary form must reproduce the above copyright
48-
notice, this list of conditions and the following disclaimer in the
49-
documentation and/or other materials provided with the distribution.
50-
51-
- Neither the name of the Xiph.Org Foundation nor the names of its
52-
contributors may be used to endorse or promote products derived from
53-
this software without specific prior written permission.
54-
55-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
56-
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
57-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
58-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
59-
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
60-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
61-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
62-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
63-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
64-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
65-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
66-
67-
68-
-----
69-
70-
libopus
71-
72-
-----
73-
74-
75-
Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic,
76-
Jean-Marc Valin, Timothy B. Terriberry,
77-
CSIRO, Gregory Maxwell, Mark Borgerding,
78-
Erik de Castro Lopo
79-
80-
Redistribution and use in source and binary forms, with or without
81-
modification, are permitted provided that the following conditions
82-
are met:
83-
84-
- Redistributions of source code must retain the above copyright
85-
notice, this list of conditions and the following disclaimer.
86-
87-
- Redistributions in binary form must reproduce the above copyright
88-
notice, this list of conditions and the following disclaimer in the
89-
documentation and/or other materials provided with the distribution.
90-
91-
- Neither the name of Internet Society, IETF or IETF Trust, nor the
92-
names of specific contributors, may be used to endorse or promote
93-
products derived from this software without specific prior written
94-
permission.
95-
96-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
97-
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
98-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
99-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
100-
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
101-
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
102-
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
103-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
104-
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
105-
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
106-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
107-
108-
Opus is subject to the royalty-free patent licenses which are
109-
specified at:
110-
111-
Xiph.Org Foundation:
112-
https://datatracker.ietf.org/ipr/1524/
113-
114-
Microsoft Corporation:
115-
https://datatracker.ietf.org/ipr/1914/
116-
117-
Broadcom Corporation:
118-
https://datatracker.ietf.org/ipr/1526/
119-
120-
121-
-----
122-
123-
libopusfile
124-
125-
-----
126-
127-
128-
Copyright (c) 1994-2013 Xiph.Org Foundation and contributors
129-
130-
Redistribution and use in source and binary forms, with or without
131-
modification, are permitted provided that the following conditions
132-
are met:
133-
134-
- Redistributions of source code must retain the above copyright
135-
notice, this list of conditions and the following disclaimer.
136-
137-
- Redistributions in binary form must reproduce the above copyright
138-
notice, this list of conditions and the following disclaimer in the
139-
documentation and/or other materials provided with the distribution.
140-
141-
- Neither the name of the Xiph.Org Foundation nor the names of its
142-
contributors may be used to endorse or promote products derived from
143-
this software without specific prior written permission.
144-
145-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
146-
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
147-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
148-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
149-
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
150-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
151-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
152-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
153-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
154-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
155-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
156-
157-
158-
----
159-
160-
libogg
161-
162-
----
163-
164-
165-
Copyright (c) 2002, Xiph.org Foundation
166-
167-
Redistribution and use in source and binary forms, with or without
168-
modification, are permitted provided that the following conditions
169-
are met:
170-
171-
- Redistributions of source code must retain the above copyright
172-
notice, this list of conditions and the following disclaimer.
173-
174-
- Redistributions in binary form must reproduce the above copyright
175-
notice, this list of conditions and the following disclaimer in the
176-
documentation and/or other materials provided with the distribution.
177-
178-
- Neither the name of the Xiph.org Foundation nor the names of its
179-
contributors may be used to endorse or promote products derived from
180-
this software without specific prior written permission.
181-
182-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
183-
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
184-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
185-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION
186-
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
187-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
188-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
189-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
190-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
191-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
192-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
193-
194-
195-
196-
1+
TODO: Add your license here.

packages/ogg_opus_player/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
a ogg opus file player for flutter.
66

7-
| platform | | required os version |
8-
| -------- | ------- | ---- |
9-
| iOS || 10.0 |
10-
| macOS || 10.12 |
7+
| platform | | required os version |
8+
|-----------|-------|---------------------|
9+
| iOS || 10.0 |
10+
| macOS || 10.12 |
11+
| Windows || |
12+
| Linux || |
1113

1214
## Getting Started
1315

@@ -30,6 +32,13 @@ player.dipose();
3032
3133
```
3234

35+
## Linux required
36+
37+
Need SDL2 library installed on Linux.
38+
39+
```shell
40+
sudo apt-get install libSDL2-2.0
41+
```
3342

3443
## LICENSE
3544

packages/ogg_opus_player/example/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
migrate_working_dir/
1112

1213
# IntelliJ related
1314
*.iml

packages/ogg_opus_player/example/.metadata

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/ogg_opus_player/example/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ This project is a starting point for a Flutter application.
88

99
A few resources to get you started if this is your first Flutter project:
1010

11-
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
11+
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
1313

14-
For help getting started with Flutter, view our
15-
[online documentation](https://flutter.dev/docs), which offers tutorials,
14+
For help getting started with Flutter development, view the
15+
[online documentation](https://docs.flutter.dev/), which offers tutorials,
1616
samples, guidance on mobile development, and a full API reference.

packages/ogg_opus_player/example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MyApp extends StatefulWidget {
1515
const MyApp({Key? key}) : super(key: key);
1616

1717
@override
18-
State<MyApp> createState() => _MyAppState();
18+
_MyAppState createState() => _MyAppState();
1919
}
2020

2121
class _MyAppState extends State<MyApp> {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flutter/ephemeral

0 commit comments

Comments
 (0)