A method, device, equipment and storage medium for expanding codec framework

By adding the FFmpeg plug-in and alias mapping to the Codec 2.0 framework of Android 10, and obtaining and initializing the codec plug-in object, the problem of insufficient support for software codec in Codec 2.0 is solved, and the codec format is expanded and the user experience is improved.

CN115762538BActive Publication Date: 2025-08-19HUIZHOU DESAY SV AUTOMOTIVE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210885557.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2025-08-19
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

Codec 2.0 in Android 10 has less support for software encoding and decoding, which makes it inconvenient for users to use.

Method used

By adding the mapping relationship between the FFmpeg plug-in and the plug-in alias information in the configuration file of the codec framework, obtain the target decoding feature information, determine the target decoding plug-in, create the plug-in object, and initialize the plug-in object based on the decoding parameter set.

Benefits of technology

The codec framework supports codec formats and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115762538B_ABST
    Figure CN115762538B_ABST
Patent Text Reader

Abstract

The present invention discloses a codec framework expansion method, apparatus, device, and storage medium. The method comprises: obtaining target decoding element information from a target media stream, the target decoding element information including a target decoding format; when target plug-in alias information matching the target decoding format exists in a codec framework configuration file, determining a target codec plug-in based on the target plug-in alias information; creating a target plug-in object corresponding to the target codec plug-in; forming a target codec parameter set based on the target decoding element information; and initializing the target plug-in object based on the target codec parameter set. The present invention expands the codec formats supported by existing codec frameworks and enhances the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information processing technology, and in particular to a method, device, equipment and storage medium for expanding a coding / decoding framework. Background Art

[0002] Prior to Android 10, MediaCodec implemented encoding and decoding functions through ACodec, calling Open MAXIL, a third-party codec standard interface. SoCs only needed to implement the interface according to the Open MAX standard to connect to Android MediaCodec / ACodec. Codec 2.0, introduced in Android 10, was designed to replace ACodec and Open MAX, but Android Codec 2.0 offered limited support for software codecs, making it inconvenient for users. Summary of the Invention

[0003] The present invention provides a codec framework expansion method, apparatus, device and storage medium to expand the codec formats supported by the existing codec framework and enhance user experience.

[0004] According to one aspect of the present invention, a method for extending a codec framework is provided, the method comprising:

[0005] Acquire target decoding element information from a target media stream, wherein the target decoding element information includes a target decoding format;

[0006] When target plug-in alias information matching the target decoding format exists in the configuration file of the codec framework, determining the target codec plug-in according to the target plug-in alias information;

[0007] Create a target plug-in object corresponding to the target codec plug-in;

[0008] forming a target encoding and decoding parameter set according to the target decoding element information;

[0009] Initialize the target plug-in object based on the target codec parameter set.

[0010] Optionally, the codec framework includes a Codec 2.0 framework;

[0011] The target codec plug-in includes a target FFmpeg plug-in.

[0012] Optionally, the method further includes:

[0013] Reading an XML configuration file of the Codec2.0 framework, and adding a plug-in alias mapping relationship between the FFmpeg plug-in and the plug-in alias information in the XML configuration file;

[0014] There is a corresponding plug-in alias mapping relationship between one FFmpeg plug-in and at least one plug-in alias information, and the plug-in alias information includes a decoder alias and decoding format information.

[0015] Optionally, when target plug-in alias information matching the target decoding format exists in the configuration file of the codec framework, determining the target codec plug-in according to the target plug-in alias information includes:

[0016] Read all plug-in alias mapping relationships in the XML configuration file of the Codec2.0 framework;

[0017] Determining the plug-in alias information matching the target decoding format as the target plug-in alias information, wherein the decoding format information in the target plug-in alias information is consistent with the target decoding format;

[0018] Determine the plug-in alias mapping relationship where the target plug-in alias information is located as the target plug-in alias mapping relationship;

[0019] The FFmpeg plug-in in the target plug-in alias mapping relationship is determined as the target FFmpeg plug-in.

[0020] Optionally, before forming a target encoding and decoding parameter set according to the target decoding element information, the method further includes:

[0021] Get the Param tag to be queried, and load the Param tag to be queried into the Config configuration item mapping.

[0022] Optionally, forming a target encoding and decoding parameter set according to the target decoding element information includes:

[0023] Determining a target decoding element as a decoding element to be queried from the target decoding element information;

