日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

android HDMI 清晰度 分辨率

發布時間:2025/3/14 编程问答 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android HDMI 清晰度 分辨率 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

?

但改變分辨率時,發送廣播即可:

?? ?Intent intent_outputmode_change = new Intent(ACTION_OUTPUTMODE_CHANGE);
??? ?intent_outputmode_change.putExtra(OUTPUT_MODE, outputmode_entries_logic);
??? ?intent_outputmode_change.putExtra("cvbs_mode", 1/0);?????
?????this.getContext().sendBroadcast(intent_outputmode_change);

?

import android.content.Context; import android.content.Intent; import android.util.Log;public class DisplayUtil {private final static String ACTION_OUTPUTMODE_CHANGE = "android.intent.action.OUTPUTMODE_CHANGE"; private final static String OUTPUT_MODE = "output_mode";private final static String ACTION_OUTPUTMODE_SAVE = "android.intent.action.OUTPUTMODE_SAVE";private final static String ACTION_OUTPUTPOSITION_CHANGE = "android.intent.action.OUTPUTPOSITION_CHANGE";private final static String ACTION_OUTPUTPOSITION_SAVE = "android.intent.action.OUTPUTPOSITION_SAVE";private final static String ACTION_OUTPUTPOSITION_DEFAULT_SAVE = "android.intent.action.OUTPUTPOSITION_DEFAULT_SAVE";private final static String OUTPUT_POSITION_X = "output_position_x";private final static String OUTPUT_POSITION_Y = "output_position_y";private final static String OUTPUT_POSITION_W = "output_position_w";private final static String OUTPUT_POSITION_H = "output_position_h";private final static String OUTPUT_POSITION_MODE = "output_position_mode";private static final String TAG = "======";public static void setOutputMode(Context c, String mode) {Intent intent_outputmode_change = new Intent(ACTION_OUTPUTMODE_CHANGE);intent_outputmode_change.putExtra(OUTPUT_MODE, mode);intent_outputmode_change.putExtra("cvbs_mode", 0);c.sendBroadcast(intent_outputmode_change);Intent intent_outputmode_save = new Intent(ACTION_OUTPUTMODE_SAVE);intent_outputmode_save.putExtra(OUTPUT_MODE, mode);c.sendBroadcast(intent_outputmode_save);}public static void setPosition(Context context, int l, int t, int r, int b,int mode) {Intent intent_output_position = new Intent(ACTION_OUTPUTPOSITION_CHANGE);intent_output_position.putExtra(OUTPUT_POSITION_X, l);intent_output_position.putExtra(OUTPUT_POSITION_Y, t);intent_output_position.putExtra(OUTPUT_POSITION_W, r);intent_output_position.putExtra(OUTPUT_POSITION_H, b);intent_output_position.putExtra(OUTPUT_POSITION_MODE, mode);context.sendBroadcast(intent_output_position);// savePosition(context, l,t,r,b); Log.i(TAG, "--------------------------------position Set");Log.d(TAG, "--------------------------------set display axis x = " + l);Log.d(TAG, "--------------------------------set display axis y = " + t);Log.d(TAG, "--------------------------------set display axis width = " + r);Log.d(TAG, "--------------------------------set display axis height = " + b);}public static void savePosition(Context context, int left, int top,int width, int height) {Intent intent_output_position = new Intent(ACTION_OUTPUTPOSITION_SAVE);intent_output_position.putExtra(OUTPUT_POSITION_X, left);intent_output_position.putExtra(OUTPUT_POSITION_Y, top);intent_output_position.putExtra(OUTPUT_POSITION_W, width);intent_output_position.putExtra(OUTPUT_POSITION_H, height);context.sendBroadcast(intent_output_position); // Log.i(TAG, "--------------------------------position Set"); // Log.d(TAG, "--------------------------------set display axis x = " + x); // Log.d(TAG, "--------------------------------set display axis y = " + y); // Log.d(TAG, "--------------------------------set display axis width = " + position_cur.width); // Log.d(TAG, "--------------------------------set display axis height = " + position_cur.height); }public static void savePositionDefault(Context context) {Intent intent_output_position = new Intent(ACTION_OUTPUTPOSITION_DEFAULT_SAVE);context.sendBroadcast(intent_output_position);}} View Code

?

分辨率顯示outputmode_entries_display和取值outputmode_entries_logic:

<!-- Display settings.? The type of output mode to show. -->
????? <string-array name="outputmode_entries_display">
????????? <item>480P</item>
????????? <item>576P</item>
????????? <item>720P 60HZ</item>
????????? <item>1080I 60HZ</item>
????????? <item>1080P 60HZ</item>
????????? <item>720P 50HZ</item>
????????? <item>1080I 50HZ</item>
????? </string-array>
????? <string-array name="outputmode_entries_logic">
????????? <item>480p</item>
????????? <item>576p</item>
????????? <item>720p</item>
????????? <item>1080i</item>
????????? <item>1080p</item>
????????? <item>720p50hz</item>
????????? <item>1080i50hz</item>
????? </string-array>
?????

????? ?<receiver android:name="net.sunniwell.settings.sdzx.content.OutputSettingsBroadcastReceiver">
?????????? <intent-filter>
?????????????? <action android:name="android.intent.action.BOOT_COMPLETED"/>
?????????????? <action android:name="android.intent.action.OUTPUTMODE_CHANGE"/>
?????????????? <action android:name="android.intent.action.OUTPUTMODE_CANCEL"/>
?????????????? <action android:name="android.intent.action.OUTPUTMODE_SAVE"/>
?????????????? <action android:name="android.intent.action.OUTPUTPOSITION_CHANGE"/>
?????????????? <action android:name="android.intent.action.OUTPUTPOSITION_CANCEL"/>
?????????????? <action android:name="android.intent.action.OUTPUTPOSITION_SAVE"/>
?????????????? <action android:name="android.intent.action.OUTPUTPOSITION_DEFAULT_SAVE"/>
?????????????? <action android:name="android.intent.action.DISP_CHANGE"/>
?????????????? <action android:name="android.intent.action.REALVIDEO_ON"/>
?????????????? <action android:name="android.intent.action.REALVIDEO_OFF"/>
?????????????? <action android:name="android.intent.action.VIDEOPOSITION_CHANGE"/>
?????????????? <action android:name="android.intent.action.CVBSMODE_CHANGE"/>
?????????? </intent-filter>
??????? </receiver>

?

如果setting沒帶處理,需要自己做:

settings源碼的文件:

OutputSettingsBroadcastReceiver.java 改變分辨率。

HDMICheckHandler.java 自動檢測hdmi最佳分辨率。

?

位置坐標文件,實現屏幕放大,縮小: /sys/class/ppmgr/ppscaler_rect: x:58,y:29,w:1280,h:720

分辨率文件: /sys/class/display/mode : 1080p

轉載于:https://www.cnblogs.com/bigben0123/p/4679274.html

總結

以上是生活随笔為你收集整理的android HDMI 清晰度 分辨率的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。