Advertisement
Guest User

Untitled

a guest
Jul 10th, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.56 KB | None | 0 0
  1. /*
  2.  * Copyright (C) 2013 Siarhei Siamashka <siarhei.siamashka@gmail.com>
  3.  *
  4.  * Licensed under the Apache License, Version 2.0 (the "License");
  5.  * you may not use this file except in compliance with the License.
  6.  * You may obtain a copy of the License at
  7.  *
  8.  *      http://www.apache.org/licenses/LICENSE-2.0
  9.  *
  10.  * Unless required by applicable law or agreed to in writing, software
  11.  * distributed under the License is distributed on an "AS IS" BASIS,
  12.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.  * See the License for the specific language governing permissions and
  14.  * limitations under the License.
  15.  */
  16.  
  17. #include <dlfcn.h>
  18. #include <stddef.h>
  19. #include <stdint.h>
  20. #include <string.h>
  21.  
  22. #include <hybris/internal/binding.h>
  23.  
  24. #define Handle         uint32_t
  25. #define vresult_e      uint32_t
  26. #define vconfig_t      void
  27. #define vstream_info_t void
  28. #define u8             uint8_t
  29. #define u32            uint32_t
  30. #define u64            uint64_t
  31.  
  32. HYBRIS_LIBRARY_INITIALIZE(cedarv_base,    "/system/lib/libcedarv_base.so");
  33. HYBRIS_LIBRARY_INITIALIZE(cedarv_adapter, "/system/lib/libcedarv_adapter.so");
  34. HYBRIS_LIBRARY_INITIALIZE(vecore,         "/system/lib/libve.so");
  35.  
  36. HYBRIS_IMPLEMENT_FUNCTION3(vecore, Handle,    libve_open, vconfig_t*, vstream_info_t*, void*);
  37. HYBRIS_IMPLEMENT_FUNCTION2(vecore, vresult_e, libve_close, u8, Handle);
  38. HYBRIS_IMPLEMENT_FUNCTION2(vecore, vresult_e, libve_reset, u8, Handle);
  39. HYBRIS_IMPLEMENT_FUNCTION2(vecore, vresult_e, libve_flush, u8, Handle);
  40. HYBRIS_IMPLEMENT_FUNCTION2(vecore, vresult_e, libve_set_vbv, Handle, Handle);
  41. HYBRIS_IMPLEMENT_FUNCTION2(vecore, vresult_e, libve_set_minor_vbv, Handle, Handle);
  42. HYBRIS_IMPLEMENT_FUNCTION1(vecore, Handle,    libve_get_fbm, Handle);
  43. HYBRIS_IMPLEMENT_FUNCTION1(vecore, Handle,    libve_get_minor_fbm, Handle);
  44. HYBRIS_IMPLEMENT_FUNCTION1(vecore, u32,       libve_get_fbm_num, Handle);
  45. HYBRIS_IMPLEMENT_FUNCTION3(vecore, vresult_e, libve_io_ctrl, u32, u32, Handle);
  46. HYBRIS_IMPLEMENT_FUNCTION4(vecore, vresult_e, libve_decode, u8, u8, u64, Handle);
  47. HYBRIS_IMPLEMENT_FUNCTION2(vecore, vresult_e, libve_get_stream_info, vstream_info_t*, Handle);
  48. HYBRIS_IMPLEMENT_FUNCTION1(vecore, u8*,       libve_get_version, Handle);
  49. HYBRIS_IMPLEMENT_FUNCTION1(vecore, u8*,       libve_get_last_error, Handle);
  50. HYBRIS_IMPLEMENT_FUNCTION1(vecore, vresult_e, libve_set_ive, void*);
  51. HYBRIS_IMPLEMENT_FUNCTION1(vecore, vresult_e, libve_set_ios, void*);
  52. HYBRIS_IMPLEMENT_FUNCTION1(vecore, vresult_e, libve_set_ifbm, void*);
  53. HYBRIS_IMPLEMENT_FUNCTION1(vecore, vresult_e, libve_set_ivbv, void*);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement