This article summarizes the common basic knowledge points in the development process of Android-TV. Mainly divided into TV – UI, IPTV, OTT, DVB, TVOS, DEBUG and so on several big modules. Suitable for common box, TV, projector and other TV development.

MindMap

Let’s start with a map. Go straight to the brain

UI

Android TV interface development are different with the traditional mobile phone development, to the TV remote control for the user interaction is mainly operation is completed, and buttons on the TV and the focus of treatment is particularly important, the second TV output shows media mainly television screens, television can support different input display resolution is different also, In addition, the design of TV interface is also different from the small screen display on mobile phones. As it is a large screen display, the DESIGN of UI needs to be more simple and convenient.

  • Focus processing on focus TV
  • You can press the button to learn about the Android View event distribution process, and distribute and intercept events for specific services
  • Screen adaptation TV screen adaptation only need to adapt to the common 720p 1080p common several resolutions can be.
  • Players on PLAYER TV are generally divided into hardware and software. If customized development is required, it is recommended to solve the hardware. In other cases, iJkPlayer can be considered
  • UI components TV common controls ListView GridView RecycleView TabLayout ViewPager ScorllView

IPTV

The popularity of IPTV concept in China mainly depends on the four major broadband operators of Telecom, Unicom, mobile and radio and television. The main features of IPTV are as follows:

  • Based on metropolitan area network transmission
  • It mainly outputs to large-screen terminals such as TELEVISIONS
  • The main sources of content are licenseholders

OTT

The probability of OTT is mainly promoted by the Internet industry in China, such as Xiaomi/LetV TV, Box, Skyworth, Konka, Hisense and other smart TVS. The main characteristics of OTT are as follows:

  • Internet Based transmission
  • In addition to the output to TV and other terminals, there are mobile phones, pads and so on, which is the so-called “multi-screen interaction”.
  • Content mainly comes from licenseholders, video network content (with copyright) + others

DVB

The concept of DVB, which is the traditional radio and television business, has its earliest existence. DVB system can be divided into front-end system, transmission system and terminal system according to the order of signal transmission. The front-end system is generally located in the program production department (such as television stations and other departments), while the terminal system is generally in the user equipment (such as set-top box).

Transmission standard

Different from the transmission mode, the general international standards of DVB can be divided into the following:

Dvb-s, the digital satellite TELEVISION system, is usually in the mountainous area of the “household” small pot. Dvb-t, digital terrestrial TV broadcasting system, is usually the signal emitted from the regional TV tower, the domestic standard corresponds to DTMB DVB-C, digital Cable TV system, is usually through Cable transmission signal

Hierarchical structure

The system described in DVB standard can be divided into audio and video coding layer, service information layer, baseband transmission layer, channel coding layer and radio frequency layer according to different layers. For Android development, mainly involves the service information layer. The service information layer is mainly divided into:

  • PSI program guide information
  • SI Business Information

PSI

PSI information consists of program association table PAT, conditional receive table CAT, program mapping table PMT and network information table NIT, which are inserted into the TS stream. PSI information is the description of a single TS flow. It is the guidance information of the TS flow. PSI information specifies how to find a specified program from a transport stream carrying multiple programs. The four table structures of program guidance information (or program specific information, PSI) are shown below

  • PAT program association table associates program numbers with program mapping table PID, which is the beginning of data acquisition
  • The PMT program mapping table specifies the Pids of one or more programs
  • The CAT conditional receive table associates one or more dedicated EMM streams with a unique PID
  • NIT network information table describes the entire network, such as the number of TS streams, frequency points and modulation mode information

SI

PSI only provides information for a single TS stream, enabling the receiver to decode different programs in a single TS stream; However, it does not provide services related to multiple TS streams, and it does not provide the type of program, program name, start time, program introduction, and other information. Therefore, DVB extended the PSI to provide other different types of tables, forming the SI. All tables defined by SI do not need to be transferred. SDT, EIT and TDT must be transferred. SDT and EIT are the most important, and these two tables can be used to form EPG with different functions, such as providing additional program information, program classification, program reservation and parental grading control.

S Service I information table is divided into the following categories:

  • SDT Service Description Table SDT describes service content and information, connecting NIT, EIT, and PMT (PSI).
  • BAT Service group association Table BAT divides all services on the network into multiple service groups to identify users.
  • EIT Event Information Table The EIT provides the event information of each service in chronological order
  • RST Running status table
  • The TDT is a Time&Date Table that transmits only UTC time and date information.
  • TOT Event Offset table The TOT table provides UTC time and date information, as well as the time difference from local time
  • ST fill the table
  • SIT Select information table
  • DIT discontinuity information table

SEARCH

DVB search from the user’s point of view, generally can be divided into automatic search, full frequency point search, manual search. One of the manual search station is in essence a single frequency point search station, automatic search station is to retrieve the TS stream inside the frequency information, or back to the single frequency point search station, full frequency point search station is generally fixed frequency array, scan the single frequency point in turn.

The essence of set-top box channel search is to obtain and store the PID value of audio and video of each program from TS stream and construct the electronic program guide.

Three kinds of channel search implementation processes are summarized as follows:

