SlideShare a Scribd company logo
1 of 43
Steven
JewelryPi
Why?
Jewelrybox is
Good
But …
 Hardware is too old
Kernel version 2.6.22.19
 Lack of new IO modules
 BT,NFC, SDXC…
 Limited Storage Size
 We don’t fully understand what Alpha Network
did…
 Too many patches…
What If We Can
Use New Hardware
RPI 2
Let’s Porting!
Jewelrybox Main Functions
Account
Import &
Compress photos
Download &
Upload From
OSDP
Notification
Pairing with Agent
SWM
UI Display
Import & Compress Photos
 Importing :TJImportImage
 Compressing : TJExtracteThumbNail
 Native Compile on RPI2
 Basic libraries and Utilities
USB Storage
 /dev/sda->/mnt/sda1: 32G usb memory stick
 Where the photo stored in
 Internal Storage
 Don’t unplug it…
 /dev/sdb->/tmp/sdb
 Where the photos imported from
Detect USB Plug In : Udev Rule
 /etc/udev/rules.d/20-usb.rules.d
 KERNEL=="sdb",
SUBSYSTEM=="block",
ACTION=="add",
RUN="/etc/hotplug.d/block/import.sh“
 Import.sh-> 30-import.sh->TJImportImage-
>TJExtractThumbNamil
Close RPI’s Udisk-Deamon
 udisks is an abstraction for enumerating block
devices and performing operations on them,
such as creating file systems or mounting
 /usr/share/dbus-1/system-services/org.freedesktop.UDisks.service:3:#Exec=/usr/lib/udisks/udisks-
daemon
 /lib/systemd/system/udisks.service:7:#ExecStart=/usr/lib/udisks/udisks-daemon --no-debug
 Conflicting to JewelryPi’s Udev Rule
UI Display
tjshow
/www Browser
Qt application :Tjshow
C++
Javascript
Qtwebkit
Window.external
executeJs
Backend
Frontend
Qt Framework 5.4
 Native Compile
 Easy
 But Building Qt on rpi2 is insanely slow
○ >16hours
 Cross Compile
 Build on PC is fast
○ 1.5 hours
 But setting up the build environment is nightmare
Javascript plays audio/video/image
/www
mediaObj.src = filepath
mediaObj.play()
Qt application :Tjshow
C++
Javascript
Qtwebkit
Window.external
executeJs
Image Goes Fine
Except …
Audio and Video Don’t Work!
Image :canvas
Video/Audio : media
QtMultimedia
/www
mediaObj.src = filepath
mediaObj.play()
Qt application :tjshow
Qtwebkit
QMediaPlayer player;
player.setMedia(QUrl::fromLocalFile("/www/assets/music/2.mp3"));
player.setVolume(50);
player.play();
Warning: "No decoder available for type 'audio/mpeg,
mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3,
rate=(int)44100, channels=(int)2, parsed=(boolean)true'.“
Error: "Your GStreamer installation is missing a plug-in."
Gstreamer
 Open-source media framework
 Create a variety of media-handling components
 audio/video playback, recording streaming and
editing
 sudo apt-get install gstreamer0.10-ffmpeg
 sudo apt-get install gstreamer0.10-plugins-ugly
DEMO
Audio Works
But …
Video is Laggy
Hardware Acceleration
 Qt5.5 support Gstreamer1.0
 Gstreamer1.0 supports omxplayer
 gst-omx
 Need to Compile Qt5.5…
 Another N*1.5hrs
 N: number of fails
 apt-get install libgstreamer1.0-0-dbg
gstreamer1.0-tools libgstreamer-plugins-
base1.0-0  gstreamer1.0-plugins-good
gstreamer1.0-plugins-bad-dbg gstreamer1.0-
omx gstreamer1.0-alsa
Video is Still Laggy
Verify Video
/www
mediaObj.src = filepath
mediaObj.play()
QtMultiMedia
Qtwebkit
Laggy
smoother
sudo apt-get remove gstreamer0.10-ffmpeg
sudo apt-get remove gstreamer0.10-plugins-ugly
GPU
gstreamer1.0-omx
TV_splash_mov_h264_.mp4
DEMO2
QtWebKit MediaPlayer
 QtWebKit and QtMultimedia have separated
