Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/flutter_webrtc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## NEXT
## 0.2.1

* Remove Ecore api

## 0.2.0

Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_webrtc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ For other Tizen devices :

```yaml
dependencies:
flutter_webrtc: ^1.3.1
flutter_webrtc_tizen: ^0.2.0
flutter_webrtc: ^1.4.1
flutter_webrtc_tizen: ^0.2.1
```

## Functionality
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_webrtc/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: flutter_webrtc_tizen
homepage: https://github.com/flutter-tizen/plugins
description: Flutter WebRTC plugin for Tizen, based on GoogleWebRTC.
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/flutter_webrtc
version: 0.2.0
version: 0.2.1

environment:
sdk: ">=3.3.0 <4.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/flutter_webrtc/tizen/inc/task_runner_tizen.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#ifndef PACKAGES_FLUTTER_WEBRTC_TASK_RUNNER_TIZEN_H_
#define PACKAGES_FLUTTER_WEBRTC_TASK_RUNNER_TIZEN_H_

#include <Ecore.h>
#include <glib.h>
Comment thread
xiaowei-guan marked this conversation as resolved.

#include <mutex>
#include <queue>
Expand All @@ -19,7 +19,7 @@ class TaskRunnerTizen : public TaskRunner {
void EnqueueTask(TaskClosure task) override;

private:
static void RunTask(void* data);
static gboolean RunTask(gpointer data);
Comment thread
xiaowei-guan marked this conversation as resolved.
std::mutex tasks_mutex_;
std::queue<TaskClosure> tasks_;
};
Expand Down
5 changes: 3 additions & 2 deletions packages/flutter_webrtc/tizen/src/task_runner_tizen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ TaskRunnerTizen::~TaskRunnerTizen() = default;
void TaskRunnerTizen::EnqueueTask(TaskClosure task) {
std::lock_guard<std::mutex> lock(tasks_mutex_);
tasks_.push(std::move(task));
ecore_main_loop_thread_safe_call_async(RunTask, this);
g_idle_add_full(G_PRIORITY_DEFAULT, RunTask, this, nullptr);
}
Comment thread
xiaowei-guan marked this conversation as resolved.

void TaskRunnerTizen::RunTask(void* data) {
gboolean TaskRunnerTizen::RunTask(gpointer data) {
TaskRunnerTizen* runner = static_cast<TaskRunnerTizen*>(data);
std::lock_guard<std::mutex> lock(runner->tasks_mutex_);
while (!runner->tasks_.empty()) {
TaskClosure task = std::move(runner->tasks_.front());
runner->tasks_.pop();
task();
}
return G_SOURCE_REMOVE;
}
Comment thread
xiaowei-guan marked this conversation as resolved.
Loading