A multi-audio aggregation vehicle multimedia method based on MediaSession framework
The multi-audio aggregation method using the MediaSession framework addresses the lack of unified standards in in-vehicle multimedia by standardizing media control and communication across different audio types, enhancing efficiency and user experience.
Patent Information
- Application Number
- CN202110500973.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-08
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2041-05-08
AI Technical Summary
In-vehicle multimedia systems lack a unified standard for controlling and communicating between multiple audio types such as radio, Bluetooth music, and online media, relying on separate interfaces and broadcasting, which is inefficient and non-standardized.
A multi-audio aggregation method using the MediaSession framework, involving creating a service subclass, maintaining a play queue, defining a playback control interface, and abstracting playback models to standardize media control and communication across different audio types.
Standardizes media service interfaces, enabling efficient and reliable switching between audio types, enriching playback experiences with customizable modes, and supporting common controls for diverse user needs.
Smart Images

Figure CN113504886B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of in-vehicle multimedia, and in particular to a multi-audio aggregation in-vehicle multimedia method based on a MediaSession framework. Background Art
[0002] At present, cars are becoming more and more popular and have become an indispensable part of our daily life. Cars generally have on-board multimedia, which can provide us with functions such as navigation and music playback. As time changes and people's needs change, the functions of on-board multimedia are more and more, and there is no unified standard.
[0003] In car multimedia, when there are multiple audio types such as radio, Bluetooth music, online media, and local media, most of them use multiple services or different interfaces to support media control and communication respectively. The control and communication between each other rely on broadcasting or ibind to implement their respective interfaces. There is no unified standard and it cannot meet people's requirements. Summary of the Invention
[0004] (1) Technical problems solved
[0005] In response to the shortcomings of the existing technology, the present invention provides a multi-audio aggregation in-vehicle multimedia method based on the MediaSession framework. This control method solves the problem that in in-vehicle multimedia, when there are multiple audio types such as radio, Bluetooth music, online media, and local media, most of them use multiple services or different interfaces to support media control and communication respectively, and the control and communication between each other rely on broadcasting or ibind to implement their respective interfaces, and there is no unified standard.
[0006] (2) Technical solution
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A multi-audio aggregation vehicle multimedia method based on the MediaSession framework includes the following steps:
[0009] S1: Create a service, create a subclass of the core service MediaBrowserServiceCompat and create MediaSessionCompat, and register callbacks related to MediaSessionCallback;
[0010] S2: Maintain a queue, maintain a play queue, and support setting the play mode;
[0011] S3: Create an interface, create the playback control abstract interface PlayerInterface, and support common media control;
[0012] S4: Covering interfaces. Different audios need to create different player implementations of PlayerInterface instances and cover all interfaces.
[0013] S5: Abstract the playback model, which has the data required for playing various audio types.
[0014] As a further solution of the present invention, the play modes in S2 are sequential, random, single, previous, next, and current song.
[0015] Furthermore, commonly used media controls in S3 include pause, play, previous, next, jump, and play status.
[0016] Based on the above solution, the data of the playback model in S5 are the playback address, audio ID, playback duration, album cover address, and audio type.
[0017] Furthermore, when the control end in S5 needs to play a song, it encapsulates the data into an abstract playback model and then sends it to mediaSession. MediaSessionCallback will receive a standard control callback. It only needs to call different players to implement the corresponding logic according to the audio type.
[0018] As a further solution of the present invention, any other multimedia control and audio information acquisition in S1 are performed through MediaSession, and MediaSession calls the player implemented by the interface through audio type forwarding.
[0019] Based on the above solution, all audio models in S5 must be converted into abstract playback models. After being handed over to MediaSession, MediaSession is handed over to the corresponding type of player to implement the corresponding function. In the entire process, the control end can control the current audio through the standard MediaSession playback control solution. Regardless of the type of audio currently being played, there is no need to adapt the interface of each audio.
[0020] (3) Beneficial effects
[0021] Compared with the existing technology, the present invention provides a multi-audio aggregation vehicle multimedia method based on the MediaSession framework, which has the following beneficial effects:
[0022] 1. The present invention standardizes the communication interface of media services and interfaces through innovative core services, achieving complete decoupling and enabling free and efficient switching between different media.
[0023] 2. The present invention can standardize the control of media and the reading of audio information in aggregated multimedia, regardless of how many different types of audio there are, whether local resources or online resources, and make direct interaction with other media on the platform more standardized, simple, efficient and reliable.
[0024] 3. The present invention can enrich the playback experience of different people and improve applicability by setting different playback modes.
[0025] 4. The present invention supports commonly used media controls and can be adjusted according to the needs of different users, thereby improving the diversity of playback. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a flow chart of the structure of a multi-audio aggregation vehicle multimedia method based on the MediaSession framework proposed by the present invention. DETAILED DESCRIPTION
[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0028] Example 1
[0029] Reference Figure 1 , a multi-audio aggregation in-vehicle multimedia method based on the MediaSession framework, comprising the following steps:
[0030] S1: Create a service, create a subclass of the core service MediaBrowserServiceCompat and create MediaSessionCompat, register callbacks related to MediaSessionCallback, standardize the communication interface between media services and interfaces, achieve complete decoupling, and enable free and efficient switching between different media;
[0031] S2: Maintain a play queue and support setting play modes. By setting different play modes, you can enrich the play experience of different people and improve applicability.
[0032] S3: Create an interface, create the playback control abstract interface PlayerInterface, and support common media control;
[0033] S4: Covering interfaces. Different audios need to create different player implementations of PlayerInterface instances and cover all interfaces.
[0034] S5: Abstract the playback model, which has the data required to play various audio types. It allows the control of media and the reading of audio information to be standardized regardless of the number of different audio types in the aggregated multimedia, whether local or online resources, and makes direct interaction with other media on the platform more standardized, simple, efficient and reliable.
[0035] It should be noted that the playback modes in S2 are sequential, random, single, previous, next, and current song. The commonly used media controls in S3 are pause, play, previous, next, jump, and playback status. By supporting commonly used media controls, it can be adjusted and changed according to the needs of different users to improve the diversity of playback. The data of the playback model in S5 is the playback address, audio id, playback time, album cover address, and audio type. When the control end in S5 needs to play a song, it encapsulates the data into an abstract playback model and then sends it to mediaSession. MediaSessionCallback will receive a standard control callback. It only needs to call different players to implement the corresponding logic according to the audio type.
[0036] Example 2
[0037] Reference Figure 1 , a multi-audio aggregation in-vehicle multimedia method based on the MediaSession framework, comprising the following steps:
[0038] S1: Create a service, create a subclass of the core service MediaBrowserServiceCompat and create MediaSessionCompat, register callbacks related to MediaSessionCallback, standardize the communication interface between media services and interfaces, achieve complete decoupling, and enable free and efficient switching between different media;
[0039] S2: Maintain a play queue and support setting play modes. By setting different play modes, you can enrich the play experience of different people and improve applicability.
[0040] S3: Create an interface, create the playback control abstract interface PlayerInterface, and support common media control;
[0041] S4: Covering interfaces. Different audios need to create different player implementations of PlayerInterface instances and cover all interfaces.
[0042] S5: Abstract the playback model, which has the data required to play various audio types. It allows the control of media and the reading of audio information to be standardized regardless of the number of different audio types in the aggregated multimedia, whether local or online resources, and makes direct interaction with other media on the platform more standardized, simple, efficient and reliable.
[0043] It should be noted that the playback modes in S2 are sequential, random, single, previous, next, and current song. The commonly used media controls in S3 are pause, play, previous, next, jump, and playback status. By supporting commonly used media controls, it can be adjusted according to the needs of different users to improve the diversity of playback. The data of the playback model in S5 is the playback address, audio id, playback time, album cover address, and audio type. When the control end in S5 needs to play a song, it encapsulates the data into an abstract playback model and then sends it to mediaSession. MediaSessionCallback will receive a standard control callback. It only needs to call different The player implements the corresponding logic. Any other multimedia control and audio information acquisition in S1 are performed through MediaSession. MediaSession calls the player implemented by the interface through the audio type forwarding. All audio models in S5 must be converted into abstract playback models. After being transferred to MediaSession, MediaSession is transferred to the corresponding type of player to implement the corresponding function. In the entire process, the control end can control the current audio through the standard MediaSession playback control solution. No matter what type of audio is currently being played, there is no need to adapt the interface of each audio.
[0044] In the description herein, it should be noted that relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Furthermore, the terms "include," "comprise," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0045] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A multi-audio aggregation vehicle multimedia method based on the MediaSession framework, characterized in that: The following steps are involved: S1: Create a service, create a subclass of the core service MediaBrowserServiceCompat and create MediaSessionCompat, register callbacks related to MediaSessionCallback, and any other multimedia control and audio information acquisition in S1 are performed through MediaSession. MediaSession calls the player implemented by each interface through audio type forwarding. S2: Queue maintenance, maintain a play queue, and support setting the play mode; S3: Create an interface, create the playback control abstract interface PlayerInterface, and support common media control; S4: Covering interfaces. Different audios need to create different player implementations of PlayerInterface instances and cover all interfaces. S5: Abstract the playback model. The playback model has the data required for playing various audio types. All audio models in S5 must be converted into abstract playback models. After being transferred to MediaSession, MediaSession is transferred to the corresponding type of player to implement the corresponding functions. In the entire process, the control end can control the current audio through the standard MediaSession playback control solution. No matter what type of audio is currently being played, there is no need to adapt the interface of each audio. When the control end in S5 needs to play a song, it encapsulates the data into an abstract playback model and then sends it to mediaSession. MediaSessionCallback will receive a standard control callback. It only needs to call different players to implement the corresponding logic according to the audio type.
2. According to the multi-audio aggregation vehicle multimedia method based on the MediaSession framework of claim 1, it is characterized in that: The play modes in S2 are sequential, random, single, previous, next, and current song.
3. According to the multi-audio aggregation vehicle multimedia method based on the MediaSession framework of claim 1, it is characterized in that: Common media controls in S3 include pause, play, previous, next, jump, and play status.
4. According to the multi-audio aggregation vehicle multimedia method based on the MediaSession framework of claim 1, it is characterized in that: The data of the playback model in S5 are playback address, audio id, playback duration, album cover address, and audio type.
