libVLC-3

9.media player

LIBVLC_APIlibvlc_media_player_t*libvlc_media_player_new(libvlc_instance_t*p_libvlc_instance)

Create an empty Media Player object.

LIBVLC_APIlibvlc_media_player_t*libvlc_media_player_new_from_media(libvlc_media_t*p_md)

Create a Media Player object from a Media.

LIBVLC_APIvoidlibvlc_media_player_release(libvlc_media_player_t*p_mi)

Release a media_player after use Decrement the reference count of a media player object.

LIBVLC_APIvoidlibvlc_media_player_retain(libvlc_media_player_t*p_mi)

Retain a reference to a media player object.

LIBVLC_APIvoidlibvlc_media_player_set_media(libvlc_media_player_t*p_mi,libvlc_media_t*p_md)

Set the media that will be used by the media_player.

LIBVLC_APIlibvlc_media_t*libvlc_media_player_get_media(libvlc_media_player_t*p_mi)

Get the media used by the media_player.

LIBVLC_APIlibvlc_event_manager_t*libvlc_media_player_event_manager(libvlc_media_player_t*p_mi)

Get the Event Manager from which the media player send event.

LIBVLC_APIintlibvlc_media_player_is_playing(libvlc_media_player_t*p_mi)

is_playing

LIBVLC_APIintlibvlc_media_player_play(libvlc_media_player_t*p_mi)

Play.

LIBVLC_APIvoidlibvlc_media_player_set_pause(libvlc_media_player_t*mp, int do_pause)

Pause or resume (no effect if there is no media)

LIBVLC_APIvoidlibvlc_media_player_pause(libvlc_media_player_t*p_mi)

Toggle pause (no effect if there is no media)

LIBVLC_APIvoidlibvlc_media_player_stop(libvlc_media_player_t*p_mi)

Stop (no effect if there is no media)

LIBVLC_APIvoidlibvlc_video_set_callbacks(libvlc_media_player_t*mp,libvlc_video_lock_cblock,libvlc_video_unlock_cbunlock,libvlc_video_display_cbdisplay, void *opaque)

Set callbacks and private data to render decoded video to a custom area in memory.

LIBVLC_APIvoidlibvlc_video_set_format(libvlc_media_player_t*mp, const char *chroma, unsigned width, unsigned height, unsigned pitch)

Set decoded video chroma and dimensions.

LIBVLC_APIvoidlibvlc_video_set_format_callbacks(libvlc_media_player_t*mp,libvlc_video_format_cbsetup,libvlc_video_cleanup_cbcleanup)

Set decoded video chroma and dimensions.

LIBVLC_APIvoidlibvlc_media_player_set_nsobject(libvlc_media_player_t*p_mi, void *drawable)

Set the NSView handler where the media player should render its video output.

LIBVLC_APIvoid *libvlc_media_player_get_nsobject(libvlc_media_player_t*p_mi)

Get the NSView handler previously set withlibvlc_media_player_set_nsobject().

LIBVLC_APIvoidlibvlc_media_player_set_agl(libvlc_media_player_t*p_mi, uint32_t drawable)

Set the agl handler where the media player should render its video output.

LIBVLC_APIuint32_tlibvlc_media_player_get_agl(libvlc_media_player_t*p_mi)

Get the agl handler previously set withlibvlc_media_player_set_agl().

LIBVLC_APIvoidlibvlc_media_player_set_xwindow(libvlc_media_player_t*p_mi, uint32_t drawable)

Set an X Window System drawable where the media player should render its video output.

LIBVLC_APIuint32_tlibvlc_media_player_get_xwindow(libvlc_media_player_t*p_mi)

Get the X Window System window identifier previously set withlibvlc_media_player_set_xwindow().

LIBVLC_APIvoidlibvlc_media_player_set_hwnd(libvlc_media_player_t*p_mi, void *drawable)

Set a Win32/Win64 API window handle (HWND) where the media player should render its video output.

LIBVLC_APIvoid *libvlc_media_player_get_hwnd(libvlc_media_player_t*p_mi)

Get the Windows API window handle (HWND) previously set withlibvlc_media_player_set_hwnd().

LIBVLC_APIvoidlibvlc_media_player_set_android_context(libvlc_media_player_t*p_mi, void *p_jvm, void *p_awindow_handler)

Set the android context.

LIBVLC_APIvoidlibvlc_audio_set_callbacks(libvlc_media_player_t*mp,libvlc_audio_play_cbplay,libvlc_audio_pause_cbpause,libvlc_audio_resume_cbresume,libvlc_audio_flush_cbflush,libvlc_audio_drain_cbdrain, void *opaque)

Set callbacks and private data for decoded audio.

LIBVLC_APIvoidlibvlc_audio_set_volume_callback(libvlc_media_player_t*mp,libvlc_audio_set_volume_cbset_volume)

Set callbacks and private data for decoded audio.