[0024] When there is a Param tag to be queried that matches the decoding element to be queried in the Config configuration item mapping, generate the corresponding target Param parameter and add it to the target codec parameter set, and return to perform the determination operation of the decoding element to be queried until all target decoding elements in the target decoding element information have been determined as decoding elements to be queried; otherwise,

[0025] Directly return to perform the operation of determining the decoding element to be queried until all target decoding elements in the target decoding element information have been determined as the decoding elements to be queried.

[0026] Optionally, the target decoding element information also includes sampling parameters, bit rate and / or channels.

[0027] According to another aspect of the present invention, a coding framework expansion device is provided, the device comprising:

[0028] A decoding element acquisition module, configured to acquire target decoding element information from a target media stream, wherein the target decoding element information includes a target decoding format;

[0029] a target plug-in determining module, configured to determine a target codec plug-in according to the target plug-in alias information matching the target decoding format when the target plug-in alias information is present in the configuration file of the codec framework;

[0030] A plug-in object creation module, used to create a target plug-in object corresponding to the target codec plug-in;

[0031] A codec parameter set forming module, configured to form a target codec parameter set according to the target decoding element information;

[0032] The plug-in object initialization module is used to initialize the target plug-in object based on the target codec parameter set.

[0033] According to another aspect of the present invention, an electronic device is provided, comprising:

[0034] at least one processor; and

[0035] a memory communicatively connected to the at least one processor; wherein,

[0036] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the codec framework extension method according to any embodiment of the present invention.

[0037] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the codec framework expansion method described in any embodiment of the present invention when executed.

[0038] The technical solution of the embodiment of the present invention obtains target decoding element information including a target decoding format from a target media stream; when target plug-in alias information matching the target decoding format exists in a configuration file of a codec framework, determines a target codec plug-in according to the target plug-in alias information; creates a target plug-in object corresponding to the target codec plug-in; forms a target codec parameter set according to the target decoding element information; and initializes the target plug-in object based on the target codec parameter set. This solves the problem of inconvenience for users when existing codecs have little support for software codecs, and can effectively expand the codec formats supported by the existing codec framework and enhance user experience.

[0039] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 This is a flowchart of a method for extending a coding / decoding framework according to a first embodiment of the present invention;

[0042] Figure 2 This is a structural diagram of a coding and decoding framework expansion device provided according to Embodiment 2 of the present invention;

[0043] Figure 3 The present invention is a schematic diagram of the structure of an electronic device for implementing the coding and decoding framework expansion method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0045] It should be noted that the terms "first", "second", "target", "to be", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0046] Example 1

[0047] Figure 1 A flowchart of a method for extending a codec framework is provided for the first embodiment of the present invention. This embodiment is applicable to the case of extending an existing codec framework. The method can be executed by a codec framework extension device. The codec framework extension device can be implemented in the form of hardware and / or software. The codec framework extension device can be configured in a computer device. Figure 1 As shown, the method includes:

[0048] S110: Acquire target decoding element information from the target media stream, where the target decoding element information includes a target decoding format.

[0049] The target decoding element information may be understood as a set of target decoding elements, and the target decoding elements may be understood as decoding elements used during decoding.

[0050] In this embodiment, the codec framework may include a Codec 2.0 framework; and the target codec plug-in may include a target FFmpeg plug-in.

[0051] The codec framework extension method of this embodiment can be applied to the Android Codec 2.0 codec framework. FFmpeg can be encapsulated into a plug-in library, which becomes a part of the Codec 2.0 decoding framework, thereby expanding the original limited codec formats of Codec 2.0.

[0052] Optionally, the target decoding element information may further include sampling parameters, bit rate and / or channels.

[0053] In this embodiment, the decoding elements required for decoding by FFmpeg can be obtained from the target media stream, including but not limited to decoding format, sampling parameters, bit rate and channels, and each decoding element can generate a corresponding key-value mapping key-value.

[0054] S120 : When target plug-in alias information matching the target decoding format exists in the configuration file of the codec framework, determine the target codec plug-in according to the target plug-in alias information.

[0055] In this embodiment, alias information corresponding to the plug-in to be extended can be pre-added to the codec framework configuration file. This alias information can include the plug-in's alias and decoding format. If the target decoding element information obtained from the target media stream contains an alias in the codec framework configuration file, this alias can be used as the target plug-in alias information. The plug-in corresponding to the target plug-in alias information is the target codec plug-in.

[0056] Optionally, before S120, the codec framework extension method provided in this embodiment may further include:

[0057] Read the XML configuration file of the Codec2.0 framework and add the plug-in alias mapping relationship between the FFmpeg plug-in and the plug-in alias information in the XML configuration file.

