Skip to content

Commit

Permalink
libhb: avoid harfbuzz header barrier collisions
Browse files Browse the repository at this point in the history
harfbuz prefixes header barriers with HB_* which conflicts with some of
handbrakes header barriers.  So use prefix HANDBRAKE_* for all of our
headers.
  • Loading branch information
jstebbins committed Sep 12, 2019
1 parent 89dbcaf commit 8a354a7
Show file tree
Hide file tree
Showing 39 changed files with 126 additions and 109 deletions.
6 changes: 3 additions & 3 deletions libhb/handbrake/audio_remap.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
* Left/Right Surround == Side Left/Right
* Left/Right Rear Surround == Back Left/Right */

#ifndef AUDIO_REMAP_H
#define AUDIO_REMAP_H
#ifndef HANDBRAKE_AUDIO_REMAP_H
#define HANDBRAKE_AUDIO_REMAP_H

#include <stdint.h>
#include "libavutil/samplefmt.h"
Expand Down Expand Up @@ -101,4 +101,4 @@ void hb_audio_remap_build_table(hb_chan_map_t *channel_map_out,
uint64_t channel_layout,
int *remap_table);

#endif /* AUDIO_REMAP_H */
#endif /* HANDBRAKE_AUDIO_REMAP_H */
6 changes: 3 additions & 3 deletions libhb/handbrake/audio_resample.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* sample_rate conversion will come later (libswresample doesn't support
* sample_rate conversion with float samples yet). */

#ifndef AUDIO_RESAMPLE_H
#define AUDIO_RESAMPLE_H
#ifndef HANDBRAKE_AUDIO_RESAMPLE_H
#define HANDBRAKE_AUDIO_RESAMPLE_H

#include <math.h>
#include <stdint.h>
Expand Down Expand Up @@ -117,4 +117,4 @@ void hb_audio_resample_free(hb_audio_resample_t *resample);
hb_buffer_t* hb_audio_resample(hb_audio_resample_t *resample,
const uint8_t **samples, int nsamples);

#endif /* AUDIO_RESAMPLE_H */
#endif /* HANDBRAKE_AUDIO_RESAMPLE_H */
6 changes: 3 additions & 3 deletions libhb/handbrake/avfilter_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_AVFILTER_PRIV_H
#define HB_AVFILTER_PRIV_H
#ifndef HANDBRAKE_AVFILTER_PRIV_H
#define HANDBRAKE_AVFILTER_PRIV_H

#include "libavfilter/avfilter.h"
#include "handbrake/hbavfilter.h"
Expand All @@ -31,4 +31,4 @@ int hb_avfilter_null_work( hb_filter_object_t * filter,
hb_buffer_t ** buf_in, hb_buffer_t ** buf_out );
void hb_avfilter_alias_close( hb_filter_object_t * filter );

#endif // HB_AVFILTER_PRIV_H
#endif // HANDBRAKE_AVFILTER_PRIV_H
6 changes: 3 additions & 3 deletions libhb/handbrake/bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_BITS_H
#define HB_BITS_H
#ifndef HANDBRAKE_BITS_H
#define HANDBRAKE_BITS_H

static inline int
allbits_set(uint32_t *bitmap, int num_words)
Expand Down Expand Up @@ -87,4 +87,4 @@ bit_nset(uint32_t *bit_map, int start_pos, int stop_pos)
}
}

#endif /* HB_BITS_H */
#endif /* HANDBRAKE_BITS_H */
6 changes: 3 additions & 3 deletions libhb/handbrake/colormap.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_COLORMAP_H
#define HB_COLORMAP_H
#ifndef HANDBRAKE_COLORMAP_H
#define HANDBRAKE_COLORMAP_H

#define HB_RGB_TO_BGR(c) (((c & 0xff0000) >> 16) | \
((c & 0x00ff00) ) | \
Expand All @@ -17,4 +17,4 @@

uint32_t hb_rgb_lookup_by_name(const char *color);

#endif // HB_COLORMAP_H
#endif // HANDBRAKE_COLORMAP_H
6 changes: 3 additions & 3 deletions libhb/handbrake/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_COMMON_H
#define HB_COMMON_H
#ifndef HANDBRAKE_COMMON_H
#define HANDBRAKE_COMMON_H

#include "handbrake/project.h"
#include "handbrake/hbtypes.h"
Expand Down Expand Up @@ -1443,4 +1443,4 @@ int hb_output_color_matrix(hb_job_t * job);
#define HB_BOOL_REG "(yes|no|true|false|[01])"
#define HB_ALL_REG "(.*)"

#endif
#endif // HANDBRAKE_COMMON_H
6 changes: 3 additions & 3 deletions libhb/handbrake/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_COMPAT_H
#define HB_COMPAT_H
#ifndef HANDBRAKE_COMPAT_H
#define HANDBRAKE_COMPAT_H

