Loading apex/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,8 @@ apex_defaults { "mediaswcodec", ], native_shared_libs: [ "libcodec2_hidl@1.0", "libcodec2_hidl@1.1", "libstagefright_foundation", ], prebuilts: [ Loading media/libmediatranscoding/TranscodingClientManager.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,15 @@ bool TranscodingClientManager::isTrustedCaller(pid_t pid, uid_t uid) { status_t TranscodingClientManager::addClient( const std::shared_ptr<ITranscodingClientCallback>& callback, const std::string& clientName, const std::string& opPackageName, std::shared_ptr<ITranscodingClient>* outClient) { int32_t callingPid = AIBinder_getCallingPid(); int32_t callingUid = AIBinder_getCallingUid(); // Check if client has the permission if (!isTrustedCaller(callingPid, callingUid)) { ALOGE("addClient rejected (clientPid %d, clientUid %d)", callingPid, callingUid); return IMediaTranscodingService::ERROR_PERMISSION_DENIED; } // Validate the client. if (callback == nullptr || clientName.empty() || opPackageName.empty()) { ALOGE("Invalid client"); Loading media/libstagefright/bqhelper/tests/Android.bp +6 −4 Original line number Diff line number Diff line Loading @@ -9,17 +9,19 @@ package { cc_test { name: "FrameDropper_test", test_suites: ["device-tests"], test_suites: [ "device-tests", "mts", ], srcs: ["FrameDropper_test.cpp"], shared_libs: [ "libstagefright_bufferqueue_helper", "libutils", ], cflags: [ "-Werror", "-Wall", ], compile_multilib: "first", } media/libstagefright/include/media/stagefright/MediaCodecConstants.h +9 −1 Original line number Diff line number Diff line Loading @@ -753,7 +753,7 @@ constexpr char KEY_CA_SESSION_ID[] = "ca-session-id"; constexpr char KEY_CA_SYSTEM_ID[] = "ca-system-id"; constexpr char KEY_CA_PRIVATE_DATA[] = "ca-private-data"; constexpr char KEY_CAPTURE_RATE[] = "capture-rate"; constexpr char KEY_CHANNEL_COUNT[] = "channel-count"; constexpr char KEY_CHANNEL_COUNT[] = "channel-count"; // value N, eq to range 1..N constexpr char KEY_CHANNEL_MASK[] = "channel-mask"; constexpr char KEY_COLOR_FORMAT[] = "color-format"; constexpr char KEY_COLOR_RANGE[] = "color-range"; Loading Loading @@ -808,6 +808,14 @@ constexpr char KEY_TEMPORAL_LAYERING[] = "ts-schema"; constexpr char KEY_TILE_HEIGHT[] = "tile-height"; constexpr char KEY_TILE_WIDTH[] = "tile-width"; constexpr char KEY_TRACK_ID[] = "track-id"; constexpr char KEY_VIDEO_QP_B_MAX[] = "video-qp-b-max"; constexpr char KEY_VIDEO_QP_B_MIN[] = "video-qp-b-min"; constexpr char KEY_VIDEO_QP_I_MAX[] = "video-qp-i-max"; constexpr char KEY_VIDEO_QP_I_MIN[] = "video-qp-i-min"; constexpr char KEY_VIDEO_QP_MAX[] = "video-qp-max"; constexpr char KEY_VIDEO_QP_MIN[] = "video-qp-min"; constexpr char KEY_VIDEO_QP_P_MAX[] = "video-qp-p-max"; constexpr char KEY_VIDEO_QP_P_MIN[] = "video-qp-p-min"; constexpr char KEY_WIDTH[] = "width"; // from MediaCodec.java Loading media/ndk/Android.bp +5 −1 Original line number Diff line number Diff line Loading @@ -276,5 +276,9 @@ cc_library_static { }, }, apex_available: ["com.android.media"], apex_available: [ "//apex_available:platform", "com.android.media", "com.android.media.swcodec", ], } Loading
apex/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,8 @@ apex_defaults { "mediaswcodec", ], native_shared_libs: [ "libcodec2_hidl@1.0", "libcodec2_hidl@1.1", "libstagefright_foundation", ], prebuilts: [ Loading
media/libmediatranscoding/TranscodingClientManager.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,15 @@ bool TranscodingClientManager::isTrustedCaller(pid_t pid, uid_t uid) { status_t TranscodingClientManager::addClient( const std::shared_ptr<ITranscodingClientCallback>& callback, const std::string& clientName, const std::string& opPackageName, std::shared_ptr<ITranscodingClient>* outClient) { int32_t callingPid = AIBinder_getCallingPid(); int32_t callingUid = AIBinder_getCallingUid(); // Check if client has the permission if (!isTrustedCaller(callingPid, callingUid)) { ALOGE("addClient rejected (clientPid %d, clientUid %d)", callingPid, callingUid); return IMediaTranscodingService::ERROR_PERMISSION_DENIED; } // Validate the client. if (callback == nullptr || clientName.empty() || opPackageName.empty()) { ALOGE("Invalid client"); Loading
media/libstagefright/bqhelper/tests/Android.bp +6 −4 Original line number Diff line number Diff line Loading @@ -9,17 +9,19 @@ package { cc_test { name: "FrameDropper_test", test_suites: ["device-tests"], test_suites: [ "device-tests", "mts", ], srcs: ["FrameDropper_test.cpp"], shared_libs: [ "libstagefright_bufferqueue_helper", "libutils", ], cflags: [ "-Werror", "-Wall", ], compile_multilib: "first", }
media/libstagefright/include/media/stagefright/MediaCodecConstants.h +9 −1 Original line number Diff line number Diff line Loading @@ -753,7 +753,7 @@ constexpr char KEY_CA_SESSION_ID[] = "ca-session-id"; constexpr char KEY_CA_SYSTEM_ID[] = "ca-system-id"; constexpr char KEY_CA_PRIVATE_DATA[] = "ca-private-data"; constexpr char KEY_CAPTURE_RATE[] = "capture-rate"; constexpr char KEY_CHANNEL_COUNT[] = "channel-count"; constexpr char KEY_CHANNEL_COUNT[] = "channel-count"; // value N, eq to range 1..N constexpr char KEY_CHANNEL_MASK[] = "channel-mask"; constexpr char KEY_COLOR_FORMAT[] = "color-format"; constexpr char KEY_COLOR_RANGE[] = "color-range"; Loading Loading @@ -808,6 +808,14 @@ constexpr char KEY_TEMPORAL_LAYERING[] = "ts-schema"; constexpr char KEY_TILE_HEIGHT[] = "tile-height"; constexpr char KEY_TILE_WIDTH[] = "tile-width"; constexpr char KEY_TRACK_ID[] = "track-id"; constexpr char KEY_VIDEO_QP_B_MAX[] = "video-qp-b-max"; constexpr char KEY_VIDEO_QP_B_MIN[] = "video-qp-b-min"; constexpr char KEY_VIDEO_QP_I_MAX[] = "video-qp-i-max"; constexpr char KEY_VIDEO_QP_I_MIN[] = "video-qp-i-min"; constexpr char KEY_VIDEO_QP_MAX[] = "video-qp-max"; constexpr char KEY_VIDEO_QP_MIN[] = "video-qp-min"; constexpr char KEY_VIDEO_QP_P_MAX[] = "video-qp-p-max"; constexpr char KEY_VIDEO_QP_P_MIN[] = "video-qp-p-min"; constexpr char KEY_WIDTH[] = "width"; // from MediaCodec.java Loading
media/ndk/Android.bp +5 −1 Original line number Diff line number Diff line Loading @@ -276,5 +276,9 @@ cc_library_static { }, }, apex_available: ["com.android.media"], apex_available: [ "//apex_available:platform", "com.android.media", "com.android.media.swcodec", ], }