WO2016154855A1 - Android自带多媒体播放器的功能扩展方法和多媒体播放系统 - Google Patents
Android自带多媒体播放器的功能扩展方法和多媒体播放系统 Download PDFInfo
- Publication number
- WO2016154855A1 WO2016154855A1 PCT/CN2015/075402 CN2015075402W WO2016154855A1 WO 2016154855 A1 WO2016154855 A1 WO 2016154855A1 CN 2015075402 W CN2015075402 W CN 2015075402W WO 2016154855 A1 WO2016154855 A1 WO 2016154855A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- multimedia
- android
- multimedia player
- play
- player
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Definitions
- the present invention relates to the field of Android technology, and in particular, to a function expansion method and a multimedia playback system of an Android self-contained multimedia player.
- Android Android
- smart electronic device In the intelligent electronic device of the Android system, the smart electronic device itself has an Android self-contained multimedia player, and the multimedia file can be played by the Android self-contained multimedia player.
- Android comes with a multimedia player through the Android player JAVA (computer programming language) interface layer access multimedia files; and through JAVA
- the local interface calls the player library Mediaplayer (libmedia) to provide an interface to JAVA; the player library to the upper layer of JAVA
- the local interface provides the interface of the player class; the playback server (MediaPlayer) Service) is a media server that implements the functions of the server by inheriting the class of the player library and completes the playback job by calling the underlying core.
- MediaPlayer MediaPlayer
- the technical problem to be solved by the present invention is to provide a function expansion method and a multimedia playback system of an Android self-contained multimedia player, which can solve the problem of weak media capability of the multimedia player.
- a technical solution adopted by the present invention is to provide a function expansion method of an Android self-contained multimedia player, the method comprising: registering an extended multimedia different from Android's own multimedia player in the Android operating system.
- a multimedia playing system which includes a playing server and an extended multimedia player.
- the playing server includes a registration unit and a derivative class generating unit, wherein: the registration unit is used for Registering an extended multimedia player different from Android's own multimedia player in the Android operating system; the derivative class generating unit is used to set a derivative class in the Android operating system that inherits from the JAVA interface layer of the Android player, and is specified by the derivative class.
- the extended multimedia player performs multimedia playback for the playback target.
- the beneficial effects of the present invention are: different from the prior art, the function expansion method of the Android self-contained multimedia player of the present invention registers an extended multimedia player different from Android's own multimedia player in the Android operating system; In the Android operating system, a derivative class that inherits from the JAVA interface layer of the Android player is set; and the extended multimedia player is used to perform multimedia playback through the derivative class, and the data format not supported by the Android-owned multimedia player can be played by expanding the multimedia player.
- the multimedia files greatly enhance the media capabilities of the multimedia player and effectively enhance the user experience.
- FIG. 1 is a schematic flow chart of a function expansion method of an Android self-contained multimedia player according to the present invention
- FIG. 2 is a schematic flow chart of sub-steps of step S102 in FIG. 1;
- step S103 in FIG. 1 is a schematic flow chart of sub-steps of step S103 in FIG. 1;
- FIG. 4 is a schematic flow chart of playing a multimedia file by the multimedia player of the present invention.
- FIG. 5 is a first schematic structural diagram of a multimedia playback system of the present invention.
- FIG. 6 is a second schematic structural diagram of a multimedia playback system of the present invention.
- FIG. 7 is a schematic structural diagram of a derivative class generating unit in FIG. 6;
- FIG. 8 is a schematic structural diagram of an extended multimedia player in FIG. 5;
- FIG. 9 is a schematic structural diagram of the Android self-contained multimedia player in FIG. 5.
- FIG. 1 is a schematic flowchart of a function expansion method of an Android self-contained multimedia player according to the present invention. The method includes the following steps:
- Step S101 Register an extended multimedia player different from Android's own multimedia player in the Android operating system.
- the extended multimedia player is used to play the multimedia file in the data format supported by the first data format set
- the Android self-contained multimedia player is used to play the multimedia file in the data format supported by the second data format set
- the second The data format set is different from the data format supported by the first data format set.
- the first data format set includes but is not limited to avi (Audio) Video Interleaved, audio video interlaced format), wmv (Windows Media Video, a streaming media format introduced by Microsoft), asf (Advanced Streaming Format, Advanced streaming format), mov (an audio and video file format developed by Apple), mpg (an audio and video file format), mpeg (Moving Picture Experts) Group, Motion Picture Experts Group), rm (a streaming video file format), flv (Flash Video, a new video format) and ape (digital music lossless compression format).
- the second data format set includes but is not limited to 3gp (3G streaming video encoding format), mp2 format, mp3 format, mp4 format, ts (high definition movie encapsulation format), flac (lossless audio compression encoding), ogg (a new Audio compression format), mkv (a new multimedia encapsulation format), webm (an open, free media file format) and wav (a sound file format developed by Microsoft).
- the first set of data formats may comprise a second set of data formats, or the first set of data formats comprises a data format of a portion of the second set of data formats.
- the multimedia file is an audio document, an image document or a video document.
- the multimedia file of the present invention is not limited to an audio document, an image document, or a video document, and may be other multimedia files.
- Step S102 Set a derivative class in the Android operating system that inherits from the JAVA interface layer of the Android player. Specifically, as shown in FIG. 2, step S102 includes the following sub-steps:
- Step S1021 Add a derivative class in the Android operating system that inherits from the JAVA interface layer of the Android player.
- Step S1022 Import the derived class in the Android installation package.
- the interface setFlag() is added to the derivative class of the present invention, and the identifier can be set through the interface setFlag(). And override the interface setDataSource() in the parent class (Android player JAVA interface layer), so that the derived class will specify the identifier of the player when calling the parent class's interface setDataSource(), and pass it to the lower layer. Play the core. In addition, the identifier is added to the playback path of the multimedia file waiting to be played.
- Step S103 Perform multimedia playback for the playback target by using the extended class designation extended multimedia player. Specifically, as shown in FIG. 3, step S103 includes the following sub-steps:
- Step S1031 The identifier of the corresponding extended multimedia player is set by the interface setFlag() of the derived class.
- the identifier is set with a preset value, and the preset value includes a first preset value, a second preset value, or a third preset value, and the like.
- the first preset value is 6.
- the identifier is used to identify the extended multimedia player, so that the extended multimedia player is distinguished from the multimedia player that is included in the Android system.
- the identifier of the extended multimedia player is added to the address of the playback target (ie, the multimedia file) to form a playback path of the playback target.
- the interface setDataSource() of the Android player JAVA interface layer is called to sequentially transmit the identifier of the specified player to the JAVA local interface, the player library, the play server, the extended multimedia player, and the Android. Comes with a multimedia player.
- the first data format set is set in advance in the Android operating system, and the first data format set corresponds to the preset value of the identifier, that is, the Android operating system can automatically identify the first data format set corresponding to the identifier. value. For example, when the Android operating system recognizes that the data format of the playback target is the data format in the first data format set, the identifier of the extended multimedia player is added to the address of the play target to form a play path of the play target.
- Step S1032 The extended multimedia player parses the identifier in the play path, so that the extended multimedia player generates the play object. It should be understood that both the extended multimedia player and the Android native multimedia player resolve the identifiers in the playback path.
- the Android self-contained multimedia player and the extended multimedia player both receive the play path of the play target waiting to be played
- the Android own multimedia player and the extended multimedia player both parse the play path.
- the extended multimedia player parses the identifier in the playback path and parses the result as a match
- the extended multimedia player is used to generate the playback object.
- the extended multimedia player has been selected to play the playback target at this time, and the extended multimedia player is ready to play.
- the Android self-contained multimedia player parses the identifier in the playback path and parses the result as a match
- the Android self-contained multimedia player is used to generate the playback object; at this time, the Android self-contained multimedia player is selected for playing and playing. Goal, and Android's own multimedia player is ready to play.
- Step S1033 playing the play object by using the extended multimedia player and displaying the first display information.
- the first display information includes but is not limited to audio information, video information, or brightness information.
- Step S201 The multimedia player parses the identifier in the playback path. It should be understood that here is an identifier in the playback play path of the Android built-in multimedia player and the extended multimedia player.
- Step S202 Determine whether the value corresponding to the identifier is the first preset value.
- step S203 is performed: calling the extended multimedia player to play the multimedia file. That is, a playback object is generated in the Android operating system, and the first display information of the playback object is set; and the extended multimedia player is used to play the playback object and display the first display information.
- Step S204 The extended multimedia player receives and executes the control instruction.
- the control instruction includes at least one of a pause play command, a resume play command, a stop play command, and a replay command to delete the command.
- the data format of the multimedia file is the data format supported by the Android self-contained multimedia player, and step S205 is performed: playing the multimedia with the Android self-contained multimedia player. file. That is, the playback object is set in the Android operating system, and the second display information of the playback object is set; at the same time, the playback object is played by the Android built-in multimedia player and the second display information is displayed.
- the second display information includes but is not limited to audio information, video information, or brightness information.
- Step S206 The Android self-contained multimedia player receives and executes the control instruction.
- the control instruction includes at least one of a pause play command, a resume play command, a stop play command, and a replay command to delete the command.
- a derivative class that inherits from the JAVA interface layer of the Android player is set in the Android operating system, and the extended multimedia player is used to perform multimedia playback by using the derivative class, thereby improving the media capability of the multimedia player and effectively improving the user's Experience.
- FIG. 5 is a first structural diagram of the multimedia playing system of the present invention, and the multimedia playing system in FIG. 5 corresponds to the method in FIG.
- the multimedia playing system includes an Android player JAVA interface layer 11, an extended interface layer 12, a JAVA local interface 13, a player library 14, a playback server 15, an extended multimedia player 16, and an Android built-in multimedia player 17.
- the Android player JAVA interface layer 11 is used to access Android multimedia application development.
- the extended interface layer 12 is used to access multimedia application development of data formats supported by the extended multimedia player. It should be understood that the extended interface layer 12 and the derived classes in FIG. 1 are different angle representations of the same object.
- the JAVA local interface 13 is used to call the player library to provide an interface to JAVA.
- the player library 14 is used to provide a player class interface to the JAVA local interface of the JAVA local interface 13.
- the play server 15 is a server of the media that implements the functions of the server by inheriting the class of the player library, and completes the play job by calling the extended multimedia player 16 of the bottom core and the Android built-in multimedia player 17.
- the multimedia playing system further includes a registration unit 151 and a derivative class generating unit 152.
- the registration unit 151 is configured to register an extended multimedia player different from the Android built-in multimedia player in the Android operating system.
- the derived class generating unit 152 is configured to set a derivative class inherited from the Android player JAVA interface layer in the Android operating system. Specifically, as shown in FIG. 7, the derived class generating unit 152 includes a derived class adding subunit 1521 and a derived class importing subunit 1522.
- the derived class adding subunit 1521 is used to add a derivative class in the Android operating system that inherits from the JAVA interface layer of the Android player.
- the derived class import sub-unit 1522 is configured to import the derived class in the Android installation package, so that the derived class specifies the extended multimedia player 16 to perform multimedia playback for the playback target.
- the interface setFlag() of the derived class in the multimedia player corresponds to the identifier of the extended multimedia player.
- the identifier is set with a preset value, and the preset value includes a first preset value, a second preset value, or a third preset value, and the like.
- the first preset value is 6.
- the identifier is used to identify the extended multimedia player 16, such that the extended multimedia player 16 is distinguished from the multimedia player 17 that comes with Android in the Android system.
- the extended interface layer 12 and the Android player JAVA interface layer 11 also form a play path forming unit, and the identifier of the extended multimedia player 16 is added to the address of the play target to form a play path of the play target.
- the interface setDataSource() of the Android player JAVA interface layer 11 is called to sequentially transmit the identifier of the specified player to the JAVA local interface 13, the player library 14, the play server 15, and the extended multimedia.
- Player 16 and Android bring a multimedia player 17.
- the first data format set is set in advance in the Android operating system, and the first data format set corresponds to the value of the identifier, that is, the Android operating system can automatically identify the value corresponding to the identifier of the first data format set. For example, when the Android operating system recognizes that the data format of the playback target is the data format of the first data format set, the identifier of the extended multimedia player 16 is added to the address of the play target to form a play path of the play target.
- the extended multimedia player 16 is used to resolve the identifier in the playback path. It should be understood that the extended multimedia player 16 and the Android built-in multimedia player 17 are respectively used to parse the identifier in the playback path, thereby causing the extended multimedia player 16 or the Android own multimedia player 17 to generate a playback object.
- both the Android-equipped multimedia player 17 and the extended multimedia player 16 receive the playback path of the playback target waiting to be played, both the Android-equipped multimedia player 17 and the extended multimedia player 16 parse the playback path.
- the extended multimedia player 16 parses the identifier in the playback path and the parsing result is a match, the extended multimedia player 16 is used to generate the play object. In other words, the extended multimedia player 16 has been selected to play the play target at this time, and the extended multimedia player 16 is ready to play.
- the Android self-contained multimedia player 17 parses the identifier in the playback path and the parsing result is a match, the Android self-contained multimedia player 17 is used to generate the play object; at this time, the Android self-contained multimedia player 17 has been selected. To play the playback target, and Android's own multimedia player 17 is ready to play.
- the extended multimedia player 16 includes a parsing unit 161, an identifier judging unit 162, and an executing unit 163.
- the parsing unit 161 is configured to parse the identifier in the play path.
- the identifier determining unit 162 is configured to determine whether the value corresponding to the identifier is the first preset value.
- the executing unit 163 is configured to invoke the extended multimedia player 16 to play the multimedia file when determining that the value corresponding to the identifier is the first preset value. That is, the execution unit 163 generates a play object corresponding to the extended multimedia player 16 in the Android operating system, and sets the first display information of the play target, while playing the play target by the extended multimedia player 16 and displaying the first display information.
- the first display information includes but is not limited to audio information, video information, or brightness information.
- the executing unit 163 is further configured to receive and execute a control instruction, where the control instruction includes at least one of a pause play instruction, a resume play instruction, a stop play instruction, a replay instruction to delete the instruction.
- the Android built-in multimedia player 17 includes a parsing unit 171, an identifier judging unit 172, and an executing unit 173.
- the parsing unit 171 is configured to parse the identifier in the play path.
- the identifier determining unit 172 is configured to determine whether the value corresponding to the identifier is the first preset value.
- the executing unit 173 is configured to invoke the Android bring-on multimedia player 17 to play the multimedia file when it is determined that the value corresponding to the identifier is not the first preset value.
- the execution unit 173 generates a play object corresponding to the Android built-in multimedia player 17 in the Android operating system, and sets the second display information of the play object, and simultaneously plays the play object and displays the second display by using the Android built-in multimedia player 17. information.
- the second display information includes but is not limited to audio information, video information, or brightness information.
- the executing unit 173 is further configured to receive and execute a control instruction, where the control instruction includes at least one of a pause play instruction, a resume play instruction, a stop play instruction, a replay instruction to delete the instruction.
- the multimedia player of the embodiment can improve the media capability of the multimedia player by setting a derivative class in the Android operating system that inherits from the JAVA interface layer of the Android player, and designating the extended multimedia player for multimedia playback through the derivative class. Effectively enhance the user experience.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Stored Programmes (AREA)
Abstract
本发明公开了一种Android自带多媒体播放器的功能扩展方法,该方法包括:在Android操作系统注册一个不同于Android自带多媒体播放器的扩展多媒体播放器;在Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类;通过衍生类指定扩展多媒体播放器针对播放目标进行多媒体播放。本发明还公开一种多媒体播放系统。通过上述方式,本发明能够提升多媒体播放器的媒体能力,有效提升用户的体验。
Description
【技术领域】
本发明涉及Android技术领域,特别是涉及一种Android自带多媒体播放器的功能扩展方法和多媒体播放系统。
【背景技术】
随着Android(安卓)技术的发展,Android系统已普遍应用在智能电子设备中,特别是智能手机。在Android系统的智能电子设备中,该智能电子设备本身都会设有Android自带多媒体播放器,可通过Android自带多媒体播放器进行播放多媒体文件。其中,Android自带多媒体播放器通过安卓播放器JAVA
(计算机编程语言)接口层接入多媒体文件;并通过JAVA
本地接口调用播放器库Mediaplayer(libmedia)提供对JAVA的接口;播放器库对上层的JAVA
本地接口提供播放器类的接口;播放服务器(MediaPlayer
Service)是媒体的服务器,其通过继承播放器库的类实现服务器的功能,并通过调用底下的核心来完成播放作业。
但是,AOSP(Android Open-Source Project ,Android
开放源代码项目)不允许对Android
Code(代码)进行大的改动,使得Android自带多媒体播放器本身的媒体能力比较弱。在面临多类型数据格式的网络时代,Android自带多媒体播放器只能播放自带多媒体播放器所支持的数据格式的多媒体文件,不能播放其他额外数据格式的多媒体文件,容易减低用户的体验。
【发明内容】
本发明主要解决的技术问题是提供一种Android自带多媒体播放器的功能扩展方法和多媒体播放系统,能够解决多媒体播放器的媒体能力薄弱的问题。
为解决上述技术问题,本发明采用的一个技术方案是:提供一种Android自带多媒体播放器的功能扩展方法,该方法包括:在Android操作系统注册一个不同于Android自带多媒体播放器的扩展多媒体播放器;在Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类;通过衍生类指定扩展多媒体播放器针对播放目标进行多媒体播放。
为解决上述技术问题,本发明采用的另一个技术方案是:提供一种多媒体播放系统,其包括播放服务器和扩展多媒体播放器,播放服务器包括注册单元和衍生类生成单元,其中:注册单元用于在Android操作系统注册一个不同于Android自带多媒体播放器的扩展多媒体播放器;衍生类生成单元用于在Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类,并通过衍生类指定扩展多媒体播放器针对播放目标进行多媒体播放。
本发明的有益效果是:区别于现有技术的情况,本发明的Android自带多媒体播放器的功能扩展方法通过在Android操作系统注册一个不同于Android自带多媒体播放器的扩展多媒体播放器;然后在Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类;并通过衍生类指定扩展多媒体播放器进行多媒体播放,能够通过扩展多媒体播放器播放Android自带多媒体播放器不支持的数据格式的多媒体文件,大大提升多媒体播放器的媒体能力,有效提升用户的体验。
【附图说明】
图1是本发明Android自带多媒体播放器的功能扩展方法的流程示意图;
图2是图1中步骤S102的子步骤的流程示意图;
图3是图1中步骤S103的子步骤的流程示意图;
图4是本发明多媒体播放器播放多媒体文件的流程示意图;
图5是本发明多媒体播放系统的第一结构示意图;
图6是本发明多媒体播放系统的第二结构示意图;
图7是图6中衍生类生成单元的结构示意图;
图8是图5中扩展多媒体播放器的结构示意图;
图9是图5中Android自带多媒体播放器的结构示意图。
【具体实施方式】
下面结合附图和实施方式对本发明进行详细说明。
如图1所示,图1是本发明Android自带多媒体播放器的功能扩展方法的流程示意图。该方法包括以下步骤:
步骤S101:在Android操作系统注册一个不同于Android自带多媒体播放器的扩展多媒体播放器。
在本实施例中,扩展多媒体播放器用于播放第一数据格式集所支持的数据格式的多媒体文件,Android自带多媒体播放器用于播放第二数据格式集所支持的数据格式的多媒体文件,第二数据格式集与第一数据格式集所支持的数据格式不同。其中,第一数据格式集包括但不限于avi(Audio
Video Interleaved,音频视频交错格式)、wmv(Windows Media
Video,微软公司推出的一种流媒体格式)、asf(Advanced Streaming Format,
高级串流格式)、mov(苹果公司开发的一种音频、视频文件格式)、mpg(一种影音文件格式)、mpeg(Moving Picture Experts
Group,动态图像专家组)、rm(一种流媒体视频文件格式)、flv(Flash
Video,一种新的视频格式)和ape(数字音乐无损压缩格式)。第二数据格式集包括但不限于3gp(3G流媒体的视频编码格式)、mp2格式、mp3格式、mp4格式、ts(高清电影封装格式)、flac(无损音频压缩编码)、ogg(一种新的音频压缩格式)、mkv(一种新的多媒体封装格式)、webm(一种开放、免费的媒体文件格式)和wav(微软公司开发的一种声音文件格式)。应理解,在另一实施例中,第一数据格式集可以包含第二数据格式集,或第一数据格式集包含部分第二数据格式集中的数据格式。
优选地,多媒体文件为音频文档、图像文档或视频文档。当然,本发明的多媒体文件并不限定于音频文档、图像文档或视频文档,也还可以是其他的多媒体文件。
步骤S102:在Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类。具体而言,如图2所示,步骤S102包括以下子步骤:
步骤S1021:在Android操作系统新增一个继承于Android播放器JAVA接口层的衍生类。
步骤S1022:在Android安装包中导入衍生类。
其中,本发明的衍生类中加入接口setFlag(),可通过该接口setFlag()设置标识符。并且重写父类(Android播放器JAVA接口层)中的接口setDataSource(),以使衍生类在调用父类的接口setDataSource()时将指定播放器的标识符,并一并传下去至下层的播放核心。此外该标识符被加入至等待播放的多媒体文件的播放路径前。
步骤S103:通过衍生类指定扩展多媒体播放器针对播放目标进行多媒体播放。具体而言,如图3所示,步骤S103包括以下子步骤:
步骤S1031:由衍生类的接口setFlag()设置对应扩展多媒体播放器的标识符。其中标识符设置有预设值,预设值包括第一预设值、第二预设值或第三预设值等等。例如,第一预设值为6。
该标识符用于标识该扩展多媒体播放器,使得该扩展多媒体播放器区别于Android系统中自带的多媒体播放器。将扩展多媒体播放器的标识符添加至播放目标(即多媒体文件)的地址之前,以形成该播放目标的播放路径。形成该播放目标的播放路径后,调用Android播放器JAVA接口层的接口setDataSource()把指定播放器的标识符一并依次传至JAVA本地接口、播放器库、播放服务器、扩展多媒体播放器和Android自带多媒体播放器。
在本实施例中,预先在Android操作系统设置第一数据格式集,该第一数据格式集与标识符的预设值对应,即Android操作系统能够自动识别第一数据格式集与标识符对应的值。如Android操作系统识别播放目标的数据格式为第一数据格式集中的数据格式时,将扩展多媒体播放器的标识符添加至播放目标的地址之前,以形成该播放目标的播放路径。
步骤S1032:扩展多媒体播放器解析播放路径中的标识符,从而使得扩展多媒体播放器生成播放对象。应理解,扩展多媒体播放器和Android自带多媒体播放器都解析播放路径中的标识符。
具体来说,当Android自带多媒体播放器与扩展多媒体播放器都收到等待播放的播放目标的播放路径时,Android自带多媒体播放器与扩展多媒体播放器都解析该播放路径。当扩展多媒体播放器通过解析播放路径中的标识符,解析结果为匹配时,则使用该扩展多媒体播放器生成播放对象。换言之,此时已选定使用扩展多媒体播放器来播放播放目标,并且扩展多媒体播放器已做好播放准备。当Android自带多媒体播放器通过解析播放路径中的标识符,解析结果为匹配时,则使用该Android自带多媒体播放器生成播放对象;此时已选定使用Android自带多媒体播放器来播放播放目标,并且Android自带多媒体播放器已做好播放准备。
步骤S1033:利用扩展多媒体播放器播放播放对象并显示第一显示信息。其中,第一显示信息包括但不限定于音频信息、视频信息或亮度信息。
进一步地,如图4所示,在多媒体播放器播放多媒体文件时,包括以下步骤:
步骤S201:多媒体播放器解析播放路径中的标识符。应理解,此处是Android自带多媒体播放器和扩展多媒体播放器解析播放路径中的标识符。
步骤S202:判断标识符对应的值是否为第一预设值。
在确定标识符对应的值为第一预设值时,执行步骤S203:调用扩展多媒体播放器播放多媒体文件。即,在Android操作系统中生成播放对象,并设置播放对象的第一显示信息;并利用扩展多媒体播放器播放播放对象并显示第一显示信息。
步骤S204:扩展多媒体播放器接收并执行控制指令。其中控制指令包括暂停播放指令、继续播放指令、停止播放指令、重新播放指令以删除指令中的至少一种。
在确定标识符对应的值不为第一预设值时,此刻说明多媒体文件的数据格式为Android自带多媒体播放器所支持的数据格式,则执行步骤S205:利用Android自带多媒体播放器播放多媒体文件。即,在Android操作系统中设置播放对象,并设置播放对象的第二显示信息;同时利用Android自带多媒体播放器播放播放对象并显示第二显示信息。其中,第二显示信息包括但不限定于音频信息、视频信息或亮度信息。
步骤S206:Android自带多媒体播放器接收并执行控制指令。其中控制指令包括暂停播放指令、继续播放指令、停止播放指令、重新播放指令以删除指令中的至少一种。
本实施例通过在Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类,并通过此衍生类指定扩展多媒体播放器进行多媒体播放,能够提升多媒体播放器的媒体能力,有效提升用户的体验。
本发明还公开一种多媒体播放系统,如图5所示,图5是本发明多媒体播放系统的第一结构示意图,图5中的多媒体播放系统与图1中的方法对应。多媒体播放系统包括Android播放器JAVA接口层11、扩展接口层12、JAVA本地接口13、播放器库14、播放服务器15、扩展多媒体播放器16和Android自带多媒体播放器17。
Android播放器JAVA接口层11用于接入Android多媒体应用开发。
扩展接口层12用于接入扩展多媒体播放器所支持数据格式的多媒体应用开发。应理解,扩展接口层12与图1中的衍生类是相同物件的不同角度表述。
JAVA本地接口13用于调用播放器库提供对JAVA的接口。
播放器库14用于对JAVA本地接口13的JAVA 本地接口提供播放器类的接口。
播放服务器15是媒体的服务器,其通过继承播放器库的类实现服务器的功能,并通过调用底下核心的扩展多媒体播放器16和Android自带多媒体播放器17来完成播放作业。
在本发明另一实施例中,如图6所示,多媒体播放系统另包含了注册单元151和衍生类生成单元152。
注册单元151用于在Android操作系统注册一个不同于Android自带多媒体播放器的扩展多媒体播放器。
衍生类生成单元152用于在Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类。具体而言,如图7所示,衍生类生成单元152包括衍生类增加子单元1521和衍生类导入子单元1522。衍生类增加子单元1521用于在Android操作系统新增一个继承于Android播放器JAVA接口层的衍生类。衍生类导入子单元1522用于在Android安装包中导入衍生类,以使得衍生类指定扩展多媒体播放器16针对播放目标进行多媒体播放。
所述多媒体播放器中的衍生类的接口setFlag()设置对应扩展多媒体播放器的标识符。其中标识符设置有预设值,预设值包括第一预设值、第二预设值或第三预设值等等。例如,第一预设值为6。该标识符用于标识该扩展多媒体播放器16,使得该扩展多媒体播放器16区别于Android系统中Android自带的多媒体播放器17。扩展接口层12与Android播放器JAVA接口层11也形成了一个播放路径形成单元,将该扩展多媒体播放器16的标识符被添加至播放目标的地址之前,以形成该播放目标的播放路径。形成该播放目标的播放路径后,调用Android播放器JAVA接口层11的接口setDataSource()把指定播放器的标识符一并依次传至JAVA本地接口13、播放器库14、播放服务器15、扩展多媒体播放器16和Android自带多媒体播放器17。
在本实施例中,预先在Android操作系统设置第一数据格式集,该第一数据格式集与标识符的值对应,即Android操作系统能够自动识别第一数据格式集与标识符对应的值。如Android操作系统识别播放目标的数据格式为第一数据格式集中的数据格式时,将扩展多媒体播放器16的标识符添加至播放目标的地址之前,以形成该播放目标的播放路径。
扩展多媒体播放器16用于解析播放路径中的标识符。应理解,扩展多媒体播放器16和Android自带多媒体播放器17分别用于解析播放路径中的标识符,从而使得扩展多媒体播放器16或Android自带多媒体播放器17生成播放对象。
具体来说,当Android自带多媒体播放器17与扩展多媒体播放器16都收到等待播放的播放目标的播放路径时,Android自带多媒体播放器17与扩展多媒体播放器16都解析该播放路径。当扩展多媒体播放器16通过解析播放路径中的标识符,解析结果为匹配时,则使用该扩展多媒体播放器16生成播放对象。换言之,此时已选定使用扩展多媒体播放器16来播放播放目标,并且扩展多媒体播放器16已做好播放准备。当Android自带多媒体播放器17通过解析播放路径中的标识符,解析结果为匹配时,则使用该Android自带多媒体播放器17生成播放对象;此时已选定使用Android自带多媒体播放器17来播放播放目标,并且Android自带多媒体播放器17已做好播放准备。
如图8所示,扩展多媒体播放器16包括解析单元161、标识符判断单元162和执行单元163。解析单元161用于解析播放路径中的标识符。标识符判断单元162用于判断标识符对应的值是否为第一预设值。执行单元163用于在确定标识符对应的值为第一预设值时,调用扩展多媒体播放器16播放多媒体文件。即,执行单元163在Android操作系统中生成扩展多媒体播放器16对应的播放对象,并设置播放目标的第一显示信息,同时利用扩展多媒体播放器16播放播放目标并显示第一显示信息。其中,第一显示信息包括但不限定于音频信息、视频信息或亮度信息。另外,执行单元163还用于接收并执行控制指令,其中控制指令包括暂停播放指令、继续播放指令、停止播放指令、重新播放指令以删除指令中的至少一种。
如图9所示,Android自带多媒体播放器17包括解析单元171、标识符判断单元172和执行单元173。解析单元171用于解析播放路径中的标识符。标识符判断单元172用于判断标识符对应的值是否为第一预设值。执行单元173用于在确定标识符对应的值不为第一预设值时,调用Android自带多媒体播放器17播放多媒体文件。即,执行单元173在Android操作系统中生成Android自带多媒体播放器17对应的播放对象,并设置播放对象的第二显示信息,同时利用Android自带多媒体播放器17播放播放对象并显示第二显示信息。其中,第二显示信息包括但不限定于音频信息、视频信息或亮度信息。另外,执行单元173还用于接收并执行控制指令,其中控制指令包括暂停播放指令、继续播放指令、停止播放指令、重新播放指令以删除指令中的至少一种。
本实施例的多媒体播放器通过在Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类,并通过此衍生类指定扩展多媒体播放器进行多媒体播放,能够提升多媒体播放器的媒体能力,有效提升用户的体验。
以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。
Claims (16)
- 一种Android自带多媒体播放器的功能扩展方法,其特征在于,所述方法包括:在Android操作系统注册一个不同于Android自带多媒体播放器的扩展多媒体播放器;在所述Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类;通过所述衍生类指定所述扩展多媒体播放器针对播放目标进行多媒体播放。
- 根据权利要求1所述的方法,其特征在于,所述扩展多媒体播放器用于播放第一数据格式集所支持的数据格式的多媒体文件,所述Android自带多媒体播放器用于播放第二数据格式集所支持的数据格式的多媒体文件,所述第二数据格式集与所述第一数据格式集所支持的数据格式不同。
- 根据权利要求1所述的方法,其特征在于,所述在所述Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类的步骤包括:在所述Android操作系统新增一个继承于所述Android播放器JAVA接口层的衍生类;在Android安装包中导入所述衍生类。
- 根据权利要求3所述的方法,其特征在于,所述通过所述衍生类指定所述扩展多媒体播放器针对播放目标进行多媒体播放的步骤包括:由所述衍生类的接口setFlag()设置对应所述扩展多媒体播放器的标识符;所述扩展多媒体播放器解析播放路径中的标识符,从而使得所述扩展多媒体播放器生成播放对象;利用所述扩展多媒体播放器播放所述播放目标并显示第一显示信息。
- 根据权利要求4所述的方法,其特征在于,所述方法还包括:将所述标识符添加至所述播放目标的地址之前,以形成所述播放目标的播放路径。
- 根据权利要求4所述的方法,其特征在于,所述扩展多媒体播放器解析播放路径中的标识符的步骤包括:判断所述标识符对应的值是否为第一预设值;在确定所述标识符对应的值为第一预设值时,利用所述扩展多媒体播放器播放所述多媒体文件。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:接收并执行控制指令,其中,所述控制指令包括暂停播放指令、继续播放指令、停止播放指令、重新播放指令以删除指令中的至少一种。
- 根据权利要求1所述的方法,其特征在于,所述多媒体文件为音频文档、图像文档或视频文档。
- 一种多媒体播放系统,其特征在于,所述多媒体播放系统包括Android自带多媒体播放器和扩展多媒体播放器,所述多媒体播放系统另包含,其中:所述注册单元用于在Android操作系统注册一个不同于Android自带多媒体播放器的扩展多媒体播放器;所述衍生类生成单元用于在所述Android操作系统中设置一个继承于Android播放器JAVA接口层的衍生类,其中所述衍生类指定所述扩展多媒体播放器针对播放目标进行多媒体播放。
- 根据权利要求9所述的多媒体播放系统,其特征在于,所述扩展多媒体播放器用于播放第一数据格式集所支持的数据格式的多媒体文件,所述Android自带多媒体播放器用于播放第二数据格式集所支持的数据格式的多媒体文件,所述第二数据格式集与所述第一数据格式集所支持的数据格式不同。
- 根据权利要求9所述的多媒体播放系统,其特征在于,所述衍生类生成单元包括:衍生类增加子单元,用于在所述Android操作系统新增一个继承于所述Android播放器JAVA接口层的衍生类;衍生类导入子单元,用于在Android安装包中导入所述衍生类。
- 根据权利要求11所述的多媒体播放系统,其特征在于,所述衍生类包含接口setFlag()设置对应所述扩展多媒体播放器的标识符;所述扩展多媒体播放器包括解析单元,用于解析播放路径中的标识符,从而使得扩展多媒体播放器生成播放对象;所述扩展多媒体播放器播放所述播放目标并显示第一显示信息。
- 根据权利要求12所述的多媒体播放系统,其特征在于, 包含播放路径形成单元,用于将所述标识符添加至所述播放目标的地址之前,以形成所述播放目标的播放路径。
- 根据权利要求12所述的多媒体播放系统,其特征在于,所述扩展多媒体播放器还包括:标识符判断单元,用于判断所述标识符对应的值是否为第一预设值;执行单元,用于在所述标识符判断单元确定所述标识符对应的值为第一预设值时,利用所述扩展多媒体播放器播放所述多媒体文件。
- 根据权利要求14所述的多媒体播放系统,其特征在于,所述执行单元还用于接收并执行控制指令,其中,所述控制指令包括暂停播放指令、继续播放指令、停止播放指令、重新播放指令以删除指令中的至少一种。
- 根据权利要求9所述的多媒体播放系统,其特征在于,所述多媒体文件为音频文档、图像文档或视频文档。
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/562,531 US20180107496A1 (en) | 2015-03-30 | 2015-03-30 | Method of expanding function of android standard multimedia player and multimedia playing system |
| PCT/CN2015/075402 WO2016154855A1 (zh) | 2015-03-30 | 2015-03-30 | Android自带多媒体播放器的功能扩展方法和多媒体播放系统 |
| CN201580051284.XA CN107077872A (zh) | 2015-03-30 | 2015-03-30 | Android自带多媒体播放器的功能扩展方法和多媒体播放系统 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2015/075402 WO2016154855A1 (zh) | 2015-03-30 | 2015-03-30 | Android自带多媒体播放器的功能扩展方法和多媒体播放系统 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2016154855A1 true WO2016154855A1 (zh) | 2016-10-06 |
Family
ID=57003808
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/075402 Ceased WO2016154855A1 (zh) | 2015-03-30 | 2015-03-30 | Android自带多媒体播放器的功能扩展方法和多媒体播放系统 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20180107496A1 (zh) |
| CN (1) | CN107077872A (zh) |
| WO (1) | WO2016154855A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115086768B (zh) * | 2022-06-16 | 2023-07-25 | 四川长虹电器股份有限公司 | 多sdk播放器的控制方法 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103051946A (zh) * | 2012-12-26 | 2013-04-17 | 四川九洲电器集团有限责任公司 | 基于Android系统的通用RTSP流播放器 |
| CN103297850A (zh) * | 2012-08-24 | 2013-09-11 | 乐视致新电子科技(天津)有限公司 | 一种实现Android系统开机播放网络视频的方法 |
| CN103366780A (zh) * | 2012-03-31 | 2013-10-23 | 盛乐信息技术(上海)有限公司 | 多媒体播放器引擎系统及其使用方法和多媒体播放器 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9098437B2 (en) * | 2010-10-01 | 2015-08-04 | Z124 | Cross-environment communication framework |
| US20090089202A1 (en) * | 2007-09-28 | 2009-04-02 | Fidessa Corporation | Algorithmic order management tool for trading financial instruments |
| CN102306103B (zh) * | 2011-08-25 | 2014-07-02 | 华南理工大学 | 一种Android RTSP播放器的SDK模块 |
-
2015
- 2015-03-30 WO PCT/CN2015/075402 patent/WO2016154855A1/zh not_active Ceased
- 2015-03-30 US US15/562,531 patent/US20180107496A1/en not_active Abandoned
- 2015-03-30 CN CN201580051284.XA patent/CN107077872A/zh active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103366780A (zh) * | 2012-03-31 | 2013-10-23 | 盛乐信息技术(上海)有限公司 | 多媒体播放器引擎系统及其使用方法和多媒体播放器 |
| CN103297850A (zh) * | 2012-08-24 | 2013-09-11 | 乐视致新电子科技(天津)有限公司 | 一种实现Android系统开机播放网络视频的方法 |
| CN103051946A (zh) * | 2012-12-26 | 2013-04-17 | 四川九洲电器集团有限责任公司 | 基于Android系统的通用RTSP流播放器 |
Also Published As
| Publication number | Publication date |
|---|---|
| US20180107496A1 (en) | 2018-04-19 |
| CN107077872A (zh) | 2017-08-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11336953B2 (en) | Video processing method, electronic device, and computer-readable medium | |
| CN103596641B (zh) | 一种音频管理方法及装置 | |
| US7669206B2 (en) | Dynamic redirection of streaming media between computing devices | |
| WO2011108900A2 (en) | Method and apparatus for generating bookmark information | |
| CN112269516B (zh) | 桌面元数据的显示方法、访问方法及相关装置 | |
| WO2020133377A1 (zh) | 视频预览方法、装置、电子设备及计算机可读存储介质 | |
| US20140093219A1 (en) | Multiple Data Source Aggregation for Efficient Synchronous Multi-Device Media Consumption | |
| CN102789385B (zh) | 视频文件播放器和视频文件播放的处理方法 | |
| WO2022033171A1 (zh) | 多媒体数据的播放方法、装置、电子设备及存储介质 | |
| CN111541913A (zh) | 一种拼接屏的视频播放方法、装置、计算机设备和介质 | |
| EP2300901A2 (en) | Apparatus and method for providing user interface service in a multimedia system | |
| WO2016023350A1 (zh) | 多媒体播放设备、播放器自动识别装置及方法 | |
| CN107450874A (zh) | 一种多媒体数据双屏播放方法及系统 | |
| WO2016154855A1 (zh) | Android自带多媒体播放器的功能扩展方法和多媒体播放系统 | |
| WO2016173075A1 (zh) | 一种系统切换方法和装置 | |
| WO2021029671A1 (ko) | 스트리밍 콘텐츠의 재생 방법 및 시스템 | |
| US20120139923A1 (en) | Wrapper for porting a media framework and components to operate with another media framework | |
| US7882510B2 (en) | Demultiplexer application programming interface | |
| CN115604238A (zh) | 物联网操作系统的音视频处理方法、装置、设备和介质 | |
| CN117472321A (zh) | 音频处理方法、装置、存储介质及电子设备 | |
| CN115437723B (zh) | 应用场景的快速切换方法、装置、电子设备和存储介质 | |
| CN115988277B (zh) | 智能电视控制方法、电子设备及可读存储介质 | |
| CN107484006A (zh) | 一种界面处理方法、机顶盒及存储介质 | |
| CN104269185A (zh) | 在Java虚拟机中实现混音播放的方法及系统 | |
| CN114286179B (zh) | 视频编辑方法、设备和计算机可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15886842 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 15562531 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 15886842 Country of ref document: EP Kind code of ref document: A1 |