/*****************************************************************************
* libvlc_media_player.h: libvlc_media_player external API
*****************************************************************************
* Copyright (C) 1998-2010 the VideoLAN team
* $Id: d328e511ba7154eb18bc5163b69c9be5d7bbbbb9 $
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman@videolan.org>
* Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/**
* \file
* This file defines libvlc_media_player external API
*/
#ifndef VLC_LIBVLC_MEDIA_PLAYER_H
#define VLC_LIBVLC_MEDIA_PLAYER_H 1
# ifdef __cplusplus
extern "C" {
# endif
/*****************************************************************************
* Media Player
*****************************************************************************/
/** \defgroup libvlc_media_player LibVLC media player
* \ingroup libvlc
* A LibVLC media player plays one media (usually in a custom drawable).
* @{
*/
typedef struct libvlc_media_player_t libvlc_media_player_t;
/**
* Description for video, audio tracks and subtitles. It contains
* id, name (description string) and pointer to next record.
*/
typedef struct libvlc_track_description_t
{
int i_id;
char *psz_name;
struct libvlc_track_description_t *p_next;
} libvlc_track_description_t;
/**
* Description for audio output. It contains
* name, description and pointer to next record.
*/
typedef struct libvlc_audio_output_t
{
char *psz_name;
char *psz_description;
struct libvlc_audio_output_t *p_next;
} libvlc_audio_output_t;
/**
* Rectangle type for video geometry
*/
typedef struct libvlc_rectangle_t
{
int top, left;
int bottom, right;
} libvlc_rectangle_t;
/**
* Marq options definition
*/
typedef enum libvlc_video_marquee_option_t {
libvlc_marquee_Enable = 0,
libvlc_marquee_Text, /** string argument */
libvlc_marquee_Color,
libvlc_marquee_Opacity,
libvlc_marquee_Position,
libvlc_marquee_Refresh,
libvlc_marquee_Size,
libvlc_marquee_Timeout,
libvlc_marquee_X,
libvlc_marquee_Y
} libvlc_video_marquee_option_t;
/**
* Create an empty Media Player object
*
* \param p_libvlc_instance the libvlc instance in which the Media Player
* should be created.
* \return a new media player object, or NULL on error.
*/
VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *p_libvlc_instance );
/**
* Create a Media Player object from a Media
*
* \param p_md the media. Afterwards the p_md can be safely
* destroyed.
* \return a new media player object, or NULL on error.
*/
VLC_PUBLIC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_media_t *p_md );
/**
* Release a media_player after use
* Decrement the reference count of a media player object. If the
* reference count is 0, then libvlc_media_player_release() will
* release the media player object. If the media player object
* has been released, then it should not be used again.
*
* \param p_mi the Media Player to free
*/
VLC_PUBLIC_API void libvlc_media_player_release( libvlc_media_player_t *p_mi );
/**
* Retain a reference to a media player object. Use
* libvlc_media_player_release() to decrement reference count.
*
* \param p_mi media player object
*/
VLC_PUBLIC_API void libvlc_media_player_retain( libvlc_media_player_t *p_mi );
/**
* Set the media that will be used by the media_player. If any,
* previous md will be released.
*
* \param p_mi the Media Player
* \param p_md the Media. Afterwards the p_md can be safely
* destroyed.
*/
VLC_PUBLIC_API void libvlc_media_player_set_media( libvlc_media_player_t *p_mi,
libvlc_media_t *p_md );
/**
* Get the media used by the media_player.
*
* \param p_mi the Media Player
* \return the media associated with p_mi, or NULL if no
* media is associated
*/
VLC_PUBLIC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *p_mi );
/**
* Get the Event Manager from which the media player send event.
*
* \param p_mi the Media Player
* \return the event manager associated with p_mi
*/
VLC_PUBLIC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *p_mi );
/**
* is_playing
*
* \param p_mi the Media Player
* \return 1 if the media player is playing, 0 otherwise
*/
VLC_PUBLIC_API int libvlc_media_player_is_playing ( libvlc_media_player_t *p_mi );
/**
* Play
*
* \param p_mi the Media Player
* \return 0 if playback started (and was already started), or -1 on error.
*/
VLC_PUBLIC_API int libvlc_media_player_play ( libvlc_media_player_t *p_mi );
/**
* Pause or resume (no effect if there is no media)
*
* \param mp the Media Player
* \param do_pause play/resume if zero, pause if non-zero
* \version LibVLC 1.1.1 or later
*/
VLC_PUBLIC_API void libvlc_media_player_set_pause ( libvlc_media_player_t *mp,
int do_pause );
/**
* Toggle pause (no effect if there is no media)
*
* \param p_mi the Media Player
*/
VLC_PUBLIC_API void libvlc_media_player_pause ( libvlc_media_player_t *p_mi );
/**
* Stop (no effect if there is no media)
*
* \param p_mi the Media Player
*/
VLC_PUBLIC_API void libvlc_media_player_stop ( libvlc_media_player_t *p_mi );
/**
* Set callbacks and private data to render decoded video to a custom area
* in memory. Use libvlc_video_set_format() to configure the decoded format.
*
* Whenever a new video frame needs to be decoded, the lock callback is
* invoked. Depending on the video chroma, one or three pixel planes of
* adequate dimensions must be returned via the second parameter. Those
* planes must be aligned on 32-bytes boundaries.
*
* When the video frame is decoded, the unlock callback is invoked. The
* second parameter to the callback corresponds is the return value of the
* lock callback. The third parameter conveys the pixel planes for convenience.
*
* When the video frame needs to be shown, as determined by the media playback
* clock, the display callback is invoked. The second parameter also conveys
* the return value from the lock callback.
*
* \param mp the media player
* \param lock callback to allocate video memory
* \param unlock callback to release video memory
* \param opaque private pointer for the three callbacks (as first parameter)
* \version LibVLC 1.1.1 or later
*/
VLC_PUBLIC_API
void libvlc_video_set_callbacks( libvlc_media_player_t *mp,
void *(*lock) (void *opaque, void **plane),
void (*unlock) (void *opaque, void *picture, void *const *plane),
void (*display) (void *opaque, void *picture),
void *opaque );
/**
* Set decoded video chroma and dimensions. This only works in combination with
* libvlc_video_set_callbacks().
*
* \param mp the media player
* \param chroma a four-characters string identifying the chroma
* (e.g. "RV32" or "I420")
* \param width pixel width
* \param height pixel height
* \param pitch line pitch (in bytes)
* \version LibVLC 1.1.1 or later
*/
VLC_PUBLIC_API
void libvlc_video_set_
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
sdk.rar (84个子文件)
sdk
include
vlc
libvlc_events.h 6KB
libvlc_media.h 15KB
libvlc_media_discoverer.h 4KB
vlc.h 2KB
deprecated.h 2KB
libvlc_structures.h 2KB
plugins
vlc_subpicture.h 7KB
vlc_http.h 2KB
vlc_objects.h 4KB
vlc_avcodec.h 1KB
vlc_plugin.h 18KB
vlc_probe.h 2KB
vlc_url.h 6KB
vlc_image.h 3KB
vlc_es_out.h 6KB
vlc_inhibit.h 1KB
vlc_cpu.h 3KB
vlc_fourcc.h 18KB
vlc_rand.h 1KB
vlc_messages.h 7KB
vlc_modules.h 3KB
vlc_sql.h 18KB
vlc_mouse.h 5KB
vlc_xlib.h 2KB
vlc_main.h 2KB
vlc_services_discovery.h 4KB
vlc_filter.h 13KB
vlc_httpd.h 5KB
vlc_gcrypt.h 3KB
vlc_access.h 6KB
vlc_threads.h 14KB
vlc_common.h 30KB
vlc_block.h 12KB
vlc_art_finder.h 1KB
vlc_input.h 22KB
vlc_video_splitter.h 5KB
vlc_vout_window.h 4KB
vlc_config_cat.h 12KB
vlc_codec.h 8KB
vlc_strings.h 2KB
vlc_playlist.h 15KB
vlc_charset.h 3KB
vlc_md5.h 3KB
vlc_vlm.h 12KB
vlc_variables.h 23KB
vlc_input_item.h 10KB
vlc_aout.h 13KB
vlc_mtime.h 6KB
vlc_xml.h 3KB
vlc_picture_pool.h 4KB
vlc_demux.h 8KB
vlc_acl.h 2KB
vlc_vout_opengl.h 2KB
vlc_es.h 10KB
vlc_block_helper.h 14KB
vlc_fs.h 2KB
vlc_configuration.h 13KB
vlc_events.h 8KB
vlc_picture.h 12KB
vlc_arrays.h 23KB
vlc_dialog.h 4KB
vlc_vout.h 13KB
vlc_aout_mixer.h 3KB
vlc_vout_display.h 14KB
vlc_picture_fifo.h 3KB
vlc_bits.h 5KB
vlc_stream.h 6KB
vlc_epg.h 3KB
vlc_sout.h 9KB
vlc_meta.h 6KB
vlc_config.h 7KB
libvlc_version.h 2KB
libvlc_vlm.h 12KB
libvlc_media_list.h 6KB
libvlc_media_library.h 3KB
libvlc_media_player.h 40KB
libvlc_media_list_player.h 6KB
libvlc.h 11KB
lib
libvlccore.la 1KB
libvlc.la 1KB
libvlccore.dll.a 402KB
libvlc.dll.a 152KB
pkgconfig
vlc-plugin.pc 392B
libvlc.pc 263B
共 84 条
- 1
weixin_42653672
- 粉丝: 93
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0