Nothing Special   »   [go: up one dir, main page]

CN110704201A - Multimedia data sharing method and terminal equipment - Google Patents

Multimedia data sharing method and terminal equipment Download PDF

Info

Publication number
CN110704201A
CN110704201A CN201810750343.8A CN201810750343A CN110704201A CN 110704201 A CN110704201 A CN 110704201A CN 201810750343 A CN201810750343 A CN 201810750343A CN 110704201 A CN110704201 A CN 110704201A
Authority
CN
China
Prior art keywords
multimedia data
application
acquisition device
calling
acquired
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810750343.8A
Other languages
Chinese (zh)
Inventor
熊友军
蒋永俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Ubtech Technology Co ltd
Original Assignee
Shenzhen Ubtech Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Ubtech Technology Co ltd filed Critical Shenzhen Ubtech Technology Co ltd
Priority to CN201810750343.8A priority Critical patent/CN110704201A/en
Publication of CN110704201A publication Critical patent/CN110704201A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of computers, and provides a multimedia data sharing method and terminal equipment. The method comprises the following steps: receiving a first call request for a multimedia data acquisition device, which is sent by a first application; calling the multimedia data acquisition device to acquire multimedia data according to the first calling request, and sending the acquired first multimedia data to the first application; when the first application calls the multimedia data acquisition device, if a second calling request for the multimedia data acquisition device sent by a second application is received, the first multimedia data are respectively sent to the first application and the second application. According to the invention, the collected multimedia data are respectively sent to the first application and the second application, so that the multimedia data can be timely and synchronously shared to a plurality of applications, and the requirement of simultaneously collecting the multimedia data by a plurality of application programs is met.

Description

