Skip to content

Commit

Permalink
Rename plugin to just_waveform.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanheise committed Nov 7, 2021
1 parent 22ac86e commit 8160367
Show file tree
Hide file tree
Showing 33 changed files with 96 additions and 97 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# waveform_extractor
# just_waveform

This plugin extracts waveform data from an audio file that can be used to render waveform visualisations.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group 'com.ryanheise.waveform_extractor'
group 'com.ryanheise.just_waveform'
version '1.0'

buildscript {
Expand Down
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'waveform_extractor'
rootProject.name = 'just_waveform'
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ryanheise.waveform_extractor">
package="com.ryanheise.just_waveform">
</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ryanheise.waveform_extractor;
package com.ryanheise.just_waveform;

import androidx.annotation.NonNull;

Expand All @@ -11,14 +11,14 @@
import java.util.List;
import io.flutter.plugin.common.PluginRegistry.Registrar;

/** WaveformExtractorPlugin */
public class WaveformExtractorPlugin implements FlutterPlugin, MethodCallHandler {
/** JustWaveformPlugin */
public class JustWaveformPlugin implements FlutterPlugin, MethodCallHandler {
private MethodChannel channel;
private Handler handler = new Handler();

@Override
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
channel = new MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "com.ryanheise.waveform_extractor");
channel = new MethodChannel(flutterPluginBinding.getFlutterEngine().getDartExecutor(), "com.ryanheise.just_waveform");
channel.setMethodCallHandler(this);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ryanheise.waveform_extractor;
package com.ryanheise.just_waveform;

import android.media.MediaCodec;
import android.media.MediaCodec.BufferInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#import "WaveformExtractorPlugin.h"
#import "JustWaveformPlugin.h"

@implementation WaveformExtractorPlugin {
@implementation JustWaveformPlugin {
FlutterMethodChannel *_channel;
}

+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
[[WaveformExtractorPlugin alloc] initWithRegistrar:registrar];
[[JustWaveformPlugin alloc] initWithRegistrar:registrar];
}

- (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar {
self = [super init];
NSAssert(self, @"super init cannot be nil");
_channel = [FlutterMethodChannel
methodChannelWithName:@"com.ryanheise.waveform_extractor"
methodChannelWithName:@"com.ryanheise.just_waveform"
binaryMessenger:[registrar messenger]];
[registrar addMethodCallDelegate:self channel:_channel];
return self;
Expand Down
4 changes: 2 additions & 2 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# waveform_extractor_example
# just_waveform_example

Demonstrates how to use the waveform_extractor plugin.
Demonstrates how to use the just_waveform plugin.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.ryanheise.waveform_extractor_example"
applicationId "com.ryanheise.just_waveform_example"
minSdkVersion 16
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
Expand Down
2 changes: 1 addition & 1 deletion example/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ryanheise.waveform_extractor_example">
package="com.ryanheise.just_waveform_example">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ryanheise.waveform_extractor_example">
package="com.ryanheise.just_waveform_example">
<application
android:label="waveform_extractor_example"
android:label="just_waveform_example"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.ryanheise.waveform_extractor_example;
package com.ryanheise.just_waveform_example;

import io.flutter.embedding.android.FlutterActivity;

Expand Down
12 changes: 6 additions & 6 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
PODS:
- Flutter (1.0.0)
- path_provider (0.0.1):
- just_waveform (0.0.1):
- Flutter
- waveform_extractor (0.0.1):
- path_provider (0.0.1):
- Flutter

DEPENDENCIES:
- Flutter (from `Flutter`)
- just_waveform (from `.symlinks/plugins/just_waveform/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- waveform_extractor (from `.symlinks/plugins/waveform_extractor/ios`)

EXTERNAL SOURCES:
Flutter:
:path: Flutter
just_waveform:
:path: ".symlinks/plugins/just_waveform/ios"
path_provider:
:path: ".symlinks/plugins/path_provider/ios"
waveform_extractor:
:path: ".symlinks/plugins/waveform_extractor/ios"

SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
just_waveform: e03174d1eadf4b096b01715a3e3ccbf940a05d25
path_provider: d1e9807085df1f9cc9318206cd649dc0b76be3de
waveform_extractor: 38345a933bbe98e3ad3a5831f5627659e9900ccc

PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>waveform_extractor_example</string>
<string>just_waveform_example</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand Down
8 changes: 4 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:flutter/services.dart';
import 'package:path/path.dart' as p;
import 'package:path_provider/path_provider.dart';
import 'package:rxdart/rxdart.dart';
import 'package:waveform_extractor/waveform_extractor.dart';
import 'package:just_waveform/just_waveform.dart';

void main() {
runApp(const MyApp());
Expand All @@ -20,7 +20,7 @@ class MyApp extends StatefulWidget {
}

class _MyAppState extends State<MyApp> {
final progressStream = BehaviorSubject<WaveformExtractorProgress>();
final progressStream = BehaviorSubject<WaveformProgress>();

@override
void initState() {
Expand All @@ -36,7 +36,7 @@ class _MyAppState extends State<MyApp> {
(await rootBundle.load('audio/waveform.mp3')).buffer.asUint8List());
final waveFile =
File(p.join((await getTemporaryDirectory()).path, 'waveform.wave'));
WaveformExtractor.extract(audioInFile: audioFile, waveOutFile: waveFile)
JustWaveform.extract(audioInFile: audioFile, waveOutFile: waveFile)
.listen(progressStream.add, onError: progressStream.addError);
} catch (e) {
progressStream.addError(e);
Expand All @@ -61,7 +61,7 @@ class _MyAppState extends State<MyApp> {
),
padding: const EdgeInsets.all(16.0),
width: double.maxFinite,
child: StreamBuilder<WaveformExtractorProgress>(
child: StreamBuilder<WaveformProgress>(
stream: progressStream,
builder: (context, snapshot) {
if (snapshot.hasError) {
Expand Down
12 changes: 6 additions & 6 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
PODS:
- FlutterMacOS (1.0.0)
- path_provider_macos (0.0.1):
- just_waveform (0.0.1):
- FlutterMacOS
- waveform_extractor (0.0.1):
- path_provider_macos (0.0.1):
- FlutterMacOS

DEPENDENCIES:
- FlutterMacOS (from `Flutter/ephemeral`)
- just_waveform (from `Flutter/ephemeral/.symlinks/plugins/just_waveform/macos`)
- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
- waveform_extractor (from `Flutter/ephemeral/.symlinks/plugins/waveform_extractor/macos`)

EXTERNAL SOURCES:
FlutterMacOS:
:path: Flutter/ephemeral
just_waveform:
:path: Flutter/ephemeral/.symlinks/plugins/just_waveform/macos
path_provider_macos:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
waveform_extractor:
:path: Flutter/ephemeral/.symlinks/plugins/waveform_extractor/macos

SPEC CHECKSUMS:
FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
just_waveform: 1ab8cecd081342f77c51392910db0162720f0cba
path_provider_macos: 160cab0d5461f0c0e02995469a98f24bdb9a3f1f
waveform_extractor: 7e5adf3ce0050b28d859b4f10be19c1c4b4f52bc

PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c

Expand Down
6 changes: 3 additions & 3 deletions example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
0EC2C0715430E93A4A2B2D33 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
33CC10ED2044A3C60003C045 /* waveform_extractor_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = waveform_extractor_example.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10ED2044A3C60003C045 /* just_waveform_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = just_waveform_example.app; sourceTree = BUILT_PRODUCTS_DIR; };
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -112,7 +112,7 @@
33CC10EE2044A3C60003C045 /* Products */ = {
isa = PBXGroup;
children = (
33CC10ED2044A3C60003C045 /* waveform_extractor_example.app */,
33CC10ED2044A3C60003C045 /* just_waveform_example.app */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -193,7 +193,7 @@
);
name = Runner;
productName = Runner;
productReference = 33CC10ED2044A3C60003C045 /* waveform_extractor_example.app */;
productReference = 33CC10ED2044A3C60003C045 /* just_waveform_example.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "waveform_extractor_example.app"
BuildableName = "just_waveform_example.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand All @@ -31,7 +31,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "waveform_extractor_example.app"
BuildableName = "just_waveform_example.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand All @@ -54,7 +54,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "waveform_extractor_example.app"
BuildableName = "just_waveform_example.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand All @@ -73,7 +73,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
BuildableName = "waveform_extractor_example.app"
BuildableName = "just_waveform_example.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
Expand Down
2 changes: 1 addition & 1 deletion example/macos/Runner/Configs/AppInfo.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// 'flutter create' template.

// The application's name. By default this is also the title of the Flutter window.
PRODUCT_NAME = waveform_extractor_example
PRODUCT_NAME = just_waveform_example

// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.ryanheise.waveformExtractorExample
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: waveform_extractor_example
description: Demonstrates how to use the waveform_extractor plugin.
name: just_waveform_example
description: Demonstrates how to use the just_waveform plugin.

publish_to: 'none'

Expand All @@ -11,7 +11,7 @@ dependencies:
sdk: flutter
rxdart: ^0.27.0

waveform_extractor:
just_waveform:
path: ../

dev_dependencies:
Expand Down
6 changes: 3 additions & 3 deletions example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:waveform_extractor_example/main.dart';
import 'package:just_waveform_example/main.dart';

void main() {
testWidgets('Verify Platform version', (WidgetTester tester) async {
Expand All @@ -18,8 +18,8 @@ void main() {
// Verify that platform version is retrieved.
expect(
find.byWidgetPredicate(
(Widget widget) => widget is Text &&
widget.data!.startsWith('Running on:'),
(Widget widget) =>
widget is Text && widget.data!.startsWith('Running on:'),
),
findsOneWidget,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
#import <AudioToolbox/AudioServices.h>
#import <AudioToolbox/ExtendedAudioFile.h>

@interface WaveformExtractorPlugin : NSObject<FlutterPlugin>
@interface JustWaveformPlugin : NSObject<FlutterPlugin>
@end
1 change: 1 addition & 0 deletions ios/Classes/JustWaveformPlugin.m
1 change: 0 additions & 1 deletion ios/Classes/WaveformExtractorPlugin.m

This file was deleted.

4 changes: 2 additions & 2 deletions ios/waveform_extractor.podspec → ios/just_waveform.podspec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint waveform_extractor.podspec` to validate before publishing.
# Run `pod lib lint just_waveform.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'waveform_extractor'
s.name = 'just_waveform'
s.version = '0.0.1'
s.summary = 'A new flutter plugin project.'
s.description = <<-DESC
Expand Down
Loading

0 comments on commit 8160367

Please sign in to comment.