Skip to content

Commit

Permalink
Fix up the restart issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkfish committed Jun 9, 2020
1 parent 7600fe0 commit bec8781
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.2.3

* Fix restarting on android. Can stop and restart now and
it all works.

## 0.2.2

* Fix the streaming to work with android.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,12 @@ class VideoEncoder(val getVideoData: GetVideoData, val width: Int, val height: I
@kotlin.jvm.Throws(IllegalStateException::class)
private fun processOutput(byteBuffer: ByteBuffer, mediaCodec: MediaCodec,
outBufferIndex: Int, bufferInfo: MediaCodec.BufferInfo) {
checkBuffer(byteBuffer, bufferInfo)
sendBuffer(byteBuffer, bufferInfo)
Log.e(TAG, "releaseOutputBuffer " + outBufferIndex)
mediaCodec.releaseOutputBuffer(outBufferIndex, false)
if (running) {
checkBuffer(byteBuffer, bufferInfo)
sendBuffer(byteBuffer, bufferInfo)
Log.e(TAG, "releaseOutputBuffer " + outBufferIndex)
mediaCodec.releaseOutputBuffer(outBufferIndex, false)
}
}


Expand Down
2 changes: 0 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,6 @@ class _CameraExampleHomeState extends State<CameraExampleHome>
_showCameraException(e);
return null;
}

await _startVideoPlayer();
}

Future<void> pauseVideoStreaming() async {
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.2.0"
version: "0.2.2"
charcode:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: camera_with_rtmp
description: Controlling the camera on Android and iOS plus rtmp live streaming support. Based off the Camera plugin.
version: 0.2.2
version: 0.2.3
homepage: https://github.com/pinkfish/flutter_rtmppublisher

environment:
Expand Down

0 comments on commit bec8781

Please sign in to comment.