summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/common.c1
-rw-r--r--libhb/dvd.c2
-rw-r--r--libhb/dvdnav.c2
-rw-r--r--libhb/enc_qsv.c14
-rw-r--r--libhb/encvobsub.c1
-rw-r--r--libhb/encvorbis.c2
-rw-r--r--libhb/fifo.c2
-rw-r--r--libhb/handbrake/common.h2
-rw-r--r--libhb/handbrake/handbrake.h3
-rw-r--r--libhb/handbrake/hbavfilter.h1
-rw-r--r--libhb/handbrake/hbtypes.h1
-rw-r--r--libhb/handbrake/internal.h7
-rw-r--r--libhb/handbrake/qsv_common.h10
-rw-r--r--libhb/handbrake/qsv_memory.h1
-rw-r--r--libhb/muxavformat.c1
15 files changed, 33 insertions, 17 deletions
diff --git a/libhb/common.c b/libhb/common.c
index f7fb9dbb5..7d80cc0b0 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -13,6 +13,7 @@
#include <sys/time.h>
#include "handbrake/handbrake.h"
+#include "handbrake/hbffmpeg.h"
#include "x264.h"
#include "handbrake/lang.h"
#include "handbrake/common.h"
diff --git a/libhb/dvd.c b/libhb/dvd.c
index 2ae506c7d..3977773f5 100644
--- a/libhb/dvd.c
+++ b/libhb/dvd.c
@@ -7,6 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/
+#include "libavcodec/avcodec.h"
+
#include "handbrake/handbrake.h"
#include "handbrake/lang.h"
#include "handbrake/dvd.h"
diff --git a/libhb/dvdnav.c b/libhb/dvdnav.c
index 52a48adfe..622e36f3c 100644
--- a/libhb/dvdnav.c
+++ b/libhb/dvdnav.c
@@ -7,6 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/
+#include "libavcodec/avcodec.h"
+
#include "handbrake/handbrake.h"
#include "handbrake/lang.h"
#include "handbrake/dvd.h"
diff --git a/libhb/enc_qsv.c b/libhb/enc_qsv.c
index 750bd35f2..511f3af24 100644
--- a/libhb/enc_qsv.c
+++ b/libhb/enc_qsv.c
@@ -32,6 +32,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "handbrake/handbrake.h"
#include "handbrake/nal_units.h"
+#include "handbrake/hbffmpeg.h"
#include "handbrake/qsv_common.h"
#include "handbrake/qsv_memory.h"
#include "handbrake/h264_common.h"
@@ -775,22 +776,9 @@ int qsv_enc_init(hb_work_private_t *pv)
else
{
mfxStatus err;
- //qsv->mfx_session = pv->mfx_session;
- AVHWFramesContext *frames_ctx = (AVHWFramesContext*)hb_enc_qsv_frames_ctx.hw_frames_ctx->data;
- AVQSVFramesContext *frames_hwctx = frames_ctx->hwctx;
mfxVersion ver;
mfxIMPL impl;
- mfxHDL handle = NULL;
- mfxHandleType handle_type;
-
- static const mfxHandleType handle_types[] = {
- MFX_HANDLE_VA_DISPLAY,
- MFX_HANDLE_D3D9_DEVICE_MANAGER,
- MFX_HANDLE_D3D11_DEVICE,
- };
-
- int i;
AVHWDeviceContext *device_ctx = (AVHWDeviceContext*)hb_hw_device_ctx->data;
AVQSVDeviceContext *device_hwctx = device_ctx->hwctx;
diff --git a/libhb/encvobsub.c b/libhb/encvobsub.c
index 33b611ed0..befc08772 100644
--- a/libhb/encvobsub.c
+++ b/libhb/encvobsub.c
@@ -8,6 +8,7 @@
*/
#include "handbrake/handbrake.h"
+#include "handbrake/hbffmpeg.h"
struct hb_work_private_s
{
diff --git a/libhb/encvorbis.c b/libhb/encvorbis.c
index 92f24a13f..3c85ab455 100644
--- a/libhb/encvorbis.c
+++ b/libhb/encvorbis.c
@@ -7,6 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/
+#include "handbrake/hbffmpeg.h"
+
#include "handbrake/handbrake.h"
#include "handbrake/audio_remap.h"
diff --git a/libhb/fifo.c b/libhb/fifo.c
index 1ded249fc..862d2df85 100644
--- a/libhb/fifo.c
+++ b/libhb/fifo.c
@@ -7,6 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/
+#include "libavcodec/avcodec.h"
+
#include "handbrake/handbrake.h"
#if HB_PROJECT_FEATURE_QSV
#include "handbrake/qsv_libav.h"
diff --git a/libhb/handbrake/common.h b/libhb/handbrake/common.h
index 2f4826d24..64289554f 100644
--- a/libhb/handbrake/common.h
+++ b/libhb/handbrake/common.h
@@ -107,6 +107,7 @@ typedef enum
#include "qsv_libav.h"
#endif
+#ifdef __LIBHB__
struct hb_buffer_list_s
{
hb_buffer_t *head;
@@ -127,6 +128,7 @@ hb_buffer_t* hb_buffer_list_set(hb_buffer_list_t *list, hb_buffer_t *buf);
void hb_buffer_list_close(hb_buffer_list_t *list);
int hb_buffer_list_count(hb_buffer_list_t *list);
int hb_buffer_list_size(hb_buffer_list_t *list);
+#endif // __LIBHB__
hb_list_t * hb_list_init(void);
int hb_list_count( const hb_list_t * );
diff --git a/libhb/handbrake/handbrake.h b/libhb/handbrake/handbrake.h
index d9a6f3636..53d5fadd0 100644
--- a/libhb/handbrake/handbrake.h
+++ b/libhb/handbrake/handbrake.h
@@ -60,6 +60,7 @@ hb_list_t * hb_get_titles( hb_handle_t * );
by the latest scan and title set data. */
hb_title_set_t * hb_get_title_set( hb_handle_t * );
+#ifdef __LIBHB__
/* hb_detect_comb()
Analyze a frame for interlacing artifacts, returns true if they're found.
Taken from Thomas Oestreich's 32detect filter in the Transcode project. */
@@ -70,6 +71,8 @@ int hb_save_preview( hb_handle_t * h, int title, int preview,
hb_buffer_t *buf );
hb_buffer_t * hb_read_preview( hb_handle_t * h, hb_title_t *title,
int preview );
+#endif // __LIBHB__
+
hb_image_t * hb_get_preview2(hb_handle_t * h, int title_idx, int picture,
hb_geometry_settings_t *geo, int deinterlace);
void hb_set_anamorphic_size2(hb_geometry_t *src_geo,
diff --git a/libhb/handbrake/hbavfilter.h b/libhb/handbrake/hbavfilter.h
index 5a75a88b6..77974fdb5 100644
--- a/libhb/handbrake/hbavfilter.h
+++ b/libhb/handbrake/hbavfilter.h
@@ -10,6 +10,7 @@
#ifndef HANDBRAKE_AVFILTER_H
#define HANDBRAKE_AVFILTER_H
+#include "libavcodec/avcodec.h"
#include "handbrake/common.h"
typedef struct hb_avfilter_graph_s hb_avfilter_graph_t;
diff --git a/libhb/handbrake/hbtypes.h b/libhb/handbrake/hbtypes.h
index 403ada0e2..01535a099 100644
--- a/libhb/handbrake/hbtypes.h
+++ b/libhb/handbrake/hbtypes.h
@@ -39,7 +39,6 @@ typedef struct hb_work_private_s hb_work_private_t;
typedef struct hb_work_object_s hb_work_object_t;
typedef struct hb_filter_private_s hb_filter_private_t;
typedef struct hb_filter_object_s hb_filter_object_t;
-typedef struct hb_buffer_s hb_buffer_t;
typedef struct hb_buffer_settings_s hb_buffer_settings_t;
typedef struct hb_image_format_s hb_image_format_t;
typedef struct hb_fifo_s hb_fifo_t;
diff --git a/libhb/handbrake/internal.h b/libhb/handbrake/internal.h
index db17d67d2..ad860379f 100644
--- a/libhb/handbrake/internal.h
+++ b/libhb/handbrake/internal.h
@@ -10,10 +10,13 @@
#ifndef HANDBRAKE_INTERNAL_H
#define HANDBRAKE_INTERNAL_H
+#include "libavutil/imgutils.h"
+#include "libavutil/pixdesc.h"
+
#include "handbrake/project.h"
-#include "handbrake/hbffmpeg.h"
#if HB_PROJECT_FEATURE_QSV
#include "handbrake/qsv_libav.h"
+#include "libavcodec/avcodec.h"
#endif
/***********************************************************************
@@ -59,6 +62,8 @@ void hb_job_setup_passes(hb_handle_t *h, hb_job_t *job, hb_list_t *list_pass);
* May have metadata associated with it via extra fields
* that are conditionally used depending on the type of packet.
*/
+typedef struct hb_buffer_s hb_buffer_t;
+
struct hb_buffer_settings_s
{
enum { OTHER_BUF, AUDIO_BUF, VIDEO_BUF, SUBTITLE_BUF, FRAME_BUF } type;
diff --git a/libhb/handbrake/qsv_common.h b/libhb/handbrake/qsv_common.h
index 9f73d97fb..2277468b0 100644
--- a/libhb/handbrake/qsv_common.h
+++ b/libhb/handbrake/qsv_common.h
@@ -16,6 +16,13 @@ int hb_qsv_available();
#if HB_PROJECT_FEATURE_QSV
+// Public API
+int hb_qsv_impl_set_preferred(const char *name);
+void hb_qsv_force_workarounds(); // for developers only
+
+#ifdef __LIBHB__
+// Private API
+
#include "mfx/mfxvideo.h"
#include "mfx/mfxplugin.h"
#include "libavcodec/avcodec.h"
@@ -191,11 +198,9 @@ const char* hb_qsv_level_name (uint32_t codec_id, uint16_t level_id);
const char* hb_qsv_frametype_name(uint16_t qsv_frametype);
uint8_t hb_qsv_frametype_xlat(uint16_t qsv_frametype, uint16_t *out_flags);
-int hb_qsv_impl_set_preferred(const char *name);
const char* hb_qsv_impl_get_name(int impl);
const char* hb_qsv_impl_get_via_name(int impl);
-void hb_qsv_force_workarounds(); // for developers only
typedef struct QSVMid {
AVBufferRef *hw_frames_ref;
@@ -246,5 +251,6 @@ int hb_qsv_preset_is_zero_copy_enabled(const hb_dict_t *job_dict);
void hb_qsv_uninit_dec(AVCodecContext *s);
void hb_qsv_uninit_enc();
+#endif // __LIBHB__
#endif // HB_PROJECT_FEATURE_QSV
#endif // HANDBRAKE_QSV_COMMON_H
diff --git a/libhb/handbrake/qsv_memory.h b/libhb/handbrake/qsv_memory.h
index 4c55d90a2..08a726162 100644
--- a/libhb/handbrake/qsv_memory.h
+++ b/libhb/handbrake/qsv_memory.h
@@ -33,6 +33,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if HB_PROJECT_FEATURE_QSV
+#include "libswscale/swscale.h"
#include "mfx/mfxplugin.h"
#include "handbrake/qsv_libav.h"
diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c
index 983c5d348..e6b022135 100644
--- a/libhb/muxavformat.c
+++ b/libhb/muxavformat.c
@@ -15,6 +15,7 @@
#include "handbrake/handbrake.h"
#include "handbrake/ssautil.h"
#include "handbrake/lang.h"
+#include "handbrake/hbffmpeg.h"
struct hb_mux_data_s
{