Method for processing playing information, electronic device and medium
By using a player agent to manage audio and video data transmission on the user terminal device, the problem of resource waste in Bluetooth connection is solved, and efficient data playback and resource saving are achieved on the vehicle's infotainment system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONOR DEVICE CO LTD
- Filing Date
- 2024-11-29
- Publication Date
- 2026-05-29
AI Technical Summary
How to reduce the resource consumption of electronic devices during audio and video playback, especially when transmitting data between Bluetooth-connected car infotainment systems and user terminal devices, to avoid unnecessary resource waste.
By using a player agent in the user terminal device to manage the transmission and display of audio and video data, the player agent is invoked only when necessary to reduce unnecessary application startup and resource consumption, and the data stream is transmitted to the vehicle's infotainment system for playback via Bluetooth connection.
It effectively reduces the power consumption of electronic devices and avoids application restarts and resource waste caused by obtaining unnecessary proxy player information.
Smart Images

Figure CN122111365A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method for processing playback information, an electronic device, and a medium. Background Technology
[0002] With the development of computer technology, the ways in which computer products are used are becoming increasingly diversified. Computer products such as computers and mobile phones are used in conjunction with software or applications to achieve various functions. For example, audio and video playback can be achieved through audio and video playback software or applications. Since audio and video playback consumes a significant amount of resources from electronic devices, minimizing resource waste is an important direction for improvement in audio and video playback technology. Summary of the Invention
[0003] This application provides a method for processing playback information, an electronic device, and a medium, which can improve resource consumption during playback. The technical solution is as follows:
[0004] In a first aspect, a method for processing playback information is provided, applied to a first electronic device, comprising: the first electronic device running a first application; sending audio data of the first application to a second electronic device; the second electronic device being connected to the first electronic device via Bluetooth; during the playback of the audio data of the first application by the second electronic device, receiving a request message for reading a player sent by the second electronic device; the request message for reading a player being used to request the first electronic device to call a player proxy to read player information; the player proxy being used to provide the second electronic device with player information of a second application that the player proxy proxies; the player information of the second application being used by the second electronic device to generate a synchronized display screen of the audio data; the second application stopping running during the running of the first application; and, in the case that the second application is different from the first application, the first electronic device ceasing to call the player proxy to provide the second electronic device with the player information of the second application.
[0005] In this embodiment, during the operation of the first application, a data stream for playback is generated. This data stream can be played on the screen of the first electronic device. The first application can also send the playback data stream to a second electronic device via a Bluetooth connection.
[0006] The second electronic device can be an in-vehicle infotainment system. This system can be installed inside a vehicle or in a simulated driving environment, such as a driving simulator or driving training equipment. Alternatively, it can be deployed on other electronic devices via an application. After receiving the data stream generated during the operation of the first application via Bluetooth, the in-vehicle infotainment system can play the data stream. While the system is playing the data stream generated during the operation of the first application, the other electronic devices can also play the data stream generated during the first application's operation, which is then displayed on the in-vehicle infotainment system's screen.
[0007] In other possible implementations, the second electronic device can be a computer, server, or platform that integrates vehicle infotainment system functionality. Alternatively, in this embodiment, the second electronic device integrates vehicle infotainment system functionality and has a display module equivalent to a vehicle infotainment system screen and a processing module equivalent to a vehicle infotainment system host.
[0008] The system reads the player's request information to request the first electronic device to invoke the player agent, which then reads the player's information. Simultaneously, the player agent reads the player information of the currently running application and also sends player information to the second electronic device. This player information is used by the second electronic device to generate a synchronized display of the audio data, which changes according to the progress of the audio data playback on the second electronic device.
[0009] The second application may have started before the first application ran, or it may not have started yet. "Abort" can also be expressed as "terminate" or "stop," which can indicate a temporary stop or a stop for a longer period of time.
[0010] The first electronic device may stop calling the player agent to provide the second electronic device with player information for the second application. This may include the first electronic device stopping calling the player agent to provide the second electronic device with player information for any application.
[0011] Alternatively, the first electronic device may stop calling the player agent to provide the second electronic device with the player information of the second application, which may include the first electronic device stopping calling the player agent to provide the second electronic device with the player information of the second application, while calling the player agent to provide the second electronic device with the player information of the first application.
[0012] In this embodiment of the application, when the first application outputs audio data to the second electronic device, the second application stops outputting audio data to the second electronic device.
[0013] If, during the operation of the first application, the proxy player is used to provide the second electronic device with information about the player for the second application, it means that the proxy player used to proxy the first application was not obtained during the operation of the first application. In other words, during the operation of the first application, the player obtained by the proxy player is not the player for the first application, but rather the player for the second application, which is not currently running. Therefore, the proxy player cannot currently obtain information about the player for the first application.
[0014] The method provided in this application embodiment, under the above circumstances, stops calling the proxy player to obtain the player information of the second application, so that the second application, which has stopped running and has been frozen by the system of the first electronic device, will not be restarted because the proxy player obtains the player information of the second application. This avoids obtaining unnecessary proxy player information or unnecessary startup of the stopped application, thereby increasing the power consumption of the first electronic device.
[0015] In this embodiment of the application, if a third application is running simultaneously while the first application is running, and the data stream generated during the running of the third application is merged with the data stream generated during the running of the first application and then transmitted from the first electronic device to the second electronic device, then the proxy player can obtain the player information of the third application without interrupting the proxy player's acquisition of the player information of the third application.
[0016] During the operation of the first application, the third application can run in the foreground or in the background of the first electronic device.
[0017] For example, the first application and the third application are two applications running in the foreground of the first electronic device. The data streams generated by the two applications while running in the foreground are merged and then sent by the first electronic device to the second electronic device for playback.
[0018] For example, the first application runs in the foreground of the first electronic device, and the third application runs in the background of the first electronic device. When the third application is running in the background, it continuously outputs a data stream. This data stream can be played on the first electronic device, or it can be played on a second electronic device that is connected to the first electronic device via Bluetooth. Therefore, when the first and second electronic devices are connected via Bluetooth, the data stream output by the third application in the background can be mixed with the data stream output by the first application in the foreground and then played on the second electronic device.
[0019] In this embodiment of the application, the data stream generated during the application's operation may include audio data, video data, audio and video data (i.e., data that is a mixture of audio and video data), screen data, and data that is a mixture of screen data and audio data.
[0020] In one implementation, the audio data can also be silent audio data. That is, if non-silent audio data is generated during the operation of the first application, such as control operation prompts, game progress prompts, or audio corresponding to videos, then the screen during the operation of the first application has synchronized audio data. Otherwise, if at a certain point in time or during a certain period of the first application's operation, the first application has not yet generated non-silent audio data, but only generated different screens, then, since the first application can output audio data to the second electronic device when the first electronic device is connected to the second electronic device, it can be considered that the first application has generated audio data during its operation even when it has not generated audio data (non-silent audio data). If, during this process, the second electronic device sends a request to the first electronic device to read the player, then the first electronic device still suspends the call to the player agent to obtain the player information of the second application.
[0021] In one implementation, the first application does not register the media session of the first electronic device before running; the second application registers the media session of the first electronic device before running.
[0022] In this embodiment, "the first application does not register the media session of the first electronic device before running" can mean that the media session is not registered in advance before the first application runs, and the media session does not contain a record of the first application when the first application runs. "The first application does not register the media session of the first electronic device before running" can also mean that the media session of the first electronic device is not registered when the first application starts. The registration of the media session for the second application is the same as for the first application.
[0023] Media sessions can be used to display playback information from applications and / or the primary electronic device, and to provide a control interface. The main function of media sessions is to control the playback behavior of applications and / or the primary electronic device, such as play and pause.
[0024] In one embodiment, the method for processing playback information further includes: a first electronic device running a second application; the first electronic device sending audio data of the second application to the second electronic device; during the process of the second electronic device playing the audio data of the second application, receiving a request message for reading the player sent by the second electronic device; and based on the request message for reading the player, calling the player agent to obtain the player information corresponding to the audio data of the second application from the second application.
[0025] In this embodiment, the first electronic device running the second application can mean that the first electronic device runs the second application in the foreground, or that the first electronic device runs the second application in other ways, enabling the second application to output a data stream to the second electronic device during its operation, thereby allowing the second electronic device to play the data stream generated during the operation of the second application. Even when the first electronic device is not connected to the second electronic device via Bluetooth, the first electronic device can still play the data stream generated during the operation of the second application.
[0026] In one implementation, running the first application includes: the first electronic device stopping running the second application; the first electronic device stopping calling the player agent; and the first electronic device running the first application.
[0027] In this embodiment, after the first electronic device runs the second application, it immediately runs the first application. That is, during the process from when the first electronic device runs the second application to when the first electronic device runs the first application, the first electronic device does not run any other applications that require calling the proxy player.
[0028] During the operation of the second application by the first electronic device, the player agent is invoked to obtain information about the player in the second application. The first electronic device stops invoking the player agent when or after the second application stops running, and before the first electronic device starts running the first application.
[0029] In one implementation, running the second application includes: launching the second application; registering a media session of the first electronic device with the second application; and running the second application.
[0030] In this embodiment, when the second application or the first application is launched, the second application or the first application is initialized. During the application initialization process, it can be determined whether the application registers a media session based on the application's configuration file.
[0031] In one implementation, the step of stopping the call to the player agent to provide player information of the second application to the second electronic device when the second application is different from the first application includes: the first electronic device determining whether the first application and the second application are the same application; and stopping the player agent from providing player information to the second electronic device when it is determined that the first application and the second application are different applications.
[0032] In one possible implementation, it can be determined whether the first application and the second application are the same application by judging whether the application being proxied by the player proxy should be the application corresponding to the audio data played by the second electronic device.
[0033] In one implementation, determining whether the first application and the second application are the same application includes: obtaining the process currently playing audio data and the process not currently playing audio data from the system audio; determining whether the process currently playing audio data is the process of the second application; and if the process currently playing audio data is not the process of the second application, determining that the first application and the second application are different applications.
[0034] In this embodiment, the process name can be used to determine whether the process currently playing audio data is a process of the second application. In other possible implementations, the identity of the first and second applications can be determined by checking whether the process pointed to by the player proxy is a process of the first application.
[0035] In one implementation, stopping the player agent from providing player information to the second electronic device includes: sending a stop call instruction to the player agent, the stop call instruction being used to control the player agent not to provide player information to the second electronic device.
[0036] In this embodiment, the first electronic device can also send a stop call command to the system Bluetooth. The stop call command is used to control the system Bluetooth to prevent it from calling the player agent. In this case, the second electronic device may display the last screen displayed by the second application during its operation, or it may not display any screen at all.
[0037] In one implementation, the step of stopping the call to the player agent to provide the player information of the second application to the second electronic device when the second application is different from the first application includes: changing the player agent to: providing the player information corresponding to the audio data of the first application to the second electronic device.
[0038] In one implementation, after changing the player agent to provide the second electronic device with information about the player corresponding to the audio data of the first application, the method further includes: calling the player agent to provide the second electronic device with information about the player corresponding to the audio data of the first application. In this case, the second electronic device can display a synchronized screen of the audio data of the first application.
[0039] In possible implementations, the application corresponding to the player agent can change as applications on the electronic device start or stop running. Alternatively, the application corresponding to the player agent can be changed by the system Bluetooth or other modules within the first electronic device without detecting changes in the media session. After the currently running application registers the media session of the first electronic device, each time this registered application runs, the system audio can detect changes in the media session and notify the system Bluetooth of the changes, which in turn changes the application corresponding to the player agent.
[0040] Secondly, this application also provides a method for processing playback information, applied to a second electronic device, comprising: receiving audio data of a first application sent by a first electronic device; the second electronic device being connected to the first electronic device via Bluetooth; the first electronic device running the first application; during the playback of the audio data of the first application by the second electronic device, sending information to the first electronic device to read the player; the request information to read the player being used to request the first electronic device to call a player proxy to read the player information; the player proxy being used to provide the second electronic device with player information of a second application proxied by the player proxy; the player information of the second application being used by the second electronic device to generate a synchronized display screen of the audio data; the second application stopping running during the running of the first application; and, if the second application is different from the first application, the player proxy ceasing to provide the second electronic device with the player information of the second application.
[0041] In this embodiment, the second electronic device can be a vehicle infotainment system or other electronic devices that integrate vehicle infotainment system functions. When the information playback processing method is applied to a vehicle infotainment system or other electronic devices, the vehicle infotainment system and other electronic devices can be considered as two different electronic devices connected via Bluetooth. Since the vehicle infotainment system itself is also a type of electronic device, the two electronic devices connected via Bluetooth can be referred to as the first electronic device and the second electronic device.
[0042] In one implementation, the first application does not register the media session of the first electronic device before running; the second application registers the media session of the first electronic device before running.
[0043] In one embodiment, the method for processing playback information further includes: receiving audio data of a second application sent by the first electronic device; the first electronic device running the second application; during the process of the second electronic device playing the audio data of the second application, sending a request to read the player to the first electronic device; receiving information of the player corresponding to the audio data of the second application sent by the first electronic device; the information of the player corresponding to the audio data of the second application is obtained by the first electronic device from the second application by calling the player agent based on the request to read the player.
[0044] In one implementation, before the first electronic device runs the first application, the first electronic device stops running the second application and stops calling the player agent.
[0045] In one implementation, after the first electronic device launches the second application, the second application registers a media session with the first electronic device. Correspondingly, after the first electronic device closes or pauses the second application, it stops accessing the media session of the first electronic device to obtain the player information of the second application. If the first electronic device is not running any application after closing or pausing the second application, or if the application running on the first electronic device does not play audio data through the second electronic device after closing or pausing the second application, then the first electronic device does not access the player information of any application through the player proxy.
[0046] In one implementation, when the second application is different from the first application, the player agent stops providing player information of the second application to the second electronic device by the following steps: determining whether the first application and the second application are the same application; if it is determined that the first application and the second application are different applications, stopping the call to the player agent to provide player information to the second electronic device.
[0047] In one implementation, determining whether the first application and the second application are the same application includes: obtaining the process currently playing audio data and the process not currently playing audio data from the system audio; determining whether the process currently playing audio data is the process of the second application; and if the process currently playing audio data is not the process of the second application, determining that the first application and the second application are different applications.
[0048] In one implementation, stopping the player agent from providing player information to the second electronic device includes: sending a stop call instruction to the player agent, the stop call instruction being used to control the player agent not to provide player information to the second electronic device.
[0049] In one implementation, when the second application is different from the first application, the player agent stops providing the player information of the second application to the second electronic device, which is achieved by the following steps: changing the player agent to provide the player information corresponding to the audio data of the first application to the second electronic device.
[0050] In one implementation, after changing the player agent to: providing the second electronic device with information about the player corresponding to the audio data of the first application, the method further includes: calling the player agent to provide the second electronic device with information about the player corresponding to the audio data of the first application.
[0051] Thirdly, embodiments of this application also provide a playback information processing apparatus, applied to a first electronic device, capable of implementing the playback information processing method applicable to a first electronic device provided in any embodiment of this application.
[0052] Fourthly, embodiments of this application also provide a playback information processing apparatus, applied to a second electronic device, capable of implementing the playback information processing method applicable to a second electronic device provided in any embodiment of this application.
[0053] Fifthly, embodiments of this application also provide a playback information processing system capable of implementing the playback information processing method provided in any embodiment of this application.
[0054] The playback information processing system provided in this application includes a playback information processing device applicable to a first electronic device and a playback information processing device applicable to a second electronic device.
[0055] Sixthly, embodiments of this application also provide a playback device that can implement the playback information processing method provided in any embodiment of this application during audio playback.
[0056] The playback device provided in the sixth aspect of the embodiments of this application may further include a playback device that can be applied to a second electronic device and a playback device that can be applied to a first electronic device.
[0057] In a seventh aspect, embodiments of this application provide an electronic device, which includes: a processor and a memory;
[0058] The memory is used to store a program for an electronic device to perform the method provided in any embodiment of the present application, and to store data involved in implementing the method provided in any embodiment of the present application;
[0059] The processor is configured to execute programs stored in memory.
[0060] Optionally, there may be one or more processors and one or more memories.
[0061] Alternatively, the memory can be integrated with the processor, or the memory can be set up separately from the processor.
[0062] The processing device in the seventh aspect above can be a chip. The processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. The memory can be integrated into the processor or located outside the processor and exist independently.
[0063] In the specific implementation process, the memory can be a non-transitory memory, such as read-only memory (ROM), which can be integrated with the processor on the same chip or set on different chips. This application does not limit the type of memory or the way the memory and processor are set.
[0064] Eighthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a computer, enable the computer to perform the method described in the first aspect.
[0065] Ninthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to perform any of the possible implementations of the first aspect.
[0066] In a tenth aspect, embodiments of this application also provide a processor, including: an input circuit, an output circuit, and a processing circuit. The processing circuit is used to receive signals through the input circuit and transmit signals through the output circuit, causing the processor to execute the method in any of the embodiments of the first aspect described above.
[0067] In specific implementation, the processor can be a chip, the input circuit can be input pins, the output circuit can be output pins, and the processing circuit can be transistors, gate circuits, flip-flops, and various logic circuits. The input signal received by the input circuit can be received and input by, for example, but not limited to, a receiver, and the signal output by the output circuit can be, for example, but not limited to, output to and transmitted by a transmitter. Furthermore, the input circuit and the output circuit can be the same circuit, which is used as both the input circuit and the output circuit at different times. This application does not limit the specific implementation of the processor and various circuits.
[0068] The technical effects achieved by the second to tenth aspects mentioned above are similar to those achieved by the corresponding technical means in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0069] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0070] Figure 2 This is a schematic diagram illustrating an application scenario according to an embodiment of this application;
[0071] Figure 3 This is a schematic diagram illustrating another application scenario of an embodiment of this application;
[0072] Figure 4 This is a schematic diagram illustrating another application scenario of this application embodiment;
[0073] Figure 5 This is a schematic diagram of the implementation process in one application scenario of this application embodiment;
[0074] Figure 6 This is a flowchart illustrating the method of an embodiment of this application;
[0075] Figure 7 This is an example interface diagram of a vehicle infotainment screen according to this application;
[0076] Figure 8 This is a schematic diagram illustrating the steps of an example playback information processing method according to this application;
[0077] Figure 9 yes Figure 8 A schematic diagram illustrating one implementation of step S814 in the diagram;
[0078] Figure 10 yes Figure 8 A schematic diagram illustrating another implementation of step S814 in the diagram;
[0079] Figure 11 This is a flowchart illustrating another example of the method in this application;
[0080] Figure 12 This is a schematic diagram of the software framework of an electronic device, which is yet another example of this application.
[0081] Figure 13 This is a schematic diagram of the structure of a playback information processing device according to an example of this application. Detailed Implementation
[0082] In the following description, specific details such as particular system architectures and technologies are set forth for illustrative purposes and not for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details.
[0083] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0084] It should be understood that "one or more" as mentioned in this application refers to one, two, or more, and "multiple" as mentioned in this application refers to two or more. In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.
[0085] Furthermore, to facilitate a clear description of the technical solutions of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.
[0086] The terms "one embodiment" or "some embodiments" used in this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this application do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. In the embodiments of this application, "obtain" can have the same meaning as "acquire" or "get."
[0087] The display method provided in this application can be applied to electronic devices. These electronic devices can be mobile phones, tablets, wearable devices, digital cameras, in-vehicle devices, augmented reality (AR) devices, virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), laptops, etc., and this application does not limit the specific application to these devices.
[0088] First, the possible structures of the electronic devices in the embodiments of this application will be introduced.
[0089] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0090] See Figure 1 The electronic device 1000 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0091] It should be noted that, Figure 10 The structure shown does not constitute a specific limitation on the electronic device 1000. In other embodiments of this application, the electronic device 1000 may include more than Figure 10 The components shown may include more or fewer components, or the electronic device 1000 may include... Figure 10 The components shown may be a combination of certain components, or the electronic device 1000 may include... Figure 10 The components shown are sub-components of certain components. For example, Figure 10 The proximity sensor 180G shown is optional. Figure 10 The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0092] Processor 110 may include one or more processing units. For example, processor 110 may include at least one of the following processing units: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and neural network processing unit (NPU). These different processing units may be independent devices or integrated devices.
[0093] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.
[0094] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0095] Figure 1 The connection relationships between the modules shown are merely illustrative and do not constitute a limitation on the connection relationships between the modules of the electronic device 1000. Optionally, the modules of the electronic device 1000 may also adopt a combination of various connection methods described in the above embodiments.
[0096] Electronic device 1000 can implement display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0097] The display screen 194 can be used to display images or videos. In some embodiments, the electronic device 1000 may include one or N display screens 194, where N is a positive integer greater than 1.
[0098] Electronic device 1000 can achieve shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0099] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can perform algorithmic optimization of image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0100] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 1000 is selecting a frequency, the DSP is used to perform Fourier transforms on the frequency energy.
[0101] Video codecs are used to compress or decompress digital video. Electronic device 1000 may support one or more video codecs. Thus, electronic device 1000 can play or record video in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, and MPEG 4.
[0102] Electronic device 1000 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0103] The distance sensor 180F is used to measure distance. The electronic device 1000 can measure distance via infrared or laser. In some embodiments, such as in a shooting scenario, the electronic device 1000 can utilize the distance sensor 180F to measure distance for rapid focusing.
[0104] Button 190 includes a power button and volume buttons. Motor 191 can generate vibration when the electronic device receives information. Motor 191 can be used to display notification information.
[0105] exist Figure 1Based on the electronic device shown, the user can switch the running state of an application using button 190. For example, the electronic device can switch an application from a foreground running state to a background running state based on the user pressing the lock screen button.
[0106] exist Figures 2 to 13 In the corresponding embodiments, the "user equipment" mentioned may refer to the "first electronic device" in the foregoing invention content. Figures 2 to 13 In a corresponding embodiment, "vehicle infotainment system" may refer to the "second electronic device" mentioned in the aforementioned invention content.
[0107] The playback information processing method provided in this application can be applied to scenarios where a first electronic device connects to a second electronic device via Bluetooth, and the second electronic device plays audio, video, or audio / video data streams. Examples of applicable scenarios for this application embodiment will be provided below.
[0108] Figure 2 This is a schematic diagram illustrating an application scenario of an embodiment of this application. For example... Figure 2 As shown, the user terminal 21 can establish a connection with the vehicle infotainment system 22 via Bluetooth. The user terminal 21 can be equivalent to the first electronic device in the aforementioned embodiments, and the vehicle infotainment system 22 can be an implementation of the second electronic device in the aforementioned embodiments. The vehicle infotainment system can also be called a vehicle tablet computer or an in-vehicle smart device, etc. In possible implementations, the vehicle infotainment system 22 can be a shorthand for an in-vehicle infotainment product installed in a car, used to realize information communication between the user and the vehicle, and between the vehicle and external devices (vehicle-to-vehicle). The vehicle infotainment system 22 can be installed in the vehicle's center console, which can be a workbench in front of the driver's and passenger's seats. The vehicle infotainment system 22 can include a host and a screen. The host of the vehicle infotainment system can be a central controller installed inside the car, used to control the vehicle's audio, navigation, entertainment, and other functions. The screen of the vehicle infotainment system can provide a user interface; in addition to the screen, the vehicle infotainment system can also have buttons, keypads, and other operation interfaces. The host of the vehicle infotainment system can be connected to the screen, or the host of the vehicle infotainment system can be separate from the screen.
[0109] When the user terminal 21 is inside the vehicle or in a position close to the vehicle, the user terminal 21 can establish a connection with the vehicle's infotainment system 22 via a short-range wireless connection. For example, the user terminal 21 can establish a connection with the vehicle's infotainment system 22 via Bluetooth, wireless LAN, or other methods. After the user terminal 21 and the vehicle's infotainment system 22 establish a connection, the vehicle's infotainment system 22 can send and receive information with the user terminal 21, realizing the interactive function between the vehicle's infotainment system 22 and the user terminal 21.
[0110] The vehicle's infotainment system and the user terminal can connect to each other, exchanging data and sharing information. This interconnection not only allows drivers to conveniently operate mobile applications while driving but also enables them to enjoy richer entertainment and navigation services through the vehicle's display screen and audio system. When the vehicle's infotainment system and the user terminal are connected wirelessly or via wired connection, audio and video playback can be one of the interactive functions between them. (See reference...) Figure 3 As shown in (a), multiple different applications are installed on the user terminal, such as video playback applications, audio playback applications, and game applications. When the vehicle infotainment system and the user terminal are connected wirelessly or via wired connection, the applications running on the user terminal can play audio and video information through the vehicle infotainment system.
[0111] When the user terminal is not connected to the vehicle's infotainment system, it can respond to user commands and run a video playback application among multiple applications, displaying, for example... Figure 3 The interface shown in (b) is shown in the image. Figure 3 In the interface shown in (b), the video stream from the video playback application is displayed, and simultaneously, the user terminal's audio playback module plays audio synchronized with the video stream. When the user terminal is connected to the vehicle's infotainment system, the system screen can display the interface corresponding to the currently running video playback application on the phone, such as... Figure 3 As shown in (c), the data stream from the video playback application is transferred to the vehicle's infotainment system. Figure 3 The operating interface shown in (c) can display the content played by the video playback application in real time, and can also play the synchronous audio stream of the video playback application through the vehicle's audio playback module. During the process of transferring the video playback application from the user terminal to the vehicle's audio system, the user terminal may not display the video playback application's interface, but it can also display a prompt message 31 indicating that the video playback application is playing on the smart device, such as... Figure 3 As shown in (d) in the figure.
[0112] The aforementioned flow refers to a function that enables interconnection between the user terminal and the vehicle system. Through this flow function, applications, navigation, music, and other content on the user terminal can be seamlessly transferred to the vehicle system, achieving interconnection and interoperability between the mobile phone and the vehicle system.
[0113] When the user terminal is connected to the vehicle's infotainment system, the user terminal's desktop can also be displayed on the vehicle's infotainment system screen, such as... Figure 4 The interface shown in (a) is divided into at least two areas. Area 41 displays the user terminal's desktop interface. The vehicle system can respond to user actions on the desktop interface by stopping operation, such as... Figure 3The video playback application shown launches the short video playback application on the user terminal and transfers the data stream of the short video playback application to the vehicle's screen, such as... Figure 4 (b) in the middle. Figure 4 In scenario (b) shown, since the user terminal and the vehicle's infotainment system are connected via Bluetooth, the short video playback application needs to register a media session each time it starts up, so that the video information from the short video playback application can be transferred to the vehicle's screen. If the short video playback application does not register a media session according to the program settings, the video information corresponding to the audio stream cannot be properly acquired by the vehicle's infotainment system during the operation of the short video application, and the vehicle's screen will continue to display the video playback application that was running before the short video playback application started, such as... Figure 3 As shown in (c) in the image, this is a synchronized view of the audio stream during the operation of the short video playback application, rather than the video stream itself.
[0114] Figure 3 and Figure 4 The information interaction process corresponding to the scenario is as follows: Figure 5 As shown. On the user terminal, multiple applications capable of playing audio and video data run, including a short video playback application and a cloud music playback application (also called a cloud music application). When the user terminal is running, the system Bluetooth notifies the system audio to listen to the media session on the user terminal. When the cloud music playback application starts, it registers for a media session. A media session is an object used to manage the data stream in the pipeline, enabling the application to interact with the system's media control functions. When an application registers for a media session, the media session manages a list of registered applications. After the cloud music playback application registers for a media session, changes to the list of registered applications managed by the media session are detected by the system audio, which notifies the user terminal's system Bluetooth that the cloud music playback application has registered for a media session. Based on the system audio notification, the system Bluetooth saves the active player proxy for the cloud music playback application.
[0115] After the cloud music application is launched, it can run in the foreground. During operation, the cloud music application sends real-time audio data to the system audio, which in turn sends the real-time audio data to the system Bluetooth. The system Bluetooth then sends the real-time audio data to the vehicle's infotainment system, which has a Bluetooth connection with the user's terminal. Upon receiving the real-time audio data, the vehicle's infotainment system generates a request to read the player and sends this request to the system Bluetooth. The system Bluetooth then activates the player agent, which sends the player read request to the cloud music application. The system Bluetooth then retrieves the player information from the cloud music application using the activated player agent and returns it to the system Bluetooth. The system Bluetooth then sends the player information obtained by the activated player agent to the vehicle's infotainment system, which displays the player information obtained by the activated player agent as the cloud music application plays its audio data.
[0116] The user terminal can respond to a command to close the cloud music application, pausing the application and temporarily removing it from the foreground. In possible implementations, the command to close the cloud music application can be received via the vehicle's infotainment system screen or the user terminal's screen. When pausing the cloud music application, the system first sends the received command to the application, stopping its foreground process. Simultaneously, a pause notification is sent to the system audio, which then forwards the pause notification to the system Bluetooth, and finally, the system Bluetooth sends it back to the vehicle's infotainment system. The infotainment system then stops updating the display corresponding to the cloud music application's audio data and ceases playback.
[0117] After closing the cloud music application, the user terminal can respond to the command to open the short video playback application and launch it. When the short video playback application launches, it can choose not to register a media session according to its settings. Therefore, the system Bluetooth does not save the active player proxy for the short video playback application. During the operation of the short video playback application, its audio data is sent to the system audio system in real time, then to the system Bluetooth system, and finally to the vehicle's infotainment system, allowing the system to play the audio data in real time. However, because the system Bluetooth system does not save the active player proxy for the short video playback application, the current active player proxy is still used to call the cloud music application's player proxy. Simultaneously, based on the vehicle's infotainment system's functions, during the playback of audio data from the user's terminal application, the system continuously requests player information from the user's terminal's system Bluetooth. However, since the system Bluetooth does not store the active player proxy for the short video playback application, it cannot access the short video playback application's player information by calling the active player proxy. Furthermore, because the cloud music application is closed, it needs to be frozen to prevent the cloud music application's player proxy from consuming the user's terminal's processor resources. On the vehicle's infotainment system, the displayed screen may remain the same as before the cloud music application was closed. Although the short video playback application's screen cannot be displayed on the vehicle's infotainment system, it continues to continuously request player information from the user's terminal while playing the short video playback application's audio data. The user's terminal's system Bluetooth will also continuously call the cloud music application's player proxy to initiate the process of obtaining player information.
[0118] Therefore, during the process of the short video playback application playing audio data through the car's infotainment system, the user terminal's system Bluetooth continuously activates the cloud music application's player agent and stops the cloud music application's player agent from consuming the user terminal's processor resources. This continuous process of activating and stopping the player agent from consuming the user terminal's processor resources causes the user terminal to continuously perform unnecessary operations, resulting in higher power consumption.
[0119] Therefore, embodiments of this application provide a method for processing playback information, which can improve power consumption during the playback of audio and video data by a user terminal through an externally connected device. For example... Figure 6 As shown, a method for processing playback information according to an embodiment of this application includes the following steps.
[0120] Step S61: The first electronic device runs the first application, and the media session of the first electronic device is not registered before the first application runs.
[0121] In the embodiments of this application, Figure 6 The first electronic device can be equivalent to Figures 2 to 5 The user terminal in the scenario shown.
[0122] In this embodiment, the first application is an application for playing audio data. While playing audio data, the first application also plays video data. When the first application plays video data simultaneously with audio data, the video data can be played synchronously with the audio data. The audio and video data played by the first application can be local data of the first electronic device or data obtained from a network.
[0123] The first application can also be a dedicated audio playback application; for example, it could be a cloud music application. When the first application is a dedicated audio playback application, it can display an audio interface on the vehicle's infotainment system screen during audio playback. While the audio interface of the first application of the first electronic device is displayed on the vehicle's infotainment system screen, the first electronic device may not display the audio interface itself. For example, such as... Figure 7 As shown, the audio interface displayed on the vehicle's infotainment system may include an audio control card 71, a song information card 72, and a playlist card 73 for the first application. The audio control card 71 includes tool controls for controlling audio playback. The song information card 72 may include information about the currently playing song, such as lyrics. The playlist card 73 may include songs that have already been played or songs that are about to be played.
[0124] The first application can also be a video playback application. For example, the first application can be a movie video playback application, a short video playback application, a live video playback application, an online video playback application, a video file playback application, or a video playback application of a specified type. Among them, a movie video playback application can be used to play movie-type videos, a short video playback application can be used to play videos shorter than a specified length, a live video playback application can be used to play videos recorded on-site and played in real time, an online video playback application can be used to play online videos sent over the network, a video file playback application can be used to play video files stored locally on the first electronic device, and a video playback application of a specified type can be used to play videos of a specified type.
[0125] Alternatively, the first application can be an application with audio and video playback capabilities, such as a game application, web browsing application, chat application, shopping application, social application, payment application, or memo application.
[0126] In step S61, if the first electronic device is running the first application in the foreground, the first electronic device may have run the first application at least once before step S61. That is, before step S61, the process of the first application was running in the background (the first application switched from the foreground running state to the background running state at least once).
[0127] In other possible implementations, the first electronic device may also run the first application in the background. In this case, the first electronic device may not have run the first application before step S61.
[0128] In one possible implementation, step S61 may be implemented by the first electronic device by switching the first application from a background running state to a foreground running state.
[0129] In step S61, the first application does not register the media session of the first electronic device before it runs. In other words, the first application does not register the media session of the first electronic device when it starts up.
[0130] In this embodiment, the media session can be used to send and receive information between the media application and other modules of the first electronic device system. The media session can also be used to notify other modules of the first electronic device system that the media application is playing, and to control the media application. The first application can be a media application. In this embodiment, the media application can encompass applications and platforms that support various media formats such as audio, video, text, and images.
[0131] After a media application registers a media session, the media session can send control commands from other applications, other modules of the first electronic device, or external devices of the first electronic device to the media application. This allows other applications, other modules of the first electronic device, or external devices of the first electronic device to control the media application. For example, if audio playback application 1 registers a media session, during the operation of audio playback application 1, external devices (such as Bluetooth headsets, car infotainment systems, etc.) can send received user commands to the first electronic device. The first electronic device then sends the received user commands to audio playback application 1, which can then respond to the user commands by performing operations such as pausing or starting playback.
[0132] Step S62: The first electronic device sends the audio data of the first application to the vehicle infotainment system; the vehicle infotainment system and the first electronic device are connected via Bluetooth.
[0133] In step S62, the vehicle system receives audio data of the first application sent by the first electronic device.
[0134] During the operation of the first application, a data stream for playback can be generated. Audio data can refer to digitized sound data, and the audio data of the first application can be the audio portion of the data stream generated during its operation. In other words, the data stream generated during the operation of the first application can include audio data streams and information that can be visualized. Alternatively, the data stream generated during the operation of the first application can include audio and video data streams, and the audio data of the first application can be the audio data from the audio and video data streams generated during its operation.
[0135] In this embodiment, the vehicle infotainment system can also be referred to as an in-vehicle infotainment system, which can refer to an infotainment device installed inside a car. Through its built-in hardware and software systems, the vehicle infotainment system can provide users with a variety of functions, including but not limited to music playback, video viewing, games, route navigation, and vehicle function control. Furthermore, the vehicle infotainment system also supports information exchange with the external environment or other vehicles, such as real-time traffic updates and vehicle status monitoring.
[0136] The vehicle infotainment system and the first electronic device are wirelessly connected via Bluetooth. The first electronic device can send audio data of the first application to the vehicle infotainment system via Bluetooth connection.
[0137] Step S63: During the process of the vehicle system playing the audio data of the first application, the first electronic device receives a request message from the vehicle system to read the player; the request message is used to request the first electronic device to call the player agent to read the player's information; the player agent is used to provide the vehicle system with the information to be displayed for the second application represented by the player agent.
[0138] In this embodiment, the information of the player in the second application can also be referred to as the information to be displayed in the second application. The second application stops running while the first application is running.
[0139] In step S63, correspondingly, when the vehicle-mounted system receives audio data from the first application, it can send a request to the first electronic device to read the player. This request can be used to request the first electronic device to read information about the currently running player. This information can include other information generated by the currently running player besides the audio data itself when outputting audio data. The information about the currently running player can include first information for generating visual content. The vehicle-mounted system, the first electronic device, or other external devices with screens can display the visual content synchronously with the playback of the audio data from the first application based on this first information. The currently running player can include the player of the first application.
[0140] A player proxy, also known as an active player proxy, is a tool within the native layer of a first electronic device used to transmit information from a media application to other modules, applications, or external devices of the first electronic device. In this embodiment, the player proxy may be created and stored by the system Bluetooth of the first electronic device. The player proxy corresponds to a media application, and it can send data from the proxied media application to other modules, applications, or external devices of the first electronic device.
[0141] When performing step S63, the second application may be already started and running in the background, or it may not be started yet. Before running, the second application registers the media session of the first electronic device.
[0142] The information to be displayed in the second application can refer to the information generated along with the audio data of the second application during its operation. The information to be displayed in the second application can be visual information. When the vehicle system obtains the information to be displayed in the second application, it can display the information on the screen of the vehicle system.
[0143] In possible implementations, the type of the second application can be the same as or different from that of the first application.
[0144] Step S64: If the second application is different from the first application, the first electronic device stops calling the player agent to provide the vehicle system with the information to be displayed for the second application.
[0145] In this embodiment of the application, the second application is different from the first application. It can also mean that the first application is not the application proxied by the player agent, or it can also mean that the first application does not have the function of registering the player agent, or it can also mean that the first electronic device does not save the activated player agent of the first application.
[0146] In this application embodiment, the second application is different from the first application and may include at least one of the following situations.
[0147] Scenario (1) The second application is already running, and the application that the player proxy is currently proxying is the second application.
[0148] If a first electronic device runs a second application before the first application runs, and no other media applications besides the first application run after the first electronic device runs the second application, then the application proxied by the player agent is the second application while the first electronic device is running the first application.
[0149] Scenario (ii) The second application is already running, and the first electronic device was running other media applications before the second application was running.
[0150] If the first electronic device is running other media applications before the second application is running, then the player agent will send the other media applications' display information to the vehicle system before sending the second application's display information to the vehicle system.
[0151] Scenario (3) The second application is not yet running, and before the first application started running, the first electronic device was not running any media applications, and the player agent is not currently acting as an agent for any other applications. In other words, the player agent is not currently acting as an agent for any applications.
[0152] In step S64, the call to the player agent to provide the information to be displayed by the second application to the vehicle system is stopped, which may include at least two situations.
[0153] Scenario (1) Stop the player agent from providing any application's pending display information to the vehicle's infotainment system.
[0154] Scenario (2) Change the player agent from providing the second application to be displayed to the vehicle system to providing other applications to be displayed to the vehicle system.
[0155] The method provided in this application embodiment enables the first electronic device to stop calling the player agent to obtain the information to be displayed for the second application when the first electronic device and the vehicle system are connected via Bluetooth. If the vehicle system plays audio data of the first application running on the first electronic device, and the second application currently being proxied by the player agent of the first electronic device is not the first application that is currently running, then the first electronic device stops calling the player agent to obtain the information to be displayed for the second application. This avoids the process of the player agent being repeatedly called and stopped when the second application is not in the foreground running state, thus saving the power consumption of the first electronic device.
[0156] In one embodiment of this application, a first electronic device first runs a second application. During the operation of the second application, the first electronic device sends control commands to the second application via a media session. Simultaneously, the first electronic device also sends the information to be displayed in the second application to other modules, applications, or external devices via a player proxy. Then, in response to the user control command, the first electronic device stops running the second application and runs the first application. Correspondingly, the method for processing playback information further includes... Figure 8 The steps are shown.
[0157] Step S81: The second application starts.
[0158] Even if the second application is not running any process in the foreground or background of the first electronic device, the first electronic device can respond to a user command and launch the second application. In step S81, launching the second application can also be expressed as: the second application is launched by the first electronic device.
[0159] Step S82: The second application registers a media session with the first electronic device.
[0160] In one possible implementation, when the second application registers a media session with the first electronic device, it can send a registration request to the media session. The media session of the first electronic device can then add the second application's information to its registration list based on the registration request.
[0161] Step S83: The system audio sends a notification of the media session change to the system Bluetooth.
[0162] In one possible configuration, the system audio of the first electronic device can be configured at the native layer and / or application framework layer of the first electronic device. System audio may include media player, audio track, audio manager, media recorder, and / or audio recorder, etc. When the system audio of the first electronic device is configured at the native layer and application framework layer, media sessions can be used to manage media application sessions, which can be used to transmit data or instructions related to the media application.
[0163] Step S84: The system Bluetooth saves the activated player agent of the second application based on the notification of the media session change via Bluetooth.
[0164] For example, the system Bluetooth may be a module in the local service layer of the first electronic device used to manage Bluetooth-related data. The system Bluetooth may call functions or interfaces to receive information about the media application proxied by the activated player agent, and send the received media application information to an external device connected to the first electronic device via Bluetooth through the Bluetooth transmission channel.
[0165] Step S85: The second application runs.
[0166] In this embodiment of the application, running the second application may include running the second application in the foreground.
[0167] Step S86: The second application sends real-time audio data generated during runtime to the system audio.
[0168] Step S87: The system audio sends the received audio data to the system Bluetooth.
[0169] Step S88: The system Bluetooth sends the audio data of the second application to the vehicle's infotainment system.
[0170] Correspondingly, after receiving the audio data from the second application, the vehicle's infotainment system plays the audio data from the second application through the system's hardware playback module.
[0171] The system's Bluetooth can continuously send a data stream containing audio data to the vehicle's infotainment system via a Bluetooth connection.
[0172] Step S89: During the process of the vehicle's infotainment system playing the audio data of the second application, the system Bluetooth receives a request from the vehicle's infotainment system to read the player.
[0173] In step S89, the vehicle infotainment system sends a request to the system Bluetooth to read the player.
[0174] In this embodiment, the system Bluetooth can continuously send requests to read the player at set time intervals before and during the playback of audio data from the second application on the vehicle's infotainment system. Therefore, during the playback of audio data from the second application, the system Bluetooth may continuously receive these requests multiple times.
[0175] Step S810: Based on the request information to read the player, the system Bluetooth calls the player agent to obtain the information to be displayed corresponding to the audio data of the second application from the second application.
[0176] In step S810, the player agent obtains the corresponding display information from the second application and returns it to the system Bluetooth.
[0177] Step S811: The system Bluetooth sends the audio data of the second application to the vehicle's infotainment system, along with the information to be displayed.
[0178] In step S811, the vehicle infotainment system receives the information to be displayed corresponding to the audio data of the second application. While playing the audio data of the second application, the vehicle infotainment system's screen displays the information to be displayed for the second application; for example, while the vehicle infotainment system is playing audio, it displays detailed information corresponding to the audio.
[0179] Step S812: The second application stops running.
[0180] The first electronic device can respond to a user command to close the second application, switching it from a foreground to a background running state. The second application stopping running can also be expressed as: the second application is stopped.
[0181] Step S813: The first application runs.
[0182] In one possible implementation, the first electronic device can close the second application first and then run the first application. Alternatively, the first electronic device can run the first application without stopping the second application, causing the second application to close automatically.
[0183] Step S814: When the second application is different from the first application, the system Bluetooth stops calling the player agent to provide the vehicle system with the information to be displayed for the second application.
[0184] In step S814, it can be first determined whether the second application is the same as the first application; that is, it can be first determined whether the application proxied by the player agent is the first application. For example, determining whether the first application and the second application are the same includes: obtaining the process currently playing audio data and the process not currently playing audio data from the system audio; determining whether the process currently playing audio data is the process of the second application; and if the process currently playing audio data is not the process of the second application, determining that the first application and the second application are different.
[0185] In possible implementations, the process currently playing audio data can include the process currently playing audio data through the vehicle's infotainment system. A process not currently playing audio data can include processes not currently playing audio data through the vehicle's infotainment system. In the case where the first application plays audio data through the vehicle's infotainment system, the process currently playing audio data is the process of the first application.
[0186] For example, stopping a call can mean aborting the call.
[0187] Step S815: The first application stops running.
[0188] In step S815, the first application stops running, which can also be expressed as: the first application is stopped running. In possible implementations, after the first application has been running for a period of time, the first electronic device can stop running the first application according to a user instruction. Alternatively, the first electronic device stops running the first application when a preset event occurs.
[0189] In one example of this application, the player information obtained by the player agent may include relevant player settings. The first electronic device may be a mobile phone. The mobile phone can establish a connection with the vehicle's Bluetooth system via Bluetooth. Assuming the mobile phone and vehicle's Bluetooth system are connected via Bluetooth, and the first application is a dedicated audio playback application, when the mobile phone starts outputting audio data from the first application, the audio data is played by the vehicle's Bluetooth system, which is the sound output device and also has a display function. During the playback of the first application's audio data by the vehicle's Bluetooth system, the vehicle's Bluetooth system may frequently read relevant player settings information (which may include song playback mode, song repeat mode, etc.) from the mobile phone's system Bluetooth system. When the mobile phone's system Bluetooth calls the player agent to read player information, the system Bluetooth system determines that the first application is playing audio data by listening to changes in the media session of the audio framework, and then calls the player agent stored in the system Bluetooth system to read the first application's player information across processes using the player agent.
[0190] Before using media sessions and player proxies, media applications need to register their media sessions with the audio framework. If a media application doesn't register its media session, the phone's media session remains unchanged while the media application is playing audio or video data. The phone's media session won't detect the media application playing audio data and will assume the currently used player is still aware of the previous application playing audio. This will cause errors when the player proxy calls for player information. When the phone and car infotainment system are connected via Bluetooth, with the car infotainment system acting as the sound output device, the phone might first play a second application, then pause it in response to an operation, allowing the second application to run in the background. Then, if the first application is opened to play audio and / or video data, the process of calling the player proxy to obtain player information will continuously execute and encounter errors. After the first application has been running for a period of time, the phone's notification bar will alert you that the first application is consuming excessive power.
[0191] The playback information processing method provided in this application, for scenarios where a mobile phone or other first electronic device is connected to a vehicle's Bluetooth system, ensures that the player proxy of the first electronic device does not become confused when the vehicle's system plays audio and video data output by an application running on the mobile phone, reducing unnecessary power consumption, and avoiding other unpredictable effects on the operation of the application caused by mistakenly calling the proxy player.
[0192] In possible implementations, the call to the player proxy can be aborted in different ways. That is to say, Figure 8 Step S184 in the process may have multiple implementations, such as Figure 9 , Figure 10 The implementation method shown.
[0193] like Figure 9As shown, in one example, when the second application is different from the first application, the first electronic device stops calling the player agent to provide the vehicle system with the information to be displayed for the second application, which includes the following steps.
[0194] Step S91: The system Bluetooth of the first electronic device determines whether the first application and the second application are the same application.
[0195] Step S92: If the system Bluetooth determines that the first application and the second application are different applications, a stop call command is sent to the player agent. The stop call command is used to control the player agent not to provide the information to be displayed to the vehicle system.
[0196] In step S92, when responding to the request to read the player's information, the player agent can be invoked and a stop invocation command can be sent to the player agent, so that the player agent no longer reads the player information of the second application, and thus the player agent no longer provides the information to be displayed to the vehicle system.
[0197] In another possible example, the system Bluetooth can also send a stop call command to the vehicle's infotainment system when responding to a request to read information from the player, so that the infotainment system does not update the information currently displayed on the screen according to the stop call command.
[0198] like Figure 10 As shown, in one example, when the second application is different from the first application, the player proxy in the first electronic device is modified to provide the vehicle system with the information to be displayed for the first application, including the following steps.
[0199] Step S1001: The system Bluetooth detects a change in the audio focus of the first electronic device.
[0200] In the first electronic device, the audio focus can be viewed as a resource manager used to determine which audio stream should be played and which audio stream should be paused.
[0201] Step S1002: Change the player agent to: provide the vehicle system with the information to be displayed corresponding to the audio data of the first application.
[0202] Step S1003: The player agent sends a request to the first application to read the player.
[0203] Step S1004: The player agent obtains the information returned by the first application response request information to read the player.
[0204] Step S1005: Call the player agent to provide the vehicle system with the information to be displayed corresponding to the audio data of the first application.
[0205] In another example of this application, if the first electronic device is running two or more media applications simultaneously, and both of the media applications are outputting audio data to the vehicle system, then the player agent can send the information to be displayed corresponding to the audio data of the last media application launched among the two or more media applications to the vehicle system.
[0206] In one example of this application, the first electronic device is a mobile phone. During the connection between the mobile phone and the vehicle's infotainment system via Bluetooth, the system's Bluetooth monitors changes in the media session in real time. When the system's Bluetooth detects a change in the media session due to a new application registration, it saves the newly registered reference to the player agent. Correspondingly, in one example, the method for processing playback information further includes, for example... Figure 11 The steps are shown.
[0207] Step S111: When the mobile phone is connected to the car's infotainment system via Bluetooth, the mobile phone's system Bluetooth monitors changes in the media session.
[0208] In one example, a media session can belong to the audio framework of the system audio.
[0209] Step S112: The phone responds to the user's operation and launches the cloud music application.
[0210] Step S113: When the mobile phone initializes the cloud music application, the cloud music application registers a media session with the system audio.
[0211] Step S114: After completing the media session registration, the system audio sends a notification of the media session change to the system Bluetooth.
[0212] In step S114, the media session change notification is used to notify the system Bluetooth that the media session has changed.
[0213] Step S115: The system Bluetooth receives a notification of a media session change and saves the activated player agent of the cloud music application.
[0214] Step S116: When the Cloud Music application plays music, the vehicle system generates a request to read the player.
[0215] Step S117: The car infotainment system will read the player's request information and send it to the phone's system Bluetooth.
[0216] Step S118: The system uses Bluetooth to activate the player agent to obtain player information from the cloud music application.
[0217] Step S119: The system Bluetooth sends the player information of the cloud music application to the vehicle's infotainment system.
[0218] Step S1110: The phone responds to the user's operation and stops running the cloud music application in the foreground.
[0219] After the cloud music application stops running, the system power consumption module of the first electronic device detects that the cloud music application process is not in use and freezes the cloud music application process.
[0220] Step S1111: The phone responds to the user's operation and opens the short video playback application.
[0221] Short video playback apps (also known as short video playback applications) do not register media sessions.
[0222] Step S1112: During the operation of the short video application, the short video application sends the audio data of the short video to the vehicle's infotainment system for playback.
[0223] For example, when a short video application sends audio data to the vehicle's infotainment system, it can first send the audio data of the short video to the phone's system audio, then the system audio sends the audio data to the system Bluetooth, and finally the system Bluetooth sends the audio data to the vehicle's infotainment system.
[0224] Step S1113: The phone's system Bluetooth obtains a list of currently playing and unplaying processes from the phone's system audio.
[0225] Step S1114: The system Bluetooth compares the currently playing process with the application represented by the activated player agent, and determines that the application represented by the activated player agent is not the cloud music application.
[0226] Step S1115: The system Bluetooth stops calling the activated player agent to read the player's information.
[0227] Through steps S1113 to S1115, the system Bluetooth can avoid the accidental activation of the player agent, thus preventing the system from waking up the cloud music process.
[0228] The steps S1113 to S1115 described above can also be implemented by the steps S1116 to S1120 described below.
[0229] Step S1116: The audio focus of the system Bluetooth monitoring system audio changes.
[0230] Step S1117: The system Bluetooth updates the application currently being proxied by the active player agent to a short video playback application.
[0231] Step S1118: The system Bluetooth obtains the information to be displayed by the short video playback application by activating the player agent.
[0232] Step S1119: The system Bluetooth sends the information to be displayed to the vehicle's infotainment system.
[0233] Step S1120: The vehicle's infotainment system displays the information to be displayed.
[0234] In this embodiment of the application, both the first application and the second application can be game applications.
[0235] The first electronic device involved in the embodiments of this application may be configured with a certain software architecture. Figure 12 This is a schematic diagram of an architecture (including a software system and some hardware) applied in an embodiment of this application. Figure 12 As shown, the architecture of the first electronic device is divided into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the application architecture may include: an application layer, an application framework layer (FWK), a local service layer, and a driver layer. In other possible implementations, the second electronic device may also have... Figure 12 The software architecture shown.
[0236] like Figure 12 As shown, the application layer, also known as the application layer, can include multiple applications, which can be further divided into system applications and third-party applications. System applications can be applications configured during the production of the first electronic device, such as desktop applications. Third-party applications can refer to applications provided by third parties, such as video applications, game applications, and audio applications. Among them, video applications and audio applications can be used to play audio and video data, and game applications can also play audio or audio and video data during operation. The desktop launcher can be used to display installed applications, which can be the last application launched during the system startup process of the first electronic device, or the first application launched among all applications of the first electronic device. The aforementioned desktop launcher can be equivalent to the desktop application in the foregoing embodiments of this application.
[0237] The application layer may also include configuration information required for application runtime. This configuration information can be used to configure whether the application registers a media session when the first electronic device is connected to an external device via Bluetooth. The application layer may also include other system applications. System applications include wireless connectivity modules (WiFi), camera applications, and Bluetooth applications, which are configured pre-installed on the first electronic device during manufacturing.
[0238] like Figure 12As shown, the application framework layer includes Bluetooth manager, WiFi manager, activity manager service (AMS), and camera manager. The application framework layer may also include parts of the audio framework, such as audio tracks, audio manager, and audio services, which can also be called audio manager services. In the software architecture of the first electronic device, the audio framework can be used for audio data acquisition and output, audio stream control, audio device management, and volume adjustment.
[0239] The local service layer may include a Bluetooth stack, wireless algorithm libraries, camera algorithm libraries, etc. The Bluetooth stack can be configured with Bluetooth protocols, which may include, for example, the Audio / Video Remote Control Profile (AVRCP) protocol. The AVRCP protocol is primarily used to control audio and video devices. It allows users to operate audio and video playback devices (such as speakers, televisions, car stereos, etc.) via remote control devices (such as mobile phones, tablets, or other controllers).
[0240] The driver layer can include Bluetooth drivers, WiFi drivers, and camera drivers, among others. The driver layer is used to drive the hardware in the primary electronic device.
[0241] It should be understood that Figure 12 The software architecture shown only illustrates a portion of the software modules of the first electronic device. The first electronic device may also include other software modules. Figure 12 It was not shown in the text.
[0242] The playback information processing device provided in this application embodiment is applied to a first electronic device and can be used to perform, for example... Figure 6 And the steps of the method provided in any related embodiments. For example... Figure 13 As shown in the figure, an embodiment of this application provides a playback information processing device, including: a running module, a sending module, a receiving module, and a stop calling module.
[0243] The runtime module is used to run the first application.
[0244] The transmitting module is used to send audio data of the first application to the vehicle infotainment system; the vehicle infotainment system and the first electronic device are connected via Bluetooth.
[0245] The receiving module is used to receive a request message for reading the player sent by the vehicle-mounted system during the process of playing audio data of the first application; the request message for reading the player is used to request the first electronic device to call the player agent to read the player's information; the player agent is used to provide the vehicle-mounted system with the information to be displayed of the second application represented by the player agent.
[0246] The abort call module is used to abort the call to provide the player agent with the information to be displayed for the second application to the vehicle system when the second application is different from the first application.
[0247] The playback information processing apparatus provided in this application embodiment can implement the playback information processing method applied to a first electronic device provided in any embodiment of this application.
[0248] This application also provides a device for processing playback information, applied to a vehicle infotainment system, including: a receiving module and a sending module.
[0249] The receiving module is used to receive audio data of a first application sent by a first electronic device; the vehicle system is connected to the first electronic device via Bluetooth; the first electronic device runs the first application.
[0250] The sending module is used to send information to read the player to the first electronic device during the process of the vehicle system playing audio data of the first application; the request information to read the player is used to request the first electronic device to call the player agent to read the player information; the player agent is used to provide the vehicle system with the display information of the second application represented by the player agent; if the second application is different from the first application, the player agent stops providing the display information of the second application to the vehicle system.
[0251] This application also provides a playback information processing device, which can implement the playback information processing method for vehicle-mounted systems provided in any one of the embodiments of this application when playing audio and video data.
[0252] This application also provides a playback information processing system, including a playback information processing device applicable to a first electronic device and a playback information processing device applicable to a vehicle infotainment system.
[0253] In the embodiments of this application, "in the case of..." can also be expressed as "when...", and "based on..." can also be expressed as "according to...".
[0254] This application embodiment uses audio and video playback as an example for illustration. In other possible implementations, this application embodiment can also be applied to the playback of other types of data. For example, it can also be applied to the playback of static image data, static text information, or data combining static image data and static text data. This application embodiment is also applicable to the playback of screens in the game interface during gameplay.
[0255] This application also provides an electronic device having a playback information processing device provided in any embodiment of this application.
[0256] This application also provides an electronic device having the playback device provided in any embodiment of this application.
[0257] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0258] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0259] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.
[0260] This application also provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0261] This application also provides a chip system, which includes a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips.
[0262] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated.
[0263] The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0264] The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0265] The above-described embodiments are optional embodiments provided by this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the technical scope disclosed in this application should be included within the protection scope of this application.
Claims
1. A method for processing playback information, applied to a first electronic device, characterized in that, include: Run the first application; Send the audio data of the first application to the second electronic device; The second electronic device is connected to the first electronic device via Bluetooth; During the process of the second electronic device playing the audio data of the first application, a request message to read the player is received from the second electronic device; the request message to read the player is used to request the first electronic device to call the player agent to read the player's information. The player agent is used to provide the second electronic device with information about the player of the second application that the player agent proxies; The information from the player in the second application is used by the second electronic device to generate a synchronized display of the audio data; The second application stops running while the first application is running; If the second application is different from the first application, the call to the player agent to provide the second electronic device with the player information of the second application is stopped.
2. The method according to claim 1, characterized in that, The first application does not register the media session of the first electronic device before running; the second application registers the media session of the first electronic device before running.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Run the second application; Send the audio data of the second application to the second electronic device; During the process of the second electronic device playing the audio data of the second application, a request message to read the player is received from the second electronic device; Based on the request information to read the player, the player agent is invoked to obtain the player information corresponding to the audio data of the second application from the second application.
4. The method according to any one of claims 1-3, characterized in that, The first application to be run includes: Stop running the second application; Stop calling the player proxy; Run the first application.
5. The method according to claim 3 or 4, characterized in that, The operation of the second application includes: Launch the second application; The second application registers a media session with the first electronic device; Run the second application.
6. The method according to any one of claims 1-5, characterized in that, The step of suspending the call to the player proxy to provide the player information of the second application to the second electronic device when the second application is different from the first application includes: Determine whether the first application and the second application are the same application; If it is determined that the first application and the second application are different applications, the player agent stops providing player information to the second electronic device.
7. The method according to claim 6, characterized in that, The step of determining whether the first application and the second application are the same application includes: Obtain information about processes that are currently playing audio data and processes that are not currently playing audio data from the system audio. Determine whether the process that is playing audio data is the process of the second application; If the process playing audio data is not the process of the second application, the first application and the second application are determined to be different applications.
8. The method according to claim 6 or 7, characterized in that, The step of stopping the player agent from providing player information to the second electronic device includes: A stop call command is sent to the player agent, which controls the player agent not to provide player information to the second electronic device.
9. The method according to any one of claims 1-8, characterized in that, The step of suspending the call to the player proxy to provide the player information of the second application to the second electronic device when the second application is different from the first application includes: The player agent is changed to: information about the player corresponding to the audio data of the first application is provided to the second electronic device.
10. The method according to claim 9, characterized in that, After changing the player proxy to: information about the player corresponding to the audio data of the first application to the second electronic device, the method further includes: The player agent is invoked to provide the second electronic device with information about the player corresponding to the audio data of the first application.
11. A method for processing playback information, applied to a second electronic device, characterized in that, include: Receive audio data from a first application sent by a first electronic device; The second electronic device is connected to the first electronic device via Bluetooth; the first electronic device runs the first application; During the process of the second electronic device playing the audio data of the first application, a request to read the player is sent to the first electronic device; the request to read the player is used to request the first electronic device to call the player agent to read the player's information. The player agent is used to provide the second electronic device with information about the player of the second application that the player agent proxies; The second application stops running while the first application is running; if the second application is different from the first application, the player agent stops providing the player information of the second application to the second electronic device.
12. The method according to claim 11, characterized in that, The first application does not register the media session of the first electronic device before running; the second application registers the media session of the first electronic device before running.
13. The method according to claim 11 or 12, characterized in that, The method further includes: The first electronic device receives audio data from a second application sent by the first electronic device; the first electronic device runs the second application; While the second electronic device is playing the audio data of the second application, a request to read the player is sent to the first electronic device; The device receives information about the player corresponding to the audio data of the second application sent by the first electronic device. The information about the player corresponding to the audio data of the second application is obtained by the first electronic device from the second application by calling the player agent based on the request information to read the player.
14. The method according to any one of claims 11-13, characterized in that, Before the first electronic device runs the first application, the first electronic device stops running the second application and stops calling the player agent.
15. The method according to claim 13 or 14, characterized in that, After the first electronic device starts the second application, the second application registers a media session for the first electronic device.
16. The method according to any one of claims 11-15, characterized in that, When the second application differs from the first application, the player agent stops providing the player information of the second application to the second electronic device through the following steps: Determine whether the first application and the second application are the same application; If it is determined that the first application and the second application are different applications, the call to the player agent to provide player information to the second electronic device is stopped.
17. The method according to claim 16, characterized in that, The step of determining whether the first application and the second application are the same application includes: Obtain information about processes that are currently playing audio data and processes that are not currently playing audio data from the system audio. Determine whether the process that is playing audio data is the process of the second application; If the process playing audio data is not the process of the second application, the first application and the second application are determined to be different applications.
18. The method according to claim 16 or 17, characterized in that, The step of stopping the player agent from providing player information to the second electronic device includes: A stop call command is sent to the player agent, which controls the player agent not to provide player information to the second electronic device.
19. The method according to any one of claims 11-18, characterized in that, When the second application differs from the first application, the player agent stops providing player information for the second application to the second electronic device, which is achieved through the following steps: The player agent is changed to: information about the player corresponding to the audio data of the first application is provided to the second electronic device.
20. The method according to claim 19, characterized in that, After changing the player proxy to: information about the player corresponding to the audio data of the first application to the second electronic device, the method further includes: The player agent is invoked to provide the second electronic device with information about the player corresponding to the audio data of the first application.
21. An electronic device, characterized in that, The electronic device includes: a processor and a memory; The memory is used to store a program for the electronic device to perform the method as described in any one of claims 1-10, and to store data involved in implementing the method as described in any one of claims 1-10; The processor is configured to execute programs stored in the memory.
22. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-10.