#ifdef HB_NEED_STRTOK_R
/*
Expand All @@ -35,4 +35,4 @@ int strerror_r(int errnum, char *strerrbuf, size_t buflen);
#endif // _GNU_SOURCE
#endif // HAVE_STRERROR_R

#endif // HB_COMPAT_H
#endif // HANDBRAKE_COMPAT_H
6 changes: 3 additions & 3 deletions libhb/handbrake/deccc608sub.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
/*
* From ccextractor...
*/
#ifndef __DECCC608SUB_H__
#define __DECCC608SUB_H__
#ifndef HANDBRAKE_DECCC608SUB_H
#define HANDBRAKE_DECCC608SUB_H

#include "handbrake/common.h"

Expand Down Expand Up @@ -143,4 +143,4 @@ enum output_format
OF_RCWT = 4
};

#endif // __DECCC608SUB_H__
#endif // HANDBRAKE_DECCC608SUB_H
6 changes: 3 additions & 3 deletions libhb/handbrake/decomb.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_DECOMB_H
#define HB_DECOMB_H
#ifndef HANDBRAKE_DECOMB_H
#define HANDBRAKE_DECOMB_H

#define MODE_DECOMB_YADIF 1 // Use yadif
#define MODE_DECOMB_BLEND 2 // Use blending interpolation
Expand All @@ -22,4 +22,4 @@
#define MODE_YADIF_BOB 4
#define MODE_DEINTERLACE_QSV 8

#endif // HB_DECOMB_H
#endif // HANDBRAKE_DECOMB_H
6 changes: 3 additions & 3 deletions libhb/handbrake/decsrtsub.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef __DECSRTSUB_H__
#define __DECSRTSUB_H__
#ifndef HANDBRAKE_DECSRTSUB_H
#define HANDBRAKE_DECSRTSUB_H

void hb_srt_to_ssa(hb_buffer_t *sub_in, int line);

#endif // __DECSRTSUB_H__
#endif // HANDBRAKE_DECSRTSUB_H

6 changes: 3 additions & 3 deletions libhb/handbrake/decssasub.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef __DECSSASUB_H__
#define __DECSSASUB_H__
#ifndef HANDBRAKE_DECSSASUB_H
#define HANDBRAKE_DECSSASUB_H

#endif // __DECSSASUB_H__
#endif // HANDBRAKE_DECSSASUB_H
8 changes: 3 additions & 5 deletions libhb/handbrake/dvd.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_DVD_H
#define HB_DVD_H
#ifndef HANDBRAKE_DVD_H
#define HANDBRAKE_DVD_H

#include "dvdnav/dvdnav.h"
#include "dvdread/ifo_read.h"
Expand Down Expand Up @@ -115,6 +115,4 @@ typedef struct hb_dvd_func_s hb_dvd_func_t;
hb_dvd_func_t * hb_dvdnav_methods( void );
hb_dvd_func_t * hb_dvdread_methods( void );

#endif // HB_DVD_H


#endif // HANDBRAKE_DVD_H
5 changes: 5 additions & 0 deletions libhb/handbrake/eedi2.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HANDBRAKE_EEDI2_H
#define HANDBRAKE_EEDI2_H

// Used to order a sequence of metrics for median filtering
void eedi2_sort_metrics( int *order, const int length );

Expand Down Expand Up @@ -91,3 +94,5 @@ void eedi2_calc_derivatives( uint8_t *srcp, int src_pitch, int height, int width

void eedi2_post_process_corner( int *x2, int *y2, int *xy, const int pitch, uint8_t * mskp, int msk_pitch,
uint8_t * dstp, int dst_pitch, int height, int width, int field );

#endif // HANDBRAKE_EEDI2_H
6 changes: 3 additions & 3 deletions libhb/handbrake/encx264.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_ENCX264_H
#define HB_ENCX264_H
#ifndef HANDBRAKE_ENCX264_H
#define HANDBRAKE_ENCX264_H

#include "x264.h"
#include "handbrake/h264_common.h"
Expand Down Expand Up @@ -62,4 +62,4 @@ typedef struct x264_api_s
void hb_x264_global_init(void);
const x264_api_t * hb_x264_api_get(int bit_depth);

#endif // HB_ENCX264_H
#endif // HANDBRAKE_ENCX264_H
6 changes: 3 additions & 3 deletions libhb/handbrake/h264_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_H264_COMMON_H
#define HB_H264_COMMON_H
#ifndef HANDBRAKE_H264_COMMON_H
#define HANDBRAKE_H264_COMMON_H

static const char * const hb_h264_profile_names_8bit[] = {
"auto", "high", "main", "baseline", NULL, };
Expand Down Expand Up @@ -37,4 +37,4 @@ static const char * const hb_h264_colmatrix_names[] = {
"GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m",
"smpte240m", "YCgCo", "bt2020nc", "bt2020c", NULL, };

#endif //HB_H264_COMMON_H
#endif // HANDBRAKE_H264_COMMON_H
6 changes: 3 additions & 3 deletions libhb/handbrake/h265_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_H265_COMMON_H
#define HB_H265_COMMON_H
#ifndef HANDBRAKE_H265_COMMON_H
#define HANDBRAKE_H265_COMMON_H

#include "handbrake/project.h"

Expand Down Expand Up @@ -53,4 +53,4 @@ static const char * const hb_h265_colmatrix_names[] = {
"GBR", "bt709", "undef", "", "fcc", "bt470bg", "smpte170m",
"smpte240m", "YCgCo", "bt2020nc", "bt2020c", NULL, };

#endif //HB_H265_COMMON_H
#endif // HANDBRAKE_H265_COMMON_H
6 changes: 3 additions & 3 deletions libhb/handbrake/handbrake.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_HB_H
#define HB_HB_H
#ifndef HANDBRAKE_HANDBRAKE_H
#define HANDBRAKE_HANDBRAKE_H

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -142,4 +142,4 @@ int is_hardware_disabled(void);
}
#endif