[0058] There is a corresponding plug-in alias mapping relationship between an FFmpeg plug-in and at least one plug-in alias information, and the plug-in alias information includes a decoder alias and decoding format information.

[0059] In this embodiment, one FFmpeg plug-in can correspond to multiple plug-in alias information. In one plug-in alias information, the decoder alias and the decoding format information correspond one to one. This eliminates the need for one plug-in for each decoding format, which can improve code reusability and portability.

[0060] Furthermore, S120 can be implemented through the following specific steps:

[0061] S1201. Read all plug-in alias mapping relationships in the XML configuration file of the Codec2.0 framework.

[0062] S1202: Determine the plug-in alias information that matches the target decoding format as the target plug-in alias information, and the decoding format information in the target plug-in alias information is consistent with the target decoding format.

[0063] S1203: Determine the plug-in alias mapping relationship where the target plug-in alias information is located as the target plug-in alias mapping relationship.

[0064] S1204: Determine the FFmpeg plug-in in the target plug-in alias mapping relationship as the target FFmpeg plug-in.

[0065] In specific applications, Codec2.0 adds support for "alias". You can add the "alias" field based on the ACodec configuration to form a plug-in alias mapping relationship. The alias field example is as follows:

[0066] <Alias name="c2.ffmpeg.ape.decoder"type="audio / ape" / >

[0067] After obtaining the target decoding format from the target media stream, MediaCodec can check whether the target decoding format exists in the plug-in alias mapping relationship added above. If so, the plug-in alias information that matches the target decoding format can be used as the target plug-in alias information, and the plug-in alias mapping relationship where the target plug-in alias information is located is determined as the target plug-in alias mapping relationship. The FFmpeg plug-in in the target plug-in alias mapping relationship is the target FFmpeg plug-in.

[0068] S130: Create a target plug-in object corresponding to the target codec plug-in.

[0069] In this embodiment, when the target codec plug-in is determined, a target plug-in object can be created. In a specific application, when the target codec plug-in is an FFmpeg plug-in, Codec 2.0 can find the FFmpeg plug-in through the target plug-in alias information and create an FFmpeg plug-in object.

[0070] S140: Form a target encoding and decoding parameter set according to the target decoding element information.

[0071] In this embodiment, the target decoding elements in the target decoding element information may be analyzed one by one to obtain element values of the decoding elements that need to be configured, thereby forming a target encoding and decoding parameter set.

[0072] Optionally, before S140, the codec framework extension method provided in this embodiment may further include:

[0073] Get the Param tag to be queried and load the Param tag to be queried into the Config configuration item mapping.

[0074] In this embodiment, all Param tags that may need to be queried may be added in advance in Codec 2.0 and loaded into the Config configuration item map at the same time.

[0075] Furthermore, S140 can be implemented through the following specific steps:

[0076] S1401: Determine a target decoding element from target decoding element information as a decoding element to be queried.

[0077] S1402: When there is a Param tag to be queried that matches the decoding element to be queried in the Config configuration item mapping, generate a corresponding target Param parameter and add it to the target codec parameter set.

[0078] In this embodiment, MediaCodec can transfer the target decoding element information to Codec2.0. Codec2.0 identifies all decoding elements in the target decoding element information and checks whether the key of the decoding element is in the loaded Config configuration item mapping. If so, the value of the decoding element can be obtained and the corresponding Param parameter is generated. If not, the decoding element is skipped. In the specific implementation process, S1401 can be executed to determine a target decoding element as a decoding element to be queried from the target decoding element information; then S1402 is executed. When there is a Param tag to be queried that matches the decoding element to be queried in the Config configuration item mapping, the target Param parameter corresponding to the decoding element to be queried is generated. When there is no Param tag to be queried that matches the decoding element to be queried in the Config configuration item mapping, this step can be skipped directly. If there are still target decoding elements in the target decoding element information that have not been determined as decoding elements to be queried, S1401 and S1402 can be returned to re-determine the next decoding element to be queried until all target decoding elements in the target decoding element information have been traversed.

[0079] S150: Initialize a target plug-in object based on the target codec parameter set.

[0080] In this embodiment, when forming the target codec parameter set, the target plugin object can be initialized according to the target codec parameter set. In a specific application, when the target codec plugin is an FFmpeg plugin, the FFmpeg plugin can query the Param tags in Codec2.0 one by one, obtain the values stored in the Param tags, and initialize the FFmpeg object based on these values.

