Cross-system multimedia playing method and electronic equipment
By redirecting multimedia playback requests to the high-performance player of the second operating system in the Android operating system, the problem of insufficient functions of Android native multimedia player is solved, and the support for more formats and the playback quality is improved, and the user experience is improved.
Patent Information
- Application Number
- CN202510125591.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-05-13
Smart Images

Figure CN119996393A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of computer technology, and more specifically, to a method and electronic device for playing multimedia across systems. Background Art
[0002] Currently, electronic devices using the Android operating system are very common. The built-in or native multimedia player of the Android operating system is integrated into the Android Open-Source Project (AOSP) source code, and all distributions based on the AOSP source code carry it by default.
[0003] The built-in or native multimedia player of the Android operating system has weak functions and can only play multimedia files in the data formats it supports (for example, it cannot play other types of multimedia files) and has limited playback quality (for example, playback of high-bitrate, high-resolution audio and video may experience lag), resulting in a poor user experience.
[0004] In order to expand the functions of the native player, it is inevitable to modify the AOSP source code. If the native player module of AOSP is changed on a large scale, the system needs to be adjusted and reconstructed on a large scale. In the prior art, in order to expand the functions of the native player, the extension components are merged into the AOSP source code, which not only pollutes the code structure of the AOSP source code, but also brings troubles to the subsequent AOSP source code upgrade, thus affecting stability and reusability. Summary of the invention
[0005] An exemplary embodiment of the present disclosure is to provide a method and electronic device for playing multimedia across systems, which at least solve the above technical problems and other technical problems not mentioned above.
[0006] According to one aspect of an embodiment of the present disclosure, a method for playing multimedia across systems is provided, the method comprising: receiving a uniform resource locator URL and a playback service request of a multimedia file to be played in a first operating system; and redirecting the URL and the playback service request from the first operating system to a second operating system so that the multimedia file is played by a second player of the second operating system called by a playback service located in the second operating system.
[0007] Optionally, the first operating system is an Android operating system, the first player of the first operating system is an Android native player based on an Android multimedia framework, and the second player of the second operating system supports or is compatible with more multimedia file formats than the first player of the first operating system.
[0008] Optionally, the first operating system receives the URL and the playback service request from an Android application.
[0009] Optionally, the first operating system runs in a container, a virtual machine, or a simulator on a host machine including the second operating system.
[0010] Optionally, before the redirecting step, it is determined that the first player of the first operating system does not support the playback of the multimedia file to be played.
[0011] Optionally, the playback service located in the second operating system is pre-created to proxy the services of the second player.
[0012] Optionally, the redirecting step includes: the process of the first operating system communicates with the process of the second operating system through inter-process communication or remote procedure call.
[0013] Optionally, the redirection step includes: the JAVA layer in the Android multimedia framework of the first operating system receives the URL and the playback service request, and the JAVA layer calls the multimedia function library libmedia in the Android multimedia framework through the JAVA local interface in the Android multimedia framework; and the multimedia function library libmedia forwards the URL and the playback service request to the playback service located in the second operating system through a remote procedure call without passing the URL and the playback service request to the multimedia service layer libmediaplayerservice in the Android multimedia framework.
[0014] Optionally, the redirection step includes: the JAVA layer in the Android multimedia framework of the first operating system receives the URL and the playback service request, and the JAVA layer calls the multimedia function library libmedia in the Android multimedia framework through the JAVA local interface in the Android multimedia framework; the multimedia function library libmedia passes the URL and the playback service request to the service layer additionally customized on the first operating system instead of passing the URL and the playback service request to the multimedia service layer libmediaplayerservice in the Android multimedia framework; and the service layer additionally customized on the first operating system forwards the URL and the playback service request to the playback service located in the second operating system through inter-process communication or remote procedure call.
[0015] Optionally, compared to the multimedia service layer libmediaplayerservice, the additional customized service layer has extended business logic.
[0016] Optionally, the redirection step includes: the JAVA layer in the Android multimedia framework of the first operating system receives the URL and the playback service request, and the JAVA layer calls the multimedia function library libmedia in the Android multimedia framework through the JAVA local interface in the Android multimedia framework; the multimedia function library libmedia passes the URL and the playback service request to the multimedia service layer libmediaplayerservice in the Android multimedia framework; and the multimedia service layer libmediaplayerservice calls the player additionally created on the first operating system instead of the native player Nulayer of the first operating system, to forward the URL and the playback service request to the playback service located in the second operating system through inter-process communication or remote procedure call.
[0017] Optionally, the additionally created player implements the interfaces MediaPlayerBase and MediaPlayerHWInterface according to the requirements of the multimedia service layer libmediaplayerservice, so as to forward the URL and the playback service request to the playback service located in the second operating system.
[0018] Optionally, the multimedia service layer libmediaplayerservice selects the additionally created player with the highest score from among the additionally created player and the native player Nuplayer through a scoring mechanism.
[0019] According to another aspect of an embodiment of the present disclosure, an electronic device is also provided, which is equipped with a first operating system and a second operating system and includes: at least one processor; and at least one memory, wherein the at least one memory stores computer-executable instructions, and when the computer-executable instructions are executed by the at least one processor, the at least one processor executes the above-mentioned method of playing multimedia across systems.
[0020] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the method for playing multimedia across systems is executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A schematic diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure.
[0022] Figure 2A flow chart of a method for playing multimedia across systems according to an exemplary embodiment of the present disclosure is shown.
[0023] Figure 3 A schematic diagram showing cross-system operations according to an exemplary embodiment of the present disclosure.
[0024] Figure 4 A schematic diagram showing cross-system operations according to an exemplary embodiment of the present disclosure.
[0025] Figure 5 A schematic diagram showing cross-system operations according to an exemplary embodiment of the present disclosure.
[0026] Figure 6 A block diagram of an electronic device according to an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0027] Reference will now be made in detail to exemplary embodiments of the present disclosure, examples of which are shown in the accompanying drawings, wherein like reference numerals refer to like components throughout. The embodiments will be described below with reference to the drawings in order to explain the present disclosure.
[0028] The functions of the built-in or native multimedia player of the Android operating system are relatively weak, and can only play multimedia files in the formats it supports but not in other additional formats, and the playback quality is limited. In the era of networks with multiple data formats and the increasing demand of users for high-performance audio-visual experience, the playback functions supported by the built-in or native multimedia player of the Android operating system have limitations, which affect the user experience. The present invention is conceived to achieve the function expansion of the built-in or native multimedia player of the Android operating system while modifying the source code architecture of the Android Open-Source Project (AOSP) as little as possible.
[0029] Figure 1 A schematic diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure.
[0030] The multimedia playback system may be implemented or provided in an electronic device 1000 equipped with a dual system. As shown, the dual system of the electronic device 1000 may include a first operating system 1010 and a second operating system 1020.
[0031] According to the present disclosure, the first operating system 1010 may be an Android operating system, and the first player 1011 of the first operating system 1010 may be an Android native player based on an Android multimedia framework.
[0032] According to the present disclosure, the second operating system 1020 may be, but is not limited to, Linux, Windows, or MacOS, etc. Compared to the Android native player, the second player 1021 of the second operating system 1020 may support extended playback functions. That is, the second player 1021 may be a player that supports or is compatible with more types or formats of multimedia files than the first player 1011. According to an embodiment, the second player 1021 that supports extended playback functions may expand the protocol support and multimedia playback quality of the Android native player based on the Android multimedia framework, etc. For example, the second player 1021 may cover a variety of playback scenarios or meet personalized user needs and / or have improved playback quality (e.g., excellent performance in color reproduction, picture details, sound quality, etc.), thereby enhancing the user experience.
[0033] As shown, the first operating system 1010 (e.g., Android operating system) can run in the simulator 1015 of the second operating system 1020 (i.e., host system). Optionally, the first operating system 1010 can run on the host machine including the second operating system 1020 in the form of a container, a virtual machine, or a simulator.
[0034] In one embodiment, an Android application (application, APP) 1005 may need to play or display a multimedia file. Optionally, the multimedia file may be an audio file, an image file, and a video file. The multimedia files disclosed in the present invention are not limited to audio files, image files, and video files, but may also be other multimedia files. For example, APP 1005 may play multimedia files through the first operating system 1010. APP 1005 may send the uniform resource locator (URL) of the multimedia file to be played and the play service request to the play redirection (or play redirection program) 1012 in the first operating system 1010. Play redirection 1012 may determine that the second player 1021 of the second operating system 1020 controls the play of the multimedia file, and forwards the URL of the multimedia file to be played and the play service request to the second operating system for processing.
[0035] According to the present disclosure, the play service request can be redirected to the second operating system 1020. The second operating system 1020 can obtain the multimedia file to be played according to the URL of the multimedia file to be played, and complete the encoding and decoding operations and rendering operations of the multimedia file. In other words, the electronic device 1000 can use the high-performance player in the second operating system 1020 to expand the functions of the Android native player. Figure 2 A flow chart of a method for playing multimedia across systems according to an exemplary embodiment of the present disclosure is shown.
[0036] Reference Figure 2 In step S101, in a first operating system (eg, Figure 1 The first operating system 1010 in the embodiment receives the URL of the multimedia file to be played and a play service request.
[0037] In step S102, the URL and the playback service request are redirected from the first operating system to the second operating system (eg, Figure 1 The second operating system 1020 in the second operating system) is called by the second player of the second operating system (for example, Figure 1 The second player 1021) is used to play the video.
[0038] In an exemplary embodiment of the present disclosure, in the above redirection step, the communication mechanism of the cross-process call between the first operating system and the host system may be inter-process communication or remote procedure call.
[0039] In an exemplary embodiment of the present disclosure, before the redirection step, the step of determining whether the first player of the first operating system supports the playback of the multimedia file to be played can be selectively performed. For example, the URL of the multimedia file to be played can be obtained, and it is determined whether the native multimedia player supports the format type corresponding to the URL. In other words, it is possible to determine whether the multimedia file to be played requires a high-performance multimedia player of the host system to play based on the URL of the multimedia file to be played. If so, the high-performance multimedia player of the host system can be used to play the multimedia file to be played in the first operating system through the above-mentioned redirection step. Otherwise, the multimedia file to be played can be played using the native multimedia player of the first operating system. The above-mentioned operation steps are examples only and are not limited to this.
[0040] In an exemplary embodiment of the present disclosure, a playback service capable of receiving multimedia playback service requests may be pre-created on a host system. The service logic of a high-performance multimedia player of the host system may be proxied by the pre-created playback service. The pre-created playback service may be started on the host system to proxy the high-performance multimedia player of the host system, and the multimedia playback service for a first operating system (e.g., an Android operating system) may be redirected to the playback service of the host system, thereby expanding the functionality of the native multimedia player of the Android operating system.
[0041] Figures 3 to 5 Schematic diagrams of cross-system operations according to exemplary embodiments of the present disclosure are respectively shown. As an example, Figures 3 to 5A first operating system 1010 (eg, Android operating system) is shown running in an emulator 1015 of a second operating system 1020 (ie, a host system).
[0042] As shown, multimedia playback in the first operating system 1010 can be implemented based on the Android multimedia framework. The JAVA layer 11 (first layer) can be used to access Android multimedia application development. The JAVA layer 11 can receive the URL of the multimedia file to be played and the playback service request. The playback service request can also include control parameters related to multimedia playback. The JAVA layer 11 can represent the JAVA interface provided by the Android operating system, which is used by Android developers. The JAVA layer 11 can receive the URL and the playback service request from the Android APP. Since the source code of the Android APP is public, the framework layer is developed by the JAVA language (an object-oriented programming language), and some classes and methods called by the APP are related to the JAVA classes at the bottom of the system.
[0043] JNI 12 (second layer) can be used to call the multimedia function library (libmedia) 13 to provide an interface to the JAVA layer 11. Since the Android underlying source code is various libraries implemented by C / C++ code, JNI 12 can be introduced to implement mutual calls between the JAVA language and the C / C++ language at the application programming interface (API) layer. The JAVA layer 11 can call the multimedia function library (libmedia) 13 through JNI 12.
[0044] The multimedia function library (libmedia) 13 can be an API interface of a multimedia function C++ class, which is used to provide a player class interface to the JAVA local interface of JNI 12. The interface provided by the multimedia function library (libmedia) 13 to the upper layer is mainly the MediaPlayer class (optionally, it can also be the VideoPlayer class). JNI 12 can provide an interface to the JAVA layer 11 by calling the MediaPlayer class, and can implement the android.media.MediaPlayer class. The multimedia service layer (libmediaplayerservice) 14 is a multimedia server, which implements the server function by inheriting the class of the multimedia function library, and plays by calling the underlying multimedia player. The business logic for controlling multimedia playback can be mainly implemented in the multimedia service layer (libmediaplayerservice) 14. The timing of multimedia playback based on the Android multimedia framework may include but is not limited to: establishing a data source (setdatasource), preparing (prepare), starting (start), and stopping (stop).
[0045] In an exemplary embodiment, the native player of the Android multimedia framework may be Nuplayer. Nuplayer may be created by the player factory (MediaPlayerFactory) 15 to implement multimedia encoding and decoding, rendering, synchronous output, etc. Nuplayer 16 may be used to play network files, and currently mainly supports the playback of protocol files such as Hypertext Transfer Protocol (HTTP) and Real Time Streaming Protocol (RTSP).
[0046] Reference Figure 3 , the JAVA layer 11 in the Android multimedia framework of the first operating system 1010 can receive the URL of the multimedia file to be played and the playback service request. Optionally, the received multimedia file to be played can be a local multimedia file or a network multimedia file. For example, the JAVA layer 11 of the first operating system 1010 can receive the corresponding URL and playback service request from the Android APP. The JAVA layer can call the multimedia function library (libmedia) 13 in the Android multimedia framework through the JNI 12 in the Android multimedia framework.
[0047] The multimedia function library (libmedia) 13 may directly forward the corresponding URL and the playback service request to the playback service 1022 located in the second operating system (for example, the playback service 1022 pre-created on the second operating system 1020) through a remote procedure call (RPC). In other words, the multimedia function library (libmedia) 13 may not pass the corresponding URL and the playback service request to the underlying multimedia service layer (libmediaplayerservice) 14. According to an embodiment, the playback service 1022 pre-created on the second operating system 1020 may act as a proxy for the high-performance multimedia player of the second operating system 1020. For example, in the second operating system 1020, the encoding, decoding and rendering of the multimedia file to be played may be completed, and then the playback of the multimedia file to be played may be controlled.
[0048] Reference Figure 4 , the JAVA layer 11 in the Android multimedia framework of the first operating system 1010 can receive the URL of the multimedia file to be played and the play service request. The JAVA layer 11 can call the multimedia function library (libmedia) 13 in the Android multimedia framework through the JNI 12 in the Android multimedia framework.
[0049] The multimedia function library (libmedia) 13 may pass the corresponding URL and the play service request to the service layer (Mylibmediaplayservice) 14' additionally customized on the first operating system 1010. In other words, the multimedia function library (libmedia) 13 may not pass the corresponding URL and the play service request to the underlying multimedia service layer (libmediaplayerservice) 14.
[0050] The additional customized service layer (Mylibmediaplayservice) 14' on the first operating system 1010 can forward the corresponding URL and the playback service request to the playback service 1022 (for example, the playback service 1022 pre-created on the second operating system 1020) located in the second operating system 1020 through inter-process communication (IPC) or RPC. According to an embodiment, the playback service 1022 pre-created on the second operating system 1020 can act as a proxy for the high-performance multimedia player of the second operating system 1020. For example, in the second operating system 1020, the multimedia file corresponding to the corresponding URL can be obtained according to the corresponding URL, and the encoding, decoding and rendering transportation of the multimedia file to be played can be completed, thereby controlling the playback of the multimedia file to be played. In addition, the embodiments of the present disclosure do not need to transmit encoding and decoding data across systems, and the performance of multimedia playback can be ensured even in scenarios with high bit rates and high data exchange.
[0051] In an exemplary embodiment of the present disclosure, the additional customized service layer (Mylibmediaplayservice) 14' may have extended business logic compared to the multimedia service layer (libmediaplayerservice) 14. That is, the user may, for example, utilize the extensibility of the Android framework system to define the interface and business of the service layer as needed.
[0052] Reference Figure 5 , the JAVA layer 11 in the Android multimedia framework of the first operating system 1010 can receive the URL of the multimedia file to be played and the play service request. The JAVA layer 11 can call the multimedia function library (libmedia) 13 in the Android multimedia framework through the JNI 12 in the Android multimedia framework.
[0053] The multimedia function library (libmedia) 13 can pass the corresponding URL and playback service request to the underlying multimedia service layer (libmediaplayerservice) 14.
[0054] The multimedia service layer (libmediaplayerservice) 14 can call the player (Myplayer) 17 additionally created on the first operating system 1010 instead of the native player (Nuplayer) 16 of the first operating system 1010 to forward the corresponding URL and playback service request to the playback service located in the second operating system 1020 through IPC or RPC.
[0055] The additionally created player (Myplayer) 17 can implement the interfaces MediaPlayerBase and MediaPlayerHWInterface according to the requirements of the multimedia service layer (libmediaplayerservice) 14 to forward the corresponding URL and playback service request to the playback service 1022 located in the second operating system 1020 (for example, the playback service 1022 pre-created on the second operating system 1020). For example, MediaPlayerBase can be used as an abstract class for executing a specific playback module to define the basic interface required by the player; MediaPlayerHWInterface can be inherited from MediaPlayerBase and used as an interface for direct output through hardware. According to an embodiment, the playback service 1022 pre-created on the second operating system 1020 can act as a proxy for the high-performance multimedia player of the second operating system 1020. For example, in the second operating system 1020, the encoding, decoding and rendering transportation of the multimedia files to be played can be completed, and then the playback of the multimedia files to be played can be controlled.
[0056] The multimedia service layer (libmediaplayerservice) 14 may select the additionally created player (Myplayer) 17 having the highest score from among the additionally created player (Myplayer) 17 and the native player (Nuplayer) 16 through a scoring mechanism.
[0057] According to reference Figures 3 to 5 The cross-system operation described can start a pre-created playback service 1022 on the second operating system 1020 (i.e., the host system) to proxy the host system's high-performance multimedia player, and the multimedia playback service for the first operating system 1010 (e.g., the Android operating system) can be redirected (transmitted to) the pre-created playback service 1022 of the host system via IPC or RPC, thereby utilizing the resource advantages of the host system to expand the functionality of the Android operating system's native multimedia player.
[0058] After the redirection from the first operating system 1010 to the second operating system 1020 through a communication mechanism such as IPC or RPC, the multimedia playback service is not limited by the hardware framework or software framework of the first operating system 1010, which helps to give full play to the software performance or hardware performance of the second operating system 1020. For example, due to the lack of support for specific multimedia formats and multimedia technologies by the native multimedia player of the first operating system 1010 (for example, the Android operating system), an Android APP with excellent multimedia files cannot fully display its multimedia files through the Android platform. The cross-system operation disclosed in the present invention realizes the display of multimedia files using the complete resources of the second operating system 1020 (for example, the formats of supported multimedia files are expanded, the playback quality of multimedia files is improved (smooth playback of high-bitrate, high-resolution multimedia files), etc.), thereby improving and expanding the functions of the native multimedia player on the basis of the Android source code architecture, and effectively improving the user experience.
[0059] In addition, the high-performance multimedia player of the second operating system 1020 does not need to be integrated into the first operating system 1010 , thereby avoiding the problem of secondary development and compatibility issues caused by the upgrade of the first operating system 1010 .
[0060] In addition, according to an exemplary embodiment of the present disclosure, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed, the method for playing multimedia across systems according to an exemplary embodiment of the present disclosure is implemented.
[0061] In an exemplary embodiment of the present disclosure, the computer-readable storage medium may carry one or more computer programs. When one or more computer programs are executed, the above-mentioned cross-system multimedia playback operation steps can be implemented, thereby importing the playback service received by the Android operating system from the Android APP into the host system through the redirection step for multimedia encoding and decoding and rendering operations, and utilizing the resource advantages of the host system to fully display the multimedia files.
[0062] In addition, according to an exemplary embodiment of the present disclosure, a computer program product is also provided, and instructions in the computer program product can be executed by a processor to complete the method for playing multimedia across systems according to an exemplary embodiment of the present disclosure.
[0063] The above has been combined Figures 1 to 5 The multimedia playback system, the method for playing multimedia across systems, and the embodiments of the cross-system operation according to the exemplary embodiments of the present disclosure are described. Figure 6 An electronic device according to an exemplary embodiment of the present disclosure is described.
[0064] Figure 6 A block diagram of an electronic device according to an exemplary embodiment of the present disclosure is shown.
[0065] Reference Figure 6 , the electronic device 600 may include a memory 601 and a processor 602, the memory 601 stores computer executable instructions, and when the computer executable instructions are executed by the processor 602, the method for playing multimedia across systems according to the exemplary embodiment of the present disclosure is executed. According to the present disclosure, the memory 601 may be one or more memories, and the processor 602 may be one or more processors.
[0066] As an example, the electronic device 600 may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above instructions. Here, the electronic device 600 is not necessarily a single electronic device, but may also be any device or circuit collection capable of executing the above instructions (or instruction sets) individually or in combination. The electronic device 600 may also be part of an integrated control system or system manager, or may be configured as a portable electronic device interconnected with a local or remote (e.g., via wireless transmission) interface.
[0067] In the electronic device 600, the processor 602 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller or a microprocessor. As an example and not limitation, the processor may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0068] The processor 602 may execute instructions or codes stored in the memory 601, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transmission protocol.
[0069] The memory 601 may be integrated with the processor 602, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. In addition, the memory 601 may include a separate device (such as an external disk drive, a storage array, or any other storage device that can be used by a database system). The memory 601 and the processor 602 may be operationally combined, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor 602 can read files stored in the memory.
[0070] In addition, the electronic device 600 may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.). All components of the electronic device 600 may be connected to each other via a bus and / or a network. In addition, the above-mentioned method of playing multimedia across systems can be implemented by instructions recorded on a computer-readable storage medium. For example, according to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions may be provided, wherein the above-mentioned method of playing multimedia across systems is executed when the instructions are executed by a processor. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers. It should be noted that the instructions can also be used to execute additional steps in addition to the above steps or to perform more specific processing when executing the above steps. The contents of these additional steps and further processing have been mentioned in the description of the relevant methods, so they will not be repeated here to avoid repetition.
[0071] It should be noted that the method for playing multimedia across systems according to the exemplary embodiment of the present disclosure can be executed entirely by relying on the running of computer programs or instructions, that is, the functional architecture of the computer program corresponds to the steps of the above method, so that a special software package (e.g., lib library) is called to implement the corresponding operations or functions.
[0072] On the other hand, program codes or code segments for performing corresponding operations or functions may be stored in a computer-readable medium such as a storage medium, so that a processor or computing device may perform the corresponding operations or functions by reading and running the corresponding program codes or code segments.
[0073] Although some exemplary embodiments of the present disclosure have been shown and described, it should be understood by those skilled in the art that the above description is only exemplary and not exhaustive, and the present disclosure is not limited to the disclosed exemplary embodiments. Without departing from the scope and spirit of the present disclosure as defined by the claims and their equivalents, many modifications are obvious to those of ordinary skill in the art, and various modifications may be made to these embodiments. Therefore, the scope of protection of the present disclosure shall be based on the scope of the claims and their equivalents.
Claims
1. A method for playing multimedia across systems, the method comprising: Receiving, in the first operating system, a uniform resource locator URL of a multimedia file to be played and a play service request; as well as The URL and the playback service request are redirected from the first operating system to the second operating system so as to be played by a second player of the second operating system called by the playback service of the second operating system.
2. The method according to claim 1, wherein: The first operating system is an Android operating system, the first player of the first operating system is an Android native player based on an Android multimedia framework, and the second player of the second operating system supports or is compatible with more multimedia file formats than the first player of the first operating system.
3. The method according to claim 2, wherein: The first operating system receives the URL and the playback service request from the Android application.
4. The method according to claim 1, wherein: The first operating system runs on a host machine including the second operating system in the form of a container, a virtual machine or a simulator.
5. The method according to claim 1, wherein: Before the redirecting step, it is determined that the first player of the first operating system does not support the playing of the multimedia file to be played.
6. The method according to claim 1, wherein: The playback service located in the second operating system is pre-created to act as a proxy for the services of the second player.
7. The method according to claim 1, wherein: The redirection step includes: the process of the first operating system communicates with the process of the second operating system through inter-process communication or remote procedure call.
8. The method according to claim 2, wherein: The redirection steps include: The JAVA layer in the Android multimedia framework of the first operating system receives the URL and the play service request, and the JAVA layer calls the multimedia function library libmedia in the Android multimedia framework through the JAVA local interface in the Android multimedia framework; and The multimedia function library libmedia forwards the URL and the playback service request to the playback service located in the second operating system through a remote procedure call instead of passing the URL and the playback service request to the multimedia service layer libmediaplayerservice in the Android multimedia framework.
9. The method according to claim 2, wherein: The redirection steps include: The JAVA layer in the Android multimedia framework of the first operating system receives the URL and the play service request, and the JAVA layer calls the multimedia function library libmedia in the Android multimedia framework through the JAVA local interface in the Android multimedia framework; The multimedia function library libmedia passes the URL and the playback service request to the service layer additionally customized on the first operating system instead of passing the URL and the playback service request to the multimedia service layer libmediaplayerservice in the Android multimedia framework; and The additional customized service layer on the first operating system forwards the URL and the playback service request to the playback service located in the second operating system through inter-process communication or remote procedure call.
10. The method according to claim 9, wherein: Compared with the multimedia service layer libmediaplayerservice, the additional customized service layer has extended business logic.
11. The method according to claim 2, wherein: The redirection steps include: The JAVA layer in the Android multimedia framework of the first operating system receives the URL and the play service request, and the JAVA layer calls the multimedia function library libmedia in the Android multimedia framework through the JAVA local interface in the Android multimedia framework; The multimedia function library libmedia passes the URL and the playback service request to the multimedia service layer libmediaplayerservice in the Android multimedia framework; and The multimedia service layer libmediaplayerservice calls the player created additionally on the first operating system instead of the native player Nulayer of the first operating system to forward the URL and the playback service request to the playback service located in the second operating system through inter-process communication or remote procedure call.
12. The method according to claim 11, wherein: The additionally created player implements the interfaces MediaPlayerBase and MediaPlayerHWInterface according to the requirements of the multimedia service layer libmediaplayerservice to forward the URL and the playback service request to the playback service located in the second operating system.
13. The method according to claim 11, wherein: The multimedia service layer libmediaplayerservice selects the additionally created player with the highest score from the additionally created player and the native player Nupperer through a scoring mechanism.
14. An electronic device, the electronic device carrying a first operating system and a second operating system and comprising: at least one processor; and at least one memory, wherein the at least one memory stores computer executable instructions, which, when executed by the at least one processor, enable the at least one processor to execute the method for playing multimedia across systems as described in any one of claims 1 to 13. 15 . A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, executes the method for playing multimedia across systems according to any one of claims 1 to 13.