• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef I_PLAYER_SERVICE_H
17 #define I_PLAYER_SERVICE_H
18 
19 #include "player.h"
20 #include "refbase.h"
21 
22 namespace OHOS {
23 namespace Media {
24 class IPlayerService {
25 public:
26     virtual ~IPlayerService() = default;
27 
28     /**
29      * @brief Sets the player producer type.
30      *
31      * @param producer Indicates the player producer type.
32      * @return Returns {@link MSERR_OK} if the producer is set successfully; returns an error code defined
33      * in {@link media_errors.h} otherwise.
34      * @since 1.0
35      * @version 1.0
36      */
37     virtual int32_t SetPlayerProducer(const PlayerProducer producer) = 0;
38 
39     /**
40      * @brief Sets the playback source for the player. The corresponding source can be local file url.
41      *
42      * @param url Indicates the playback source.
43      * @return Returns {@link MSERR_OK} if the url is set successfully; returns an error code defined
44      * in {@link media_errors.h} otherwise.
45      * @since 1.0
46      * @version 1.0
47      */
48     virtual int32_t SetSource(const std::string &url) = 0;
49     /**
50      * @brief Sets the playback media data source for the player.
51      *
52      * @param dataSrc Indicates the media data source. in {@link media_data_source.h}
53      * @return Returns {@link MSERR_OK} if the dataSrc is set successfully; returns an error code defined
54      * in {@link media_errors.h} otherwise.
55      * @since 1.0
56      * @version 1.0
57      */
58     virtual int32_t SetSource(const std::shared_ptr<IMediaDataSource> &dataSrc) = 0;
59     /**
60      * @brief Sets the playback media file descriptor source for the player.
61      *
62      * @param fd Indicates the file descriptor of media source.
63      * @param offset Indicates the offset of media source in file descriptor.
64      * @param size Indicates the size of media source.
65      * @return Returns {@link MSERR_OK} if the fd source is set successfully; returns an error code defined
66      * in {@link media_errors.h} otherwise.
67      * @since 1.0
68      * @version 1.0
69      */
70     virtual int32_t SetSource(int32_t fd, int64_t offset, int64_t size) = 0;
71     /**
72      * @brief Add a subtitle source for the player. The corresponding source can be local file url.
73      *
74      * @param url Indicates the subtitle source.
75      * @return Returns {@link MSERR_OK} if the url is set successfully; returns an error code defined
76      * in {@link media_errors.h} otherwise.
77      * @since 1.0
78      * @version 1.0
79      */
80     virtual int32_t AddSubSource(const std::string &url) = 0;
81     /**
82      * @brief Add a playback subtitle file descriptor source for the player.
83      *
84      * @param fd Indicates the file descriptor of subtitle source.
85      * @param offset Indicates the offset of subtitle source in file descriptor.
86      * @param size Indicates the size of subtitle source.
87      * @return Returns {@link MSERR_OK} if the fd source is set successfully; returns an error code defined
88      * in {@link media_errors.h} otherwise.
89      * @since 1.0
90      * @version 1.0
91      */
92     virtual int32_t AddSubSource(int32_t fd, int64_t offset, int64_t size) = 0;
93     /**
94      * @brief Start playback.
95      *
96      * This function must be called after {@link Prepare}. If the player state is <b>Prepared</b>,
97      * this function is called to start playback.
98      *
99      * @return Returns {@link MSERR_OK} if the playback is started; otherwise returns an error code defined
100      * in {@link media_errors.h} otherwise.
101      * @since 1.0
102      * @version 1.0
103      */
104     virtual int32_t Play() = 0;
105 
106     /**
107      * @brief Prepares the playback environment and buffers media data asynchronous.
108      *
109      * This function must be called after {@link SetSource}.
110      *
111      * @return Returns {@link MSERR_OK} if {@link Prepare} is successfully added to the task queue;
112      * returns an error code defined in {@link media_errors.h} otherwise.
113      * @since 1.0
114      * @version 1.0
115      */
116     virtual int32_t Prepare() = 0;
117 
118     /**
119      * @brief Enables render video first frame of the media playback.
120      *
121      * @return Returns {@link MSERR_OK} if the single display is set; returns an error code defined
122      * in {@link media_errors.h} otherwise.
123      * @since 1.0
124      * @version 1.0
125      */
SetRenderFirstFrame(bool display)126     virtual int32_t SetRenderFirstFrame(bool display)
127     {
128         (void)display;
129         return 0;
130     }
131 
132     /**
133      * @brief Specify the start and end time to play
134      * This function must be called after {@link SetSource}.
135      * This function is called to set start and end time
136      *
137      * @return Returns {@link MSERR_OK} if the single display is set; returns an error code defined
138      * in {@link media_errors.h} otherwise.
139      * @since 1.0
140      * @version 1.0
141      */
SetPlayRange(int64_t start,int64_t end)142     virtual int32_t SetPlayRange(int64_t start, int64_t end)
143     {
144         (void)start;
145         (void)end;
146         return 0;
147     }
148 
149     /**
150      * @brief Set playback start position and end position.
151      * Use the specified seek mode to jump to the playback start position,
152      * currently support SEEK_PREVIOUS_SYNC and SEEK_CLOSEST, other values are invalid,
153      * This function must be called after {@link SetSource}.
154      *
155      * @return Returns {@link MSERR_OK} if the single display is set; returns an error code defined
156      * in {@link media_errors.h} otherwise.
157      * @since 1.0
158      * @version 1.0
159      */
SetPlayRangeWithMode(int64_t start,int64_t end,PlayerSeekMode mode)160     virtual int32_t SetPlayRangeWithMode(int64_t start, int64_t end, PlayerSeekMode mode)
161     {
162         (void)start;
163         (void)end;
164         (void)mode;
165         return 0;
166     }
167 
168     /**
169      * @brief Prepares the playback environment and buffers media data asynchronous.
170      *
171      * This function must be called after {@link SetSource}.
172      *
173      * @return Returns {@link MSERR_OK} if {@link PrepareAsync} is successfully added to the task queue;
174      * returns an error code defined in {@link media_errors.h} otherwise.
175      * @since 1.0
176      * @version 1.0
177      */
178     virtual int32_t PrepareAsync() = 0;
179 
180     /**
181      * @brief Pauses playback.
182      *
183      * @return Returns {@link MSERR_OK} if {@link Pause} is successfully added to the task queue;
184      * returns an error code defined in {@link media_errors.h} otherwise.
185      * @since 1.0
186      * @version 1.0
187      */
188     virtual int32_t Pause() = 0;
189 
190     /**
191      * @brief Stop playback.
192      *
193      * @return Returns {@link MSERR_OK} if {@link Stop} is successfully added to the task queue;
194      * returns an error code defined in {@link media_errors.h} otherwise.
195      * @since 1.0
196      * @version 1.0
197      */
198     virtual int32_t Stop() = 0;
199 
200     /**
201      * @brief Restores the player to the initial state.
202      *
203      * After the function is called, add a playback source by calling {@link SetSource},
204      * call {@link Play} to start playback again after {@link Prepare} is called.
205      *
206      * @return Returns {@link MSERR_OK} if {@link Reset} is successfully added to the task queue;
207      * returns an error code defined in {@link media_errors.h} otherwise.
208      * @since 1.0
209      * @version 1.0
210      */
211     virtual int32_t Reset() = 0;
212 
213     /**
214      * @brief Releases player resources async
215      *
216      * @return Returns {@link MSERR_OK} if {@link Release} is successfully added to the task queue;
217      * returns an error code defined in {@link media_errors.h} otherwise.
218      * @since 1.0
219      * @version 1.0
220      */
221     virtual int32_t Release() = 0;
222 
223     /**
224      * @brief Releases player resources sync
225      *
226      * @return Returns {@link MSERR_OK} if the playback is released; returns an error code defined
227      * in {@link media_errors.h} otherwise.
228      * @since 1.0
229      * @version 1.0
230      */
ReleaseSync()231     virtual int32_t ReleaseSync()
232     {
233         return ERR_OK;
234     }
235 
236     /**
237      * @brief Sets the volume of the player.
238      *
239      * This function can be used during playback or pause. The value <b>0</b> indicates no sound,
240      * and <b>1</b> indicates the original volume. If no audio device is started or no audio
241      * stream exists, the value <b>-1</b> is returned.
242      *
243      * @param leftVolume Indicates the target volume of the left audio channel to set,
244      *        ranging from 0 to 1. each step is 0.01.
245      * @param rightVolume Indicates the target volume of the right audio channel to set,
246      *        ranging from 0 to 1. each step is 0.01.
247      * @return Returns {@link MSERR_OK} if the volume is set; returns an error code defined
248      * in {@link media_errors.h} otherwise.
249      * @since 1.0
250      * @version 1.0
251      */
252     virtual int32_t SetVolume(float leftVolume, float rightVolume) = 0;
253 
254     virtual int32_t SetVolumeMode(int32_t mode) = 0;
255 
256     /**
257      * @brief Changes the playback position.
258      *
259      * This function can be used during play or pause.
260      *
261      * @param mSeconds Indicates the target playback position, accurate to second.
262      * @param mode Indicates the player seek mode. For details, see {@link PlayerSeekMode}.
263      * @return Returns {@link MSERR_OK} if the seek is done; returns an error code defined
264      * in {@link media_errors.h} otherwise.
265      * @since 1.0
266      * @version 1.0
267     */
268     virtual int32_t Seek(int32_t mSeconds, PlayerSeekMode mode) = 0;
269 
270     /**
271      * @brief Obtains the playback position, accurate to millisecond.
272      *
273      * @param currentTime Indicates the playback position.
274      * @return Returns {@link MSERR_OK} if the current position is get; returns an error code defined
275      * in {@link media_errors.h} otherwise.
276      * @since 1.0
277      * @version 1.0
278      */
279     virtual int32_t GetCurrentTime(int32_t &currentTime) = 0;
280 
281     /**
282      * @brief Obtains the playback position, accurate to millisecond.
283      *
284      * @param playbackPosition Indicates the playback position.
285      * @return Returns {@link MSERR_OK} if the current position is get; returns an error code defined
286      * in {@link media_errors.h} otherwise.
287      * @since 1.0
288      * @version 1.0
289      */
290     virtual int32_t GetPlaybackPosition(int32_t &playbackPosition) = 0;
291 
292     /**
293      * @brief Obtains the video track info, contains mimeType, bitRate, width, height, frameRata.
294      *
295      * @param video track info vec.
296      * @return Returns {@link MSERR_OK} if the track info is get; returns an error code defined
297      * in {@link media_errors.h} otherwise.
298      * @since 1.0
299      * @version 1.0
300      */
301     virtual int32_t GetVideoTrackInfo(std::vector<Format> &videoTrack) = 0;
302 
303     /**
304      * @brief Obtains playbackInfo, contains server_ip_address, average_download_rate,
305      * download_rate, is_downloading, buffer_duration.
306      *
307      * @param playbackInfo.
308      * @return Returns {@link MSERR_OK} if the track info is get; returns an error code defined
309      * in {@link media_errors.h} otherwise.
310      * @since 1.0
311      * @version 1.0
312      */
313     virtual int32_t GetPlaybackInfo(Format &playbackInfo) = 0;
314 
315     /**
316      * @brief Obtains the audio track info, contains mimeType, bitRate, sampleRate, channels, language.
317      *
318      * @param audio track info vec.
319      * @return Returns {@link MSERR_OK} if the track info is get; returns an error code defined
320      * in {@link media_errors.h} otherwise.
321      * @since 1.0
322      * @version 1.0
323      */
324     virtual int32_t GetAudioTrackInfo(std::vector<Format> &audioTrack) = 0;
325 
326     /**
327      * @brief get the video width.
328      *
329      * @return Returns width if success; else returns 0
330      * @since 1.0
331      * @version 1.0
332      */
333     virtual int32_t GetVideoWidth() = 0;
334 
335     /**
336      * @brief get the video height.
337      *
338      * @return Returns height if success; else returns 0
339      * @since 1.0
340      * @version 1.0
341      */
342     virtual int32_t GetVideoHeight() = 0;
343 
344     /**
345      * @brief Obtains the total duration of media files, accurate to milliseconds.
346      *
347      * @param duration Indicates the total duration of media files.
348      * @return Returns {@link MSERR_OK} if the current duration is get; returns an error code defined
349      * in {@link media_errors.h} otherwise.
350      * @since 1.0
351      * @version 1.0
352      */
353     virtual int32_t GetDuration(int32_t &duration) = 0;
354 
355     /**
356      * @brief set the player playback rate
357      *
358      * @param mode the rate mode {@link PlaybackRateMode} which can set.
359      * @return Returns {@link MSERR_OK} if the playback rate is set successfully; returns an error code defined
360      * in {@link media_errors.h} otherwise.
361      * @since 1.0
362      * @version 1.0
363      */
364     virtual int32_t SetPlaybackSpeed(PlaybackRateMode mode) = 0;
365 
366     /**
367      * @brief set the player playback rate
368      *
369      * @param rate the rate which can set.
370      * @return Returns {@link MSERR_OK} if the playback rate is set successfully; returns an error code defined
371      * in {@link media_errors.h} otherwise.
372      */
373     virtual int32_t SetPlaybackRate(float rate) = 0;
374 
375     virtual int32_t SetMediaSource(const std::shared_ptr<AVMediaSource> &mediaSource, AVPlayStrategy strategy) = 0;
376     /**
377      * @brief set the bit rate use for hls player
378      *
379      * @param bitRate the bit rate.
380      * @return Returns {@link MSERR_OK} if the bit rate is set successfully; returns an error code defined
381      * in {@link media_errors.h} otherwise.
382      * @since 1.0
383      * @version 1.0
384      */
385     virtual int32_t SelectBitRate(uint32_t bitRate) = 0;
386 
387     /**
388      * @brief get the current player playback rate
389      *
390      * @param mode the rate mode {@link PlaybackRateMode} which can get.
391      * @return Returns {@link MSERR_OK} if the current player playback rate is get; returns an error code defined
392      * in {@link media_errors.h} otherwise.
393      * @since 1.0
394      * @version 1.0
395      */
396     virtual int32_t GetPlaybackSpeed(PlaybackRateMode &mode) = 0;
397 
398     /**
399      * @brief add for drm, set decrypt module
400      *
401      * @param keySessionProxy is the sptr will be setted to playerserver.
402      * @param svp bool.
403      * @return Returns {@link MSERR_OK} if set successfully; returns an error code defined
404      * in {@link media_errors.h} otherwise.
405      * @since
406      * @version
407      */
408     virtual int32_t SetDecryptConfig(const sptr<DrmStandard::IMediaKeySessionService> &keySessionProxy,
409         bool svp) = 0;
410 
411 #ifdef SUPPORT_VIDEO
412     /**
413      * @brief Method to set the surface.
414      *
415      * @param surface pointer of the surface.
416      * @return Returns {@link MSERR_OK} if the surface is set; returns an error code defined
417      * in {@link media_errors.h} otherwise.
418      * @since 1.0
419      * @version 1.0
420      */
421     virtual int32_t SetVideoSurface(sptr<Surface> surface) = 0;
422 #endif
423 
424     /**
425      * @brief Checks whether the player is playing.
426      *
427      * @return Returns true if the playback is playing; false otherwise.
428      * @since 1.0
429      * @version 1.0
430      */
431     virtual bool IsPlaying() = 0;
432 
433     /**
434      * @brief Returns the value whether single looping is enabled or not .
435      *
436      * @return Returns true if the playback is single looping; false otherwise.
437      * @since 1.0
438      * @version 1.0
439      */
440     virtual bool IsLooping() = 0;
441 
442     /**
443      * @brief Enables single looping of the media playback.
444      *
445      * @return Returns {@link MSERR_OK} if the single looping is set; returns an error code defined
446      * in {@link media_errors.h} otherwise.
447      * @since 1.0
448      * @version 1.0
449      */
450     virtual int32_t SetLooping(bool loop) = 0;
451 
452     /**
453      * @brief Enables setting the renderer descriptor for the current media
454      *
455      * @return Returns {@link MSERR_OK} if the renderer descriptor is set; returns an error code defined
456      * in {@link media_errors.h} otherwise.
457      * @since 1.0
458      * @version 1.0
459      */
460     virtual int32_t SetParameter(const Format &param) = 0;
461 
462     /**
463      * @brief Method to set player callback.
464      *
465      * @param callback object pointer.
466      * @return Returns {@link MSERR_OK} if the playercallback is set; returns an error code defined
467      * in {@link media_errors.h} otherwise.
468      * @since 1.0
469      * @version 1.0
470      */
471     virtual int32_t SetPlayerCallback(const std::shared_ptr<PlayerCallback> &callback) = 0;
472 
473     /**
474      * @brief Select audio or subtitle track.
475      * By default, the first audio stream with data is played, and the subtitle track is not played.
476      * After the settings take effect, the original track will become invalid.
477      * Please set it in the prepared/playing/paused/completed state.
478      *
479      * @param index Track index, reference {@link #GetAudioTrackInfo} and {@link #GetVideoTrackInfo}.
480      * @return Returns {@link MSERR_OK} if selected successfully; returns an error code defined
481      * in {@link media_errors.h} otherwise.
482      * @since 1.0
483      * @version 1.0
484     */
485     virtual int32_t SelectTrack(int32_t index, PlayerSwitchMode mode = PlayerSwitchMode::SWITCH_SMOOTH) = 0;
486 
487     /**
488      * @brief Deselect the current audio or subtitle track.
489      * After audio is deselected, the default track will be played, and after subtitles are deselected,
490      * they will not be played. Please set it in the prepared/playing/paused/completed state.
491      *
492      * @param index Track index, reference {@link #GetAudioTrackInfo} and {@link #GetVideoTrackInfo}.
493      * @return Returns {@link MSERR_OK} if selected successfully; returns an error code defined
494      * in {@link media_errors.h} otherwise.
495      * @since 1.0
496      * @version 1.0
497     */
498     virtual int32_t DeselectTrack(int32_t index) = 0;
499 
500     /**
501      * @brief Obtain the currently effective track index.
502      *
503      * @param trackType Media type.
504      * @param index Track index, reference {@link #GetAudioTrackInfo} and {@link #GetVideoTrackInfo}.
505      * @return Returns {@link MSERR_OK} if the track index is get; returns an error code defined
506      * in {@link media_errors.h} otherwise.
507      * @since 1.0
508      * @version 1.0
509      */
510     virtual int32_t GetCurrentTrack(int32_t trackType, int32_t &index) = 0;
511 
512     /**
513      * @brief Obtains the subtitle track info, contains mimeType, type, language.
514      *
515      * @param subtitle track info vec.
516      * @return Returns {@link MSERR_OK} if the track info is get; returns an error code defined
517      * in {@link media_errors.h} otherwise.
518      * @since 1.0
519      * @version 1.0
520      */
521     virtual int32_t GetSubtitleTrackInfo(std::vector<Format> &subtitleTrack) = 0;
522 
523     /**
524      * @brief set the playback strategy
525      * the playback strategy includes five fileds:
526      * preferredWidth: Preferred width, which is of the int type, for example, 1080.
527      * preferredHeight: Preferred height, which is of the int type, for example, 1920.
528      * preferredBufferDuration: Preferred buffer duration, in seconds. The value ranges from 1 to 20.
529      * preferredHdr: Whether HDR is preferred. The value true means that HDR is preferred, and false means the opposite.
530      * mutedMediaType: The mediaType to be muted before play, which is of the MediaType type,
531      * for example, MediaType::MEDIA_TYPE_AUD.
532      * @param playbackStrategy the playback strategy.
533      * @return Returns {@link MSERR_OK} if the playback strategy is set successfully; returns an error code defined
534      * in {@link media_errors.h} otherwise.
535      * @since 1.0
536      * @version 1.0
537      */
SetPlaybackStrategy(AVPlayStrategy playbackStrategy)538     virtual int32_t SetPlaybackStrategy(AVPlayStrategy playbackStrategy)
539     {
540         (void)playbackStrategy;
541         return 0;
542     }
543 
SetMediaMuted(MediaType mediaType,bool isMuted)544     virtual int32_t SetMediaMuted(MediaType mediaType, bool isMuted)
545     {
546         (void)mediaType;
547         (void)isMuted;
548         return 0;
549     }
550 
551     /**
552      * @brief Enable or disable super resolution.
553      *
554      * @return Returns {@link MSERR_OK} if super resolution is set; returns an error code defined
555      * in {@link media_errors.h} otherwise.
556      * @since 1.0
557      * @version 1.0
558      */
SetSuperResolution(bool enabled)559     virtual int32_t SetSuperResolution(bool enabled)
560     {
561         (void)enabled;
562         return 0;
563     }
564 
565     /**
566      * @brief Set video window size for super-resolution.
567      *
568      * @return Returns {@link MSERR_OK} if video window size is set; returns an error code defined
569      * in {@link media_errors.h} otherwise.
570      * @since 1.0
571      * @version 1.0
572      */
SetVideoWindowSize(int32_t width,int32_t height)573     virtual int32_t SetVideoWindowSize(int32_t width, int32_t height)
574     {
575         (void)width;
576         (void)height;
577         return 0;
578     }
579 
580     /**
581      * @brief Set get max ampliutude callback status.
582      *
583      * @param status callback status.
584      * @return Returns {@link MSERR_OK} if the callback status is set; returns an error code defined
585      * in {@link media_errors.h} otherwise.
586      * @since 1.0
587      * @version 1.0
588      */
SetMaxAmplitudeCbStatus(bool status)589     virtual int32_t SetMaxAmplitudeCbStatus(bool status)
590     {
591         (void)status;
592         return 0;
593     }
594 
595     /**
596      * @brief set get device change callback status.
597      *
598      * @return Returns {@link MSERR_OK} if the single display is set; returns an error code defined
599      * in {@link media_errors.h} otherwise.
600      * @since 1.0
601      * @version 1.0
602      */
SetDeviceChangeCbStatus(bool status)603     virtual int32_t SetDeviceChangeCbStatus(bool status)
604     {
605         (void)status;
606         return 0;
607     }
608     /**
609      * @brief Obtain the api version of application.
610      *
611      * @return Returns {@link MSERR_OK} if the current api version is get; returns an error code defined
612      * in {@link media_errors.h} otherwise.
613      * @since 1.0
614      * @version 1.0
615      */
GetApiVersion(int32_t & apiVersion)616     virtual int32_t GetApiVersion(int32_t &apiVersion)
617     {
618         (void)apiVersion;
619         return 0;
620     }
621 
622     /**
623      * @brief Checks whether the player supports SeekContinuous.
624      *
625      * @return Returns true if the player supports SeekContinuous; false otherwise.
626      * @since 1.0
627      * @version 1.0
628      */
629     virtual bool IsSeekContinuousSupported() = 0;
630 
631     /**
632      * @brief Set get sei message callback status.
633      *
634      * @param status callback status.
635      * @return Returns {@link MSERR_OK} if the callback status is set; returns an error code defined
636      * in {@link media_errors.h} otherwise.
637      * @since 1.0
638      * @version 1.0
639      */
SetSeiMessageCbStatus(bool status,const std::vector<int32_t> & payloadTypes)640     virtual int32_t SetSeiMessageCbStatus(bool status, const std::vector<int32_t> &payloadTypes)
641     {
642         (void)status;
643         (void)payloadTypes;
644         return 0;
645     }
646     /**
647      * @brief Get memory usage.
648      *
649      * @return Returns memory usage KB.
650      * @since 1.0
651      * @version 1.0
652      */
GetMemoryUsage()653     virtual uint32_t GetMemoryUsage()
654     {
655         return 0;
656     }
657 
658     /**
659      * @brief Enables or disables the report of media progress.
660      *
661      * @param enable Indicates whether to enable the report of media progress.
662      * @return Returns {@link MSERR_OK} if the report of media progress is enabled or disabled; returns an error code
663      * defined in {@link media_errors.h} otherwise.
664      * @since 1.0
665      * @version 1.0
666      */
EnableReportMediaProgress(bool enable)667     virtual int32_t EnableReportMediaProgress(bool enable)
668     {
669         (void)enable;
670         return 0;
671     }
672 
673     /**
674      * @brief Enables or disables the report of audio interrupt during frozen state.
675      *
676      * @param enable Indicates whether to enable the report of audio interrupt during frozen state.
677      * @return Returns {@link MSERR_OK} if the report of audio interrupt is enabled or disabled; returns an error code
678      * defined in {@link media_errors.h} otherwise.
679      * @since 1.0
680      * @version 1.0
681      */
EnableReportAudioInterrupt(bool enable)682     virtual int32_t EnableReportAudioInterrupt(bool enable)
683     {
684         (void)enable;
685         return 0;
686     }
687 
Freeze()688     virtual int32_t Freeze()
689     {
690         return 0;
691     }
692 
UnFreeze()693     virtual int32_t UnFreeze()
694     {
695         return 0;
696     }
697 
SetStartFrameRateOptEnabled(bool enabled)698     virtual int32_t SetStartFrameRateOptEnabled(bool enabled)
699     {
700         (void)enabled;
701         return 0;
702     }
703 
SetCameraPostprocessing(bool isOpen)704     virtual int32_t SetCameraPostprocessing(bool isOpen)
705     {
706         (void)isOpen;
707         return 0;
708     }
709 
ForceLoadVideo(bool)710     virtual int32_t ForceLoadVideo(bool /* enabled */)
711     {
712         return 0;
713     }
714 
715     /**
716      * @brief Set video reopen fd.
717      *
718      * @return Returns {@link MSERR_OK} if video reopen fd is set; returns an error code defined
719      * in {@link media_errors.h} otherwise.
720      * @since 1.0
721      * @version 1.0
722      */
SetReopenFd(int32_t fd)723     virtual int32_t SetReopenFd(int32_t fd)
724     {
725         (void)fd;
726         return 0;
727     }
728 
729     /**
730      * @brief Enable or disable camera post process.
731      *
732      * @return Returns {@link MSERR_OK} if enable camera post process is set; returns an error code defined
733      * in {@link media_errors.h} otherwise.
734      * @since 1.0
735      * @version 1.0
736      */
EnableCameraPostprocessing()737     virtual int32_t EnableCameraPostprocessing()
738     {
739         return 0;
740     }
741 };
742 } // namespace Media
743 } // namespace OHOS
744 #endif // I_PLAYER_SERVICE_H
745