Multimedia data sharing method and terminal equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a multimedia data sharing method and a terminal device.
Background
In the terminal equipment, one multimedia data acquisition device (such as a microphone, a camera and the like) can be used by only one application at the same time, and the terminal equipment does not allow a plurality of applications to use the same multimedia data acquisition device for data acquisition at the same time. However, at present, there are many applications on the terminal device, and there are situations where multiple applications use the same multimedia data acquisition device at the same time, for example, there are situations where video data acquisition is performed at the same time in face recognition application, monitoring application, remote video application, visual awakening application, and the like on the terminal device. The prior art can not meet the requirement that a plurality of application programs carry out multimedia data acquisition simultaneously.
Disclosure of Invention
In view of this, embodiments of the present invention provide a multimedia data sharing method and a terminal device, so as to solve the problem that the prior art cannot meet the requirement of performing multimedia data acquisition by multiple application programs simultaneously.
A first aspect of an embodiment of the present invention provides a multimedia data sharing method, including:
receiving a first call request for a multimedia data acquisition device, which is sent by a first application;
calling the multimedia data acquisition device to acquire multimedia data according to the first calling request, and sending the acquired first multimedia data to the first application;
when the first application calls the multimedia data acquisition device, if a second calling request for the multimedia data acquisition device sent by a second application is received, the first multimedia data are respectively sent to the first application and the second application.
A second aspect of embodiments of the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the multimedia data sharing method in the first aspect when executing the computer program.
A third aspect of embodiments of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the multimedia data sharing method of the first aspect.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: when the first application calls the multimedia data acquisition device, if a call request of the second application is received, the multimedia data acquired by the multimedia data acquisition device is sent to the second application under the condition that the multimedia data is sent to the first application, so that the first application and the second application can both acquire the acquired multimedia data, and the sharing of the multimedia data is realized. According to the embodiment of the invention, the collected multimedia data are respectively sent to the first application and the second application, so that the multimedia data can be timely and synchronously shared to a plurality of applications, and the requirement that a plurality of application programs simultaneously collect the multimedia data is met.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of an implementation of a multimedia data sharing method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating an implementation of resampling processing on first multimedia data in a multimedia data sharing method according to an embodiment of the present invention;
fig. 3 is a flowchart of an implementation of a multimedia data sharing method according to another embodiment of the present invention;
fig. 4 is a flowchart of an implementation of a multimedia data sharing method according to another embodiment of the present invention;
fig. 5 is a flowchart of an implementation of a multimedia data sharing method according to another embodiment of the present invention;
fig. 6 is a flowchart illustrating an implementation of comparing a first call priority with a second call priority in a multimedia data sharing method according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating an implementation of resampling processing on fourth multimedia data in a multimedia data sharing method according to an embodiment of the present invention;
fig. 8 is a schematic diagram of an implementation example of a multimedia data sharing method provided by an embodiment of the present invention;
fig. 9 is a schematic diagram of another implementation example of the multimedia data sharing method provided in the embodiment of the present invention;
FIG. 10 is a diagram of an apparatus for sharing multimedia data according to an embodiment of the present invention;
fig. 11 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is a flowchart of an implementation of a multimedia data sharing method according to an embodiment of the present invention, which is detailed as follows:
in S101, a first call request for the multimedia data acquisition device sent by a first application is received.
In this embodiment, the multimedia data may be audio data, image data, video data, and the like, and the multimedia data acquisition device may be an acquisition device such as a microphone, a camera, and the like, which is not limited herein. One multimedia acquisition device can only be called by one application at the same time. The first application is any application program in the terminal equipment. When the multimedia data acquisition device needs to be called for data acquisition, the first application can send a first calling request, and the first calling request is used for indicating the multimedia data acquisition device to be called by the first application to perform data acquisition. The first call request may carry at least one of a device identifier of the multimedia data acquisition device and an acquisition parameter for data acquisition. Wherein, the collection parameter may include at least one of collection frequency, data format and data capacity of the multimedia data.
In S102, the multimedia data acquisition device is called according to the first call request to acquire multimedia data, and the acquired first multimedia data is sent to the first application.
In this embodiment, the multimedia data acquisition device is not occupied by other applications, and the first application may be allowed to call the multimedia data acquisition device, so that the multimedia data acquisition device performs multimedia data acquisition according to the acquisition parameters carried by the first call request. The collected multimedia data is called first multimedia data, and the first multimedia data is sent to the first application. For example, the first multimedia data may be sent to a memory space of an application process of the first application.
In S103, when the first application calls the multimedia data acquisition device, if a second call request for the multimedia data acquisition device sent by a second application is received, the first multimedia data is sent to the first application and the second application respectively.
In this embodiment, during the period when the first application calls the multimedia data acquisition device to acquire data, if a call request sent by the second application to the multimedia data acquisition device is received, it indicates that the second application also needs to call the multimedia data acquisition device to acquire data at this time, and the first multimedia data can be sent to both the first application and the second application, so that the second application can also acquire data acquired by the multimedia data acquisition device, and simultaneously, the requirements of the first application and the second application on the multimedia data acquisition are met.
According to the embodiment of the invention, when the multimedia data acquisition device is called by the first application, if the calling request of the second application is received, the multimedia data acquired by the multimedia data acquisition device is sent to the second application under the condition that the multimedia data is sent to the first application, so that both the first application and the second application can acquire the acquired multimedia data, and the sharing of the multimedia data is realized. According to the embodiment of the invention, the collected multimedia data are respectively sent to the first application and the second application, so that the multimedia data can be timely and synchronously shared to a plurality of applications, and the requirement that a plurality of application programs simultaneously collect the multimedia data is met.
As an embodiment of the present invention, as shown in fig. 2, the sending the first multimedia data to the second application in S103 may include:
in S201, it is determined whether the first multimedia data conforms to a data format required to be collected by the second application.
In the present embodiment, the data format includes, but is not limited to, one or more of a sampling rate, a number of sampling bits, and a number of channels. The first multimedia data is the multimedia data acquired by the multimedia data acquisition device according to the first calling request, so that the first multimedia data conforms to the data format required to be acquired by the first application. The data format that needs to be acquired by the second application may be different from the first application, for example, the sampling rate that needs to be acquired by the first application is different from the sampling rate that needs to be acquired by the second application, and so on. Therefore, whether the first multimedia data conforms to the data format required to be collected by the second application can be judged.
Optionally, each invocation request carries a corresponding data format. The data format carried by the first call request is the data format of the first multimedia data. The data format carried by the second call request is the data format required to be acquired by the second application. Whether the first multimedia data conforms to the data format required to be acquired by the second application or not can be judged by comparing the data format carried by the first call request with the data format carried by the second call request.
Optionally, the data format of the first multimedia data may be acquired from the multimedia data acquisition device, the data format required to be acquired by the second application may be acquired from the second application, the acquired data format of the first multimedia data may be compared with the data format required to be acquired by the second application, and whether the first multimedia data conforms to the data format required to be acquired by the second application may be determined.
In S202, if the first multimedia data does not conform to the data format required to be acquired by the second application, resampling the first multimedia data.
In this embodiment, if the first multimedia data conforms to the data format required to be collected by the second application, it indicates that the second application can use the first multimedia data, and therefore the first multimedia data is directly sent to the second application; if the first multimedia data does not conform to the data format required to be acquired by the second application, the second application cannot directly use the first multimedia data, so that the first multimedia data is firstly subjected to resampling processing, the data format of the resampled first multimedia data conforms to the data format required to be acquired by the second application, and the resampled first multimedia data can be used by the second application.
In S203, the resampled first multimedia data is sent to the second application.
According to the method and the device, the first multimedia data which do not conform to the data format required by the second application is resampled, so that the resampled first multimedia data can conform to the requirement of the second application, the situation that the first multimedia data cannot be used by the second application due to the data format problem is avoided, and the multimedia data can be used by the first application and the second application at the same time.
As an embodiment of the present invention, as shown in fig. 3, after S103, the method may further include:
in S301, after receiving a third call request for the multimedia data acquisition device sent by a third application, the first multimedia data is stored in a shared storage space accessible to the third application.
In this embodiment, the third application may be one or more. Under the condition that the multimedia data acquisition device is called by the first application and the first multimedia data is sent to the first application and the second application, if one or more other third applications need to call the multimedia data acquisition device for data acquisition, the first multimedia data can be stored in a shared storage space which can be commonly accessed by the third applications. Therefore, the one or more third applications can access the shared storage space to obtain the multimedia data collected by the multimedia data collection device, so that the use requirements of the one or more third applications on the multimedia data are met.
In the embodiment, the first multimedia data is stored in the shared storage space which can be accessed by the third applications, so that the multimedia data can be conveniently acquired by one or more third applications, the acquired multimedia data can be timely and synchronously updated through the shared storage space, the timeliness of acquiring the multimedia data by each third application is ensured, the acquisition of the multimedia data by the first application and the second application is not influenced, the blockage caused by calling more applications of the multimedia data acquisition device can be avoided, and the acquisition and sharing efficiency of the multimedia data is ensured.
As an embodiment of the present invention, the saving the first multimedia data to the shared storage space accessible by the third application in S301 may include:
and setting the memory space of the first application for storing the first multimedia data or the memory space of the second application for storing the first multimedia data as the shared memory space.
In this embodiment, the application calls the multimedia data acquisition device to create a corresponding process and a memory space for storing multimedia data, such as a buffer register. The first application and the second application are respectively corresponding to memory spaces for storing the first multimedia data, and the memory space for storing the first multimedia data by the first application or the memory space for storing the first multimedia data by the second application is set as a shared memory space, so that one or more third applications can access the shared memory space to acquire the first multimedia data. Therefore, the existing memory space for storing the first multimedia data is set as the shared storage space, the need of additionally opening up a storage space as the shared storage space is avoided, and the space resources occupied by the multimedia data can be saved.
As an embodiment of the present invention, each invocation request carries a corresponding acquisition parameter, as shown in fig. 4, after S103, the method may further include:
in S401, after it is monitored that the first application calls the multimedia data acquisition device, the multimedia data acquisition device is called according to the acquisition parameter carried in the second call request to acquire multimedia data, and the acquired second multimedia data is sent to the second application.
In the present embodiment, the acquisition parameters may include, but are not limited to, one or more of acquisition frequency, data format, and data capacity of the multimedia data. The calling mode of the application to the multimedia data acquisition device can comprise a main mode and a secondary mode. The multimedia data acquisition device acquires data according to acquisition parameters corresponding to the application called in the primary mode, the application called in the secondary mode can only receive the multimedia data acquired by the multimedia data acquisition device, and the corresponding acquisition parameters cannot be used for indicating the acquisition of the multimedia data.
In S103, the first application calls the multimedia data acquisition device in the active mode, so that the multimedia data acquisition device acquires the first multimedia data according to the acquisition parameters carried in the first call request, and the first application may control the acquisition of the multimedia data by changing the acquisition parameters, such as changing the acquisition frequency and changing the data format. The second application calls the multimedia data acquisition device in a secondary mode, only the first multimedia data acquired by the multimedia data acquisition device can be acquired, and the second application cannot control the acquisition of the multimedia data in a mode of changing acquisition parameters.
The end of the calling of the multimedia data acquisition device by the first application can be monitored by acquiring a calling end message sent by the first application. If the calling of the multimedia data acquisition device by the first application is monitored to be finished, the calling of the multimedia data acquisition device by the first application is indicated to be finished, at the moment, the auxiliary mode of the second application can be switched to the main mode, and the multimedia data acquisition device acquires the second multimedia data according to the acquisition parameters carried by the second calling request.
In this embodiment, after the first application finishes the call of the multimedia data acquisition device, the second application calls the multimedia data acquisition device in the active mode, so that the second application can control the acquisition of the multimedia data by changing the acquisition parameters according to the own requirements.
As an embodiment of the present invention, as shown in fig. 5, after S401, the method may further include:
in S501, when the second application calls the multimedia data acquisition device, if a fourth call request sent by the first application is received, the multimedia data acquisition device is called according to an acquisition parameter carried in the fourth call request to acquire multimedia data, and the acquired third multimedia data is sent to the first application and the second application, respectively.
In this embodiment, during the period when the second application calls the multimedia data acquisition device in the active mode to perform data acquisition, if a call request sent by the first application is received, it indicates that the first application needs to call the multimedia data acquisition device again, the active mode of the second application may be switched back to the secondary mode, so that the first application calls the multimedia data acquisition device in the active mode again, the multimedia data acquisition device performs data acquisition according to the acquisition parameters carried by the fourth call request, and the acquired third multimedia data is sent to the first application and the second application respectively. Therefore, the first application can still control the collection of the multimedia data by changing the collection parameters according to the self requirement when the multimedia data collection is carried out again.
As an embodiment of the present invention, as shown in fig. 6, the "sending the first multimedia data to the first application and the second application, respectively" in S103 may include:
in S601, a first call priority of the first application to the multimedia data acquisition device and a second call priority of the second application to the multimedia data acquisition device are obtained.
In this embodiment, for one multimedia data acquisition apparatus, each application has a corresponding call priority. When a plurality of applications call the multimedia data acquisition device at the same time, the multimedia data acquisition device acquires data according to the acquisition parameters of the application with the highest calling priority, and other applications can only acquire the acquired multimedia data and cannot control the acquisition of the multimedia data.
In S602, the first call priority and the second call priority are compared.
In S603, if the first call priority is higher than the second call priority, the first multimedia data is respectively sent to the first application and the second application.
In this embodiment, when the first call priority is higher than the second call priority, the multimedia data acquisition device needs to perform data acquisition according to the acquisition parameter corresponding to the first application, and since the multimedia data acquisition device performs data acquisition according to the acquisition parameter carried in the first call request in S102, the multimedia data acquisition device does not need to be changed, and the first multimedia data can be directly and respectively sent to the first application and the second application.
In S604, if the first call priority is lower than the second call priority, the multimedia data acquisition device is called according to the second call request to acquire multimedia data, and the acquired fourth multimedia data is respectively sent to the first application and the second application.
In this embodiment, when the first call priority is lower than the second call priority, the multimedia data acquisition device needs to perform data acquisition according to the acquisition parameters corresponding to the second application, so that the multimedia data acquisition device can perform data acquisition according to the acquisition parameters carried in the second call request, and send the acquired fourth multimedia data to the first application and the second application respectively.
In this embodiment, each application is provided with a corresponding call priority, and when a plurality of applications call the multimedia data acquisition device at the same time, the multimedia data acquisition device performs data acquisition according to acquisition parameters corresponding to the application with the highest call priority by comparing the call priorities of the applications, so that the acquired multimedia data can meet the requirements of the application with the highest call priority.
As an embodiment of the present invention, as shown in fig. 7, the sending the collected fourth multimedia data to the first application in S604 may include:
in S701, it is determined whether the fourth multimedia data conforms to a data format required to be acquired by the first application.
In S702, if the fourth multimedia data does not conform to the data format required to be acquired by the first application, the fourth multimedia data is resampled.
In S703, the resampled fourth multimedia data is sent to the first application.
In this embodiment, the fourth multimedia data is data acquired by the multimedia data acquisition device according to the acquisition parameters carried by the second invocation request, so that the fourth multimedia data conforms to the data format required to be acquired by the second application, but the data format required to be acquired by the second application and the first application may be different, and therefore, whether the first multimedia data conforms to the data format required to be acquired by the first application or not can be determined.
If the fourth multimedia data conforms to the data format required to be acquired by the first application, the fourth multimedia data can be used by the first application, and therefore the fourth multimedia data is directly sent to the first application; if the fourth multimedia data does not conform to the data format required to be acquired by the first application, it is indicated that the first application cannot directly use the fourth multimedia data, so that the fourth multimedia data is resampled, the data format of the resampled fourth multimedia data conforms to the data format required to be acquired by the first application, and the resampled fourth multimedia data can be used by the first application.
According to the method and the device, the fourth multimedia data which do not conform to the data format required to be acquired by the first application are resampled, so that the resampled fourth multimedia data can conform to the requirement of the first application, the situation that the fourth multimedia data cannot be used by the first application due to the data format problem is avoided, and the multimedia data can be used by the first application and the second application at the same time.
Fig. 8 shows an implementation example provided by the embodiment of the present invention. The X application program and the Y application program call the cameras to acquire images, the X application program calls the cameras in a primary mode, and the Y application program calls the cameras in a secondary mode. And the camera acquires images according to acquisition parameters corresponding to the X application program and respectively sends the acquired images to a buffer register corresponding to the X application program and a buffer register corresponding to the Y application program. The image data acquired by the X application and the Y application are identical. When the X application program quits using the camera, the Y application program can synchronously receive the message, quit the secondary mode and change to using the camera in the primary mode. When the X application program reuses the camera, the Y application program can also synchronously receive the message and exit the main mode, at the moment, the X application program can continue to use the camera in the main mode, and the B application program is converted into the auxiliary mode. The above embodiment is only used for explaining the multimedia data sharing method, and is not limited, for example, the X application and the Y application may also call the multimedia data acquisition device to acquire multimedia data such as audio and video.
Fig. 9 shows another implementation example provided by the embodiment of the present invention. The memory space for storing the images by the Y application is set as the shared memory space, and the Y1 application, the Y2 application, the Y3 application and the like can access the shared memory space to acquire the images acquired by the camera.
The embodiment of the invention can share the multimedia data to two or more applications, can ensure the effectiveness and the safety access of the shared data, meets the requirement that a plurality of applications share the same multimedia data acquisition device, and can save the hardware cost compared with the mode of additionally arranging a plurality of multimedia data acquisition devices on the terminal equipment.
According to the embodiment of the invention, when the multimedia data acquisition device is called by the first application, if the calling request of the second application is received, the multimedia data acquired by the multimedia data acquisition device is sent to the second application under the condition that the multimedia data is sent to the first application, so that both the first application and the second application can acquire the acquired multimedia data, and the sharing of the multimedia data is realized. According to the embodiment of the invention, the collected multimedia data are respectively sent to the first application and the second application, so that the multimedia data can be timely and synchronously shared to a plurality of applications, and the requirement that a plurality of application programs simultaneously collect the multimedia data is met.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 10 is a schematic diagram of a multimedia data sharing apparatus according to an embodiment of the present invention, corresponding to the multimedia data sharing method described in the foregoing embodiment. For convenience of explanation, only the portions related to the present embodiment are shown.
Referring to fig. 10, the apparatus includes a receiving module 101, a first calling module 102, and a transmitting module 103.
The receiving module 101 is configured to receive a first call request for the multimedia data acquisition device sent by a first application.
The first calling module 102 is configured to call the multimedia data acquisition device to acquire multimedia data according to the first calling request, and send the acquired first multimedia data to the first application.
A sending module 103, configured to, when the first application calls the multimedia data acquisition device, if a second call request for the multimedia data acquisition device sent by a second application is received, send the first multimedia data to the first application and the second application respectively.
Optionally, the sending module 103 is configured to:
judging whether the first multimedia data conforms to a data format required to be acquired by the second application;
if the first multimedia data do not conform to the data format required to be acquired by the second application, resampling the first multimedia data;
and sending the resampled first multimedia data to the second application.
Optionally, the apparatus further comprises a saving module. The saving module is used for:
and after a third call request for the multimedia data acquisition device, which is sent by a third application, is received, the first multimedia data is stored in a shared storage space which can be accessed by the third application.
Optionally, the saving module is configured to:
and setting the memory space of the first application for storing the first multimedia data or the memory space of the second application for storing the first multimedia data as the shared memory space.
Optionally, each invocation request carries a corresponding acquisition parameter. The apparatus also includes a monitoring module configured to:
and after the calling of the multimedia data acquisition device by the first application is monitored to be finished, calling the multimedia data acquisition device to acquire multimedia data according to acquisition parameters carried by the second calling request, and sending the acquired second multimedia data to the second application.
Optionally, the apparatus further includes a second invoking module, where the second invoking module is configured to:
when the second application calls the multimedia data acquisition device, if a fourth call request sent by the first application is received, the multimedia data acquisition device is called according to acquisition parameters carried by the fourth call request to acquire multimedia data, and the acquired third multimedia data is respectively sent to the first application and the second application.
Optionally, the sending module 103 is configured to:
acquiring a first calling priority of the first application to the multimedia data acquisition device and a second calling priority of the second application to the multimedia data acquisition device;
comparing the first calling priority with the second calling priority;
if the first calling priority is higher than the second calling priority, the first multimedia data are respectively sent to the first application and the second application;
if the first calling priority is lower than the second calling priority, calling the multimedia data acquisition device to acquire multimedia data according to the second calling request, and respectively sending acquired fourth multimedia data to the first application and the second application.
Optionally, the sending module 103 is configured to:
judging whether the fourth multimedia data conforms to a data format required to be acquired by the first application;
if the fourth multimedia data does not conform to the data format required to be acquired by the first application, resampling the fourth multimedia data;
and sending the fourth multimedia data after the resampling processing to the first application.
According to the embodiment of the invention, when the multimedia data acquisition device is called by the first application, if the calling request of the second application is received, the multimedia data acquired by the multimedia data acquisition device is sent to the second application under the condition that the multimedia data is sent to the first application, so that both the first application and the second application can acquire the acquired multimedia data, and the sharing of the multimedia data is realized. According to the embodiment of the invention, the collected multimedia data are respectively sent to the first application and the second application, so that the multimedia data can be timely and synchronously shared to a plurality of applications, and the requirement that a plurality of application programs simultaneously collect the multimedia data is met.
Fig. 11 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 11, the terminal device 11 of this embodiment includes: a processor 110, a memory 111 and a computer program 112, e.g. a program, stored in said memory 111 and executable on said processor 110. The processor 110, when executing the computer program 112, implements the steps in the various method embodiments described above, such as the steps 101 to 103 shown in fig. 1. Alternatively, the processor 110, when executing the computer program 112, implements the functions of each module/unit in the above-mentioned device embodiments, for example, the functions of the modules 101 to 103 shown in fig. 10.
Illustratively, the computer program 112 may be partitioned into one or more modules/units that are stored in the memory 111 and executed by the processor 110 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program 112 in the terminal device 11. For example, the computer program 112 may be divided into a receiving module, a first calling module and a sending module, and the specific functions of each module are as follows:
the receiving module is used for receiving a first calling request for the multimedia data acquisition device, which is sent by the first application.
And the first calling module is used for calling the multimedia data acquisition device to acquire multimedia data according to the first calling request and sending the acquired first multimedia data to the first application.
The sending module is used for sending the first multimedia data to the first application and the second application respectively if a second calling request for the multimedia data acquisition device sent by a second application is received when the first application calls the multimedia data acquisition device.
The terminal device 11 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 110, a memory 111. Those skilled in the art will appreciate that fig. 11 is merely an example of a terminal device 11, and does not constitute a limitation of the terminal device 11, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device may further include an input-output device, a network access device, a bus, a display, and the like.
The Processor 110 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 111 may be an internal storage unit of the terminal device 11, such as a hard disk or a memory of the terminal device 11. The memory 111 may also be an external storage device of the terminal device 11, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 11. Further, the memory 111 may also include both an internal storage unit and an external storage device of the terminal device 11. The memory 111 is used for storing the computer program and other programs and data required by the terminal device. The memory 111 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method for sharing multimedia data, comprising:
receiving a first call request for a multimedia data acquisition device, which is sent by a first application;
calling the multimedia data acquisition device to acquire multimedia data according to the first calling request, and sending the acquired first multimedia data to the first application;
when the first application calls the multimedia data acquisition device, if a second calling request for the multimedia data acquisition device sent by a second application is received, the first multimedia data are respectively sent to the first application and the second application.
2. The multimedia data sharing method of claim 1, wherein sending the first multimedia data to the second application comprises:
judging whether the first multimedia data conforms to a data format required to be acquired by the second application;
if the first multimedia data do not conform to the data format required to be acquired by the second application, resampling the first multimedia data;
and sending the resampled first multimedia data to the second application.
3. The multimedia data sharing method of claim 1, further comprising, after the sending the first multimedia data to the first application and the second application, respectively:
and after a third call request for the multimedia data acquisition device, which is sent by a third application, is received, the first multimedia data is stored in a shared storage space which can be accessed by the third application.
4. The multimedia data sharing method of claim 3, wherein the saving the first multimedia data to a shared storage space accessible to the third application comprises:
and setting the memory space of the first application for storing the first multimedia data or the memory space of the second application for storing the first multimedia data as the shared memory space.
5. The method according to any of claims 1 to 4, wherein each invocation request carries a corresponding acquisition parameter;
after the sending the first multimedia data to the first application and the second application respectively, the method further includes:
and after the calling of the multimedia data acquisition device by the first application is monitored to be finished, calling the multimedia data acquisition device to acquire multimedia data according to acquisition parameters carried by the second calling request, and sending the acquired second multimedia data to the second application.
6. The multimedia data sharing method of claim 5, wherein after the sending the collected second multimedia data to the second application, further comprising:
when the second application calls the multimedia data acquisition device, if a fourth call request sent by the first application is received, the multimedia data acquisition device is called according to acquisition parameters carried by the fourth call request to acquire multimedia data, and the acquired third multimedia data is respectively sent to the first application and the second application.
7. The multimedia data sharing method of claim 1, wherein the sending the first multimedia data to the first application and the second application, respectively, comprises:
acquiring a first calling priority of the first application to the multimedia data acquisition device and a second calling priority of the second application to the multimedia data acquisition device;
comparing the first calling priority with the second calling priority;
if the first calling priority is higher than the second calling priority, the first multimedia data are respectively sent to the first application and the second application;
if the first calling priority is lower than the second calling priority, calling the multimedia data acquisition device to acquire multimedia data according to the second calling request, and respectively sending acquired fourth multimedia data to the first application and the second application.
8. The multimedia data sharing method of claim 7, wherein sending the collected fourth multimedia data to the first application comprises:
judging whether the fourth multimedia data conforms to a data format required to be acquired by the first application;
if the fourth multimedia data does not conform to the data format required to be acquired by the first application, resampling the fourth multimedia data;
and sending the fourth multimedia data after the resampling processing to the first application.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
CN201810750343.8A 2018-07-10 2018-07-10 Multimedia data sharing method and terminal equipment Pending CN110704201A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810750343.8A CN110704201A (en) 2018-07-10 2018-07-10 Multimedia data sharing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810750343.8A CN110704201A (en) 2018-07-10 2018-07-10 Multimedia data sharing method and terminal equipment

