Wednesday 4 March 2020

Applications for Android OS

Applications for Android OS

In view of the imperfection of the Android operating system multimedia function and the complexity of streaming media system. At the same time, the development cycle is long, and efficiency is low. In order to solve those problems, the thesis designed the streaming engine layer between Linux kernel layer and application framework layer of Android platform, and constructed fast and convenient streaming media application development framework. First of all, Android operating system (OS) was analyzed, and then the media engine was added into the Android OS architecture. Based on the characteristic of the streaming media system, the steaming media engine is divided into five layers, including the user interface, data capture, and data output, codec, and network transmission layer. At last, the architecture was applied in the wisdom medical terminal project. Through an instance of video data transmission client, the feasibility of the architecture is confirmed.
Android OS is a kind of open source OS, which is launched by Google. In Android, the hierarchical structure is used just like other OSs; it is divided into five layers, including Linux kernel, hardware abstraction, libraries and Android runtime, application framework and applications. The system architecture is shown in Figure 1. Every layer description is as follows [4-5] Linux Kernel ) Android OS bases on Linux 2.6 kernel, and Linux kernel as hardware abstraction of underlying layer provides the services of basic memory management, thread management, network protocol stack and device driver etc. B. Hareware Abstraction The hardware abstraction layer is used to abstract services provided by the underlying Linux kernel layer; it can shield the underlying implement details. C. Libraries and Android Runtime Android libraries provide many basic C/C++ libraries, which are called by applications. They are the ultimate realization of the upper layer applicaitons. Android Runtime is a set of libraries which provides most of functions of Java programming language. Dalvik virtual machine is included. Every processing has own instance of Dalvik virtual machine. It is used to run the .dex excutive file. D. Application Framework The application framework layer provides a development platform for developers, which facilitates the reuse and replacement of components and the building of all kinds of applications. E. Applications Android application layer provides a range of packages, which contains most of Google's applications, for example, clock, calendar, etc. They are writen by Java.Generally, native code is faster than Java code [6-7]. So in view of of the efficiency requirements of streaming media applications, and the characteristics of Android stratification, the streaming media engine is located between Linux kernel layer and applications layer, and realized by C/C++ programming language. In the streaming media engine, the function of Linux kernel and libraries are called to realize streaming media codec and transmission functions. Android application layer could call the service provided by streaming media engine using JNI interface. Because the reliability of software is inversely proportional to the number of software stratification, so the whole structure is designed for four layers. CodeShoppy


Applications for Android OS


 Android OS bases on Linux 2.6 kernel, and Linux kernel as hardware abstraction of underlying layer provides the services of basic memory management, thread management, network protocol stack and device driver etc. B. Hareware Abstraction The hardware abstraction layer is used to abstract services provided by the underlying Linux kernel layer; it can shield the underlying implement details. C. Libraries and Android Runtime Android libraries provide many basic C/C++ libraries, which are called by applications. They are the ultimate Overall design of streaming media engine The characteristicsof Android platform is hierarchical design, while the modular design is typically used for streaming media system. Combining hierarchical and modular design, the streaming media engine is divided five layers, including the user interface, data capture, data output, codec, and network transport. The overall framework is shown in Figure 3. This of design strategy the can simplify media information proccessing. It is helpful for developers to develop and maintain streaming media application using the streaming media engine. It is also easy for sreaming media application to extend new codec or transport protocol.Data Capture The main task of the data capture is to capture audio or video data. It is defined a derived class, which provides some interfaces including message input and output interface, device open and close interface. Developers only need to inherit the class, and then according to the data type which we want to capture, the functions of the class are realized. In fact, the device open function calls the appropriate driver interface to initialize and open an audio or video device. At the end of open o function, the thread is started to capture the audio or video data. At last, input function can be used to input data acquisition command, and then captured data by thread will be copied to message data area. When the output 0 function is called, we can get the capured messag included the audio or vedio data. C. Data Output The design of data output layer is similar to the design of the data capture layer. It also creates a derived class named by data output, and provides device open and close interface, data output interface. Because nothing can be got form the layer, there not is ouput 0 function in the layer. First of all, the developers inherit the class, and then realize it according to different output devices and business needs. When needs to be used, firstly it instantiated. Sencondly, the open 0 function which is realized by using device driver is called to open and initialize the device, and create the output thread for audio or vedio. In the thread, the input data is outputed the ouput device for playing audio or video. The ouput data is input by using input 0 function. D. Codec Codec layer mainly realizes the compression and decompression of streaming media data, it is defined a codec class, which has initialization, codec selecting, data input and output interface. After inheriting the class, developers could call the select 0 function to select different codec algorithm, and avcodecinit 0 to initialize the codec. The algorithm is realized in the input 0 function by different way. The output function is used to get data which has processed. The decoding processing is the contrary.Network Transport Network transport layer mainly to complete the transfer function in streaming media systems; it created a network transmission class, including data input and the session initialization interface. According to the requirement, developers inherit the class and initialize the transmitionsession in mIt 0 function, then using input 0 function, developers can transmit the data to destination. The multi­thread mechanism can be used to achieve the transmission of data. The signal is used to communicate process with thread. F. User Interface The user interface layer is the interface of streaming media engine, and it is a JNI interface package of streaming media engine. Through JNI interface, Java applications can call the corresponding streaming engine functions. APIs implement the parameters control, parameter setting and query interface. The layer controls the flow of message from one layer to another. There is a mapping table between native functions and Android Java functions. It will be registered to Dalvik virtual machine when systemloadLibrary 0 is called. By this way, the time consumption will be reduced [10]. The user interface layer contains start and stop interface of streaming media engine. When the start function is called, the messages are sent from data capture via codec to network transport or from network transport via codec to data output.which one IS selected can be configured by configuration file. These classes in the streaming media engine each layer are compiled into dynamic libraries using Android NDK tools, which can be called by others. The purpose of this is easy to upgrade and reuse each layer. Only through changing the dynamic library, the developers can develop new application.  
https://codeshoppy.com/php-projects-titles-topics.html

No comments:

Post a Comment