1e41f4b71Sopenharmony_ci# Multimedia Subsystem Changelog
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci## cl.multimedia.1 Core Module APIs Changed
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci**Access Level**
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciPublic API
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci**Reason for Change**
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ciThe **AVMemory** struct is deprecated and replaced by **AVBuffer**.
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci**Change Impact**
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ciThe change is compatible with earlier versions. Use the new APIs in your code.
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci**API Level**
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci|         Deprecated API        |          API Level                |
21e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------|
22e41f4b71Sopenharmony_ci| OH_AVMemory_Create | 10 |
23e41f4b71Sopenharmony_ci| OH_AVMemory_GetAddr | 9 |
24e41f4b71Sopenharmony_ci| OH_AVMemory_GetSize  | 9 |
25e41f4b71Sopenharmony_ci| OH_AVMemory_Destroy  | 10 |
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci**Change Since**
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.3
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci**Key API/Component Changes**
32e41f4b71Sopenharmony_ci
33e41f4b71Sopenharmony_ci|         Deprecated API        |          Deprecated Description               | Substitute API                     |
34e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------| :----------------------------|
35e41f4b71Sopenharmony_ci| OH_AVMemory_Create | The API for creating an **AVMemory** instance is deprecated, and the API for creating an **AVBuffer** instance is supported.|OH_AVBuffer_Create|
36e41f4b71Sopenharmony_ci| OH_AVMemory_GetAddr | The API for obtaining the virtual address of the memory is deprecated, and the API for obtaining the buffer address is supported.|OH_AVBuffer_GetAddr|
37e41f4b71Sopenharmony_ci| OH_AVMemory_GetSize  | The API for obtaining the memory length is deprecated, and the API for obtaining the buffer length is supported.|OH_AVBuffer_GetCapacity |
38e41f4b71Sopenharmony_ci| OH_AVMemory_Destroy  | The API for destroying an **AVMemory** instance is deprecated, and the API for destroying an **AVBuffer** instance is supported.|OH_AVBuffer_Destroy |
39e41f4b71Sopenharmony_ci
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ci**Adaptation Guide**
42e41f4b71Sopenharmony_ci
43e41f4b71Sopenharmony_ciBefore change:
44e41f4b71Sopenharmony_ci
45e41f4b71Sopenharmony_ciIn the code for implementing media encoding/decoding and muxing/demuxing, use the **AVMemory** APIs to operate the data memory.
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ciAfter change:
48e41f4b71Sopenharmony_ci
49e41f4b71Sopenharmony_ciIn the code for implementing media encoding/decoding and muxing/demuxing, use the **AVBuffer** APIs to operate the data memory.
50e41f4b71Sopenharmony_ci
51e41f4b71Sopenharmony_ci## cl.multimedia.2 CodecBase Module APIs Changed
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci**Access Level**
54e41f4b71Sopenharmony_ci
55e41f4b71Sopenharmony_ciPublic API
56e41f4b71Sopenharmony_ci
57e41f4b71Sopenharmony_ci**Reason for Change**
58e41f4b71Sopenharmony_ci
59e41f4b71Sopenharmony_ciThe **AVMemory** struct is deprecated and replaced by **AVBuffer**. Unsupported specifications are removed.
60e41f4b71Sopenharmony_ci
61e41f4b71Sopenharmony_ci**Change Impact**
62e41f4b71Sopenharmony_ci
63e41f4b71Sopenharmony_ciThe change is compatible with earlier versions. Use the new APIs in your code.
64e41f4b71Sopenharmony_ci
65e41f4b71Sopenharmony_ci**API Level**
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ci|         API        |          API Level                |
68e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------|
69e41f4b71Sopenharmony_ci| OH_AVCodecOnNeedInputData | 9 |
70e41f4b71Sopenharmony_ci| OH_AVCodecOnNewOutputData | 9 |
71e41f4b71Sopenharmony_ci| OH_AVCodecAsyncCallback  | 9 |
72e41f4b71Sopenharmony_ci| const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG4  | 10 |
73e41f4b71Sopenharmony_ci| AudioChannelSet | 10 |
74e41f4b71Sopenharmony_ci| AudioChanelLayout | 10 |
75e41f4b71Sopenharmony_ci
76e41f4b71Sopenharmony_ci**Change Since**
77e41f4b71Sopenharmony_ci
78e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.3
79e41f4b71Sopenharmony_ci
80e41f4b71Sopenharmony_ci**Key API/Component Changes**
81e41f4b71Sopenharmony_ci
82e41f4b71Sopenharmony_ci|         Deprecated API        |          Deprecated Description               | Substitute API                     |
83e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------| :----------------------------|
84e41f4b71Sopenharmony_ci| OH_AVCodecOnNeedInputData | The callback function for codec input data is changed from **AVMemory** to **AVBuffer**.|OH_AVCodecOnNeedInputBuffer|
85e41f4b71Sopenharmony_ci| OH_AVCodecOnNewOutputData | The callback function for codec output data is changed from **AVMemory** to **AVBuffer**.|OH_AVCodecOnNewOutputBuffer|
86e41f4b71Sopenharmony_ci| OH_AVCodecAsyncCallback  | The pointer to the registered callback functions is changed from **AVMemory** to **AVBuffer**.|OH_AVCodecCallback |
87e41f4b71Sopenharmony_ci| const char *OH_AVCODEC_MIMETYPE_VIDEO_MPEG4  | This specification is no longer supported.|None|
88e41f4b71Sopenharmony_ci| AudioChannelSet | The API name is changed.| OH_AudioChannelSet |
89e41f4b71Sopenharmony_ci| AudioChanelLayout | The API name is changed.| OH_AudioChannelLayout |
90e41f4b71Sopenharmony_ci
91e41f4b71Sopenharmony_ci**Adaptation Guide**
92e41f4b71Sopenharmony_ci
93e41f4b71Sopenharmony_ciBefore change:
94e41f4b71Sopenharmony_ci
95e41f4b71Sopenharmony_ciPointer to the registered callback functions **OH_AVCodecAsyncCallback** for the audio and video codec:
96e41f4b71Sopenharmony_ci
97e41f4b71Sopenharmony_ciImplementation of the codec input callback: **OH_AVCodecOnNeedInputData**
98e41f4b71Sopenharmony_ci
99e41f4b71Sopenharmony_ciImplementation of the codec output callback: **OH_AVCodecOnNewOutputData**
100e41f4b71Sopenharmony_ci
101e41f4b71Sopenharmony_ciContainer format: **OH_AVCODEC_MIMETYPE_VIDEO_MPEG4**
102e41f4b71Sopenharmony_ci
103e41f4b71Sopenharmony_ciAudio channel settings: **AudioChannelSet**
104e41f4b71Sopenharmony_ci
105e41f4b71Sopenharmony_ciAudio channel layouts: **AudioChanelLayout**
106e41f4b71Sopenharmony_ci
107e41f4b71Sopenharmony_ciAfter change:
108e41f4b71Sopenharmony_ci
109e41f4b71Sopenharmony_ciPointer to the registered callback functions **OH_AVCodecCallback** for the audio and video codec:
110e41f4b71Sopenharmony_ci
111e41f4b71Sopenharmony_ciImplementation of the codec input callback: **OH_AVCodecOnNeedInputBuffer**
112e41f4b71Sopenharmony_ci
113e41f4b71Sopenharmony_ciImplementation of the codec output callback: **OH_AVCodecOnNewOutputBuffer**
114e41f4b71Sopenharmony_ci
115e41f4b71Sopenharmony_ciContainer format **OH_AVCODEC_MIMETYPE_VIDEO_MPEG4**: no longer supported
116e41f4b71Sopenharmony_ci
117e41f4b71Sopenharmony_ciAudio channel settings: **OH_AudioChannelSet**
118e41f4b71Sopenharmony_ci
119e41f4b71Sopenharmony_ciAudio channel layouts: **OH_AudioChannelLayout**
120e41f4b71Sopenharmony_ci
121e41f4b71Sopenharmony_ci## cl.multimedia.3 VideoDecoder Module APIs Changed
122e41f4b71Sopenharmony_ci
123e41f4b71Sopenharmony_ci**Access Level**
124e41f4b71Sopenharmony_ci
125e41f4b71Sopenharmony_ciPublic API
126e41f4b71Sopenharmony_ci
127e41f4b71Sopenharmony_ci**Reason for Change**
128e41f4b71Sopenharmony_ci
129e41f4b71Sopenharmony_ciThe **AVMemory** struct is deprecated and replaced by **AVBuffer**.
130e41f4b71Sopenharmony_ci
131e41f4b71Sopenharmony_ci**Change Impact**
132e41f4b71Sopenharmony_ci
133e41f4b71Sopenharmony_ciThe change is compatible with earlier versions. Use the new APIs in your code.
134e41f4b71Sopenharmony_ci
135e41f4b71Sopenharmony_ci**API Level**
136e41f4b71Sopenharmony_ci
137e41f4b71Sopenharmony_ci|         API        |          API Level                |
138e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------|
139e41f4b71Sopenharmony_ci| OH_VideoDecoder_SetCallback | 9 |
140e41f4b71Sopenharmony_ci| OH_VideoDecoder_PushInputData | 9 |
141e41f4b71Sopenharmony_ci| OH_VideoDecoder_RenderOutputData  | 9 |
142e41f4b71Sopenharmony_ci| OH_VideoDecoder_FreeOutputData  | 9 |
143e41f4b71Sopenharmony_ci
144e41f4b71Sopenharmony_ci**Change Since**
145e41f4b71Sopenharmony_ci
146e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.3
147e41f4b71Sopenharmony_ci
148e41f4b71Sopenharmony_ci**Key API/Component Changes**
149e41f4b71Sopenharmony_ci
150e41f4b71Sopenharmony_ci|         Deprecated API        |          Deprecated Description               | Substitute API                     |
151e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------| :----------------------------|
152e41f4b71Sopenharmony_ci| OH_VideoDecoder_SetCallback | The **AVBuffer** struct is used in the callback function registration.|OH_VideoDecoder_RegisterCallback|
153e41f4b71Sopenharmony_ci| OH_VideoDecoder_PushInputData | The **AVBuffer** struct is used in the decoder's input stream data.|OH_VideoDecoder_PushInputBuffer|
154e41f4b71Sopenharmony_ci| OH_VideoDecoder_RenderOutputData  | The **AVBuffer** struct is used in the decoder's output rendering control.|OH_VideoDecoder_RenderOutputBuffer |
155e41f4b71Sopenharmony_ci| OH_VideoDecoder_FreeOutputData  | The **AVBuffer** struct is used in the decoder's output rendering release.|OH_VideoDecoder_FreeOutputBuffer |
156e41f4b71Sopenharmony_ci
157e41f4b71Sopenharmony_ci**Adaptation Guide**
158e41f4b71Sopenharmony_ci
159e41f4b71Sopenharmony_ciBefore change:
160e41f4b71Sopenharmony_ci
161e41f4b71Sopenharmony_ciCall **OH_VideoDecoder_SetCallback()** to set callback functions.
162e41f4b71Sopenharmony_ci
163e41f4b71Sopenharmony_ciCall **OH_VideoDecoder_PushInputData** to fill in stream data when an input callback is received.
164e41f4b71Sopenharmony_ci
165e41f4b71Sopenharmony_ciCall **OH_VideoDecoder_FreeOutputData** to release the output image or **OH_VideoDecoder_RenderOutputData** to render the image when an output callback is received.
166e41f4b71Sopenharmony_ci
167e41f4b71Sopenharmony_ciAfter change:
168e41f4b71Sopenharmony_ci
169e41f4b71Sopenharmony_ciCall **OH_VideoDecoder_RegisterCallback()** to set callback functions.
170e41f4b71Sopenharmony_ci
171e41f4b71Sopenharmony_ciCall **OH_VideoDecoder_PushInputBuffer** to fill in stream data when an input callback is received.
172e41f4b71Sopenharmony_ci
173e41f4b71Sopenharmony_ciCall **OH_VideoDecoder_FreeOutputBuffer** to release the output image or **OH_VideoDecoder_RenderOutputBuffer** to render the image when an output callback is received.
174e41f4b71Sopenharmony_ci
175e41f4b71Sopenharmony_ci
176e41f4b71Sopenharmony_ci## cl.multimedia.4 VideoEncoder Module APIs Changed
177e41f4b71Sopenharmony_ci
178e41f4b71Sopenharmony_ci**Access Level**
179e41f4b71Sopenharmony_ci
180e41f4b71Sopenharmony_ciPublic API
181e41f4b71Sopenharmony_ci
182e41f4b71Sopenharmony_ci**Reason for Change**
183e41f4b71Sopenharmony_ci
184e41f4b71Sopenharmony_ciThe **AVMemory** struct is deprecated and replaced by **AVBuffer**.
185e41f4b71Sopenharmony_ci
186e41f4b71Sopenharmony_ci**Change Impact**
187e41f4b71Sopenharmony_ci
188e41f4b71Sopenharmony_ciThe change is compatible with earlier versions. Use the new APIs in your code.
189e41f4b71Sopenharmony_ci
190e41f4b71Sopenharmony_ci**API Level**
191e41f4b71Sopenharmony_ci
192e41f4b71Sopenharmony_ci|         API        |          API Level                |
193e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------|
194e41f4b71Sopenharmony_ci| OH_VideoEncoder_SetCallback | 9 |
195e41f4b71Sopenharmony_ci| OH_VideoEncoder_PushInputData | 9 |
196e41f4b71Sopenharmony_ci| OH_VideoEncoder_FreeOutputData  | 9 |
197e41f4b71Sopenharmony_ci
198e41f4b71Sopenharmony_ci**Change Since**
199e41f4b71Sopenharmony_ci
200e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.3
201e41f4b71Sopenharmony_ci
202e41f4b71Sopenharmony_ci**Key API/Component Changes**
203e41f4b71Sopenharmony_ci
204e41f4b71Sopenharmony_ci|         Deprecated API        |          Deprecated Description               | Substitute API                     |
205e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------| :----------------------------|
206e41f4b71Sopenharmony_ci| OH_VideoEncoder_SetCallback | The **AVBuffer** struct is used in the callback function registration.|OH_VideoEncoder_RegisterCallback|
207e41f4b71Sopenharmony_ci| OH_VideoEncoder_PushInputData | The **AVBuffer** struct is used in the encoder's input stream data.|OH_VideoEncoder_PushInputBuffer|
208e41f4b71Sopenharmony_ci| OH_VideoEncoder_FreeOutputData  | The **AVBuffer** struct is used in the encoder's output rendering release.|OH_VideoEncoder_FreeOutputBuffer |
209e41f4b71Sopenharmony_ci
210e41f4b71Sopenharmony_ci**Adaptation Guide**
211e41f4b71Sopenharmony_ci
212e41f4b71Sopenharmony_ciBefore change:
213e41f4b71Sopenharmony_ci
214e41f4b71Sopenharmony_ciCall **OH_VideoEncoder_SetCallback()** to set callback functions.
215e41f4b71Sopenharmony_ci
216e41f4b71Sopenharmony_ciCall **OH_VideoEncoder_PushInputData** to fill in data to encode when an input callback is received.
217e41f4b71Sopenharmony_ci
218e41f4b71Sopenharmony_ciCall **OH_VideoEncoder_FreeOutputData** to release output data when an output callback is received.
219e41f4b71Sopenharmony_ci
220e41f4b71Sopenharmony_ciAfter change:
221e41f4b71Sopenharmony_ci
222e41f4b71Sopenharmony_ciCall **OH_VideoEncoder_RegisterCallback()** to set callback functions.
223e41f4b71Sopenharmony_ci
224e41f4b71Sopenharmony_ciCall **OH_VideoEncoder_PushInputBuffer** to fill in data to encode when an input callback is received.
225e41f4b71Sopenharmony_ci
226e41f4b71Sopenharmony_ciCall **OH_VideoEncoder_FreeOutputBuffer** to release output data when an output callback is received.
227e41f4b71Sopenharmony_ci
228e41f4b71Sopenharmony_ci
229e41f4b71Sopenharmony_ci## cl.multimedia.5 AVDemuxer Module APIs Changed
230e41f4b71Sopenharmony_ci
231e41f4b71Sopenharmony_ci**Access Level**
232e41f4b71Sopenharmony_ci
233e41f4b71Sopenharmony_ciPublic API
234e41f4b71Sopenharmony_ci
235e41f4b71Sopenharmony_ci**Reason for Change**
236e41f4b71Sopenharmony_ci
237e41f4b71Sopenharmony_ciThe **AVMemory** struct is deprecated and replaced by **AVBuffer**.
238e41f4b71Sopenharmony_ci
239e41f4b71Sopenharmony_ci**Change Impact**
240e41f4b71Sopenharmony_ci
241e41f4b71Sopenharmony_ciThe change is compatible with earlier versions. Use the new API in your code.
242e41f4b71Sopenharmony_ci
243e41f4b71Sopenharmony_ci**API Level**
244e41f4b71Sopenharmony_ci
245e41f4b71Sopenharmony_ci|         API        |          API Level                |
246e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------|
247e41f4b71Sopenharmony_ci| OH_AVDemuxer_ReadSample | 10 |
248e41f4b71Sopenharmony_ci
249e41f4b71Sopenharmony_ci**Change Since**
250e41f4b71Sopenharmony_ci
251e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.3
252e41f4b71Sopenharmony_ci
253e41f4b71Sopenharmony_ci**Key API/Component Changes**
254e41f4b71Sopenharmony_ci
255e41f4b71Sopenharmony_ci|         Deprecated API        |          Deprecated Description               | Substitute API                     |
256e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------| :----------------------------|
257e41f4b71Sopenharmony_ci| OH_AVDemuxer_ReadSample | The **AVBuffer** struct is used when the demuxer reads frames.|OH_AVDemuxer_ReadSampleBuffer|
258e41f4b71Sopenharmony_ci
259e41f4b71Sopenharmony_ci**Adaptation Guide**
260e41f4b71Sopenharmony_ci
261e41f4b71Sopenharmony_ciBefore change:
262e41f4b71Sopenharmony_ci
263e41f4b71Sopenharmony_ci**OH_AVDemuxer_ReadSample()** is used to read compressed frames and related information.
264e41f4b71Sopenharmony_ci
265e41f4b71Sopenharmony_ciAfter change:
266e41f4b71Sopenharmony_ci
267e41f4b71Sopenharmony_ciCall **OH_AVDemuxer_ReadSampleBuffer()** to read compressed frames and related information.
268e41f4b71Sopenharmony_ci
269e41f4b71Sopenharmony_ci## cl.multimedia.6 AVMuxer Module APIs Changed
270e41f4b71Sopenharmony_ci
271e41f4b71Sopenharmony_ci**Access Level**
272e41f4b71Sopenharmony_ci
273e41f4b71Sopenharmony_ciPublic API
274e41f4b71Sopenharmony_ci
275e41f4b71Sopenharmony_ci**Reason for Change**
276e41f4b71Sopenharmony_ci
277e41f4b71Sopenharmony_ciThe **AVMemory** struct is deprecated and replaced by **AVBuffer**.
278e41f4b71Sopenharmony_ci
279e41f4b71Sopenharmony_ci**Change Impact**
280e41f4b71Sopenharmony_ci
281e41f4b71Sopenharmony_ciThe change is compatible with earlier versions. Use the new API in your code.
282e41f4b71Sopenharmony_ci
283e41f4b71Sopenharmony_ci**API Level**
284e41f4b71Sopenharmony_ci
285e41f4b71Sopenharmony_ci|         API        |          API Level                |
286e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------|
287e41f4b71Sopenharmony_ci| OH_AVMuxer_WriteSample | 10 |
288e41f4b71Sopenharmony_ci
289e41f4b71Sopenharmony_ci**Change Since**
290e41f4b71Sopenharmony_ci
291e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.3
292e41f4b71Sopenharmony_ci
293e41f4b71Sopenharmony_ci**Key API/Component Changes**
294e41f4b71Sopenharmony_ci
295e41f4b71Sopenharmony_ci|         Deprecated API        |          Deprecated Description               | Substitute API                     |
296e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------| :----------------------------|
297e41f4b71Sopenharmony_ci| OH_AVMuxer_WriteSample | The **AVBuffer** struct is used when the muxer writes frames.|OH_AVMuxer_WriteSampleBuffer|
298e41f4b71Sopenharmony_ci
299e41f4b71Sopenharmony_ci**Adaptation Guide**
300e41f4b71Sopenharmony_ci
301e41f4b71Sopenharmony_ciBefore change:
302e41f4b71Sopenharmony_ci
303e41f4b71Sopenharmony_ciCall **OH_AVMuxer_WriteSample()** to write compressed frames and related information.
304e41f4b71Sopenharmony_ci
305e41f4b71Sopenharmony_ciAfter change:
306e41f4b71Sopenharmony_ci
307e41f4b71Sopenharmony_ciCall **OH_AVMuxer_WriteSampleBuffer()** to write compressed frames and related information.
308e41f4b71Sopenharmony_ci
309e41f4b71Sopenharmony_ci## cl.multimedia.7 AudioDecoder Module APIs Changed
310e41f4b71Sopenharmony_ci
311e41f4b71Sopenharmony_ci**Access Level**
312e41f4b71Sopenharmony_ci
313e41f4b71Sopenharmony_ciPublic API
314e41f4b71Sopenharmony_ci
315e41f4b71Sopenharmony_ci**Reason for Change**
316e41f4b71Sopenharmony_ci
317e41f4b71Sopenharmony_ciThe **AVMemory** struct is deprecated and replaced by **AVBuffer**. The **AudioDecoder** module is changed to the **AudioCodec** module.
318e41f4b71Sopenharmony_ci
319e41f4b71Sopenharmony_ci**Change Impact**
320e41f4b71Sopenharmony_ci
321e41f4b71Sopenharmony_ciThe change is compatible with earlier versions. Use the new APIs in your code.
322e41f4b71Sopenharmony_ci
323e41f4b71Sopenharmony_ci**API Level**
324e41f4b71Sopenharmony_ci
325e41f4b71Sopenharmony_ci|         API        |          API Level                |
326e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------|
327e41f4b71Sopenharmony_ci| OH_AudioDecoder_CreateByName | 9 |
328e41f4b71Sopenharmony_ci| OH_AudioDecoder_CreateByMime | 9 |
329e41f4b71Sopenharmony_ci| OH_AudioDecoder_SetCallback | 9 |
330e41f4b71Sopenharmony_ci| OH_AudioDecoder_Configure | 9 |
331e41f4b71Sopenharmony_ci| OH_AudioDecoder_Prepare | 9 |
332e41f4b71Sopenharmony_ci| OH_AudioDecoder_Start | 9 |
333e41f4b71Sopenharmony_ci| OH_AudioDecoder_PushInputData | 9 |
334e41f4b71Sopenharmony_ci| OH_AudioDecoder_FreeOutputData | 9 |
335e41f4b71Sopenharmony_ci| OH_AudioDecoder_Flush | 9 |
336e41f4b71Sopenharmony_ci| OH_AudioDecoder_IsValid | 10 |
337e41f4b71Sopenharmony_ci| OH_AudioDecoder_Reset | 9 |
338e41f4b71Sopenharmony_ci| OH_AudioDecoder_Stop | 9 |
339e41f4b71Sopenharmony_ci| OH_AudioDecoder_Destroy | 9 |
340e41f4b71Sopenharmony_ci
341e41f4b71Sopenharmony_ci
342e41f4b71Sopenharmony_ci**Change Since**
343e41f4b71Sopenharmony_ci
344e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.3
345e41f4b71Sopenharmony_ci
346e41f4b71Sopenharmony_ci**Key API/Component Changes**
347e41f4b71Sopenharmony_ci
348e41f4b71Sopenharmony_ci|         Deprecated API        |          Deprecated Description               | Substitute API                     |
349e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------| :----------------------------|
350e41f4b71Sopenharmony_ci| OH_AudioDecoder_CreateByName | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_CreateByName |
351e41f4b71Sopenharmony_ci| OH_AudioDecoder_CreateByMime | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_CreateByMime |
352e41f4b71Sopenharmony_ci| OH_AudioDecoder_SetCallback | The **AudioDecoder** module is changed to the **AudioCodec** module. The **AVBuffer** struct is used in the callback function registration.| OH_AudioCodec_RegisterCallback |
353e41f4b71Sopenharmony_ci| OH_AudioDecoder_Configure | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Configure |
354e41f4b71Sopenharmony_ci| OH_AudioDecoder_Prepare | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Prepare |
355e41f4b71Sopenharmony_ci| OH_AudioDecoder_Start | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Start |
356e41f4b71Sopenharmony_ci| OH_AudioDecoder_PushInputData | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_PushInputBuffer |
357e41f4b71Sopenharmony_ci| OH_AudioDecoder_FreeOutputData | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_FreeOutputBuffer |
358e41f4b71Sopenharmony_ci| OH_AudioDecoder_Flush | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Flush |
359e41f4b71Sopenharmony_ci| OH_AudioDecoder_IsValid | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_IsValid |
360e41f4b71Sopenharmony_ci| OH_AudioDecoder_Reset | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Reset |
361e41f4b71Sopenharmony_ci| OH_AudioDecoder_Stop | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Stop |
362e41f4b71Sopenharmony_ci| OH_AudioDecoder_Destroy | The **AudioDecoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Destroy |
363e41f4b71Sopenharmony_ci
364e41f4b71Sopenharmony_ci**Adaptation Guide**
365e41f4b71Sopenharmony_ci
366e41f4b71Sopenharmony_ciBefore change:
367e41f4b71Sopenharmony_ci
368e41f4b71Sopenharmony_ciCall **OH_AudioDecoder_CreateByName()** or **OH_AudioDecoder_CreateByMime()** to create a decoder.
369e41f4b71Sopenharmony_ci
370e41f4b71Sopenharmony_ciCall **OH_AudioDecoder_SetCallback()** to set callback functions.
371e41f4b71Sopenharmony_ci
372e41f4b71Sopenharmony_ciCall **OH_AudioDecoder_Configure()** to configure the decoder.
373e41f4b71Sopenharmony_ci
374e41f4b71Sopenharmony_ciCall **OH_AudioDecoder_Prepare()** to prepare internal resources for the decoder.
375e41f4b71Sopenharmony_ci
376e41f4b71Sopenharmony_ciCall **OH_AudioDecoder_Start()** to start the decoder.
377e41f4b71Sopenharmony_ci
378e41f4b71Sopenharmony_ciCall **OH_AudioDecoder_PushInputData()** to write the data to decode.
379e41f4b71Sopenharmony_ci
380e41f4b71Sopenharmony_ciCall **OH_AudioDecoder_FreeOutputData()** to output decoded PCM streams.
381e41f4b71Sopenharmony_ci
382e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioDecoder_Flush()** to refresh the decoder.
383e41f4b71Sopenharmony_ci
384e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioDecoder_IsValid()** to determine whether the execution can be continued.
385e41f4b71Sopenharmony_ci
386e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioDecoder_Reset()** to reset the decoder.
387e41f4b71Sopenharmony_ci
388e41f4b71Sopenharmony_ciCall **OH_AudioDecoder_Stop()** to stop the decoder.
389e41f4b71Sopenharmony_ci
390e41f4b71Sopenharmony_ciCall **OH_AudioDecoder_Destroy()** to destroy the decoder instance and release resources.
391e41f4b71Sopenharmony_ci
392e41f4b71Sopenharmony_ciAfter change:
393e41f4b71Sopenharmony_ci
394e41f4b71Sopenharmony_ciCall **OH_AudioCodec_CreateByName()** or **OH_AudioCodec_CreateByMime** to create a codec.
395e41f4b71Sopenharmony_ci
396e41f4b71Sopenharmony_ciCall **OH_AudioCodec_SetCallback()** to set callback functions.
397e41f4b71Sopenharmony_ci
398e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Configure()** to configure the codec.
399e41f4b71Sopenharmony_ci
400e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Prepare()** to prepare internal resources for the codec.
401e41f4b71Sopenharmony_ci
402e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Start()** to start the codec.
403e41f4b71Sopenharmony_ci
404e41f4b71Sopenharmony_ciCall **OH_AudioCodec_PushInputData()** to write the data to decode.
405e41f4b71Sopenharmony_ci
406e41f4b71Sopenharmony_ciCall **OH_AudioCodec_FreeOutputData()** to output the codec stream.
407e41f4b71Sopenharmony_ci
408e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioCodec_Flush()** to refresh the codec.
409e41f4b71Sopenharmony_ci
410e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioCodec_IsValid()** to determine whether the execution can be continued.
411e41f4b71Sopenharmony_ci
412e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioCodec_Reset()** to reset the codec.
413e41f4b71Sopenharmony_ci
414e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Stop()** to stop the codec.
415e41f4b71Sopenharmony_ci
416e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Destroy()** to destroy the codec instance and release resources.
417e41f4b71Sopenharmony_ci
418e41f4b71Sopenharmony_ci## cl.multimedia.8 AudioEncoder Module APIs Changed
419e41f4b71Sopenharmony_ci
420e41f4b71Sopenharmony_ci**Access Level**
421e41f4b71Sopenharmony_ci
422e41f4b71Sopenharmony_ciPublic API
423e41f4b71Sopenharmony_ci
424e41f4b71Sopenharmony_ci**Reason for Change**
425e41f4b71Sopenharmony_ci
426e41f4b71Sopenharmony_ciThe **AVMemory** struct is deprecated and replaced by **AVBuffer**. The **AudioEncoder** module is changed to the **AudioCodec** module.
427e41f4b71Sopenharmony_ci
428e41f4b71Sopenharmony_ci**Change Impact**
429e41f4b71Sopenharmony_ci
430e41f4b71Sopenharmony_ciThe change is compatible with earlier versions. Use the new APIs in your code.
431e41f4b71Sopenharmony_ci
432e41f4b71Sopenharmony_ci**API Level**
433e41f4b71Sopenharmony_ci
434e41f4b71Sopenharmony_ci|         API        |          API Level                |
435e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------|
436e41f4b71Sopenharmony_ci| OH_AudioEncoder_CreateByName | 9 |
437e41f4b71Sopenharmony_ci| OH_AudioEncoder_CreateByMime | 9 |
438e41f4b71Sopenharmony_ci| OH_AudioEncoder_SetCallback | 9 |
439e41f4b71Sopenharmony_ci| OH_AudioEncoder_Configure | 9 |
440e41f4b71Sopenharmony_ci| OH_AudioEncoder_Prepare | 9 |
441e41f4b71Sopenharmony_ci| OH_AudioEncoder_Start | 9 |
442e41f4b71Sopenharmony_ci| OH_AudioEncoder_PushInputData | 9 |
443e41f4b71Sopenharmony_ci| OH_AudioEncoder_FreeOutputData | 9 |
444e41f4b71Sopenharmony_ci| OH_AudioEncoder_Flush | 9 |
445e41f4b71Sopenharmony_ci| OH_AudioEncoder_IsValid | 10 |
446e41f4b71Sopenharmony_ci| OH_AudioEncoder_Reset | 9 |
447e41f4b71Sopenharmony_ci| OH_AudioEncoder_Stop | 9 |
448e41f4b71Sopenharmony_ci| OH_AudioEncoder_Destroy | 9 |
449e41f4b71Sopenharmony_ci
450e41f4b71Sopenharmony_ci
451e41f4b71Sopenharmony_ci**Change Since**
452e41f4b71Sopenharmony_ci
453e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.3
454e41f4b71Sopenharmony_ci
455e41f4b71Sopenharmony_ci**Key API/Component Changes**
456e41f4b71Sopenharmony_ci
457e41f4b71Sopenharmony_ci|         Deprecated API        |          Deprecated Description               | Substitute API                     |
458e41f4b71Sopenharmony_ci| ----------------------- | :--------------------------------| :----------------------------|
459e41f4b71Sopenharmony_ci| OH_AudioEncoder_CreateByName | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_CreateByName |
460e41f4b71Sopenharmony_ci| OH_AudioEncoder_CreateByMime | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_CreateByMime |
461e41f4b71Sopenharmony_ci| OH_AudioEncoder_SetCallback | The **AudioEncoder** module is changed to the **AudioCodec** module. The **AVBuffer** struct is used in the callback function registration.| OH_AudioCodec_RegisterCallback |
462e41f4b71Sopenharmony_ci| OH_AudioEncoder_Configure | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Configure |
463e41f4b71Sopenharmony_ci| OH_AudioEncoder_Prepare | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Prepare |
464e41f4b71Sopenharmony_ci| OH_AudioEncoder_Start | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Start |
465e41f4b71Sopenharmony_ci| OH_AudioEncoder_PushInputData | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_PushInputBuffer |
466e41f4b71Sopenharmony_ci| OH_AudioEncoder_FreeOutputData | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_FreeOutputBuffer |
467e41f4b71Sopenharmony_ci| OH_AudioEncoder_Flush | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Flush |
468e41f4b71Sopenharmony_ci| OH_AudioEncoder_IsValid | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_IsValid |
469e41f4b71Sopenharmony_ci| OH_AudioEncoder_Reset | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Reset |
470e41f4b71Sopenharmony_ci| OH_AudioEncoder_Stop | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Stop |
471e41f4b71Sopenharmony_ci| OH_AudioEncoder_Destroy | The **AudioEncoder** module is changed to the **AudioCodec** module.| OH_AudioCodec_Destroy |
472e41f4b71Sopenharmony_ci
473e41f4b71Sopenharmony_ci**Adaptation Guide**
474e41f4b71Sopenharmony_ci
475e41f4b71Sopenharmony_ciBefore change:
476e41f4b71Sopenharmony_ci
477e41f4b71Sopenharmony_ciCall **OH_AudioEncoder_CreateByName()** or **OH_AudioEncoder_CreateByMime** to create an encoder.
478e41f4b71Sopenharmony_ci
479e41f4b71Sopenharmony_ciCall **OH_AudioEncoder_SetCallback()** to set callback functions.
480e41f4b71Sopenharmony_ci
481e41f4b71Sopenharmony_ciCall **OH_AudioEncoder_Configure()** to configure the encoder.
482e41f4b71Sopenharmony_ci
483e41f4b71Sopenharmony_ciCall **OH_AudioEncoder_Prepare()** to prepare internal resources for the encoder.
484e41f4b71Sopenharmony_ci
485e41f4b71Sopenharmony_ciCall **OH_AudioEncoder_Start()** to start the encoder.
486e41f4b71Sopenharmony_ci
487e41f4b71Sopenharmony_ciCall **OH_AudioEncoder_PushInputData()** to write the data to encode.
488e41f4b71Sopenharmony_ci
489e41f4b71Sopenharmony_ciCall **OH_AudioEncoder_FreeOutputData()** to output the encoded stream.
490e41f4b71Sopenharmony_ci
491e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioEncoder_Flush()** to refresh the encoder.
492e41f4b71Sopenharmony_ci
493e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioEncoder_IsValid()** to determine whether the execution can be continued.
494e41f4b71Sopenharmony_ci
495e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioEncoder_Reset()** to reset the encoder.
496e41f4b71Sopenharmony_ci
497e41f4b71Sopenharmony_ciCall **OH_AudioEncoder_Stop()** to stop the encoder.
498e41f4b71Sopenharmony_ci
499e41f4b71Sopenharmony_ciCall **OH_AudioEncoder_Destroy()** to destroy the encoder instance and release resources.
500e41f4b71Sopenharmony_ci
501e41f4b71Sopenharmony_ciAfter change:
502e41f4b71Sopenharmony_ci
503e41f4b71Sopenharmony_ciCall **OH_AudioCodec_CreateByName()** or **OH_AudioCodec_CreateByMime** to create a codec.
504e41f4b71Sopenharmony_ci
505e41f4b71Sopenharmony_ciCall **OH_AudioCodec_SetCallback()** to set callback functions.
506e41f4b71Sopenharmony_ci
507e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Configure()** to configure the codec.
508e41f4b71Sopenharmony_ci
509e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Prepare()** to prepare internal resources for the codec.
510e41f4b71Sopenharmony_ci
511e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Start()** to start the codec.
512e41f4b71Sopenharmony_ci
513e41f4b71Sopenharmony_ciCall **OH_AudioCodec_PushInputData()** to write the data to decode.
514e41f4b71Sopenharmony_ci
515e41f4b71Sopenharmony_ciCall **OH_AudioCodec_FreeOutputData()** to output the codec stream.
516e41f4b71Sopenharmony_ci
517e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioCodec_Flush()** to refresh the codec.
518e41f4b71Sopenharmony_ci
519e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioCodec_IsValid()** to determine whether the execution can be continued.
520e41f4b71Sopenharmony_ci
521e41f4b71Sopenharmony_ci(Optional) Call **OH_AudioCodec_Reset()** to reset the codec.
522e41f4b71Sopenharmony_ci
523e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Stop()** to stop the codec.
524e41f4b71Sopenharmony_ci
525e41f4b71Sopenharmony_ciCall **OH_AudioCodec_Destroy()** to destroy the codec instance and release resources.
526e41f4b71Sopenharmony_ci
527e41f4b71Sopenharmony_ci## cl.multimedia.9 Format Specifications Supported by AVPlayer and AVRecorder Changed
528e41f4b71Sopenharmony_ci
529e41f4b71Sopenharmony_ci**Access Level**
530e41f4b71Sopenharmony_ci
531e41f4b71Sopenharmony_ciPublic API
532e41f4b71Sopenharmony_ci
533e41f4b71Sopenharmony_ci**Reason for Change**
534e41f4b71Sopenharmony_ci
535e41f4b71Sopenharmony_ciThe **AVCodec** struct is used for muxing/demuxing and encoding/decoding.
536e41f4b71Sopenharmony_ci
537e41f4b71Sopenharmony_ci**Change Impact**
538e41f4b71Sopenharmony_ci
539e41f4b71Sopenharmony_ciThe following formats are not supported:
540e41f4b71Sopenharmony_ciContainer format: WebM
541e41f4b71Sopenharmony_ciVideo decoding formats: H.263, MPEG2, MPEG4, and VP8
542e41f4b71Sopenharmony_ciVideo encoding format: MPEG4
543e41f4b71Sopenharmony_ci
544e41f4b71Sopenharmony_ci**API Level**
545e41f4b71Sopenharmony_ci
546e41f4b71Sopenharmony_ci11
547e41f4b71Sopenharmony_ci
548e41f4b71Sopenharmony_ci**Change Since**
549e41f4b71Sopenharmony_ci
550e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.6.3
551e41f4b71Sopenharmony_ci
552e41f4b71Sopenharmony_ci**Key API/Component Changes**
553e41f4b71Sopenharmony_ci**AVPlayer** and **AVRecorder**
554e41f4b71Sopenharmony_ci
555e41f4b71Sopenharmony_ci**Adaptation Guide**
556e41f4b71Sopenharmony_ci1. Use MPEG4 rather than AVC for video encoding.
557e41f4b71Sopenharmony_ci2. If the container format WebM or video decoding format H.263/MPEG2/MPEG4/VP8 is used, the playback fails. In this case, you are advised to use the resources in the container format MP4 and video decoding format AVC.
558