SlideShare una empresa de Scribd logo
1 de 36
Descargar para leer sin conexión
How to adapt XBMC for IoT application
Deaware System Co., LTD
หมายเหตุ : เป็นสไลด์ประกอบการบรรยาย

ในงาน cmm maker party 2015 ภายในเวลา 30 นาที
What XBMC/KODI ?
What is XBMC ?
XBMC ก็แค่โปรแกรมเอาไว้ดูหนังเล่นวีดีโอ ?
What is XBMC ?
XBMC ก็แค่โปรแกรมเอาไว้ดูหนังเล่นวีดีโอ ?
What XBMC/KODI ?
Originally developed for XBOX



XBMC = Xbox Media Center



Currently for All platform
What XBMC/KODI ?
Formally name XBMC but currently called “KODI”
What XBMC/KODI ?
Free OpenSource media player 

Available in multiple platform 

Overview
XBMC/Kodi ซัพพอร์ตรูปแบบของไฟล์เสียง วีดีโอ ได้หลากหลาย



นอกจากนั้นยังสามารถเพิ่มความสามารถโดยการเขียน plugin จาก

Third party ได้หลากหลาย



สำหรับ Plugin โดยหลักการเรียก API ของ XBMC
จะใช้ภาษา Python
Overview
XBMC/Kodi เขียนด้วยภาษา C++ บน OpenGL เป็นหลัก

ทำให้ประสิทธิภาพในการแสดงผลทำได้ดี โดยเฉพาะการแสดง

ผล User interface



โดยเฉพาะบน platform เช่น Embedded System ที่สามารถ

รีดเร้นประสิทธิภาพออกมาได้สูง
Hardware requirement for XBMC/Kodi
เนื่องจาก XBMC/Kodi จำเป็นต้องการใช้ประสิทธิภาพทางด้าน 

3D/Video ของระบบฮาร์ดแวร์ที่จะสามารถติดตั้งได้จำเป็นจะต้อง

มีฮาร์ดแวร์กราฟิกที่รองรับ OpenGL
XBMC/Kodi ในมุมมองนักพัฒนา
จุดเด่นที่เราสามารถจับตาได้
XBMC/Kodi ในมุมมองนักพัฒนา
จุดเด่นที่เราสามารถจับตาได้
เนื่องจากเป็น XBMC เป็น platform ที่สามารถทำ 

cross-platform ได้และ core code เขียนด้วยภาษา 

C++ ( ANSI Standard ) ทำให้มีการนำไปปรับแต่ง

พร้อมระบบปฏิบัติ เพื่อใช้งานเฉพาะด้านที่ต้องการ

ความสามารถในการแสดงผลของ UI เช่น



smart tv box, digital signage, ตู้จำหน่ายสินค้าอัตโนมัติ
XBMC/Kodi ในมุมมองนักพัฒนา
XBMC/Kodi ในมุมมองนักพัฒนา
ไม่ใช่แค่ Graphic API, Video API 

แต่หมายถึง Networking, Database application

ที่สามารถใช้ประโยชน์จาก XBMC ได้
XBMC/Kodi ในมุมมองนักพัฒนา
ยกตัวอย่างเช่น Raspberry PI
XBMC/Kodi ในมุมมองนักพัฒนา
XBMC ก็แค่โปรแกรมเอาไว้ดูหนังเล่นวีดีโอ ?
XBMC/Kodi ในมุมมองนักพัฒนา
XBMC ก็แค่โปรแกรมเอาไว้ดูหนังเล่นวีดีโอ ?
ตัวอย่างโอกาสทางธุรกิจของโปรแกรมที่เกิดขึ้นจริง
XBMC/Kodi ในมุมมองนักพัฒนา
Digital signage made on raspberry pi with XBMC
XBMC/Kodi ในมุมมองนักพัฒนา
XBMC/Kodi ในมุมมองนักพัฒนา
Web management
Broadcast content
Broadcast content
XBMC/Kodi ในมุมมองนักพัฒนา
Web management
Broadcast content
Broadcast content
สื่อประชาสัมพันธ์เป็นตลาด

ที่ใหญ่มาก
XBMC/Kodi ในมุมมองนักพัฒนา
- ประสิทธิภาพดี 



- ต้นทุนฮาร์ดแวร์ถูก



- ขายได้ราคา



