User Tools

Site Tools


mheg5port

Porting Guide

The MHEG5 component can be built for broadcast via DSM-CC, or for CI plus via Common Interface.

MHEG5 is controlled by the DVB application, and, to some degree, by events in DVB stack (DVBCore). For a basic implementation, MHEG5 needs operating system and graphic plane drawing from the platform. It needs access to service information and control of audio/video, provided by DVB stack. And finally, it requires support from DSM-CC component and/or Common Interface (CI plus) component.

At initialisation, MHEG5_Open function must be called. This allows MHEG5 to set up all its required resources. It also tells MHEG5 of the Hardware support provided by the platform, gives MHEG5 the manufacturer string, and selects which MHEG5 profile to support.

After the open function has initialised MHEG5 component, normal processing is started by MHEG5_Start.

Porting Stages

Below is a possible order for implementing required functions. This may help with getting the MHEG stack up and running quickly. This is not an exhaustive list, only lists the functions for basic usage.

Platform API functions

Operating System

  • STB_OSGetClockMilliseconds
  • STB_OSCreateTask
  • STB_OSDestroyTask
  • STB_OSTaskDelay
  • STB_OSCreateQueue
  • STB_OSDestroyQueue
  • STB_OSReadQueue
  • STB_OSWriteQueue
  • STB_OSCreateSemaphore
  • STB_OSSemaphoreWait
  • STB_OSSemaphoreWaitTimeout
  • STB_OSSemaphoreSignal
  • STB_OSCreateCountSemaphore
  • STB_OSDeleteSemaphore
  • STB_OSCreateMutex
  • STB_OSDeleteMutex
  • STB_OSMutexLock
  • STB_OSMutexUnlock

Graphics plane

  • STB_OSDMhegSetResolution
  • STB_OSDMhegCreateSurface
  • STB_OSDMhegLockBuffer
  • STB_OSDMhegUnlockBuffer
  • STB_OSDMhegDestroySurface
  • STB_OSDMhegBlitBitmap
  • STB_OSDMhegFillRectangle
  • STB_OSDMhegUpdate
  • STB_OSDMhegClear

DVBCore implemented functions

Memory Allocation

  • STB_MemAlloc
  • STB_MemFree

System Local Time

  • DVB_MhegGetLocalTime

Service information and Tuning

  • DVB_MhegDvbLocatorToIndex
  • DVB_MhegIndexToDvbLocator
  • DVB_MhegLcnToDvbLocator
  • DVB_MhegTuneIndex

Control of A/V

  • DVB_MhegAudioPlayDefault
  • DVB_MhegAudioPlayStream
  • DVB_MhegAudioStopStream
  • DVB_MhegVideoPlayDefault
  • DVB_MhegVideoPlayStream
  • DVB_MhegVideoStopStream
  • DVB_MhegVideoPlayIFrame
  • DVB_MhegVideoStopIFrame
  • DVB_MhegVideoSetUpdating
  • DVB_MhegAudioPlayClip
  • DVB_MhegAudioStopClip
  • DVB_MhegAudioSetSpeed
  • DVB_MhegAudioSetvolume

Video Scaling

  • STB_VTSetMhegScalingResolution
  • STB_VTSetMhegVideoScaling
  • STB_VTGetDisplayAspectRatio
  • STB_VTGetDecoderFormatConversion
  • STB_VTSetMhegAspectRatio
  • STB_VTSetMhegVideoAlignment
mheg5port.txt · Last modified: 2020/11/18 15:59 (external edit)