קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Android כולל ממשקי API שמאפשרים לאפליקציות לשנות את הגדרות התצוגה בחומרה נתמכת. ב-Android TV OS, אפליקציות יכולות לנצל את התכונה הזו כדי להבטיח שהתוכן יוצג בפורמט הטוב ביותר האפשרי, על ידי התאמה של קצב הפריימים ופרופיל הצבעים לחוויית צפייה אופטימלית.
התאמת התוכן לקצב הפריימים
אם קצב הפריימים של סרטון לא תואם לקצב הרענון של המסך,
המשתמשים עלולים לחוות תופעות לא נעימות של תנועה קופצנית כתוצאה מהמרת קצב הפריימים. הדבר בולט במיוחד בצילומי פנינג איטיים. לכן חשוב להשתמש ב-API SurfaceControl.Transaction.setFrameRate() כדי להודיע למסגרת על קצב הפריימים של התוכן, וכדי לציין אם תוכן הסרטון עומד בדרישות להחלפה לא חלקה של קצב הפריימים.
MediaQuality API ב-Android 16 מאפשר למפתחים לשלוט בפרופילים של תמונות.
דוגמאות לתרחישים:
בסרטים ובסדרות טלוויזיה שעברו מאסטרינג עם טווח דינמי רחב יותר,
יכול להיות שמפתחים יבקשו להשתמש במצב Filmmaker כדי להציג את התוכן בצורה מדויקת, כפי שהיוצרים התכוונו שהוא ייראה. פרופיל קולנוע עם דיוק צבעים גבוה יותר
מבליט פרטים עדינים בצללים במקום להגביר את הבהירות.
אירועי ספורט בשידור חי, שלרוב עוברים מאסטרינג עם טווח דינמי צר ונצפים באור יום, יכולים להרוויח מפרופיל שנותן עדיפות לבהירות על פני דיוק צבעים.
מפתחי משחקים יכולים לבקש פרופיל עם זמן אחזור נמוך ועיבוד תמונה מינימלי, כדי שהשחקנים יוכלו להפיק את הביצועים הכי טובים מהמסך שלהם.
בחירת תמונת פרופיל מהמערכת
לפני שבוחרים תמונת פרופיל, חשוב לוודא שהמכשיר תומך בה.
בדוגמה הבאה אפשר לראות איך משתמשים ב-getAvailablePictureProfiles() כדי לשלוח שאילתה לכל פרופילי התמונות הנתמכים ולהחיל פרופיל ספורט:
if(Build.VERSION.SDK_INT>=Build.VERSION_CODES.BAKLAVA){valmediaQualityManager:MediaQualityManager=context.getSystemService(MediaQualityManager::class.java)valprofiles=mediaQualityManager.getAvailablePictureProfiles(null)for(profileinprofiles){// If we have a system sports profile, apply it to our media codecif(profile.profileType==PictureProfile.TYPE_SYSTEM && profile.name==NAME_SPORTS){valbundle=Bundle().apply{putParcelable(MediaFormat.KEY_PICTURE_PROFILE_INSTANCE,profile)}mediaCodec.setParameters(bundle)}}}
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-09-03 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-09-03 (שעון UTC)."],[],[],null,["Android includes APIs that allow apps to adjust display settings on supported\nhardware. On Android TV OS, apps can take advantage of this to ensure that\ncontent displays in the best possible format, by matching the framerate and\ncolor profile for the ideal watching experience.\n\nMatch content frame rate\n\nWhen the framerate of a video doesn't match the refresh rate of the display,\nusers can experience unpleasant motion judder artifacts from frame rate\nconversion. This is especially visible during slow panning shots. For this\nreason, it's important to use the\n[`SurfaceControl.Transaction.setFrameRate()`](/training/tv/playback/(/reference/android/view/SurfaceControl.Transaction#setFrameRate(android.view.SurfaceControl,%20float,%20int,%20int)))\nAPI to notify the framework about the frame rate of the content and to signal\nwhether the video content is eligible for a non-seamless\n[frame rate switch](/guide/topics/media/frame-rate#non-seamless).\n\nFor more information, read the [frame rate guide](/guide/topics/media/frame-rate).\n\nMatch preferred picture profiles\n\nThe MediaQuality API in Android 16 allows developers to take control over\npicture profiles.\n\nSome example scenarios include:\n\n- For movies and TV series that are mastered with a wider dynamic range, developers might request Filmmaker mode to accurately display content as the creator intended for it to look. A cinema profile with greater color accuracy brings out subtle details in shadows in favor of increasing brightness.\n- Live sporting events, which are often mastered with a narrow dynamic range and watched in the daylight, can benefit from a profile that gives preference to brightness over color accuracy.\n- Game developers can request a low latency profile with minimal image processing so players can get the best performance from their display.\n\n| **Note:** OEMs may add additional presets and provide mechanisms for users to define their own picture profiles. This implementation uses the [`createPictureProfile()`](/reference/android/media/quality/MediaQualityManager#createPictureProfile(android.media.quality.PictureProfile)) method that requires a system permission.\n\nSelecting a system picture profile\n\nBefore selecting a picture profile, it's important to first validate that the\ndevice supports it.\n\nThe following snippet shows how to use\n[`getAvailablePictureProfiles()`](/reference/android/media/quality/MediaQualityManager#getAvailablePictureProfiles(android.media.quality.MediaQualityManager.ProfileQueryParams)) to query all\nsupported picture profiles and apply a sports profile: \n\n if (Build.VERSION.SDK_INT \u003e= Build.VERSION_CODES.BAKLAVA) {\n val mediaQualityManager: MediaQualityManager =\n context.getSystemService(MediaQualityManager::class.java)\n val profiles = mediaQualityManager.getAvailablePictureProfiles(null)\n for (profile in profiles) {\n // If we have a system sports profile, apply it to our media codec\n if (profile.profileType == PictureProfile.TYPE_SYSTEM\n && profile.name == NAME_SPORTS\n ) {\n val bundle = Bundle().apply { \n putParcelable(MediaFormat.KEY_PICTURE_PROFILE_INSTANCE, profile)\n }\n mediaCodec.setParameters(bundle)\n }\n }\n }\n\nTo obtain a specific profile by name, use [`getPictureProfile()`](/reference/android/media/quality/MediaQualityManager#getPictureProfile(int,%20java.lang.String,%20android.media.quality.MediaQualityManager.ProfileQueryParams)): \n\n if (Build.VERSION.SDK_INT \u003e= Build.VERSION_CODES.BAKLAVA) {\n val profile = mediaQualityManager.getPictureProfile(\n PictureProfile.TYPE_SYSTEM, NAME_SPORTS, null)\n }\n\nIf you don't need to query whether a profile is available, profiles can be\nprovided directly by their ID to a MediaCodec by using\n`MediaFormat.KEY_PICTURE_PROFILE_INSTANCE`.\n\nWhile supported profiles may differ by device, you may consider matching against\nthe following known system profile IDs: \n\n const val NAME_STANDARD: String = \"standard\"\n const val NAME_VIVID: String = \"vivid\"\n const val NAME_SPORTS: String = \"sports\"\n const val NAME_GAME: String = \"game\"\n const val NAME_MOVIE: String = \"movie\"\n const val NAME_ENERGY_SAVING: String = \"energy_saving\"\n const val NAME_USER: String = \"user\"\n\n| **Note:** These strings are provided as recommendations to OEMs and are subject to change in future API levels."]]