ff_ffplay.h 2.3 KB
Newer Older
Z
Zhang Rui 已提交
1
/*
2
 * ff_ffplay.h
3
 *
Z
Zhang Rui 已提交
4 5
 * Copyright (c) 2003 Fabrice Bellard
 * Copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
6
 *
Z
Zhang Rui 已提交
7
 * This file is part of ijkPlayer.
8
 *
Z
Zhang Rui 已提交
9
 * ijkPlayer is free software; you can redistribute it and/or
10 11 12 13
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
Z
Zhang Rui 已提交
14
 * ijkPlayer is distributed in the hope that it will be useful,
15 16 17 18 19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
Z
Zhang Rui 已提交
20
 * License along with ijkPlayer; if not, write to the Free Software
21 22 23
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

Z
Zhang Rui 已提交
24 25
#ifndef FFPLAY__FF_FFPLAY_H
#define FFPLAY__FF_FFPLAY_H
26

27
#include "ff_ffplay_def.h"
Z
Zhang Rui 已提交
28 29
#include "ff_fferror.h"
#include "ff_ffmsg.h"
30

Z
Zhang Rui 已提交
31 32
void      ffp_global_init();
void      ffp_global_uninit();
33

Z
Zhang Rui 已提交
34 35
FFPlayer *ffp_create();
void      ffp_destroy(FFPlayer *ffp);
Z
Zhang Rui 已提交
36
void      ffp_destroy_p(FFPlayer **pffp);
Z
Zhang Rui 已提交
37
void      ffp_reset(FFPlayer *ffp);
Z
Zhang Rui 已提交
38

Z
Zhang Rui 已提交
39
/* set options before ffp_prepare_async_l() */
B
bbcallen 已提交
40
void      ffp_set_format_option(FFPlayer *ffp, const char *name, const char *value);
Z
Zhang Rui 已提交
41 42
void      ffp_set_codec_option(FFPlayer *ffp, const char *name, const char *value);
void      ffp_set_sws_option(FFPlayer *ffp, const char *name, const char *value);
Z
Zhang Rui 已提交
43
void      ffp_set_overlay_format(FFPlayer *ffp, int chroma_fourcc);
44
void      ffp_set_picture_queue_capicity(FFPlayer *ffp, int frame_count);
Z
Zhang Rui 已提交
45
void      ffp_set_max_fps(FFPlayer *ffp, int max_fps);
B
bbcallen 已提交
46

Z
Zhang Rui 已提交
47
/* playback controll */
Z
Zhang Rui 已提交
48
int       ffp_prepare_async_l(FFPlayer *ffp, const char *file_name);
Z
Zhang Rui 已提交
49
int       ffp_start_from_l(FFPlayer *ffp, long msec);
Z
Zhang Rui 已提交
50 51 52 53
int       ffp_start_l(FFPlayer *ffp);
int       ffp_pause_l(FFPlayer *ffp);
int       ffp_stop_l(FFPlayer *ffp);
int       ffp_wait_stop_l(FFPlayer *ffp);
Z
Zhang Rui 已提交
54

55
/* all in milliseconds */
Z
Zhang Rui 已提交
56 57 58
int       ffp_seek_to_l(FFPlayer *ffp, long msec);
long      ffp_get_current_position_l(FFPlayer *ffp);
long      ffp_get_duration_l(FFPlayer *ffp);
59

60 61 62 63
/* for internal usage */
void      ffp_toggle_buffering_l(FFPlayer *ffp, int start_buffering);
void      ffp_toggle_buffering(FFPlayer *ffp, int start_buffering);

64
#endif