LIBVLC_APIvoidlibvlc_audio_set_format_callbacks(libvlc_media_player_t*mp,libvlc_audio_setup_cbsetup,libvlc_audio_cleanup_cbcleanup)

Set decoded audio format.

LIBVLC_APIvoidlibvlc_audio_set_format(libvlc_media_player_t*mp, const char *format, unsigned rate, unsigned channels)

Set decoded audio format.

LIBVLC_APIlibvlc_time_tlibvlc_media_player_get_length(libvlc_media_player_t*p_mi)

Get the current movie length (in ms).

LIBVLC_APIlibvlc_time_tlibvlc_media_player_get_time(libvlc_media_player_t*p_mi)

Get the current movie time (in ms).

LIBVLC_APIvoidlibvlc_media_player_set_time(libvlc_media_player_t*p_mi,libvlc_time_ti_time)

Set the movie time (in ms).

LIBVLC_APIfloatlibvlc_media_player_get_position(libvlc_media_player_t*p_mi)

Get movie position as percentage between 0.0 and 1.0.

LIBVLC_APIvoidlibvlc_media_player_set_position(libvlc_media_player_t*p_mi, float f_pos)

Set movie position as percentage between 0.0 and 1.0.

LIBVLC_APIvoidlibvlc_media_player_set_chapter(libvlc_media_player_t*p_mi, int i_chapter)

Set movie chapter (if applicable).

LIBVLC_APIintlibvlc_media_player_get_chapter(libvlc_media_player_t*p_mi)

Get movie chapter.

LIBVLC_APIintlibvlc_media_player_get_chapter_count(libvlc_media_player_t*p_mi)

Get movie chapter count.

LIBVLC_APIintlibvlc_media_player_will_play(libvlc_media_player_t*p_mi)

Is the player able to play.

LIBVLC_APIintlibvlc_media_player_get_chapter_count_for_title(libvlc_media_player_t*p_mi, int i_title)

Get title chapter count.

LIBVLC_APIvoidlibvlc_media_player_set_title(libvlc_media_player_t*p_mi, int i_title)

Set movie title.

LIBVLC_APIintlibvlc_media_player_get_title(libvlc_media_player_t*p_mi)

Get movie title.

LIBVLC_APIintlibvlc_media_player_get_title_count(libvlc_media_player_t*p_mi)

Get movie title count.

LIBVLC_APIvoidlibvlc_media_player_previous_chapter(libvlc_media_player_t*p_mi)

Set previous chapter (if applicable)

LIBVLC_APIvoidlibvlc_media_player_next_chapter(libvlc_media_player_t*p_mi)

Set next chapter (if applicable)

LIBVLC_APIfloatlibvlc_media_player_get_rate(libvlc_media_player_t*p_mi)

Get the requested movie play rate.

LIBVLC_APIintlibvlc_media_player_set_rate(libvlc_media_player_t*p_mi, float rate)

Set movie play rate.

LIBVLC_APIlibvlc_state_tlibvlc_media_player_get_state(libvlc_media_player_t*p_mi)

Get current movie state.

LIBVLC_APIfloatlibvlc_media_player_get_fps(libvlc_media_player_t*p_mi)

Get movie fps rate.

LIBVLC_APIunsignedlibvlc_media_player_has_vout(libvlc_media_player_t*p_mi)

end bug

LIBVLC_APIintlibvlc_media_player_is_seekable(libvlc_media_player_t*p_mi)

Is this media player seekable?

LIBVLC_APIintlibvlc_media_player_can_pause(libvlc_media_player_t*p_mi)

Can this media player be paused?

LIBVLC_APIintlibvlc_media_player_program_scrambled(libvlc_media_player_t*p_mi)

Check if the current program is scrambled.

LIBVLC_APIvoidlibvlc_media_player_next_frame(libvlc_media_player_t*p_mi)

Display the next frame (if supported)

LIBVLC_APIvoidlibvlc_media_player_navigate(libvlc_media_player_t*p_mi, unsigned navigate)

Navigate through DVD Menu.

LIBVLC_APIvoidlibvlc_media_player_set_video_title_display(libvlc_media_player_t*p_mi,libvlc_position_tposition, unsigned int timeout)

Set if, and how, the video title will be shown when media is played.

LIBVLC_APIvoidlibvlc_track_description_list_release(libvlc_track_description_t*p_track_description)

Release (free)libvlc_track_description_t.

LIBVLC_DEPRECATEDLIBVLC_APIvoidlibvlc_track_description_release(libvlc_track_description_t*p_track_description)

10.vlm stream output

LIBVLC_APIvoidlibvlc_vlm_release(libvlc_instance_t*p_instance)

Release the vlm instance related to the given libvlc_instance_t.

LIBVLC_APIintlibvlc_vlm_add_broadcast(libvlc_instance_t*p_instance, const char *psz_name, const char *psz_input, const char *psz_output, int i_options, const char *const *ppsz_options, int b_enabled, int b_loop)

Add a broadcast, with one input.

LIBVLC_APIintlibvlc_vlm_add_vod(libvlc_instance_t*p_instance, const char *psz_name, const char *psz_input, int i_options, const char *const *ppsz_options, int b_enabled, const char *psz_mux)

Add a vod, with one input.

LIBVLC_APIintlibvlc_vlm_del_media(libvlc_instance_t*p_instance, const char *psz_name)

Delete a media (VOD or broadcast).

LIBVLC_APIintlibvlc_vlm_set_enabled(libvlc_instance_t*p_instance, const char *psz_name, int b_enabled)

Enable or disable a media (VOD or broadcast).

LIBVLC_APIintlibvlc_vlm_set_output(libvlc_instance_t*p_instance, const char *psz_name, const char *psz_output)

Set the output for a media.

LIBVLC_APIintlibvlc_vlm_set_input(libvlc_instance_t*p_instance, const char *psz_name, const char *psz_input)

Set a media's input MRL.

LIBVLC_APIintlibvlc_vlm_add_input(libvlc_instance_t*p_instance, const char *psz_name, const char *psz_input)

Add a media's input MRL.

LIBVLC_APIintlibvlc_vlm_set_loop(libvlc_instance_t*p_instance, const char *psz_name, int b_loop)

Set a media's loop status.

LIBVLC_APIintlibvlc_vlm_set_mux(libvlc_instance_t*p_instance, const char *psz_name, const char *psz_mux)

Set a media's vod muxer.

LIBVLC_APIintlibvlc_vlm_change_media(libvlc_instance_t*p_instance, const char *psz_name, const char *psz_input, const char *psz_output, int i_options, const char *const *ppsz_options, int b_enabled, int b_loop)

Edit the parameters of a media.

LIBVLC_APIintlibvlc_vlm_play_media(libvlc_instance_t*p_instance, const char *psz_name)

Play the named broadcast.

LIBVLC_APIintlibvlc_vlm_stop_media(libvlc_instance_t*p_instance, const char *psz_name)

Stop the named broadcast.

LIBVLC_APIintlibvlc_vlm_pause_media(libvlc_instance_t*p_instance, const char *psz_name)

Pause the named broadcast.

LIBVLC_APIintlibvlc_vlm_seek_media(libvlc_instance_t*p_instance, const char *psz_name, float f_percentage)

Seek in the named broadcast.

LIBVLC_APIconst char *libvlc_vlm_show_media(libvlc_instance_t*p_instance, const char *psz_name)

Return information about the named media as a JSON string representation.

LIBVLC_APIfloatlibvlc_vlm_get_media_instance_position(libvlc_instance_t*p_instance, const char *psz_name, int i_instance)

Get vlm_media instance position by name or instance id.

LIBVLC_APIintlibvlc_vlm_get_media_instance_time(libvlc_instance_t*p_instance, const char *psz_name, int i_instance)

Get vlm_media instance time by name or instance id.

LIBVLC_APIintlibvlc_vlm_get_media_instance_length(libvlc_instance_t*p_instance, const char *psz_name, int i_instance)

Get vlm_media instance length by name or instance id.

LIBVLC_APIintlibvlc_vlm_get_media_instance_rate(libvlc_instance_t*p_instance, const char *psz_name, int i_instance)

Get vlm_media instance playback rate by name or instance id.

LIBVLC_APIlibvlc_event_manager_t*libvlc_vlm_get_event_manager(libvlc_instance_t*p_instance)

Get libvlc_event_manager from a vlm media.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,684评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 87,143评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 151,214评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,788评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,796评论 5 368
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,665评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,027评论 3 399
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,679评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 41,346评论 1 299
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,664评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,766评论 1 331
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,412评论 4 321
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,015评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,974评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,203评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,073评论 2 350
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,501评论 2 343

推荐阅读更多精彩内容

  • 1.playlist libvlc_playlist_play(libvlc_instance_t*p_insta...
    hello_math阅读 3,436评论 0 1
  • 7.LIBVLC_APIlibvlc_media_list_t*libvlc_media_list_new(lib...
    hello_math阅读 1,128评论 0 1
  • 在我小时候,是日漫在中国最后的黄金时期,以及国漫尚未粗制滥造的时候。各大卫视为了蹭一波热度,均设有专播动画的栏目。...
    光年旋律阅读 148评论 0 0
  • 他会在热闹喧嚣中缄默到让世界忘却,亦会在安静里嘟囔个不停。他不记得上次聚会她有没出现,没太在意,所以连记忆都显得应...
    vpt阅读 212评论 0 0
  • 是的,你没有看错,本小仙女又来了,今天我不想写什么技术文章,不想写什么生活美好,大好河山,我今天只想讲讲我的男票—...
    炒鸡可耐的小葵花阅读 389评论 5 1