[0081] Based on the above embodiment, after initializing the target plug-in object, the FFmpeg plug-in can obtain the media stream data in C2Workinput, call FFmpeg for decoding, and after successful decoding, store the decoded pcm / yuv in C2Work output and return it.

[0082] The technical solution of the embodiment of the present invention obtains target decoding element information including a target decoding format from a target media stream; when target plug-in alias information matching the target decoding format exists in a configuration file of a codec framework, determines a target codec plug-in according to the target plug-in alias information; creates a target plug-in object corresponding to the target codec plug-in; forms a target codec parameter set according to the target decoding element information; and initializes the target plug-in object based on the target codec parameter set. This solves the problem of inconvenience for users when existing codecs have little support for software codecs, and can effectively expand the codec formats supported by the existing codec framework and enhance user experience.

[0083] Example 2

[0084] Figure 2 A schematic diagram of the structure of a codec framework expansion device is provided for the second embodiment of the present invention. Figure 2 As shown, the device includes:

[0085] The decoding element acquisition module 210 is configured to acquire target decoding element information from a target media stream, where the target decoding element information includes a target decoding format.

[0086] The target plug-in determining module 220 is configured to determine a target codec plug-in according to the target plug-in alias information when there is target plug-in alias information matching the target decoding format in the configuration file of the codec framework.

[0087] The plug-in object creation module 230 is used to create a target plug-in object corresponding to the target codec plug-in.

[0088] The codec parameter set forming module 240 is configured to form a target codec parameter set according to the target decoding element information.

[0089] The plug-in object initialization module 250 is configured to initialize the target plug-in object based on the target codec parameter set.

[0090] Optionally, the codec framework includes a Codec 2.0 framework;

[0091] The target codec plug-in includes a target FFmpeg plug-in.

[0092] Optionally, the device further includes:

[0093] An alias mapping creation module is used to read the XML configuration file of the Codec2.0 framework and add a plug-in alias mapping relationship between the FFmpeg plug-in and the plug-in alias information in the XML configuration file; wherein, a corresponding plug-in alias mapping relationship exists between an FFmpeg plug-in and at least one plug-in alias information, and the plug-in alias information includes a decoder alias and decoding format information.

[0094] Optionally, the target plug-in determination module 220 includes:

[0095] An alias mapping reading unit, configured to read all plug-in alias mapping relationships in an XML configuration file of the Codec 2.0 framework;

[0096] an alias to be extended determining unit, configured to determine the plug-in alias information matching the target decoding format as the target plug-in alias information, wherein the decoding format information in the target plug-in alias information is consistent with the target decoding format;

[0097] a target mapping relationship determining unit, configured to determine the plug-in alias mapping relationship where the target plug-in alias information is located as the target plug-in alias mapping relationship;

[0098] The target plug-in determining unit is configured to determine the FFmpeg plug-in in the target plug-in alias mapping relationship as the target FFmpeg plug-in.

[0099] Optionally, the device further includes:

[0100] The Param tag determining unit is configured to obtain the Param tag to be queried and load the Param tag to be queried into the Config configuration item mapping before forming the target encoding and decoding parameter set according to the target decoding element information.

[0101] Optionally, the encoding and decoding parameter set forming module 240 includes:

[0102] a to-be-queried element determining unit, configured to determine a target decoding element from the target decoding element information as a to-be-queried decoding element;

[0103] The Param parameter determination unit is used to generate a corresponding target Param parameter and add it to the target codec parameter set when there is a Param tag to be queried that matches the decoding element to be queried in the Config configuration item mapping, and return to perform the determination operation of the decoding element to be queried until all target decoding elements in the target decoding element information have been determined as decoding elements to be queried; otherwise, directly return to perform the determination operation of the decoding element to be queried until all target decoding elements in the target decoding element information have been determined as decoding elements to be queried.

[0104] Optionally, the target decoding element information also includes sampling parameters, bit rate and / or channels.

[0105] The codec framework extension device provided in the embodiment of the present invention can execute the codec framework extension method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0106] Example 3

[0107] Figure 3 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0108] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0109] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0110] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the codec framework expansion method.

[0111] In some embodiments, the codec framework extension method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the codec framework extension method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the codec framework extension method in any other appropriate manner (for example, by means of firmware).