Publications (1)

Publication Number Publication Date
CN110704201A true CN110704201A (en) 2020-01-17

Family

ID=69192926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810750343.8A Pending CN110704201A (en) 2018-07-10 2018-07-10 Multimedia data sharing method and terminal equipment

Country Status (1)

Country Link
CN (1) CN110704201A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897603A (en) * 2020-07-23 2020-11-06 上海瑾盛通信科技有限公司 Data distribution method and device, electronic equipment and storage medium
CN114422837A (en) * 2022-01-25 2022-04-29 成都鼎桥通信技术有限公司 Method, device, equipment and medium for sharing media data by multiple applications

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329657A (en) * 2007-06-19 2008-12-24 瑞达信息安全产业股份有限公司 System and method for safe sharing dynamic memory of multi-application space
CN101833520A (en) * 2009-03-11 2010-09-15 凹凸电子(武汉)有限公司 Method for simultaneously utilizing one camera by computer system and a plurality of application programs
CN103327278A (en) * 2013-07-10 2013-09-25 亿览在线网络技术(北京)有限公司 Real time sharing method and device of images
CN106020777A (en) * 2016-04-29 2016-10-12 杭州华橙网络科技有限公司 Data processing method, device and system
CN106504777A (en) * 2016-11-25 2017-03-15 维沃移动通信有限公司 A kind of processing method of recording data and mobile terminal
CN106648921A (en) * 2016-09-30 2017-05-10 北京奇虎科技有限公司 Method for achieving recording data share in Android system and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329657A (en) * 2007-06-19 2008-12-24 瑞达信息安全产业股份有限公司 System and method for safe sharing dynamic memory of multi-application space
CN101833520A (en) * 2009-03-11 2010-09-15 凹凸电子(武汉)有限公司 Method for simultaneously utilizing one camera by computer system and a plurality of application programs
CN103327278A (en) * 2013-07-10 2013-09-25 亿览在线网络技术(北京)有限公司 Real time sharing method and device of images
CN106020777A (en) * 2016-04-29 2016-10-12 杭州华橙网络科技有限公司 Data processing method, device and system
CN106648921A (en) * 2016-09-30 2017-05-10 北京奇虎科技有限公司 Method for achieving recording data share in Android system and electronic device
CN106504777A (en) * 2016-11-25 2017-03-15 维沃移动通信有限公司 A kind of processing method of recording data and mobile terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897603A (en) * 2020-07-23 2020-11-06 上海瑾盛通信科技有限公司 Data distribution method and device, electronic equipment and storage medium
CN111897603B (en) * 2020-07-23 2024-02-09 上海瑾盛通信科技有限公司 Data distribution method, device, electronic equipment and storage medium
CN114422837A (en) * 2022-01-25 2022-04-29 成都鼎桥通信技术有限公司 Method, device, equipment and medium for sharing media data by multiple applications
CN114422837B (en) * 2022-01-25 2023-08-18 成都鼎桥通信技术有限公司 Method, device, equipment and medium for sharing media data by multiple applications

