Commit f5a11ea7 authored by 林生雨's avatar 林生雨

commit

parent 30fd4309
...@@ -8,10 +8,6 @@ ...@@ -8,10 +8,6 @@
<list default="true" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" name="Default Changelist" comment=""> <list default="true" id="5be6bbb5-7d6e-4540-a24f-d2b3bf78b3ba" 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$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/example/ios/.symlinks/plugins/gengmei_flutter_plugin/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumModel.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/lib/AlbumModel/repository/AlbumRepository.dart" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m" beforeDir="false" afterPath="$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/.dart_tool/" /> <ignored path="$PROJECT_DIR$/.dart_tool/" />
<ignored path="$PROJECT_DIR$/.idea/" /> <ignored path="$PROJECT_DIR$/.idea/" />
...@@ -48,7 +44,7 @@ ...@@ -48,7 +44,7 @@
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor" />
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart"> <entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/page/album/AlbumPage.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="871"> <state relative-caret-position="871">
...@@ -72,6 +68,18 @@ ...@@ -72,6 +68,18 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="95">
<caret line="26" column="41" selection-start-line="26" selection-start-column="41" selection-end-line="26" selection-end-column="41" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$USER_HOME$/Downloads/flutter/packages/flutter/lib/src/services/platform_channel.dart"> <entry file="file://$USER_HOME$/Downloads/flutter/packages/flutter/lib/src/services/platform_channel.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
...@@ -93,15 +101,6 @@ ...@@ -93,15 +101,6 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/SharedPlugin.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="18" column="39" selection-start-line="18" selection-start-column="28" selection-end-line="18" selection-end-column="39" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m"> <entry file="file://$PROJECT_DIR$/ios/Classes/GengmeiFlutterPlugin.m">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
...@@ -250,11 +249,6 @@ ...@@ -250,11 +249,6 @@
<item name="AlbumModel" type="462c0819:PsiDirectoryNode" /> <item name="AlbumModel" type="462c0819:PsiDirectoryNode" />
<item name="repository" type="462c0819:PsiDirectoryNode" /> <item name="repository" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path>
<item name="gengmei_flutter_plugin" type="b2602c69:ProjectViewProjectNode" />
<item name="gengmei_flutter_plugin" type="462c0819:PsiDirectoryNode" />
<item name="lib" type="462c0819:PsiDirectoryNode" />
</path>
</expand> </expand>
<select /> <select />
</subPane> </subPane>
...@@ -305,9 +299,8 @@ ...@@ -305,9 +299,8 @@
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="9" y="23" width="1440" height="811" extended-state="6" /> <frame x="9" y="23" width="1440" height="811" extended-state="6" />
<editor active="true" />
<layout> <layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.19742489" /> <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.19742489" />
<window_info id="Captures" order="1" side_tool="true" /> <window_info id="Captures" order="1" side_tool="true" />
<window_info id="Structure" order="2" side_tool="true" /> <window_info id="Structure" order="2" side_tool="true" />
<window_info id="Image Layers" order="3" /> <window_info id="Image Layers" order="3" />
...@@ -322,7 +315,7 @@ ...@@ -322,7 +315,7 @@
<window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" /> <window_info anchor="bottom" id="Android Profiler" order="3" show_stripe_button="false" />
<window_info anchor="bottom" id="Logcat" order="4" weight="0.4534075" /> <window_info anchor="bottom" id="Logcat" order="4" weight="0.4534075" />
<window_info anchor="bottom" id="Debug" order="5" /> <window_info anchor="bottom" id="Debug" order="5" />
<window_info anchor="bottom" id="Terminal" order="6" visible="true" weight="0.30458972" /> <window_info active="true" anchor="bottom" id="Terminal" order="6" visible="true" weight="0.6175243" />
<window_info anchor="bottom" id="Event Log" order="7" side_tool="true" /> <window_info anchor="bottom" id="Event Log" order="7" side_tool="true" />
<window_info anchor="bottom" id="Flutter Performance" order="8" side_tool="true" /> <window_info anchor="bottom" id="Flutter Performance" order="8" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="9" /> <window_info anchor="bottom" id="Version Control" order="9" />
...@@ -525,16 +518,6 @@ ...@@ -525,16 +518,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="440">
<caret line="26" column="41" selection-start-line="26" selection-start-column="41" selection-end-line="26" selection-end-column="41" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/SharedPlugin.dart"> <entry file="file://$PROJECT_DIR$/lib/SharedPlugin.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330"> <state relative-caret-position="330">
...@@ -562,16 +545,6 @@ ...@@ -562,16 +545,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352">
<caret line="19" column="71" selection-start-line="19" selection-start-column="10" selection-end-line="19" selection-end-column="71" />
<folding>
<element signature="e#45#86#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/LiveData.dart"> <entry file="file://$PROJECT_DIR$/example/lib/AlbumModel/LiveData.dart">
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor" />
</entry> </entry>
...@@ -605,5 +578,25 @@ ...@@ -605,5 +578,25 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/ScanImagePlugn.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352">
<caret line="19" column="71" selection-start-line="19" selection-start-column="10" selection-end-line="19" selection-end-column="71" />
<folding>
<element signature="e#45#86#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/lib/gengmei_flutter_plugin.dart">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="95">
<caret line="26" column="41" selection-start-line="26" selection-start-column="41" selection-end-line="26" selection-end-column="41" />
<folding>
<element signature="e#0#20#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -554,10 +554,10 @@ NSString *cacheDirectory; ...@@ -554,10 +554,10 @@ NSString *cacheDirectory;
-(void) saveItemAndUpload:(NSMutableDictionary*)queryItemDict :(PHAsset*)assets :(NSString*)tmpPath :(NSString*)docName :(long)resultId{ -(void) saveItemAndUpload:(NSMutableDictionary*)queryItemDict :(PHAsset*)assets :(NSString*)tmpPath :(NSString*)docName :(long)resultId{
NSLog(@"RUNNING THREAD %@",[NSThread currentThread]); NSLog(@"RUNNING THREAD %@",[NSThread currentThread]);
self.nowSize++;
[self.scanMap setObject:assets forKey:tmpPath];
NSMutableArray * arr=self.finalMap[docName];
@synchronized (self) { @synchronized (self) {
self.nowSize++;
[self.scanMap setObject:assets forKey:tmpPath];
NSMutableArray * arr=self.finalMap[docName];
if (arr==nil) { if (arr==nil) {
self.finalMap[docName]=[NSMutableArray array]; self.finalMap[docName]=[NSMutableArray array];
[self.finalMap[docName] addObject:queryItemDict]; [self.finalMap[docName] addObject:queryItemDict];
...@@ -565,32 +565,33 @@ NSString *cacheDirectory; ...@@ -565,32 +565,33 @@ NSString *cacheDirectory;
[self.finalMap[docName] addObject:queryItemDict]; [self.finalMap[docName] addObject:queryItemDict];
} }
[self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict]; [self.finalMap[@"IsGengmeiAlbumAllImages"] addObject:queryItemDict];
NSLog(@"SCARE SIZEEE %d %d ",self.nowSize,self.needSize); }
if(self.needSize>200){ NSLog(@"SCARE SIZEEE %d %d ",self.nowSize,self.needSize);
if(self.nowSize<=201){ if(self.needSize>200){
NSMutableArray * arr=self.finalMapTemp[docName]; if(self.nowSize<=201){
if (arr==nil) { NSMutableArray * arr=self.finalMapTemp[docName];
self.finalMapTemp[docName]=[NSMutableArray array]; if (arr==nil) {
[self.finalMapTemp[docName] addObject:queryItemDict]; self.finalMapTemp[docName]=[NSMutableArray array];
}else{ [self.finalMapTemp[docName] addObject:queryItemDict];
[self.finalMapTemp[docName] addObject:queryItemDict]; }else{
} [self.finalMapTemp[docName] addObject:queryItemDict];
[self.finalMapTemp[@"IsGengmeiAlbumAllImages"] insertObject:queryItemDict atIndex:self.nowSize-1];
}
if(self.nowSize==201){
[self reslutImg:resultId];
}else if(self.nowSize==self.needSize){
self.finishScanImg=true;
[self upImgs];
}
}else{
if (self.nowSize==self.needSize) {
self.finishScanImg=true;
[self reslutImg:resultId];
self.finalMap=[self.finalMapTemp mutableCopy];
} }
[self.finalMapTemp[@"IsGengmeiAlbumAllImages"] insertObject:queryItemDict atIndex:self.nowSize-1];
}
if(self.nowSize==201){
[self reslutImg:resultId];
}else if(self.nowSize==self.needSize){
self.finishScanImg=true;
[self upImgs];
}
}else{
if (self.nowSize==self.needSize) {
self.finishScanImg=true;
[self reslutImg:resultId];
self.finalMap=[self.finalMapTemp mutableCopy];
} }
} }
} }
-(void) copyImg:(long)resultId{ -(void) copyImg:(long)resultId{
...@@ -660,15 +661,15 @@ NSString *cacheDirectory; ...@@ -660,15 +661,15 @@ NSString *cacheDirectory;
} }
[[PHImageManager defaultManager]requestAVAssetForVideo:assets options:options resultHandler:^(AVAsset * _Nullable asset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) { [[PHImageManager defaultManager]requestAVAssetForVideo:assets options:options resultHandler:^(AVAsset * _Nullable asset, AVAudioMix * _Nullable audioMix, NSDictionary * _Nullable info) {
//疑问 为什么不切换到对应的线程。。 //疑问 为什么不切换到对应的线程。。
// dispatch_async(queue, ^{ dispatch_async(queue, ^{
AVURLAsset *urlAsset = (AVURLAsset *)asset; AVURLAsset *urlAsset = (AVURLAsset *)asset;
NSMutableDictionary* queryItemDict = [NSMutableDictionary dictionary]; NSMutableDictionary* queryItemDict = [NSMutableDictionary dictionary];
[queryItemDict setObject:[self getVideoDuring:urlAsset.duration] forKey:@"during"]; [queryItemDict setObject:[self getVideoDuring:urlAsset.duration] forKey:@"during"];
[queryItemDict setObject:tmpPath forKey:@"path"]; [queryItemDict setObject:tmpPath forKey:@"path"];
[queryItemDict setObject:@"T" forKey:@"isVideo"]; [queryItemDict setObject:@"T" forKey:@"isVideo"];
[queryItemDict setObject:[NSString stringWithFormat:@"%ld", (long)[assets.creationDate timeIntervalSince1970]*1000] forKey:@"dataToken"]; [queryItemDict setObject:[NSString stringWithFormat:@"%ld", (long)[assets.creationDate timeIntervalSince1970]*1000] forKey:@"dataToken"];
[self saveItemAndUpload:queryItemDict :assets :tmpPath :docName :resultId]; [self saveItemAndUpload:queryItemDict :assets :tmpPath :docName :resultId];
// }); });
}]; }];
}]; }];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment