File tree Expand file tree Collapse file tree
src/main/kotlin/com/google/ai/sample/feature/multimodal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,9 +53,6 @@ captures/
5353# External native build folder generated in Android Studio 2.2 and later
5454.externalNativeBuild /
5555
56- # Google Services (e.g. APIs or Firebase)
57- google-services.json
58-
5956# Freeline
6057freeline.py
6158freeline /
Original file line number Diff line number Diff line change 1+ {
2+ "project_info" : {
3+ "project_number" : " 123456789012" ,
4+ "project_id" : " screenoperator" ,
5+ "storage_bucket" : " screenoperator.appspot.com"
6+ },
7+ "client" : [
8+ {
9+ "client_info" : {
10+ "mobilesdk_app_id" : " 1:123456789012:android:abcdef1234567890" ,
11+ "android_client_info" : {
12+ "package_name" : " io.github.android_poweruser"
13+ }
14+ },
15+ "oauth_client" : [],
16+ "api_key" : [
17+ {
18+ "current_key" : " AIzaSyDUMMY_PLACEHOLDER_KEY"
19+ }
20+ ],
21+ "services" : {
22+ "appinvite_service" : {
23+ "other_platform_oauth_client" : []
24+ }
25+ }
26+ }
27+ ],
28+ "configuration_version" : " 1"
29+ }
Original file line number Diff line number Diff line change @@ -165,20 +165,13 @@ private suspend fun uriToBitmap(
165165 }
166166}
167167
168- private fun extractVideoFrame (context : android.content.Context , uri : Uri ): Bitmap ? {
169- val retriever = MediaMetadataRetriever ()
170- return try {
171- retriever.setDataSource(context, uri)
172- retriever.getFrameAtTime(0 )
173- } catch (e: IllegalArgumentException ) {
174- android.util.Log .e(" PhotoReasoningRoute" , " Invalid video URI: $uri " , e)
175- null
176168private fun extractVideoFrame (context : android.content.Context , uri : Uri ): Bitmap ? {
177169 val retriever = MediaMetadataRetriever ()
178170 return try {
179171 retriever.setDataSource(context, uri)
180172 retriever.getFrameAtTime(0 , MediaMetadataRetriever .OPTION_CLOSEST_SYNC )
181173 } catch (e: Exception ) {
174+ android.util.Log .e(" PhotoReasoningRoute" , " Error extracting video frame for URI: $uri " , e)
182175 null
183176 } finally {
184177 retriever.release()
You can’t perform that action at this time.
0 commit comments