Browse Source

添加获取摄像头封面图功能

qiuzijian 3 years ago
parent
commit
07ce73fb85
2 changed files with 12 additions and 18 deletions
  1. 6 9
      .idea/workspace.xml
  2. 6 9
      Modules/Camera/Services/CameraServices.php

+ 6 - 9
.idea/workspace.xml

@@ -2,10 +2,7 @@
 <project version="4">
 <project version="4">
   <component name="ChangeListManager">
   <component name="ChangeListManager">
     <list default="true" id="b5beace6-e4f4-419b-8299-c67e17af5998" name="Default Changelist" comment="">
     <list default="true" id="b5beace6-e4f4-419b-8299-c67e17af5998" name="Default Changelist" comment="">
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Modules/Camera/Enum/CameraEnum.php" beforeDir="false" afterPath="$PROJECT_DIR$/Modules/Camera/Enum/CameraEnum.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/Modules/Camera/Services/CameraServices.php" beforeDir="false" afterPath="$PROJECT_DIR$/Modules/Camera/Services/CameraServices.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/Modules/Camera/Services/CameraServices.php" beforeDir="false" afterPath="$PROJECT_DIR$/Modules/Camera/Services/CameraServices.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/app/Http/Controllers/TestsController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/TestsController.php" afterDir="false" />
     </list>
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="SHOW_DIALOG" value="false" />
@@ -54,8 +51,8 @@
       <file pinned="false" current-in-tab="true">
       <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/Modules/Camera/Services/CameraServices.php">
         <entry file="file://$PROJECT_DIR$/Modules/Camera/Services/CameraServices.php">
           <provider selected="true" editor-type-id="text-editor">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="118">
-              <caret line="816" column="70" selection-start-line="816" selection-start-column="70" selection-end-line="816" selection-end-column="70" />
+            <state relative-caret-position="367">
+              <caret line="828" column="25" selection-start-line="822" selection-start-column="24" selection-end-line="828" selection-end-column="25" />
               <folding>
               <folding>
                 <element signature="e#129#150#0#PHP" expanded="true" />
                 <element signature="e#129#150#0#PHP" expanded="true" />
               </folding>
               </folding>
@@ -440,12 +437,12 @@
       <workItem from="1641785500605" duration="61000" />
       <workItem from="1641785500605" duration="61000" />
       <workItem from="1641786030534" duration="477000" />
       <workItem from="1641786030534" duration="477000" />
       <workItem from="1641800375826" duration="26685000" />
       <workItem from="1641800375826" duration="26685000" />
-      <workItem from="1643085370753" duration="11882000" />
+      <workItem from="1643085370753" duration="12054000" />
     </task>
     </task>
     <servers />
     <servers />
   </component>
   </component>
   <component name="TimeTrackingManager">
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="441933000" />
+    <option name="totallyTimeSpent" value="442105000" />
   </component>
   </component>
   <component name="ToolWindowManager">
   <component name="ToolWindowManager">
     <frame x="0" y="0" width="1440" height="900" extended-state="0" />
     <frame x="0" y="0" width="1440" height="900" extended-state="0" />
@@ -830,8 +827,8 @@
     </entry>
     </entry>
     <entry file="file://$PROJECT_DIR$/Modules/Camera/Services/CameraServices.php">
     <entry file="file://$PROJECT_DIR$/Modules/Camera/Services/CameraServices.php">
       <provider selected="true" editor-type-id="text-editor">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="118">
-          <caret line="816" column="70" selection-start-line="816" selection-start-column="70" selection-end-line="816" selection-end-column="70" />
+        <state relative-caret-position="367">
+          <caret line="828" column="25" selection-start-line="822" selection-start-column="24" selection-end-line="828" selection-end-column="25" />
           <folding>
           <folding>
             <element signature="e#129#150#0#PHP" expanded="true" />
             <element signature="e#129#150#0#PHP" expanded="true" />
           </folding>
           </folding>

+ 6 - 9
Modules/Camera/Services/CameraServices.php

@@ -820,15 +820,12 @@ class CameraServices
                         exec($cover_exec);
                         exec($cover_exec);
 
 
                         //判断图片是否存在
                         //判断图片是否存在
-                        $j = 1;
-                        while ($j <= 3) {
-                            $picture_exists = file_exists(public_path() . '/' . CameraEnum::M3U8_FILE_PATH . '/' . $path . '/' . CameraEnum::COVER_PICTURE_NAME);
-
-                            if ($picture_exists) {
-                                Log::info(111);
-                            } else {
-                                Log::info(222);
-                            }
+                        $picture_exists = file_exists(public_path() . '/' . CameraEnum::M3U8_FILE_PATH . '/' . $path . '/' . CameraEnum::COVER_PICTURE_NAME);
+
+                        if ($picture_exists) {
+                            Log::info(111);
+                        } else {
+                            Log::info(222);
                         }
                         }
                     }
                     }