FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
jack2/android/BnAndroidShm.cpp at develop · jackaudio/jack2 · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
jackaudio
/
jack2
Public
Notifications
You must be signed in to change notification settings
Fork
396
Star
2.4k
Code
Issues
332
Pull requests
38
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
jack2
/
android
/
BnAndroidShm.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
83 lines (74 loc) · 2.7 KB
Breadcrumbs
jack2
/
android
/
BnAndroidShm.cpp
Copy path
File metadata and controls
83 lines (74 loc) · 2.7 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
include
"
BnAndroidShm.h
"
#
include
<
binder/Parcel.h
>
namespace
android
{
status_t
BnAndroidShm::onTransact
(
uint32_t
code,
const
Parcel &data,
Parcel *reply,
uint32_t
flags)
{
switch
(code) {
case
HW_SENDCOMMAND
:{
CHECK_INTERFACE
(IAndroidShm, data, reply);
const
char
*str;
str = data.
readCString
();
reply->
writeInt32
(
sendCommand
(str));
return
NO_ERROR
;
}
break
;
case
HW_GETBUFFER
:{
CHECK_INTERFACE
(IAndroidShm, data, reply);
int32_t
index;
data.
readInt32
(&index);
sp<IMemoryHeap> Data =
getBuffer
(index);
if
(Data !=
NULL
){
reply->
writeStrongBinder
(Data->
asBinder
());
}
return
NO_ERROR
;
}
break
;
case
HW_ALLOC_SHM
:{
CHECK_INTERFACE
(IAndroidShm, data, reply);
int32_t
size;
data.
readInt32
(&size);
reply->
writeInt32
(
allocShm
(size));
return
NO_ERROR
;
}
break
;
case
HW_REMOVE_SHM
:{
CHECK_INTERFACE
(IAndroidShm, data, reply);
int32_t
index;
data.
readInt32
(&index);
reply->
writeInt32
(
removeShm
(index));
return
NO_ERROR
;
}
break
;
case
HW_IS_ALLOCATED
:{
CHECK_INTERFACE
(IAndroidShm, data, reply);
int32_t
index;
data.
readInt32
(&index);
reply->
writeInt32
(
isAllocated
(index));
return
NO_ERROR
;
}
break
;
case
HW_SET_REGISTRY_INDEX
:{
CHECK_INTERFACE
(IAndroidShm, data, reply);
int32_t
index;
data.
readInt32
(&index);
reply->
writeInt32
(
setRegistryIndex
(index));
return
NO_ERROR
;
}
break
;
case
HW_GET_REGISTRY_INDEX
:{
CHECK_INTERFACE
(IAndroidShm, data, reply);
reply->
writeInt32
(
getRegistryIndex
());
return
NO_ERROR
;
}
break
;
case
HW_INIT_SEMAPHORE
:{
CHECK_INTERFACE
(IAndroidShm, data, reply);
const
char
*name;
name = data.
readCString
();
sp<IMemoryHeap> Data =
InitSemaphore
(name);
if
(Data !=
NULL
){
reply->
writeStrongBinder
(Data->
asBinder
());
}
return
NO_ERROR
;
}
break
;
default
:
return
BBinder::onTransact
(code, data, reply, flags);
}
}
};
Back
|
FazBrowse Home
|
New Git URL