- ไม่มีใครสนใจระบบด้านหลัง

ว่าใช้คอมหรือ Embedded 

สำคัญที่สุดคือราคาและคุณภาพ
XBMC and IoT Application Example ( FreeScale SoC )
XBMC and IoT Application Example ( Home media Gateway )
- Check Out IoT 



- Integration with Zigbee and 

Low level hardware interface



- Security Camera, Smart Bulb, 

Smart phone, Smart Plugin Including
Home media gateway architecture
XBMC IoT Gateway
Home media gateway Demo
Home media gateway Demo
IP Camera monitoring
XBMC Plugin for developer ( Python )
ข้อเสียของ XBMC ด้านการพัฒนาคือ

เอกสารตัวอย่างในการพัฒนาน้อยมาก

อาจจะต้องศึกษาจาก plugin ตัวอย่างแทนและใช้วิธี

การอ่าน API ของ Python
XBMC Plugin for developer ( Python )
XBMC มีความสามารถในการให้นักพัฒนาเขียน Plugin 

ผ่านภาษา Python ได้โดยเป็นการเรียก API ของ XBMC
XBMC Plugin for developer ( Python )
Python binding Class in XBMC core
Hello world plugin example
Add your metadata
Writing the code ( HelloWorld )
Will popup Helloworld
XBMC have ability to create GUI
import xbmc, xbmcgui
 
ACTION_PREVIOUS_MENU = 10
ACTION_SELECT_ITEM = 7
 
class MyClass(xbmcgui.Window):
def onAction(self, action):
if action == ACTION_PREVIOUS_MENU:
self.close()
if action == ACTION_SELECT_ITEM:
self.strAction = xbmcgui.ControlLabel(300, 200, 200, 200, '', 'font14', '0xFF00FF00')
self.addControl(self.strAction)
self.strAction.setLabel('Hello world')
 
mydisplay = MyClass()
mydisplay .doModal()
del mydisplay
Hacking XBMC from C++
Interesting Library
- Rendering GUI with OpenGL
- Overlay on small embedded system
- Video player OMXPlayer and other platform support
Happy Coding !!!
เดียแวร์ ซิสเต็ม

connect@deaware.com

www.deaware.com
facebook.com/deaware

Más contenido relacionado

Similar a XBMC in IoT Application ( TH language )

Similar a XBMC in IoT Application ( TH language ) (13)

e-Publishing
e-Publishinge-Publishing
e-Publishing
 
Red5 streaming
Red5 streamingRed5 streaming
Red5 streaming
 
Python Programming for Lecturer_RUS_Nonthaburi 17may2019
Python Programming for Lecturer_RUS_Nonthaburi 17may2019Python Programming for Lecturer_RUS_Nonthaburi 17may2019
Python Programming for Lecturer_RUS_Nonthaburi 17may2019
 
Chapter1 pr5-mac-introduction-pdf
Chapter1 pr5-mac-introduction-pdfChapter1 pr5-mac-introduction-pdf
Chapter1 pr5-mac-introduction-pdf
 
Gnewvb01 090401013958-phpapp01
Gnewvb01 090401013958-phpapp01Gnewvb01 090401013958-phpapp01
Gnewvb01 090401013958-phpapp01
 
Video Conference
Video ConferenceVideo Conference
Video Conference
 
Imv unit7-1-pr3-introduction-pdf
Imv unit7-1-pr3-introduction-pdfImv unit7-1-pr3-introduction-pdf
Imv unit7-1-pr3-introduction-pdf
 
Video with Windows Movie Maker
Video with Windows Movie MakerVideo with Windows Movie Maker
Video with Windows Movie Maker
 
Red5 streaming template
Red5 streaming templateRed5 streaming template
Red5 streaming template
 
Digital Media
Digital MediaDigital Media
Digital Media
 
IT Trends eMagazine Vol 4. No.12
IT Trends eMagazine  Vol 4. No.12IT Trends eMagazine  Vol 4. No.12
IT Trends eMagazine Vol 4. No.12
 
Lesson9
Lesson9Lesson9
Lesson9
 
Chapter7 6-pr5-exporting movies-pdf
Chapter7 6-pr5-exporting movies-pdfChapter7 6-pr5-exporting movies-pdf
Chapter7 6-pr5-exporting movies-pdf
 

XBMC in IoT Application ( TH language )