① : main frequency locking ->NIT to obtain ServiceList -> to obtain SDT set-top box software development manufacturers will set an initial frequency point (MainFrenquency) in the set-top box. Or main frequency point, STB can be based on the physical parameters of the main frequency point, such as frequency point. Symbol rate, and modulation mode to lock this frequency point. For example, if a set-top box is set to 506MHZ as the main frequency point of digital programs, the Network Information Table (NIT) can be obtained. The NIT Table is described as follows: 1.Cable Delivery System Descriptor, which mainly includes frequency point, symbol rate, modulation parameters and other information; 2.ServiceList Descriptor: This Descriptor contains the description of the current program information. Obtain a ServiceList from the NIT Table, and then obtain the Service Descriptor Table (SDT) to obtain the SDT. Channel name, channel type, program start time, program name, program length, program classification and other information can be known by sdT. STB. Program information can be filtered by BAT (Business Group Association Table) of the system, and channel list of EPG application can be constructed. Finally, the new program information is written into a non-volatile storage medium such as E2PROM, and the data in the memory is automatically read after startup. In a non-volatile storage medium such as E2PROM, data in this storage is automatically read upon startup. So far set top box program search work is completed.

② : main frequency locking ->PAT access ->PMT access set-top box to find the main frequency to obtain PAT table. The Program Association Table (PAT) is not encrypted. PAT is the total entry point for all programs in a stream. Each TS stream has one PAT and one PMT, but the resultant TS stream has only one PAT and a total number of corresponding Program Map tables (PMT). Through the information of these two tables, the Program information can be obtained and written into a non-volatile storage medium such as E2PROM. Data in this storage is automatically read upon startup.

③ : interval cross frequency point frequency lock -> get frequency point program information. All frequency point searching way: by setting the point of the low frequency and high frequency points, set-top boxes from the low frequency points, general system the most low point to a few MHz, 8 m, then every growth, in turn, search point to the highest frequency, the programmes search to the frequency point information, then write a specific storage space, finally write nonvolatile storage medium in the E2PROM chips was introduced,

PLAY

The playback is mainly divided into large screen playback and picture-in-picture playback. I still don’t understand why there is a demand for such business scenes. Picture in picture generally requires dual Demux support. The playback flow of DVB is different from that of traditional player calls, which generally requires a low-level, JNI layer to encapsulate individual player interface calls. DVB playback requires the input of frequency point information, AUDIO and video PID, and audio and video type.

TVOS

NGB TVOS, short for Next Generation Broadcasting Network TVOS, is an operating system for Network TV based on Linux and Android system developed by the Science and Technology Department of The State Administration of Press, Publication, Radio, Film and Television of the People’s Republic of China. Its developers claim to “take into account the existing operating system technology, such as Linux, Android”, and increase information security module, strengthen the user’s information security, is specifically for the TV terminal operating system. According to the above description, combined with NGB related specifications, it is not difficult to see that TVOS is actually based on Android system development and transformation, mainly the general specification of the middle layer interface specification, for hardware and software manufacturers to integrate the general interface. A complete SET of TVOS system, the basic collection of DVB+IPTV business functions. The application level of TVOS covers the following aspects

  • Desktop >>>>>> generally supports dynamic configuration updates
  • >>>>>> can be divided into DVB live broadcast (supported by traditional Cable) and IPTV live broadcast (HTTP or UDP).
  • Back to see >>>>>> is currently mainly IPTV back to see, go HTTP
  • Time shift >>>>>> currently mainly IPTV time shift, go HTTP, but also some RTSP
  • On demand >>>>>> is currently mainly IPTV back to see, go HTTP, there are also some RTSP
  • Multi-screen interaction >> mainly through DLNA,AIRLPAY integration, but also partly through LAN socket or multicast implementation
  • Set >>>>>> customized Settings, mainly including network Settings, image Settings, system Settings, other Settings, etc
  • Local Media >> Mainly provides external USB or SDcard multimedia file browsing and playing, or APK installation
  • Application Management >> Provides local application management, remote application recommendation, and upgrade
  • System upgrade >> Mainly provides system ROM upgrade, IP upgrade and Cable upgrade
  • Message management >> Provides front-end message delivery, terminal message distribution, and reporting
  • Advertising management >> Mainly provides front-end advertising distribution, terminal advertising distribution, including IP two-way advertising, as well as Cable one-way advertising
  • Terminal management >> mainly provides remote operation and maintenance, remote upgrade, etc., generally using TR069, MQTT, XMPP and other protocols
  • Data collection is mainly for user behavior analysis, requiring the terminal application to integrate and report data, and the front end to conduct big data analysis, generally using MQTT, XMPP and so on

DEBUG

The development and debugging of TV terminal is also different from that of mobile terminal. The debugging methods of TV terminal are roughly as follows:

  • AndoroidStudio debugging, can be directly debug

  • Adb command line, common Linux command

  • Serial port tools need to be unpacked

  • Tftp File Transfer

  • System signature, root,remout, etc

  • Stetho, can remotely view database, SP, files and other information in Google Browser.

  • Android-debug-database, the browser online plug-in Database

REF

  • Android Developer TV
  • Android TV Open Source community
  • Android TV development exploration – Zhihu column
  • Introduction of DVB digital TV system
  • DVB standards
  • PSI/SI think-tank

Recommended reading

Management articles

Software development project management

② Software development team management

Development of article

① Android-TV- Development overview

(2) the Android – the NDK/JNI figure/C and the brain

(3) the Android figure – C/RoadMap and the brain

Tool post

① Android-Gradle modular construction

② Vcs/Git version control

③ Common Command lines for Android development

④Android Helper software development tool set