Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-os-example-mbed5-blinky by
baidu_media_play.h
00001 // Copyright 2017 Baidu Inc. All Rights Reserved. 00002 // Author: Chen Xihao (chenxihao@baidu.com) 00003 // 00004 // Description: Media player API 00005 00006 #ifndef BAIDU_TINYDU_IOT_OS_SRC_MEDIA_PLAYER_BAIDU_MEDIA_PLAY_H 00007 #define BAIDU_TINYDU_IOT_OS_SRC_MEDIA_PLAYER_BAIDU_MEDIA_PLAY_H 00008 00009 #include "baidu_media_play_type.h" 00010 #include "baidu_media_type.h" 00011 #include "baidu_media_play_buffer.h" 00012 00013 namespace duer { 00014 00015 enum MediaPlayerCmd { 00016 PLAYER_CMD_START, //to start playing media 00017 PLAYER_CMD_CONTINUE, //media data stream 00018 PLAYER_CMD_STOP //to stop mediaplayer 00019 }; 00020 00021 struct MediaPlayerMessage { 00022 MediaPlayerCmd cmd; //command to mediaplayer 00023 MediaType type; 00024 int size; //data size in MediaPlayBuffer 00025 }; 00026 00027 void start_media_play_thread(); 00028 void start_media_voice_thread(); 00029 // return last status of media player 00030 MediaPlayerStatus media_play_pause_or_resume(); 00031 MediaPlayerStatus media_play_stop(); 00032 MediaPlayerStatus media_play_get_status(); 00033 int media_play_register_stop_callback(media_player_stop_callback callback); 00034 int media_play_unregister_stop_callback(media_player_stop_callback callback); 00035 void media_play_set_volume(unsigned char vol); 00036 00037 extern MediaPlayBuffer* g_media_play_buffer; 00038 00039 } // namespace duer 00040 00041 #endif // BAIDU_TINYDU_IOT_OS_SRC_MEDIA_PLAYER_BAIDU_MEDIA_PLAY_H
Generated on Tue Jul 12 2022 16:28:52 by
1.7.2