implementation of mediaplayer
What’s Worse
 QtWebKit is officially depreciated in qt5.5
 Removed in qt5.6
JewelryPi is Stuck
Because QtWebkit
Time to Let
QtWebkit Go
SAD?
Make JewelryPi AWESOME
Instead
QML
What is Qml ?
 Qt Meta Language
 JavaScript-based, declarative language for
designing user interface–centric app
 Support by QtQuick (the standard library for
writing QML applications)
 Mainly for mobile app and embedded
 Qml element easily to be extended by
javascript and C++ class
 Qml can use various qt modules
piomxtexture
 GitHub:
https://github.com/carlonluca/pi/blob/ma
ster/PiOmxTextures.pro
 Implements file browser by QML
 Hardware Acceleration
 Suitable for Jewelrypi
DEMO3
QML Advantages
 Re-usability of existing source code
 Strong Performance of Graphic Operations
Qml
Qt application :Tjshow
C++
QMetaObject::invokeMethod(): view.engine()->rootContext()-
>setContextProperty(windos.external);
This is Far From Over
Account
Import &
Compress photos
Download &
Upload From
OSDP
NotificationUI DisplaySWM
Browser->qml
Exfat
filesystem
Utilize
multicores to
compress
photo
Conclusion
 Prototype of Jewelrypi
 Hotplug udev-rule
 Qtwebkit Performance Issue
 Qml
 Future Works
You Can Help!
 GitHub:
git@gitlab.tw.trendnet.org:steven_song/j
ewelrypi.git
Thanks!

More Related Content

What's hot

Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessNanik Tolaram
 
Relax-and-Recover Automated Testing
Relax-and-Recover Automated TestingRelax-and-Recover Automated Testing
Relax-and-Recover Automated TestingGratien D'haese
 
the NML project
the NML projectthe NML project
the NML projectLei Yang
 
IT Automation with Puppet Enterprise
IT Automation with Puppet EnterpriseIT Automation with Puppet Enterprise
IT Automation with Puppet EnterpriseAnuchit Chalothorn
 
Java Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky ProblemJava Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky ProblemWill Iverson
 
openQRM how-to: Setup UEC and openQRM cloud
openQRM how-to: Setup UEC and openQRM cloudopenQRM how-to: Setup UEC and openQRM cloud
openQRM how-to: Setup UEC and openQRM cloudopenQRM Enterprise GmbH
 
Automated everything - Setting up an openQRM Cloud
Automated everything - Setting up an openQRM CloudAutomated everything - Setting up an openQRM Cloud
Automated everything - Setting up an openQRM CloudopenQRM Enterprise GmbH
 
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virshCreación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virshJonathan Franchesco Torres Baca
 
OWASP Bangalore : OWTF demo : 13 Dec 2014
OWASP Bangalore : OWTF demo : 13 Dec 2014OWASP Bangalore : OWTF demo : 13 Dec 2014
OWASP Bangalore : OWTF demo : 13 Dec 2014Anant Shrivastava
 
chainer-trt: ChainerとTensorRTで超高速推論
chainer-trt: ChainerとTensorRTで超高速推論chainer-trt: ChainerとTensorRTで超高速推論
chainer-trt: ChainerとTensorRTで超高速推論belltailjp
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
x86_64 Hardware Deep dive
x86_64 Hardware Deep divex86_64 Hardware Deep dive
x86_64 Hardware Deep diveNaoto MATSUMOTO
 
Deploying Prometheus stacks with Juju
Deploying Prometheus stacks with JujuDeploying Prometheus stacks with Juju
Deploying Prometheus stacks with JujuJ.J. Ciarlante
 
Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)Sebastien Chabrolles
 
Internet Archive Video Presentation
Internet Archive Video Presentation Internet Archive Video Presentation
Internet Archive Video Presentation tracey jaquith
 
