diff options
author | jstebbins <[email protected]> | 2011-07-27 15:09:49 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2011-07-27 15:09:49 +0000 |
commit | 7a47aa6da23391fa2f4f0bc46eb4f814e4590661 (patch) | |
tree | c464eed037523e1fee104e78b68c4a75e71e478d /libhb/common.h | |
parent | e71ac4bb36c9cec69ed4cb45a48e179d662fa828 (diff) |
libhb: fix or simplify several hacks involved with Libav support
For files that are demuxed by Libav, we must share the format context
with the decoder iso that it can obtain the codec context for each stream.
The code that did this was very convoluted and difficult to understand.
It is simplified by simply passing the context in hb_title_t.
Reader was closing stream files before the decoder was finished with the
context. This created the need to delay the actual close and cache
the context. Changed reader so it behaves more like the rest of handbrake's
work objects which lets us explicitly close after the decoders are finished.
Libav does some probing of the file when av_find_stream_info is called.
This probing leaves the format context in a bad state for some files and
causes subsequent reads or seeks to misbehave. So open 2 contexts in
ffmpeg_open. One is used only for probing, and the other only for reading.
decavcodec.c had 2 separate decoders for files demuxed by hb and files
demuxed by Libav. They have been combined and simplified.
Previously, it was not possible to decode one source audio track multiple
times in order to fan it out to multiple output tracks if the file is
demuxed by Libav. We were using the codec context from the format context.
Since there is only one of these for each stream, we could only do one
decode for each stream. Use avcodec_copy_context to make copies of
the codec context and allow multiple decodes. This allows removal of
a lot of special case code for Libav streams that was necessary to
duplicate the output of the decoder.
Patch Libav's mkv demux to fix a seek problem. This has been pushed
upstreams, so the next time we update Libav, we must remove this patch.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4141 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/common.h')
-rw-r--r-- | libhb/common.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libhb/common.h b/libhb/common.h index 41463c135..48a4812bb 100644 --- a/libhb/common.h +++ b/libhb/common.h @@ -299,8 +299,6 @@ struct hb_job_s hb_fifo_t * fifo_render; /* Raw pictures, scaled */ hb_fifo_t * fifo_mpeg4; /* MPEG-4 video ES */ - hb_thread_t * reader; - hb_list_t * list_work; hb_esconfig_t config; @@ -324,7 +322,6 @@ struct hb_job_s #define HB_ACODEC_FFMPEG 0x00020000 #define HB_ACODEC_DCA_HD 0x00040000 #define HB_ACODEC_FF_MASK 0x00060000 -#define HB_ACODEC_FF_I_FLAG 0x80000000 #define HB_ACODEC_PASS_FLAG 0x40000000 #define HB_ACODEC_PASS_MASK (HB_ACODEC_DCA_HD | HB_ACODEC_AC3 | HB_ACODEC_DCA) #define HB_ACODEC_AC3_PASS (HB_ACODEC_AC3 | HB_ACODEC_PASS_FLAG) @@ -465,8 +462,6 @@ struct hb_audio_s hb_esconfig_t config; hb_mux_data_t * mux_data; hb_fifo_t * scan_cache; - - hb_list_t * ff_audio_list; } priv; }; #endif @@ -599,6 +594,7 @@ struct hb_title_s uint64_t block_end; uint64_t block_count; int angle_count; + void *opaque_priv; /* Visual-friendly duration */ int hours; @@ -714,7 +710,6 @@ typedef struct hb_work_info_s int height; int pixel_aspect_width; int pixel_aspect_height; - double aspect; }; struct { // info only valid for audio decoders int channel_layout; @@ -785,10 +780,8 @@ extern hb_work_object_t hb_encx264; 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_decavcodeca; 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; @@ -797,6 +790,7 @@ extern hb_work_object_t hb_muxer; extern hb_work_object_t hb_encca_aac; extern hb_work_object_t hb_encca_haac; extern hb_work_object_t hb_encavcodeca; +extern hb_work_object_t hb_reader; #define FILTER_OK 0 #define FILTER_DELAY 1 |