[0112] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0113] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0114] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0115] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0116] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0117] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0118] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0119] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for extending a coding / decoding framework, characterized in that: include: Acquire target decoding element information from a target media stream, wherein the target decoding element information includes a target decoding format; When target plug-in alias information matching the target decoding format exists in the configuration file of the codec framework, determining the target codec plug-in according to the target plug-in alias information; wherein the codec framework includes the Codec 2.0 framework; and the target codec plug-in includes a target FFmpeg plug-in; Create a target plug-in object corresponding to the target codec plug-in; forming a target encoding and decoding parameter set according to the target decoding element information; Initializing the target plug-in object based on the target codec parameter set; Reading an XML configuration file of the Codec2.0 framework, and adding a plug-in alias mapping relationship between an FFmpeg plug-in and plug-in alias information in the XML configuration file; wherein a corresponding plug-in alias mapping relationship exists between one FFmpeg plug-in and at least one plug-in alias information, and the plug-in alias information includes a decoder alias and decoding format information; Wherein, when target plug-in alias information matching the target decoding format exists in the configuration file of the codec framework, determining the target codec plug-in according to the target plug-in alias information includes: Read all plug-in alias mapping relationships in the XML configuration file of the Codec2.0 framework; Determining the plug-in alias information matching the target decoding format as the target plug-in alias information, wherein the decoding format information in the target plug-in alias information is consistent with the target decoding format; Determine the plug-in alias mapping relationship where the target plug-in alias information is located as the target plug-in alias mapping relationship; The FFmpeg plug-in in the target plug-in alias mapping relationship is determined as the target FFmpeg plug-in.

2. The method according to claim 1, characterized in that Before forming a target encoding and decoding parameter set according to the target decoding element information, the method further includes: Get the Param tag to be queried, and load the Param tag to be queried into the Config configuration item mapping.

3. The method according to claim 2, characterized in that The forming of a target encoding and decoding parameter set according to the target decoding element information includes: Determining a target decoding element as a decoding element to be queried from the target decoding element information; When there is a Param tag to be queried that matches the decoding element to be queried in the Config configuration item mapping, generate the corresponding target Param parameter and add it to the target codec parameter set, and return to perform the determination operation of the decoding element to be queried until all target decoding elements in the target decoding element information have been determined as decoding elements to be queried; otherwise, Directly return to perform the operation of determining the decoding element to be queried until all target decoding elements in the target decoding element information have been determined as the decoding elements to be queried.

4. The method according to claim 1, wherein The target decoding element information also includes sampling parameters, bit rate and / or channels.

5. A coding and decoding framework expansion device, characterized in that: include: A decoding element acquisition module, configured to acquire target decoding element information from a target media stream, wherein the target decoding element information includes a target decoding format; a target plug-in determination module, configured to determine a target codec plug-in according to the target plug-in alias information when there is target plug-in alias information matching the target decoding format in the configuration file of the codec framework; wherein the codec framework includes the Codec 2.0 framework; and the target codec plug-in includes a target FFmpeg plug-in; A plug-in object creation module, used to create a target plug-in object corresponding to the target codec plug-in; A codec parameter set forming module, configured to form a target codec parameter set according to the target decoding element information; A plug-in object initialization module, configured to initialize the target plug-in object based on the target codec parameter set; An alias mapping creation module is configured to read an XML configuration file of the Codec 2.0 framework and add a plug-in alias mapping relationship between an FFmpeg plug-in and plug-in alias information in the XML configuration file; wherein a corresponding plug-in alias mapping relationship exists between one FFmpeg plug-in and at least one plug-in alias information, and the plug-in alias information includes a decoder alias and decoding format information; The target plug-in determination module includes: an alias mapping reading unit, an alias to be extended determination unit, a target mapping relationship determination unit, and a target plug-in determination unit; The alias mapping reading unit is used to read all plug-in alias mapping relationships in the XML configuration file of the Codec2.0 framework; The alias to be extended determining unit is configured to determine the plug-in alias information matching the target decoding format as the target plug-in alias information, wherein the decoding format information in the target plug-in alias information is consistent with the target decoding format; The target mapping relationship determining unit is configured to determine the plug-in alias mapping relationship where the target plug-in alias information is located as the target plug-in alias mapping relationship; The target plug-in determining unit is configured to determine the FFmpeg plug-in in the target plug-in alias mapping relationship as the target FFmpeg plug-in.

6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the codec framework extension method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the coding and decoding framework expansion method according to any one of claims 1 to 4 when executed.

Citation Information

Patent Citations

  • Use method of communication coding-decoding assembly of android system

    CN104023266A

  • Decoding system and method based on FFMPEG and hardware acceleration equipment

    CN112511840A