完善注释和范例

This commit is contained in:
xiongziliang 2018-12-19 18:18:24 +08:00
parent 99a4bc3c1d
commit efa2234e49
2 changed files with 358 additions and 267 deletions

View File

@ -2,18 +2,27 @@
<project version="4"> <project version="4">
<component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true" buildAllGenerated="true"> <component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true" buildAllGenerated="true">
<generated> <generated>
<config projectName="MediaKitWrapper" targetName="MediaKitWrapper_static" /> <config projectName="MediaKitWrapper" targetName="zltoolkit" />
<config projectName="MediaKitWrapper" targetName="zlmediakit" />
<config projectName="MediaKitWrapper" targetName="test_all" /> <config projectName="MediaKitWrapper" targetName="test_all" />
<config projectName="MediaKitWrapper" targetName="MediaKitWrapper_shared" /> <config projectName="MediaKitWrapper" targetName="MediaKitWrapper_shared" />
</generated> </generated>
</component> </component>
<component name="CMakeSettings" ADDITIONAL_BUILD_OPTIONS="-j4"> <component name="CMakeSettings">
<configurations> <configurations>
<configuration CONFIG_NAME="Debug" GENERATION_OPTIONS="-DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2j/" /> <configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2j/" BUILD_OPTIONS="-j4" />
</configurations> </configurations>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="db5167c7-a7f4-4c11-a19e-0c6c8a7b66f1" name="Default" comment="" /> <list default="true" id="db5167c7-a7f4-4c11-a19e-0c6c8a7b66f1" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/common.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/common.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/flvrecorder.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/flvrecorder.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/media.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/media.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/player.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/player.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/proxyplayer.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/proxyplayer.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../tests/test_server.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/../tests/test_server.cpp" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/cmake-build-debug/" /> <ignored path="$PROJECT_DIR$/cmake-build-debug/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" /> <option name="TRACKING_ENABLED" value="true" />
@ -22,27 +31,17 @@
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="httpdownloader.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/httpdownloader.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242">
<caret line="58" column="98" lean-forward="false" selection-start-line="58" selection-start-column="98" selection-end-line="58" selection-end-column="98" />
<folding>
<element signature="e#1238#1265#0" expanded="true" />
<marker date="1513154719000" expanded="true" signature="0:1236" ph="/.../" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="media.cpp" pinned="false" current-in-tab="false"> <file leaf-file-name="media.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/media.cpp"> <entry file="file://$PROJECT_DIR$/src/media.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="142"> <state relative-caret-position="268">
<caret line="71" column="0" lean-forward="false" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" /> <caret line="93" lean-forward="true" selection-start-line="93" selection-end-line="93" />
<folding /> <folding>
<element signature="e#1238#1256#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -50,73 +49,52 @@
<file leaf-file-name="proxyplayer.cpp" pinned="false" current-in-tab="false"> <file leaf-file-name="proxyplayer.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/proxyplayer.cpp"> <entry file="file://$PROJECT_DIR$/src/proxyplayer.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="17">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="24" selection-end-column="3" /> <caret line="27" column="16" selection-start-line="27" selection-start-column="16" selection-end-line="27" selection-end-column="16" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="common.cpp" pinned="false" current-in-tab="false"> <file leaf-file-name="AAC.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/common.cpp"> <entry file="file://$PROJECT_DIR$/../src/Extension/AAC.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor" />
<state relative-caret-position="240">
<caret line="82" column="18" lean-forward="false" selection-start-line="82" selection-start-column="18" selection-end-line="82" selection-end-column="18" />
<folding>
<element signature="e#1238#1257#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="media.h" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/media.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473">
<caret line="76" column="52" lean-forward="false" selection-start-line="76" selection-start-column="52" selection-end-line="76" selection-end-column="52" />
<folding />
</state>
</provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="player.cpp" pinned="false" current-in-tab="false"> <file leaf-file-name="player.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/player.cpp"> <entry file="file://$PROJECT_DIR$/src/player.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170"> <state relative-caret-position="267">
<caret line="179" column="45" lean-forward="false" selection-start-line="179" selection-start-column="25" selection-end-line="179" selection-end-column="45" /> <caret line="72" column="26" selection-start-line="72" selection-start-column="26" selection-end-line="72" selection-end-column="26" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="PlayerBase.h" pinned="false" current-in-tab="false"> <file leaf-file-name="CMakeLists.txt" pinned="false" current-in-tab="false">
<entry file="file:///usr/local/include/Player/PlayerBase.h"> <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="224"> <state relative-caret-position="250">
<caret line="187" column="9" lean-forward="false" selection-start-line="187" selection-start-column="9" selection-end-line="187" selection-end-column="9" /> <caret line="95" column="27" selection-start-line="95" selection-start-column="27" selection-end-line="95" selection-end-column="27" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="player.h" pinned="false" current-in-tab="false"> <file leaf-file-name="AACEncoder.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/../src/Codec/AACEncoder.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="28" selection-start-line="28" selection-end-line="28" />
<folding>
<element signature="e#1258#1276#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="player.h" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/player.h"> <entry file="file://$PROJECT_DIR$/src/player.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="347"> <state relative-caret-position="412">
<caret line="101" column="35" lean-forward="true" selection-start-line="101" selection-start-column="35" selection-end-line="101" selection-end-column="35" /> <caret line="101" column="35" selection-start-line="101" selection-start-column="35" selection-end-line="101" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="test_all.cpp" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/tests/test_all.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1213">
<caret line="118" column="19" lean-forward="false" selection-start-line="118" selection-start-column="19" selection-end-line="118" selection-end-column="19" />
<folding>
<element signature="e#1237#1258#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
@ -124,23 +102,45 @@
<file leaf-file-name="common.h" pinned="false" current-in-tab="false"> <file leaf-file-name="common.h" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/common.h"> <entry file="file://$PROJECT_DIR$/src/common.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="163"> <state relative-caret-position="353">
<caret line="41" column="8" lean-forward="false" selection-start-line="41" selection-start-column="8" selection-end-line="41" selection-end-column="8" /> <caret line="114" lean-forward="true" selection-start-line="114" selection-end-line="114" />
<folding> <folding>
<element signature="e#1324#1488#0" expanded="true" /> <element signature="e#1324#1488#0" expanded="true" />
<marker date="1513156321000" expanded="true" signature="3358:3361" ph="/.../" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="flvrecorder.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/flvrecorder.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="19" selection-start-line="5" selection-start-column="19" selection-end-line="5" selection-end-column="19" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="stdlib.h" pinned="false" current-in-tab="false">
<entry file="file:///Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-89">
<caret line="93" column="14" selection-start-line="93" selection-start-column="14" selection-end-line="93" selection-end-column="14" />
</state>
</provider>
</entry>
</file>
</leaf> </leaf>
</component> </component>
<component name="FindInProjectRecents"> <component name="FindInProjectRecents">
<findStrings> <findStrings>
<find>s_threadPool</find> <find>s_threadPool</find>
<find>11</find>
<find>s_mapPlayer</find>
</findStrings> </findStrings>
</component> </component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
</component>
<component name="IdeDocumentHistory"> <component name="IdeDocumentHistory">
<option name="CHANGED_PATHS"> <option name="CHANGED_PATHS">
<list> <list>
@ -153,16 +153,17 @@
<option value="$PROJECT_DIR$/src/cleaner.h" /> <option value="$PROJECT_DIR$/src/cleaner.h" />
<option value="$PROJECT_DIR$/src/rtspApi.h" /> <option value="$PROJECT_DIR$/src/rtspApi.h" />
<option value="$PROJECT_DIR$/src/httpdownloader.cpp" /> <option value="$PROJECT_DIR$/src/httpdownloader.cpp" />
<option value="$PROJECT_DIR$/src/media.cpp" />
<option value="$PROJECT_DIR$/src/proxyplayer.h" /> <option value="$PROJECT_DIR$/src/proxyplayer.h" />
<option value="$PROJECT_DIR$/src/proxyplayer.cpp" />
<option value="$PROJECT_DIR$/src/common.h" />
<option value="$PROJECT_DIR$/src/common.cpp" /> <option value="$PROJECT_DIR$/src/common.cpp" />
<option value="$PROJECT_DIR$/src/mediakit.h" /> <option value="$PROJECT_DIR$/src/mediakit.h" />
<option value="$PROJECT_DIR$/tests/test_all.cpp.cpp" /> <option value="$PROJECT_DIR$/tests/test_all.cpp.cpp" />
<option value="$PROJECT_DIR$/src/player.h" /> <option value="$PROJECT_DIR$/src/player.h" />
<option value="$PROJECT_DIR$/src/player.cpp" />
<option value="$PROJECT_DIR$/tests/test_all.cpp" /> <option value="$PROJECT_DIR$/tests/test_all.cpp" />
<option value="$PROJECT_DIR$/src/common.h" />
<option value="$PROJECT_DIR$/src/flvrecorder.cpp" />
<option value="$PROJECT_DIR$/src/proxyplayer.cpp" />
<option value="$PROJECT_DIR$/src/media.cpp" />
<option value="$PROJECT_DIR$/src/player.cpp" />
</list> </list>
</option> </option>
</component> </component>
@ -173,23 +174,13 @@
<sorting>DEFINITION_ORDER</sorting> <sorting>DEFINITION_ORDER</sorting>
</component> </component>
<component name="OCFindUsagesOptions" text="true" ivars="false" properties="true" derivedClasses="false" /> <component name="OCFindUsagesOptions" text="true" ivars="false" properties="true" derivedClasses="false" />
<component name="ProjectFrameBounds" extendedState="6"> <component name="ProjectFrameBounds">
<option name="y" value="23" /> <option name="y" value="23" />
<option name="width" value="1280" /> <option name="width" value="1633" />
<option name="height" value="1057" /> <option name="height" value="1027" />
</component> </component>
<component name="ProjectView"> <component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1"> <navigator proportions="" version="1">
<flattenPackages />
<showMembers />
<showModules />
<showLibraryContents />
<hideEmptyPackages />
<abbreviatePackageNames />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
<manualOrder />
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
@ -197,23 +188,29 @@
<subPane> <subPane>
<expand> <expand>
<path> <path>
<item name="MediaKitWrapper" type="dad4c3:CidrFilesViewHelper$MyProjectTreeStructure$1" /> <item name="MediaKitWrapper" type="b2602c69:ProjectViewProjectNode" />
<item name="c_wrapper" type="47feb1d3:ProjectViewModuleNode" />
</path>
<path>
<item name="MediaKitWrapper" type="b2602c69:ProjectViewProjectNode" />
<item name="c_wrapper" type="47feb1d3:ProjectViewModuleNode" />
<item name="c_wrapper" type="462c0819:PsiDirectoryNode" /> <item name="c_wrapper" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="MediaKitWrapper" type="dad4c3:CidrFilesViewHelper$MyProjectTreeStructure$1" /> <item name="MediaKitWrapper" type="b2602c69:ProjectViewProjectNode" />
<item name="c_wrapper" type="47feb1d3:ProjectViewModuleNode" />
<item name="c_wrapper" type="462c0819:PsiDirectoryNode" /> <item name="c_wrapper" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="MediaKitWrapper" type="dad4c3:CidrFilesViewHelper$MyProjectTreeStructure$1" /> <item name="MediaKitWrapper" type="b2602c69:ProjectViewProjectNode" />
<item name="c_wrapper" type="462c0819:PsiDirectoryNode" /> <item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
<item name="tests" type="462c0819:PsiDirectoryNode" />
</path> </path>
</expand> </expand>
<select /> <select />
</subPane> </subPane>
</pane> </pane>
<pane id="Scope" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
@ -239,28 +236,22 @@
</list> </list>
</option> </option>
</component> </component>
<component name="RunManager" selected="Application.test_all"> <component name="RunManager" selected="Application.Build All">
<configuration name="Build All" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" CONFIG_NAME="Debug" EXPLICIT_BUILD_TARGET_NAME="all"> <configuration name="Build All" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" CONFIG_NAME="Debug" EXPLICIT_BUILD_TARGET_NAME="all" />
<envs /> <configuration name="MediaKitWrapper_shared" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="MediaKitWrapper" TARGET_NAME="MediaKitWrapper_shared" CONFIG_NAME="Debug" />
</configuration> <configuration name="test_all" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="MediaKitWrapper" TARGET_NAME="test_all" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="MediaKitWrapper" RUN_TARGET_NAME="test_all" />
<configuration name="MediaKitWrapper_shared" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="MediaKitWrapper" TARGET_NAME="MediaKitWrapper_shared" CONFIG_NAME="Debug"> <configuration name="zlmediakit" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="MediaKitWrapper" TARGET_NAME="zlmediakit" CONFIG_NAME="Debug" />
<envs /> <configuration name="zltoolkit" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="MediaKitWrapper" TARGET_NAME="zltoolkit" CONFIG_NAME="Debug" />
</configuration> <list>
<configuration name="MediaKitWrapper_static" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="MediaKitWrapper" TARGET_NAME="MediaKitWrapper_static" CONFIG_NAME="Debug"> <item itemvalue="Application.Build All" />
<envs /> <item itemvalue="Application.MediaKitWrapper_shared" />
</configuration> <item itemvalue="Application.zlmediakit" />
<configuration name="test_all" type="CMakeRunConfiguration" factoryName="Application" PASS_PARENT_ENVS_2="true" PROJECT_NAME="MediaKitWrapper" TARGET_NAME="test_all" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="MediaKitWrapper" RUN_TARGET_NAME="test_all"> <item itemvalue="Application.zltoolkit" />
<envs /> <item itemvalue="Application.test_all" />
</configuration>
<list size="4">
<item index="0" class="java.lang.String" itemvalue="Application.Build All" />
<item index="1" class="java.lang.String" itemvalue="Application.MediaKitWrapper_shared" />
<item index="2" class="java.lang.String" itemvalue="Application.MediaKitWrapper_static" />
<item index="3" class="java.lang.String" itemvalue="Application.test_all" />
</list> </list>
</component> </component>
<component name="ShelveChangesManager" show_recycled="false"> <component name="SvnConfiguration">
<option name="remove_strategy" value="false" /> <configuration />
</component> </component>
<component name="TaskManager"> <component name="TaskManager">
<task active="true" id="Default" summary="Default task"> <task active="true" id="Default" summary="Default task">
@ -270,34 +261,35 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1513153608354</updated> <updated>1513153608354</updated>
<workItem from="1513153610227" duration="5467000" /> <workItem from="1513153610227" duration="5467000" />
<workItem from="1541062066056" duration="1176000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="5467000" /> <option name="totallyTimeSpent" value="6643000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="0" y="23" width="1852" height="1057" extended-state="6" /> <frame x="0" y="23" width="1633" height="1027" extended-state="6" />
<layout> <layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19779006" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.19727047" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="TODO" order="6" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32952183" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="Messages" order="12" visible="true" weight="0.32903227" />
<window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3846154" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="CMake" order="12" weight="0.38387096" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> <window_info anchor="bottom" id="Event Log" order="12" side_tool="true" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="Run" order="2" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="Version Control" order="12" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.44282743" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="Terminal" order="12" weight="0.44193548" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3991684" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="Debug" order="3" weight="0.3991684" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> <window_info id="Favorites" order="2" side_tool="true" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info anchor="right" id="Commander" order="0" weight="0.4" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="Find" order="1" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info anchor="right" id="Data View" order="4" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info anchor="bottom" id="Message" order="0" />
</layout> </layout>
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@ -331,94 +323,114 @@
</breakpoints> </breakpoints>
<option name="time" value="4" /> <option name="time" value="4" />
</breakpoint-manager> </breakpoint-manager>
<watches-manager />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/httpdownloader.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="986">
<caret line="58" column="1" lean-forward="true" selection-start-line="58" selection-start-column="1" selection-end-line="58" selection-end-column="1" />
<folding>
<element signature="e#1238#1265#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/media.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1207">
<caret line="71" selection-start-line="71" selection-end-line="71" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/proxyplayer.cpp">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret selection-end-line="24" selection-end-column="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/common.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1394">
<caret line="82" column="18" selection-start-line="82" selection-start-column="18" selection-end-line="82" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/media.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1292">
<caret line="76" column="52" selection-start-line="76" selection-start-column="52" selection-end-line="76" selection-end-column="52" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/player.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="3043">
<caret line="179" column="15" lean-forward="true" selection-start-line="179" selection-start-column="15" selection-end-line="179" selection-end-column="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/player.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1717">
<caret line="101" column="35" lean-forward="true" selection-start-line="101" selection-start-column="35" selection-end-line="101" selection-end-column="35" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/common.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="595">
<caret line="41" column="8" selection-start-line="41" selection-start-column="8" selection-end-line="41" selection-end-column="8" />
<folding>
<element signature="e#1324#1488#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/test_all.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2006">
<caret line="118" lean-forward="true" selection-start-line="118" selection-end-line="118" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake/FindFAAC.cmake"> <entry file="file://$PROJECT_DIR$/cmake/FindFAAC.cmake">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="114"> <state relative-caret-position="114">
<caret line="6" column="25" lean-forward="false" selection-start-line="6" selection-start-column="25" selection-end-line="6" selection-end-column="25" /> <caret line="6" column="25" selection-start-line="6" selection-start-column="25" selection-end-line="6" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/proxy.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2051">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/udpsearcher.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="456">
<caret line="24" column="3" lean-forward="false" selection-start-line="24" selection-start-column="3" selection-end-line="24" selection-end-column="3" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/udpsearcher.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="206">
<caret line="33" column="9" lean-forward="false" selection-start-line="33" selection-start-column="9" selection-end-line="33" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="19">
<caret line="1" column="23" lean-forward="false" selection-start-line="1" selection-start-column="8" selection-end-line="1" selection-end-column="23" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/proxy.h" />
<entry file="file://$PROJECT_DIR$/src/udpsearcher.h" />
<entry file="file://$PROJECT_DIR$/src/udpsearcher.cpp" />
<entry file="file://$PROJECT_DIR$/src/cleaner.h"> <entry file="file://$PROJECT_DIR$/src/cleaner.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="206"> <state relative-caret-position="206">
<caret line="49" column="16" lean-forward="false" selection-start-line="49" selection-start-column="16" selection-end-line="49" selection-end-column="16" /> <caret line="49" column="16" selection-start-line="49" selection-start-column="16" selection-end-line="49" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file:///usr/local/include/Player/MediaPlayer.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="206">
<caret line="43" column="6" lean-forward="false" selection-start-line="43" selection-start-column="6" selection-end-line="43" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
<entry file="file:///usr/local/include/Device/PlayerProxy.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="206">
<caret line="49" column="11" lean-forward="false" selection-start-line="49" selection-start-column="11" selection-end-line="49" selection-end-column="11" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file:///usr/local/include/Player/MediaPlayer.h" />
<entry file="file:///usr/local/include/Device/PlayerProxy.h" />
<entry file="file://$PROJECT_DIR$/src/mediakit.h"> <entry file="file://$PROJECT_DIR$/src/mediakit.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="449"> <state relative-caret-position="449">
<caret line="33" column="0" lean-forward="false" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" /> <caret line="33" selection-start-line="33" selection-end-line="33" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/tests/CMakeLists.txt"> <entry file="file://$PROJECT_DIR$/tests/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="266"> <state relative-caret-position="266">
<caret line="14" column="37" lean-forward="false" selection-start-line="14" selection-start-column="37" selection-end-line="14" selection-end-column="37" /> <caret line="14" column="37" selection-start-line="14" selection-start-column="37" selection-end-line="14" selection-end-column="37" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/proxyplayer.h"> <entry file="file://$PROJECT_DIR$/src/proxyplayer.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="367"> <state relative-caret-position="367">
<caret line="44" column="29" lean-forward="false" selection-start-line="44" selection-start-column="11" selection-end-line="44" selection-end-column="29" /> <caret line="44" column="29" selection-start-line="44" selection-start-column="11" selection-end-line="44" selection-end-column="29" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -426,99 +438,156 @@
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="343"> <state relative-caret-position="343">
<caret line="37" column="107" lean-forward="true" selection-start-line="37" selection-start-column="44" selection-end-line="37" selection-end-column="107" /> <caret line="37" column="107" lean-forward="true" selection-start-line="37" selection-start-column="44" selection-end-line="37" selection-end-column="107" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/common.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="163">
<caret line="41" column="8" lean-forward="false" selection-start-line="41" selection-start-column="8" selection-end-line="41" selection-end-column="8" />
<folding>
<element signature="e#1324#1488#0" expanded="true" />
<marker date="1513156321000" expanded="true" signature="3358:3361" ph="/.../" />
</folding>
</state>
</provider>
</entry>
<entry file="file:///usr/local/include/Player/PlayerBase.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="224">
<caret line="187" column="9" lean-forward="false" selection-start-line="187" selection-start-column="9" selection-end-line="187" selection-end-column="9" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file:///usr/local/include/Player/PlayerBase.h" />
<entry file="file://$PROJECT_DIR$/src/media.h"> <entry file="file://$PROJECT_DIR$/src/media.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473"> <state relative-caret-position="1292">
<caret line="76" column="52" lean-forward="false" selection-start-line="76" selection-start-column="52" selection-end-line="76" selection-end-column="52" /> <caret line="76" column="52" selection-start-line="76" selection-start-column="52" selection-end-line="76" selection-end-column="52" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/proxyplayer.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="24" selection-end-column="3" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/common.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="82" column="18" lean-forward="false" selection-start-line="82" selection-start-column="18" selection-end-line="82" selection-end-column="18" />
<folding>
<element signature="e#1238#1257#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/httpdownloader.cpp"> <entry file="file://$PROJECT_DIR$/src/httpdownloader.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242"> <state relative-caret-position="986">
<caret line="58" column="98" lean-forward="false" selection-start-line="58" selection-start-column="98" selection-end-line="58" selection-end-column="98" /> <caret line="58" column="1" selection-start-line="58" selection-start-column="1" selection-end-line="58" selection-end-column="1" />
<folding> <folding>
<element signature="e#1238#1265#0" expanded="true" /> <element signature="e#1238#1265#0" expanded="true" />
<marker date="1513154719000" expanded="true" signature="0:1236" ph="/.../" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/media.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="142">
<caret line="71" column="0" lean-forward="false" selection-start-line="71" selection-start-column="0" selection-end-line="71" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/player.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="347">
<caret line="101" column="35" lean-forward="true" selection-start-line="101" selection-start-column="35" selection-end-line="101" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/player.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="179" column="45" lean-forward="false" selection-start-line="179" selection-start-column="25" selection-end-line="179" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/tests/test_all.cpp"> <entry file="file://$PROJECT_DIR$/tests/test_all.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1213"> <state relative-caret-position="285">
<caret line="118" column="19" lean-forward="false" selection-start-line="118" selection-start-column="19" selection-end-line="118" selection-end-column="19" /> <caret line="118" selection-start-line="118" selection-end-line="118" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/common.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="189">
<caret line="109" column="1" selection-start-line="109" selection-start-column="1" selection-end-line="109" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../ZLToolKit/src/Network/TcpClient.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="25" selection-start-line="25" selection-end-line="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../ZLToolKit/src/Network/TcpServer.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="62">
<caret line="27" selection-start-line="27" selection-end-line="27" />
<folding> <folding>
<element signature="e#1237#1258#0" expanded="true" /> <element signature="e#1216#1232#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file:///Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/chrono">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="302" selection-start-line="302" selection-end-line="302" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../ZLToolKit/src/Network/Socket.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="191">
<caret line="25" selection-start-line="25" selection-end-line="25" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../ZLToolKit/src/Network/sockutil.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-20">
<caret line="27" selection-start-line="27" selection-end-line="27" />
<folding>
<element signature="e#1229#1366#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../src/Extension/AAC.cpp">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="250">
<caret line="95" column="27" selection-start-line="95" selection-start-column="27" selection-end-line="95" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/../src/Codec/AACEncoder.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="28" selection-start-line="28" selection-end-line="28" />
<folding>
<element signature="e#1258#1276#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file:///Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-89">
<caret line="93" column="14" selection-start-line="93" selection-start-column="14" selection-end-line="93" selection-end-column="14" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/common.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="353">
<caret line="114" lean-forward="true" selection-start-line="114" selection-end-line="114" />
<folding>
<element signature="e#1324#1488#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/flvrecorder.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="19" selection-start-line="5" selection-start-column="19" selection-end-line="5" selection-end-column="19" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/proxyplayer.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="27" column="16" selection-start-line="27" selection-start-column="16" selection-end-line="27" selection-end-column="16" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/media.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="268">
<caret line="93" lean-forward="true" selection-start-line="93" selection-end-line="93" />
<folding>
<element signature="e#1238#1256#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/player.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="267">
<caret line="72" column="26" selection-start-line="72" selection-start-column="26" selection-end-line="72" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/player.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="412">
<caret line="101" column="35" selection-start-line="101" selection-start-column="35" selection-end-line="101" selection-end-column="35" />
</state>
</provider>
</entry>
</component> </component>
</project> </project>

View File

@ -106,6 +106,7 @@ onceToken token1([](){
#define REALM "realm_zlmedaikit" #define REALM "realm_zlmedaikit"
static onceToken s_token([](){ static onceToken s_token([](){
//监听kBroadcastOnGetRtspRealm事件决定rtsp链接是否需要鉴权(传统的rtsp鉴权方案)才能访问
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastOnGetRtspRealm,[](BroadcastOnGetRtspRealmArgs){ NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastOnGetRtspRealm,[](BroadcastOnGetRtspRealmArgs){
if(string("1") == args._streamid ){ if(string("1") == args._streamid ){
// live/1需要认证 // live/1需要认证
@ -123,6 +124,7 @@ static onceToken s_token([](){
} }
}); });
//监听kBroadcastOnRtspAuth事件返回正确的rtsp鉴权用户密码
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastOnRtspAuth,[](BroadcastOnRtspAuthArgs){ NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastOnRtspAuth,[](BroadcastOnRtspAuthArgs){
InfoL << "用户:" << user_name << (must_no_encrypt ? " Base64" : " MD5" )<< " 方式登录"; InfoL << "用户:" << user_name << (must_no_encrypt ? " Base64" : " MD5" )<< " 方式登录";
string user = user_name; string user = user_name;
@ -153,7 +155,8 @@ static onceToken s_token([](){
}); });
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastRtmpPublish,[](BroadcastRtmpPublishArgs){ //监听rtsp/rtmp推流事件返回结果告知是否有推流权限
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastMediaPublish,[](BroadcastMediaPublishArgs){
InfoL << args._vhost << " " << args._app << " " << args._streamid << " " << args._param_strs ; InfoL << args._vhost << " " << args._app << " " << args._streamid << " " << args._param_strs ;
EventPoller::Instance().async([invoker](){ EventPoller::Instance().async([invoker](){
invoker("");//鉴权成功 invoker("");//鉴权成功
@ -161,6 +164,7 @@ static onceToken s_token([](){
}); });
}); });
//监听rtsp/rtsps/rtmp/http-flv播放事件返回结果告知是否有播放权限(rtsp通过kBroadcastOnRtspAuth或此事件都可以实现鉴权)
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastMediaPlayed,[](BroadcastMediaPlayedArgs){ NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastMediaPlayed,[](BroadcastMediaPlayedArgs){
InfoL << args._schema << " " << args._vhost << " " << args._app << " " << args._streamid << " " << args._param_strs ; InfoL << args._schema << " " << args._vhost << " " << args._app << " " << args._streamid << " " << args._param_strs ;
EventPoller::Instance().async([invoker](){ EventPoller::Instance().async([invoker](){
@ -169,6 +173,7 @@ static onceToken s_token([](){
}); });
}); });
//shell登录事件通过shell可以登录进服务器执行一些命令
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastShellLogin,[](BroadcastShellLoginArgs){ NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastShellLogin,[](BroadcastShellLoginArgs){
InfoL << "shell login:" << user_name << " " << passwd; InfoL << "shell login:" << user_name << " " << passwd;
EventPoller::Instance().async([invoker](){ EventPoller::Instance().async([invoker](){
@ -177,7 +182,7 @@ static onceToken s_token([](){
}); });
}); });
//此处用于测试rtmp保存为flv录像保存在http根目录下 //监听rtsp、rtmp源注册或注销事件此处用于测试rtmp保存为flv录像保存在http根目录下
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastMediaChanged,[](BroadcastMediaChangedArgs){ NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastMediaChanged,[](BroadcastMediaChangedArgs){
if(schema == RTMP_SCHEMA && app == "live"){ if(schema == RTMP_SCHEMA && app == "live"){
static map<string,FlvRecorder::Ptr> s_mapFlvRecorder; static map<string,FlvRecorder::Ptr> s_mapFlvRecorder;
@ -199,6 +204,23 @@ static onceToken s_token([](){
} }
}); });
//监听播放失败(未找到特定的流)事件
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastNotFoundStream,[](BroadcastNotFoundStreamArgs){
/**
*
* ZLMediaKit会把其立即转发给播放器(55)
*/
DebugL << "未找到流:" << args._vhost << " " << args._app << " " << args._streamid << " " << args._param_strs ;
});
//监听播放或推流结束时消耗流量事件
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastFlowReport,[](BroadcastFlowReportArgs){
DebugL << "播放器(推流器)断开连接:" << args._vhost << " " << args._app << " " << args._streamid << " " << args._param_strs
<< "\r\n使用流量:" << totalBytes << " bytes,连接时长:" << totalDuration << "" ;
});
}, nullptr); }, nullptr);