#endif
#endif // HANDBRAKE_HANDBRAKE_H
6 changes: 3 additions & 3 deletions libhb/handbrake/hb_dict.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
It may be used under the terms of the GNU General Public License v2.
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/
#if !defined(HB_DICT_H)
#define HB_DICT_H
#if !defined(HANDBRAKE_DICT_H)
#define HANDBRAKE_DICT_H

#include "handbrake/hbtypes.h"
#include <jansson.h>
Expand Down Expand Up @@ -166,4 +166,4 @@ char * hb_dict_to_encopts(const hb_dict_t * dict);
#define hb_dict_set_bool(dict, key, val) hb_dict_set(dict, key, hb_value_bool(val))


#endif // !defined(HB_DICT_H)
#endif // !defined(HANDBRAKE_DICT_H)
6 changes: 3 additions & 3 deletions libhb/handbrake/hb_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_JSON_H
#define HB_JSON_H
#ifndef HANDBRAKE_JSON_H
#define HANDBRAKE_JSON_H

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -43,4 +43,4 @@ hb_dict_t * hb_version_dict(void);
}
#endif

#endif // HB_JSON_H
#endif // HANDBRAKE_JSON_H
6 changes: 3 additions & 3 deletions libhb/handbrake/hbavfilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_AVFILTER_H
#define HB_AVFILTER_H
#ifndef HANDBRAKE_AVFILTER_H
#define HANDBRAKE_AVFILTER_H

#include "handbrake/common.h"

Expand Down Expand Up @@ -39,4 +39,4 @@ void hb_avfilter_append_dict(hb_value_array_t * filters,

void hb_avfilter_combine(hb_list_t * list);

#endif // HB_AVFILTER_H
#endif // HANDBRAKE_AVFILTER_H
6 changes: 3 additions & 3 deletions libhb/handbrake/hbffmpeg.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_FFMPEG_H
#define HB_FFMPEG_H
#ifndef HANDBRAKE_FFMPEG_H
#define HANDBRAKE_FFMPEG_H

#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
Expand Down Expand Up @@ -59,4 +59,4 @@ int hb_av_encoder_present(int encoder);
const char* const* hb_av_profile_get_names(int encoder);
const char* const* hb_av_level_get_names(int encoder);

#endif
#endif // HANDBRAKE_FFMPEG_H
6 changes: 3 additions & 3 deletions libhb/handbrake/hbtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_TYPES_H
#define HB_TYPES_H
#ifndef HANDBRAKE_TYPES_H
#define HANDBRAKE_TYPES_H

typedef struct hb_handle_s hb_handle_t;
typedef struct hb_list_s hb_list_t;
Expand Down Expand Up @@ -45,4 +45,4 @@ typedef struct hb_image_format_s hb_image_format_t;
typedef struct hb_fifo_s hb_fifo_t;
typedef struct hb_lock_s hb_lock_t;

#endif // HB_TYPES_H
#endif // HANDBRAKE_TYPES_H
6 changes: 3 additions & 3 deletions libhb/handbrake/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_INTERNAL_H
#define HB_INTERNAL_H
#ifndef HANDBRAKE_INTERNAL_H
#define HANDBRAKE_INTERNAL_H

#include "handbrake/project.h"
#include "handbrake/hbffmpeg.h"
Expand Down Expand Up @@ -538,4 +538,4 @@ void hb_chapter_dequeue(hb_chapter_queue_t *q, hb_buffer_t *b);
#define HB_FONT_SANS "sans-serif"
#endif

#endif // HB_INTERNAL_H
#endif // HANDBRAKE_INTERNAL_H
6 changes: 3 additions & 3 deletions libhb/handbrake/lang.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/

#ifndef HB_LANG_H
#define HB_LANG_H
#ifndef HANDBRAKE_LANG_H
#define HANDBRAKE_LANG_H

typedef struct iso639_lang_t
{
Expand Down Expand Up @@ -62,4 +62,4 @@ const iso639_lang_t* lang_get_next(const iso639_lang_t *last);
#ifdef __cplusplus
}
#endif
#endif
#endif // HANDBRAKE_LANG_H
Loading

0 comments on commit 8a354a7

Please sign in to comment.