ijkplayer_header
2017-01-06 09:52:51 0 举报
ijkplayer_header是一个开源的跨平台媒体播放器框架,它基于FFmpeg和Android NDK实现。该框架支持多种视频格式和音频格式,包括RTMP、HTTP、HLS等协议。ijkplayer_header具有轻量级、高性能、低延迟等特点,可以用于开发各种类型的应用程序,如视频播放器、直播应用等。此外,ijkplayer_header还提供了丰富的API接口,方便开发者进行二次开发和定制。总之,ijkplayer_header是一个非常优秀的媒体播放器框架,值得广大开发者使用。
作者其他创作
大纲/内容
struct IjkMediaPlayer { volatile int ref_count; pthread_mutex_t mutex; FFPlayer *ffplayer; //该指针在ijkmp_create中由ffp_create(); int (*msg_loop)(void*); //该指针指向media_player_msg_loop SDL_Thread *msg_thread; SDL_Thread _msg_thread; int mp_state; char *data_source; //此处在viewWillAppear中, prepareToPlay中, 将url 赋值给data_source void *weak_thiz; int restart; int restart_from_beginning; int seek_req; long seek_msec;};
typedef struct FFPlayer { const AVClass *av_class; /* ffplay context */ VideoState *is; /* format/codec options */ AVDictionary *format_opts; AVDictionary *codec_opts; AVDictionary *sws_dict; AVDictionary *player_opts; AVDictionary *swr_opts; AVDictionary *swr_preset_opts; /* ffplay options specified by the user */#ifdef FFP_MERGE AVInputFormat *file_iformat;#endif char *input_filename;#ifdef FFP_MERGE const char *window_title; int fs_screen_width; int fs_screen_height; int default_width; int default_height; int screen_width; int screen_height;#endif int audio_disable; int video_disable;#ifdef FFP_MERGE int subtitle_disable;#endif const char* wanted_stream_spec[AVMEDIA_TYPE_NB]; int seek_by_bytes; int display_disable; int show_status; int av_sync_type; int64_t start_time; int64_t duration; int fast; int genpts; int lowres; int decoder_reorder_pts; int autoexit;#ifdef FFP_MERGE int exit_on_keydown; int exit_on_mousedown;#endif int loop; int framedrop; int64_t seek_at_start; int infinite_buffer; enum ShowMode show_mode; char *audio_codec_name;#ifdef FFP_MERGE char *subtitle_codec_name;#endif char *video_codec_name; double rdftspeed;#ifdef FFP_MERGE int64_t cursor_last_shown; int cursor_hidden;#endif#if CONFIG_AVFILTER const char **vfilters_list; int nb_vfilters; char *afilters; char *vfilter0;#endif int autorotate; unsigned sws_flags; /* current context */#ifdef FFP_MERGE int is_full_screen;#endif int64_t audio_callback_time;#ifdef FFP_MERGE SDL_Surface *screen;#endif /* extra fields */ SDL_Aout *aout; SDL_Vout *vout; //该指针在ijkmp_ios_create中赋值为SDL_VoutIos_CreateForGLES2(); struct IJKFF_Pipeline *pipeline; struct IJKFF_Pipenode *node_vdec; int sar_num; int sar_den; char *video_codec_info; char *audio_codec_info; Uint32 overlay_format; int last_error; int prepared; int auto_resume; int error; int error_count; int start_on_prepared; int first_video_frame_rendered; int first_audio_frame_rendered; int sync_av_start; MessageQueue msg_queue; //在ffp_create()中初始化 int64_t playable_duration_ms; int packet_buffering; int pictq_size; int max_fps; int videotoolbox; int vtb_max_frame_width; int vtb_async; int vtb_wait_async; int vtb_handle_resolution_change; int mediacodec_all_videos; int mediacodec_avc; int mediacodec_hevc; int mediacodec_mpeg2; int mediacodec_mpeg4; int mediacodec_handle_resolution_change; int mediacodec_auto_rotate; int opensles; char *iformat_name; int no_time_adjust; double preset_5_1_center_mix_level; struct IjkMediaMeta *meta; SDL_SpeedSampler vfps_sampler; SDL_SpeedSampler vdps_sampler; /* filters */ SDL_mutex *vf_mutex; //在ffp_create中初始化 SDL_mutex *af_mutex; //在ffp_create中初始化 int vf_changed; int af_changed; float pf_playback_rate; int pf_playback_rate_changed; float pf_playback_volume; int pf_playback_volume_changed; void *inject_opaque; FFStatistic stat; FFDemuxCacheControl dcc; AVApplicationContext *app_ctx;} FFPlayer;
0 条评论
下一页