diff options
author | van <[email protected]> | 2008-05-31 17:00:42 +0000 |
---|---|---|
committer | van <[email protected]> | 2008-05-31 17:00:42 +0000 |
commit | afbd06d8d6151b69bbb18adf83cfab8d680c3946 (patch) | |
tree | 4e7be731854c8b8db8f87934c301c60a9155387c /libhb/common.h | |
parent | d0550da569b56a71857c34463c5b030172d47291 (diff) |
- support blu-ray, avchd & dvb x264
- support video files handled by ffmpeg (avi, mkv, mp4, etc.)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1480 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.h')
-rw-r--r-- | libhb/common.h | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/libhb/common.h b/libhb/common.h index fc0001fac..d7728770e 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -251,6 +251,7 @@ struct hb_job_s #define HB_ACODEC_MPGA 0x001000 #define HB_ACODEC_LPCM 0x002000 #define HB_ACODEC_DCA 0x004000 +#define HB_ACODEC_FFMPEG 0x008000 /* Audio Mixdown */ /* define some masks, used to extract the various information from the HB_AMIXDOWN_XXXX values */ @@ -329,8 +330,9 @@ struct hb_audio_config_s /* Input */ struct { - int track; /* Input track number */ - PRIVATE uint32_t codec; /* Input audio codec */ + int track; /* Input track number */ + PRIVATE uint32_t codec; /* Input audio codec */ + PRIVATE uint32_t codec_param; /* per-codec config info */ PRIVATE int samplerate; /* Input sample rate (Hz) */ PRIVATE int bitrate; /* Input bitrate (kbps) */ PRIVATE int channel_layout; @@ -345,6 +347,7 @@ struct hb_audio_config_s PRIVATE int ac3; /* flags.ac3 is only set when the source audio format is HB_ACODEC_AC3 */ PRIVATE int dca; /* flags.dca is only set when the source audio format is HB_ACODEC_DCA */ } flags; +#define AUDIO_F_DOLBY (1 << 31) /* set if source uses Dolby Surround */ struct { @@ -437,7 +440,11 @@ struct hb_title_s int rate; int rate_base; int crop[4]; + enum { HB_MPEG2_DEMUXER = 0, HB_NULL_DEMUXER } demuxer; int detected_interlacing; + int video_id; /* demuxer stream id for video */ + int video_codec; /* worker object id of video codec */ + int video_codec_param; /* codec specific config */ uint32_t palette[16]; @@ -501,6 +508,27 @@ struct hb_state_s } param; }; +typedef struct hb_work_info_s +{ + const char *name; + int profile; + int level; + int bitrate; + int rate; + int rate_base; + int flags; + union { + struct { // info only valid for video decoders + int width; + int height; + double aspect; + }; + struct { // info only valid for audio decoders + int channel_layout; + }; + }; +} hb_work_info_t; + struct hb_work_object_s { int id; @@ -511,6 +539,18 @@ struct hb_work_object_s int (* work) ( hb_work_object_t *, hb_buffer_t **, hb_buffer_t ** ); void (* close) ( hb_work_object_t * ); + /* the info entry point is used by scan to get bitstream information + * during a decode (i.e., it should only be called after at least one + * call to the 'work' entry point). currently it's only called for + * video streams & can be null for other work objects. */ + int (* info) ( hb_work_object_t *, hb_work_info_t * ); + /* the bitstream info entry point is used by scan to get bitstream + * information from a buffer. it doesn't have to be called during a + * decode (it can be called even if init & work haven't been). + * currently it's only called for audio streams & can be null for + * other work objects. */ + int (* bsinfo) ( hb_work_object_t *, const hb_buffer_t *, + hb_work_info_t * ); hb_fifo_t * fifo_in; hb_fifo_t * fifo_out; @@ -524,6 +564,7 @@ struct hb_work_object_s hb_thread_t * thread; volatile int * done; int status; + int codec_param; hb_work_object_t * next; int thread_sleep_interval; @@ -541,6 +582,9 @@ extern hb_work_object_t hb_enctheora; extern hb_work_object_t hb_deca52; extern hb_work_object_t hb_decdca; extern hb_work_object_t hb_decavcodec; +extern hb_work_object_t hb_decavcodecv; +extern hb_work_object_t hb_decavcodecvi; +extern hb_work_object_t hb_decavcodecai; extern hb_work_object_t hb_declpcm; extern hb_work_object_t hb_encfaac; extern hb_work_object_t hb_enclame; |