Patching: answers to questions you probably were afraid to ask about oracle s...
Patching: answers to questions you probably were afraid to ask about oracle s...Patching: answers to questions you probably were afraid to ask about oracle s...
Patching: answers to questions you probably were afraid to ask about oracle s...DATA SECURITY SOLUTIONS
 
Introduction of omap4 booting sequence
Introduction of omap4 booting sequence Introduction of omap4 booting sequence
Introduction of omap4 booting sequence Johnson Chou
 

What's hot (20)

Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
Relax-and-Recover Automated Testing
Relax-and-Recover Automated TestingRelax-and-Recover Automated Testing
Relax-and-Recover Automated Testing
 
the NML project
the NML projectthe NML project
the NML project
 
IT Automation with Puppet Enterprise
IT Automation with Puppet EnterpriseIT Automation with Puppet Enterprise
IT Automation with Puppet Enterprise
 
Java Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky ProblemJava Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky Problem
 
How To Build Android for ARM Chip boards
How To Build Android for ARM Chip boardsHow To Build Android for ARM Chip boards
How To Build Android for ARM Chip boards
 
openQRM how-to: Setup UEC and openQRM cloud
openQRM how-to: Setup UEC and openQRM cloudopenQRM how-to: Setup UEC and openQRM cloud
openQRM how-to: Setup UEC and openQRM cloud
 
Automated everything - Setting up an openQRM Cloud
Automated everything - Setting up an openQRM CloudAutomated everything - Setting up an openQRM Cloud
Automated everything - Setting up an openQRM Cloud
 
OpenSolaris 2009.06 Workshop
OpenSolaris 2009.06 WorkshopOpenSolaris 2009.06 Workshop
OpenSolaris 2009.06 Workshop
 
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virshCreación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virsh
 
OWASP Bangalore : OWTF demo : 13 Dec 2014
OWASP Bangalore : OWTF demo : 13 Dec 2014OWASP Bangalore : OWTF demo : 13 Dec 2014
OWASP Bangalore : OWTF demo : 13 Dec 2014
 
chainer-trt: ChainerとTensorRTで超高速推論
chainer-trt: ChainerとTensorRTで超高速推論chainer-trt: ChainerとTensorRTで超高速推論
chainer-trt: ChainerとTensorRTで超高速推論
 
QEMU in Cross building
QEMU in Cross buildingQEMU in Cross building
QEMU in Cross building
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
x86_64 Hardware Deep dive
x86_64 Hardware Deep divex86_64 Hardware Deep dive
x86_64 Hardware Deep dive
 
Deploying Prometheus stacks with Juju
Deploying Prometheus stacks with JujuDeploying Prometheus stacks with Juju
Deploying Prometheus stacks with Juju
 
Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)
 
Internet Archive Video Presentation
Internet Archive Video Presentation Internet Archive Video Presentation
Internet Archive Video Presentation
 
Patching: answers to questions you probably were afraid to ask about oracle s...
Patching: answers to questions you probably were afraid to ask about oracle s...Patching: answers to questions you probably were afraid to ask about oracle s...
Patching: answers to questions you probably were afraid to ask about oracle s...
 
Introduction of omap4 booting sequence
Introduction of omap4 booting sequence Introduction of omap4 booting sequence
Introduction of omap4 booting sequence
 

Viewers also liked

Introduction to OpenCV with python (at taichung.py)
Introduction to OpenCV with python (at taichung.py)Introduction to OpenCV with python (at taichung.py)
Introduction to OpenCV with python (at taichung.py)Max Lai
 
Python, Raspberry Pi (RPi), face detection @ Pycon Taiwan 2013
Python, Raspberry Pi (RPi), face detection @ Pycon Taiwan 2013Python, Raspberry Pi (RPi), face detection @ Pycon Taiwan 2013
Python, Raspberry Pi (RPi), face detection @ Pycon Taiwan 2013Will Wang
 
Face Recognition based Lecture Attendance System
Face Recognition based Lecture Attendance SystemFace Recognition based Lecture Attendance System
Face Recognition based Lecture Attendance SystemKarmesh Maheshwari
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection SystemAbhiroop Ghatak
 
Sales Specialist Slideshow PDF
Sales Specialist Slideshow PDFSales Specialist Slideshow PDF
Sales Specialist Slideshow PDFAlexis Fulton
 
