• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 mod bindings;
6 mod event;
7 mod format;
8 mod session;
9 mod vea_instance;
10 
11 pub use event::*;
12 pub use format::*;
13 pub use session::*;
14 pub use vea_instance::*;
15 
16 /// libvda only exists on ChromeOS, so we cannot link against it in a regular environment, which
17 /// limits our build coverage. These stubs are built if the "chromeos" feature is not specified,
18 /// which allows build to complete successfully, although the video device will just badly crash if
19 /// it is ever used.
20 #[cfg(feature = "libvda-stub")]
21 mod native_stubs {
22     use super::bindings::*;
23 
24     #[no_mangle]
initialize_encode(_type_: vea_impl_type_t) -> *mut ::std::os::raw::c_void25     extern "C" fn initialize_encode(_type_: vea_impl_type_t) -> *mut ::std::os::raw::c_void {
26         unimplemented!()
27     }
28 
29     #[no_mangle]
deinitialize_encode(_impl_: *mut ::std::os::raw::c_void)30     extern "C" fn deinitialize_encode(_impl_: *mut ::std::os::raw::c_void) {
31         unimplemented!()
32     }
33 
34     #[no_mangle]
get_vea_capabilities( _impl_: *mut ::std::os::raw::c_void, ) -> *const vea_capabilities_t35     extern "C" fn get_vea_capabilities(
36         _impl_: *mut ::std::os::raw::c_void,
37     ) -> *const vea_capabilities_t {
38         unimplemented!()
39     }
40 
41     #[no_mangle]
init_encode_session( _impl_: *mut ::std::os::raw::c_void, _config: *mut vea_config_t, ) -> *mut vea_session_info_t42     extern "C" fn init_encode_session(
43         _impl_: *mut ::std::os::raw::c_void,
44         _config: *mut vea_config_t,
45     ) -> *mut vea_session_info_t {
46         unimplemented!()
47     }
48 
49     #[no_mangle]
close_encode_session( _impl_: *mut ::std::os::raw::c_void, _session_info: *mut vea_session_info_t, )50     extern "C" fn close_encode_session(
51         _impl_: *mut ::std::os::raw::c_void,
52         _session_info: *mut vea_session_info_t,
53     ) {
54         unimplemented!()
55     }
56 
57     #[no_mangle]
vea_encode( _ctx: *mut ::std::os::raw::c_void, _input_buffer_id: vea_input_buffer_id_t, _fd: ::std::os::raw::c_int, _num_planes: usize, _planes: *mut video_frame_plane_t, _timestamp: i64, _force_keyframe: u8, ) -> ::std::os::raw::c_int58     extern "C" fn vea_encode(
59         _ctx: *mut ::std::os::raw::c_void,
60         _input_buffer_id: vea_input_buffer_id_t,
61         _fd: ::std::os::raw::c_int,
62         _num_planes: usize,
63         _planes: *mut video_frame_plane_t,
64         _timestamp: i64,
65         _force_keyframe: u8,
66     ) -> ::std::os::raw::c_int {
67         unimplemented!()
68     }
69 
70     #[no_mangle]
vea_use_output_buffer( _ctx: *mut ::std::os::raw::c_void, _output_buffer_id: vea_output_buffer_id_t, _fd: ::std::os::raw::c_int, _offset: u32, _size: u32, ) -> ::std::os::raw::c_int71     extern "C" fn vea_use_output_buffer(
72         _ctx: *mut ::std::os::raw::c_void,
73         _output_buffer_id: vea_output_buffer_id_t,
74         _fd: ::std::os::raw::c_int,
75         _offset: u32,
76         _size: u32,
77     ) -> ::std::os::raw::c_int {
78         unimplemented!()
79     }
80 
81     #[no_mangle]
vea_request_encoding_params_change( _ctx: *mut ::std::os::raw::c_void, _bitrate: vea_bitrate_t, _framerate: u32, ) -> ::std::os::raw::c_int82     extern "C" fn vea_request_encoding_params_change(
83         _ctx: *mut ::std::os::raw::c_void,
84         _bitrate: vea_bitrate_t,
85         _framerate: u32,
86     ) -> ::std::os::raw::c_int {
87         unimplemented!()
88     }
89 
90     #[no_mangle]
vea_flush(_ctx: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int91     extern "C" fn vea_flush(_ctx: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int {
92         unimplemented!()
93     }
94 }
95