Universal Home API - eLinux · Both use interface-based programming Both use a “functional...

22
Universal Home Application Programming Interface © UHAPI Forum UHAPI Universal Home API UHAPI and DirectFB CE Linux Forum Technical Jamboree, 13/14th June, Yokohama, Japan John Vugts (UHAPI) Denis Oliver Kropp (DirectFB) June 14 th , 2005 Yokohama, Japan

Transcript of Universal Home API - eLinux · Both use interface-based programming Both use a “functional...

Page 1: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Confidential © UHAPI Forum

Universal Home Application Programming Interface

© UHAPI Forum

UHAPIUniversal Home API

UHAPI and DirectFB

CE Linux Forum Technical Jamboree,13/14th June, Yokohama, Japan

John Vugts (UHAPI) Denis Oliver Kropp (DirectFB)

June 14th, 2005 Yokohama, Japan

Page 2: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum2GSO/10/05/2005

Outline

IntroductionDirectFB Core featuresUHAPI Vmix Core featuresCommonalities between DirectFB and UHAPIFunctional overlap / differencesHow can they go together?Conclusion

Page 3: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum3GSO/10/05/2005

Introduction

Conclusion from the last CELF face-2-face Audio Video Gfx workgroup meeting:

DirectFB is interesting, and a recommend part of CELF specificationUHAPI is interesting, and proposed as part of the CELF specification

Question: How can they go together in the CELF specification?

Both specs have been studied, by the UHAPI forum and the DirectFB author Denis Oliver KroppThis presentation reports the results of the study and meetings that took place

Page 4: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum4GSO/10/05/2005

Outline

IntroductionDirectFB Core featuresUHAPI Vmix Core featuresCommonalities between DirectFB and UHAPIFunctional overlap / differencesHow can they go together?Conclusion

Page 5: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum5GSO/10/05/2005

DirectFB core features

Powerful graphics libraryfor LinuxDesigned with embedded systems in mindCompliant to Multimedia Home Platform (MHP)Provides HW abstractionAllows HW acceleration where possibleRecommended by the CELF 1.0 specification, adopted by many members

Page 6: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum6GSO/10/05/2005

DirectFB core features

Drawing (lines, rectangles, filling etc.)Blitting (scaled blended, color keyed etc).Font renderingWindow management.Multiple application support

resource managementHandling input events.Scaling.Color keying.Layer mixing.

Page 7: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum8GSO/10/05/2005

Outline

IntroductionDirectFB Core featuresUHAPI Vmix Core featuresCommonalities between DirectFB and UHAPIFunctional overlap / differencesHow can they go together?Conclusion

Page 8: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum10GSO/10/05/2005

UHAPI Vmix LC core features

No Gfx, just a SetBufferCropping / positioning of live videoScaling (e.g. Non-linear)Auto-blankingBlanking / hidingSmooth zooming / fadingStrobing / freezingColor keyingLayer bordersLayer mixing / blending

original 4:3 stretched to 16:9 panoramic 16:9

current window

target window Zooming from the current windowto the target window

destination window

layer window

layer background colorlayer border color

top border thickness

bottom border thickness

right borderthickness

left borderthickness

Page 9: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum11GSO/10/05/2005

Outline

Introduction DirectFB Core featuresUHAPI Vmix Core featuresCommonalities between DirectFB and UHAPIFunctional overlap / differencesHow can they go together?Conclusion

Page 10: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum12GSO/10/05/2005

UHAPI and DirectFB (similarities)Both are at about the same level of abstractionBoth try to abstract different platforms, and provide room for differentiationDirectFB is implemented in user space

UHAPI can also be implemented in user space UHAPI4Linux is implemented in user space (using available PC Tuner card support)

Both use interface-based programmingBoth use a “functional interface” (strong typing)

For example, no ioctl with weakly typed struct as parameterHelps to catch programming errors early

Both use vtables and AddRef/ReleaseQueryInterface can be added easily to DirectFB (for free)

Denis is looking into using the UHAPI interface technology support

Page 11: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum13GSO/10/05/2005

Outline

IntroductionDirectFB Core featuresUHAPI Vmix Core featuresCommonalities between DirectFB and UHAPIFunctional overlap / differencesHow can they go together?Conclusion

Page 12: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum14GSO/10/05/2005

UHAPI and DirectFB (functional overlap)

UHAPI focus: AV streaming controlDirectFB focus: GraphicsUHAPI and DirectFB are complementary except where AV streaming “meets” graphics:

Both UHAPI and DirectFB support layer mixing and color keyingBoth have concepts for controlling an encoder

Considering all of UHAPI and DirectFB, the overlap is really small

Page 13: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum15GSO/10/05/2005

UHAPI and DirectFB (differences)

Provided by UHAPI video mixer, not by DirectFB:Non-linear scaling, smooth zooming, fade to, auto-blanking, layer borders, strobing, freeze

Provided by DirectFB, not by UHAPI:Blitting / drawing / fonts, window management, clip board, input devices

Page 14: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum16GSO/10/05/2005

Outline

IntroductionDirectFB Core featuresUHAPI Vmix Core featuresCommonalities between DirectFB and UHAPIFunctional overlap / differencesHow can they go together?Conclusion

Page 15: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum17GSO/10/05/2005

How can they go together?DirectFB responsible for graphics layersUHAPI responsible for video layers written to by the UHAPI platform, and exclusive set of gfx layers (e.g. subtitles)Remaining set of gfx layers used by DirectFB implementationDirectFB used for all gfx related functionsDon’t support certain DirectFB options like:

IDirectFBScreen (encoder)Field synchronised gfxColour adjustment…

Denis is looking into defining profiles for DirectFBE.g. a UHAPI profile could imply: don’t use IDirectFBScreenBackwards compatible for both DirectFB and UHAPI

applications

Page 16: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum18GSO/10/05/2005

How can they go together (details)?

Don’t support VideoProvidersMuch more detailed control is required and provided by UHAPILittle used, not core of DirectFB

Don’t support IDirectFBScreenProposed solutions are not powerful enough

E.g connecting to output connectors, encoder controlTypically only used by HW dependent applicationsLittle used interface (only recently defined)

IDisplayLayerOnly provide one source, just setting a source is not powerful enough (use case concept of UHAPI)

Page 17: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum19GSO/10/05/2005

Vmix

Vid Layer

DirectFB – UHAPI mapping (1)Li

nux

OS

Vid LayerGfx LayerGfx Layer

UHAPI

... LC

+

Gfx

Vmix is one out of 50 existing UHAPI components!

Audio Video Hardware

Gfx Layer

... LC

Existing UHAPI app (e.g. Broadcast)

Page 18: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum20GSO/10/05/2005

Vmix

Vid Layer

DirectFB – UHAPI mapping (2)

Gfx

Acc

eler

atio

n

Audio Video Hardware

Vid LayerGfx LayerGfx Layer

UHAPI

DirectFB implementation

DirectFB

Existing DirectFB app

+

Gfx Layer... LC

Linu

x O

S

Page 19: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum21GSO/10/05/2005

Vmix

Vid Layer

DirectFB – UHAPI mapping (2)

Gfx

Acc

eler

atio

n

Audio Video Hardware

Vid LayerGfx LayerGfx Layer

UHAPI

DirectFB implementation

DirectFB

+

Gfx Layer... LC

Linu

x O

S

CELF Application

Page 20: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum22GSO/10/05/2005

Vmix

Vid Layer

DirectFB – UHAPI mapping (2)

Gfx

Acc

eler

atio

n

Audio Video Hardware

Vid LayerGfx LayerGfx Layer

UHAPI

DirectFB implementation

DirectFB

+

Gfx Layer... LCLinu

x O

S

CELF Application

•Non-linear scaling•Render Subtitles•Color key ranges•Borders•Fade to•…

•Accelerated gfx•Windowing•Input devices•Fonts•…

Page 21: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum23GSO/10/05/2005

Outline

IntroductionDirectFB Core featuresUHAPI Vmix Core featuresCommonalities between DirectFB and UHAPIFunctional overlap / differencesHow can they go together?Conclusion

Page 22: Universal Home API - eLinux · Both use interface-based programming Both use a “functional interface” (strong typing) zFor example, no ioctl with weakly typed struct as parameter

Universal Home Application Programming Interface

© UHAPI Forum24GSO/10/05/2005

Conclusion

DirectFB focusses on Gfx functionalityThis was left out of UHAPI to keep it OS agnosticIn the CELF context this is a good embedded Linux solution

UHAPI focusses on Audio Video controlDirectFB and UHAPI use very similar technology and look and feelThey go together very wellDirectFB Gfx applications can be reusedUHAPI applications can be reusedDenis Oliver Kropp and UHAPI are actively making DirectFB and UHAPI fully compatible