You will get DBA Jobs If You Learn What is Storage System, Hurry Up!
You will get DBA Jobs If You Learn What is Storage System, Hurry Up!You will get DBA Jobs If You Learn What is Storage System, Hurry Up!
You will get DBA Jobs If You Learn What is Storage System, Hurry Up!raima sen
 
3Com 6900195701
3Com 69001957013Com 6900195701
3Com 6900195701savomir
 
The Neurometabolic Cascade of a Concussion
The Neurometabolic Cascade of a ConcussionThe Neurometabolic Cascade of a Concussion
The Neurometabolic Cascade of a ConcussionAmanda McClure
 
The Union flag history
The Union flag historyThe Union flag history
The Union flag historyEfthymios
 

Viewers also liked (11)

Introduction to OpenCV with python (at taichung.py)
Introduction to OpenCV with python (at taichung.py)Introduction to OpenCV with python (at taichung.py)
Introduction to OpenCV with python (at taichung.py)
 
Python, Raspberry Pi (RPi), face detection @ Pycon Taiwan 2013
Python, Raspberry Pi (RPi), face detection @ Pycon Taiwan 2013Python, Raspberry Pi (RPi), face detection @ Pycon Taiwan 2013
Python, Raspberry Pi (RPi), face detection @ Pycon Taiwan 2013
 
Face Recognition based Lecture Attendance System
Face Recognition based Lecture Attendance SystemFace Recognition based Lecture Attendance System
Face Recognition based Lecture Attendance System
 
Automated Face Detection System
Automated Face Detection SystemAutomated Face Detection System
Automated Face Detection System
 
OpenCV Introduction
OpenCV IntroductionOpenCV Introduction
OpenCV Introduction
 
CV_Sushil Kumar Joshi
CV_Sushil Kumar JoshiCV_Sushil Kumar Joshi
CV_Sushil Kumar Joshi
 
Sales Specialist Slideshow PDF
Sales Specialist Slideshow PDFSales Specialist Slideshow PDF
Sales Specialist Slideshow PDF
 
You will get DBA Jobs If You Learn What is Storage System, Hurry Up!
You will get DBA Jobs If You Learn What is Storage System, Hurry Up!You will get DBA Jobs If You Learn What is Storage System, Hurry Up!
You will get DBA Jobs If You Learn What is Storage System, Hurry Up!
 
3Com 6900195701
3Com 69001957013Com 6900195701
3Com 6900195701
 
The Neurometabolic Cascade of a Concussion
The Neurometabolic Cascade of a ConcussionThe Neurometabolic Cascade of a Concussion
The Neurometabolic Cascade of a Concussion
 
The Union flag history
The Union flag historyThe Union flag history
The Union flag history
 

Similar to JewelryPi

Similar to JewelryPi (20)

Starting Raspberry Pi
Starting Raspberry PiStarting Raspberry Pi
Starting Raspberry Pi
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
OPTEE on QEMU - Build Tutorial
OPTEE on QEMU - Build TutorialOPTEE on QEMU - Build Tutorial
OPTEE on QEMU - Build Tutorial
 
How to Hack Edison
How to Hack EdisonHow to Hack Edison
How to Hack Edison
 
Flowframes
FlowframesFlowframes
Flowframes
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
 
Readme
ReadmeReadme
Readme
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
 
Beagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009bBeagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009b
 
Raspberry pi
Raspberry pi Raspberry pi
Raspberry pi
 
Raspberry pi on java 20121110
Raspberry pi on java 20121110Raspberry pi on java 20121110
Raspberry pi on java 20121110
 
snortinstallguide
snortinstallguidesnortinstallguide
snortinstallguide
 
Zedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on ZedboardZedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on Zedboard
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial
 
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.jsRaspberry Pi 2 + Windows 10 IoT Core + Node.js
Raspberry Pi 2 + Windows 10 IoT Core + Node.js
 
Sw update elce2017
Sw update elce2017Sw update elce2017
Sw update elce2017
 
Bringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near YouBringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near You
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 

JewelryPi