MWCapture SDK Mac  3.4.62314
mw_venc.h
1#ifndef MW_VENC_H
2#define MW_VENC_H
3
5// Copyright (c) 2011-2020 Magewell Electronics Co., Ltd. (Nanjing)
6//
7// Permission is hereby granted, free of charge, to any person obtaining a
8// copy of this software and associated documentation files (the "Software"),
9// to deal in the Software without restriction, including without limitation
10// the rights to use, copy, modify, merge, publish, distribute, sublicense,
11// and/or sell copies of the Software, and to permit persons to whom the
12// Software is furnished to do so, subject to the following conditions:
13//
14// The above copyright notice and this permission notice shall be included
15// in all copies or substantial portions of the Software.
16//
17// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23// THE SOFTWARE.
25
26#ifdef _WIN32
27#ifdef MWVENC_EXPORTS
28#define MWVENC_API __declspec(dllexport)
29#else
30#define MWVENC_API __declspec(dllimport)
31#endif
32#endif
33
34#include "mw_venc_common.h"
35#import <VideoToolbox/VideoToolbox.h>
36typedef struct venc_handle *mw_venc_handle_t;
37#ifdef __cplusplus
38extern "C"
39{
40#endif
78#ifdef _WIN32
79MWVENC_API
80#endif
82
144#ifdef _WIN32
145MWVENC_API
146#endif
147mw_venc_handle_t
149 MW_ENCODER_CALLBACK callback,
150 MW_ENCODER_CALLBACK_NALU callback_nalu,
151 void *user_ptr);
152
181#ifdef _WIN32
182MWVENC_API
183#endif
185mw_venc_put_imagebuffer(mw_venc_handle_t handle,
186 CVImageBufferRef image_buffer,
187 int64_t pts);
188
218#ifdef _WIN32
219MWVENC_API
220#endif
223 mw_venc_handle_t handle,
224 uint8_t *p_frame,
225 int64_t pts);
226
246#ifdef _WIN32
247MWVENC_API
248#endif
250mw_venc_destory(mw_venc_handle_t handle);
251
285#ifdef _WIN32
286MWVENC_API
287#endif
290 mw_venc_handle_t handle,
291 mw_venc_property_t param,
292 void *args);
293
323#ifdef _WIN32
324MWVENC_API
325#endif
328 mw_venc_handle_t handle,
329 mw_venc_property_t param,
330 void *args);
331
332#ifdef __cplusplus
333}
334#endif
335
336#endif
void(* MW_ENCODER_CALLBACK)(void *user_ptr, const uint8_t *p_frame, uint32_t frame_len, mw_venc_frame_info_t *p_frame_info)
Callback functions.
Definition: mw_venc_common.h:74
mw_venc_status_t mw_venc_put_frame(mw_venc_handle_t handle, uint8_t *p_frame, int64_t pts)
Imports data to encoders.
mw_venc_handle_t mw_venc_create(mw_venc_param_t *p_param, MW_ENCODER_CALLBACK callback, MW_ENCODER_CALLBACK_NALU callback_nalu, void *user_ptr)
Creates an encoder.
mw_venc_status_t mw_venc_get_default_param(mw_venc_param_t *p_param)
Gets the default value of encoding parameters.
mw_venc_status_t mw_venc_put_imagebuffer(mw_venc_handle_t handle, CVImageBufferRef image_buffer, int64_t pts)
Imports data to encoders.
mw_venc_status_t mw_venc_set_property(mw_venc_handle_t handle, mw_venc_property_t param, void *args)
Sets encoder parameters.
mw_venc_status_t mw_venc_destory(mw_venc_handle_t handle)
Destroys encoders.
mw_venc_status_t mw_venc_get_property(mw_venc_handle_t handle, mw_venc_property_t param, void *args)
Gets encoder parameters.
enum mw_venc_status mw_venc_status_t
mw_venc_status_t
enum mw_venc_property mw_venc_property_t
mw_venc_property_t
mw_venc_param_t
Definition: mw_venc_common.h:420