{"id":902,"date":"2023-06-12T00:51:36","date_gmt":"2023-06-12T00:51:36","guid":{"rendered":"http:\/\/robinluo.top\/?p=902"},"modified":"2023-06-14T12:13:22","modified_gmt":"2023-06-14T12:13:22","slug":"vlc-%e6%ba%90%e7%a0%81%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/robinluo.top\/?p=902","title":{"rendered":"vlc \u6e90\u7801\u5206\u6790"},"content":{"rendered":"\n<p><a href=\"https:\/\/blog.csdn.net\/c_m_deng\/article\/details\/8212401\">(13\u6761\u6d88\u606f) VLC\u6e90\u7801\u5206\u6790\u77e5\u8bc6\u603b\u7ed3_c_m_deng\u7684\u535a\u5ba2-CSDN\u535a\u5ba2<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/blog.csdn.net\/u012459903\/article\/details\/88035705\">(13\u6761\u6d88\u606f) vlc\u6e90\u7801\u5206\u6790&#8211;issue (\u672a\u5b8c\u5f85\u7eed)_\u738b\u4e8c\u306e\u9ec4\u91d1\u65f6\u4ee3\u7684\u535a\u5ba2-CSDN\u535a\u5ba2<\/a><\/p>\n\n\n\n<p>VLM<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>VLM: VideoLAN (Media) Manager\r\n\r\nVLM is a little media manager originally designed to launch multiple\r\nstreams with only one VLC.<\/code><\/pre>\n\n\n\n<p>example<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\/ This file is included in libVLC main page in the doxygen documentation.\r\n\r\n\/\/! &#91;minimal example]\r\n#include &lt;stdio.h>\r\n#include &lt;stdlib.h>\r\n#include &lt;inttypes.h>\r\n#include &lt;unistd.h>\r\n#include &lt;vlc\/vlc.h>\r\n\r\nint main(int argc, char* argv&#91;])\r\n{\r\n    libvlc_instance_t * inst;\r\n    libvlc_media_player_t *mp;\r\n    libvlc_media_t *m;\r\n\r\n    \/* Load the VLC engine *\/\r\n    inst = libvlc_new (0, NULL);\/\/\u521b\u5efalbvlc \u5b9e\u4f8b\u5bf9\u8c61\n\r\n\r\n    \/* Create a new item *\/\r\n    m = libvlc_media_new_location(\"http:\/\/mycool.movie.com\/test.mov\");\n    \/\/\u521b\u5efavlc\u64ad\u653e\u5a92\u4f53\u5bf9\u8c61\r\n    \/\/m = libvlc_media_new_path(\"\/path\/to\/test.mov\");\n\r\n\r\n    \/* Create a media player playing environement *\/\r\n    mp = libvlc_media_player_new_from_media (inst, m);\n\r   \/\/\u521b\u5efavlc\u64ad\u653e\u5668\u5bf9\u8c61\n\r\n    \/* No need to keep the media now *\/\r\n    libvlc_media_release (m);\r\n\r\n    \/* play the media_player *\/\r\n    libvlc_media_player_play (mp);\n\r     \/\/\u6267\u884c\u64ad\u653e\u5668\u64ad\u653e\n\r\n    while (libvlc_media_player_is_playing(mp))\r\n    { \n\r       \/\/\u5faa\u73af\u8bfb\u53d6\u64ad\u653e\u72b6\u6001\n        sleep (1);\r\n        int64_t milliseconds = libvlc_media_player_get_time(mp);\r\n        int64_t seconds = milliseconds \/ 1000;\r\n        int64_t minutes = seconds \/ 60;\r\n        milliseconds -= seconds * 1000;\r\n        seconds -= minutes * 60;\r\n\r\n        printf(\"Current time: %\" PRId64 \":%\" PRId64 \":%\" PRId64 \"\\n\",\r\n               minutes, seconds, milliseconds);\r\n    }\r\n\r\n    \/* Stop playing *\/\r\n    libvlc_media_player_stop_async (mp);\r\n\r\n    \/* Free the media_player *\/\r\n    libvlc_media_player_release (mp);\r\n\r\n    libvlc_release (inst);\r\n\r\n    return 0;\r\n}\r\n\/\/! &#91;minimal example]\r\n<\/code><\/pre>\n\n\n\n<p>\u6e90\u7801\u89e3\u6790<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(13\u6761\u6d88\u606f) VLC\u6e90\u7801\u5206\u6790\u77e5\u8bc6\u603b\u7ed3_c_m_deng\u7684\u535a\u5ba2-CSDN\u535a\u5ba2 (13\u6761\u6d88\u606f) vlc\u6e90\u7801\u5206\u6790&#8211;issue (\u672a\u5b8c\u5f85\u7eed)_\u738b\u4e8c\u306e\u9ec4\u91d1\u65f6\u4ee3\u7684\u535a\u5ba2-CSDN\u535a\u5ba2 VLM example \u6e90\u7801\u89e3\u6790<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[142],"tags":[141],"_links":{"self":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/902"}],"collection":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=902"}],"version-history":[{"count":4,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/902\/revisions"}],"predecessor-version":[{"id":913,"href":"https:\/\/robinluo.top\/index.php?rest_route=\/wp\/v2\/posts\/902\/revisions\/913"}],"wp:attachment":[{"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robinluo.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}