Similar Documents

Publication Publication Date Title
CN107241281B (en) Data processing method and device
CN108540568B (en) Computing capacity sharing method and intelligent equipment
CN111224806A (en) Resource allocation method and server
CN110213147B (en) Cloud network intercommunication method and device, storage medium and terminal equipment
CN112965809A (en) Deep learning task processing system and method
CN111026697A (en) Inter-core communication method, inter-core communication system, electronic device and electronic equipment
CN110990319B (en) Synchronous serial bus multiplexing method, device, terminal and non-transitory computer readable storage medium
CN110704201A (en) Multimedia data sharing method and terminal equipment
CN114205529A (en) Single-camera calling method and device, terminal and readable storage medium
EP4293600A1 (en) Registration and execution methods and apparatuses for a smart contract in a blockchain
CN113177015B (en) Frame header-based serial port communication method and serial port chip
CN111258582B (en) Window rendering method and device, computer equipment and storage medium
CN111813541B (en) Task scheduling method, device, medium and equipment
CN112506460A (en) Screen control authority sharing method and device, terminal and storage medium
CN114510299A (en) Method, device and storage medium for processing artificial intelligence service
CN115589527B (en) Automatic driving image transmission method, device, electronic equipment and computer medium
CN111538717B (en) Data processing method, device, electronic equipment and computer readable medium
CN111061518B (en) Data processing method, system, terminal equipment and storage medium based on drive node
CN113055350B (en) Data transmission method, device, equipment and readable storage medium
CN106851213A (en) The packet method for allocating tasks and system of cloud platform in monitoring system
CN109214844A (en) Advertisement distribution method and device and electronic equipment
CN113051077A (en) User request processing method and device, terminal equipment and storage medium
CN106060648A (en) Audio data transmission method and smart television
CN111901561A (en) Video data processing method, device and system in monitoring system and storage medium
CN111258670B (en) Method and device for managing component data, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination