Commit Graph

175 Commits

Author SHA1 Message Date
Moritz Bunkus
75279b5a81 Use the PRId64/PRIu64 defines instead of %lld/%llu for enhanced cross-platform compatibility. Cosmetics. 2005-10-12 16:41:09 +00:00
Moritz Bunkus
5fc1f03809 Removed the autofree_ptr class because memory_c can be used instead. 2005-10-09 09:55:53 +00:00
Moritz Bunkus
d15887f68f Merged the new memory_ptr_c and memory_c classes into a single class for a refcounted memory block. Removed the unsigned char * members of packet_t that were only holding copies of the memory_c members. The data is now stored directly in packet_t.data and packet_t.data_adds. 2005-10-09 09:30:24 +00:00
Moritz Bunkus
e277c1849c Native MPEG-4 part 2: The very first frame must get the first timecode available. 2005-10-07 13:49:10 +00:00
Moritz Bunkus
eebddbda7f Changed how frames are referenced in h.264/AVC video. References are kept intact when reading from Matroska. If no references are provided then the previous frame is referenced for non-I frames. Should fix bug 154. 2005-09-30 18:12:38 +00:00
Moritz Bunkus
19227e0ea6 Only use the extracted size if the current file is not being appended. Otherwise header values are not initialized. 2005-09-19 21:30:24 +00:00
Moritz Bunkus
d338c5dd12 Also fix the BITMAPINFOHEADER with the new pixel dimenions after getting them from the bitstream. Added a test case for this feature. 2005-09-19 07:49:22 +00:00
Moritz Bunkus
388bac2386 Always extract the aspect ratio information from the AVC private data. Otherwise overriding AR on the command line would cause two appended AVC tracks to have different private data because the AR information was still present in the first AVC track. 2005-09-18 12:55:34 +00:00
Moritz Bunkus
ceeced6ffc Added a function for extracting the pixel width & height from the MPEG-4 part 2 bitstream. This is a workaround for buggy muxers writing wrong values to the source container, e.g. to MP4 files. Fixes bug 149. 2005-09-18 11:10:56 +00:00
Moritz Bunkus
826a119363 More security for bogus input from a reader. 2005-09-15 20:14:33 +00:00
Moritz Bunkus
c15f9a97c4 Remove the bitstream aspect ratio information from AVC/h.264 video tracks. 2005-09-04 15:06:06 +00:00
Moritz Bunkus
23144fb6fd Included commands for getting AVC from AVI into MP4 suitable for inclusion into MKV in the AVC-in-VfW-mode warning message. 2005-08-30 11:52:11 +00:00
Moritz Bunkus
3eaed084ed Use STL maps instead of vectors and structs in many places in the track info class. Easier to read, and for this task maps are suited way better than vectors anyway. 2005-08-27 16:13:48 +00:00
Moritz Bunkus
1a378a21e7 Default display width/height to pixel width/height for video tracks read from Matroska files. Do not extract the AR from a MPEG-4 part 2 track if the display dimensions are given. 2005-08-25 09:17:25 +00:00
Moritz Bunkus
56703d4959 Always output native MPEG-4 ASP when reading native MPEP-4 ASP regardless of the --engage native_mpeg4 CL argument. 2005-08-25 09:06:33 +00:00
Moritz Bunkus
7a27f3bd9e Native MPEG-4 ASP: simplified and fixed the timecode/duration assignment -- hopefully! 2005-08-24 20:31:04 +00:00
Moritz Bunkus
11b53ee089 Cosmetics: removed tab characters and trailing whitespaces. 2005-08-22 07:14:22 +00:00
Moritz Bunkus
2e57b08d67 More positive wording. 2005-08-21 13:05:24 +00:00
Moritz Bunkus
38dfa553a2 Disallow putting AVC/h.264 video in VfW compatibility mode. Can be forced with a new --engage option. 2005-08-21 13:04:48 +00:00
Moritz Bunkus
0a4e6d625c Cast size_t arguments to something whose size is known (or that matches the format specifier). 2005-08-17 11:46:09 +00:00
Moritz Bunkus
15f47f2741 Reworked the packet queueing if timecode files are involved. First, do not queue anything if no timecode file has been specified and don't create a factory in that case either. Second, queue only as many frames as are needed. This depends on the track type and codec used. Subtitle tracks do not need any queueing. Neither do most audio tracks with the exception of RealAudio. Most normal B frame video codecs like MPEG-4 part 2, MPEG-1/-2, RealVideo etc only need short queueing while AVC and all unknown video codecs should be fully queued. 2005-08-06 11:52:14 +00:00
Moritz Bunkus
052b45ab52 AVC/H.264: Non-I frames reference the previous "P" frame just as if "B" frames were referenced as well and not the previous I frame. 2005-07-19 17:31:43 +00:00
Moritz Bunkus
8b5d160c70 The MPEG-1/-2 video packetizer has to create a new packet_t structure for each packet it passes downstream because it may produce more than one output packet from each input packet, and packet_t structures must only be used once. 2005-06-24 07:52:23 +00:00
Moritz Bunkus
0c356f0350 Non-native to native MPEG-4 part 2: If the frame queue contains more frames than the timecode queue timecodes then use the FPS and create new ones. If a FPS is not known then issue a warning and drop the frames which do not have a timecode available (at most one frame should have to be dropped anyway). 2005-06-17 09:37:52 +00:00
Moritz Bunkus
d809e013f7 Fix the codec version string for MPEG-4 codecs: if it indicates "DivX packed bitstream" then change it to not say "packed bitstream" anymore. 2005-06-16 14:01:14 +00:00
Moritz Bunkus
6a8e29fd18 Accidentally committed a lot of debug code. 2005-06-16 08:48:18 +00:00
Moritz Bunkus
056abda15b Changed the timecode_factory_c interface. The get_next() function receives the complete packet and not only a couple of its parameters. 2005-06-16 08:34:54 +00:00
Moritz Bunkus
41f5e7af68 The queue for native MPEG4 must also be flushed if it contains two I/P frames and the next frame is an I or P frame. 2005-06-12 08:07:30 +00:00
Moritz Bunkus
e64f94534a Added a field for specifying a factor that the timecode factory might need, e.g. in MPEG2 field-vs-frame situations. 2005-06-10 12:31:57 +00:00
Moritz Bunkus
309b6e2cdf Make sure that all readers call their packetizers' flush() function when they run out of data. Make sure that all packetizers' flush() functions call generic_packetizer_c::flush() as well so that this one can save the fact that flush() has been called already. 2005-06-10 07:12:50 +00:00
Moritz Bunkus
a25e565d35 After add_packet() the function's packet_t argument belongs to the lower layers, and it must not be reused. It's a considerable speed gain. 2005-05-26 16:46:32 +00:00
Moritz Bunkus
96c08ba235 Complete rewrite of the parameter passing between generic_packetizer_c::process() and generic_packetizer_c::add_packet(). Those functions use the packet_t structure. There are a couple of more or less small memory leaks left. Those will be addressed later. 2005-05-25 21:31:26 +00:00
Moritz Bunkus
cbe0a25c38 Set the default compression method in the packetizer. Otherwise it would have to be set in each reader. 2005-05-22 10:05:03 +00:00
Moritz Bunkus
b53de99588 Improved the support for native MPEG-4 (it actually works for three files now). Renamed a couple of function parameters in the process and moved the memory_c class into the "common" subdir. 2005-05-02 12:36:51 +00:00
Moritz Bunkus
1097c66ae8 In case of remuxing MPEG-1/-2 video tracks from Matroska files simply hand the frames over as they are without sending them through the MPEG frame detection code. 2005-04-18 08:11:40 +00:00
Moritz Bunkus
6f31a23ad3 Don't free memory handled by a smart pointer! 2005-04-07 17:10:35 +00:00
Moritz Bunkus
0ff59ed27e Wrong calculation of the duration in case of Vorbis packets whose container timecodes are not what the packet's durations indicate they should be. 2005-03-21 21:21:29 +00:00
Moritz Bunkus
07826c5550 After modifying ti.private_data it has to be copied into the CodecPrivate again. 2005-03-19 10:55:12 +00:00
Moritz Bunkus
6f662a61ba Don't check the complete CodecPrivate data for MS compat tracks. Only check if both are present and have the same size (e.g. slight offsets in the FPS or sth else are OK). Let the user shoot himself in the foot if he really wants to ;) 2005-03-06 14:30:23 +00:00
Moritz Bunkus
c2fe84204f Added more descriptive error messages to the connection checks. 2005-03-02 15:53:34 +00:00
Moritz Bunkus
371fb21758 Renamed a couple of variables. C++ified class member initializations. 2005-02-24 21:05:35 +00:00
Moritz Bunkus
ca468458c9 No warnings, thanks. 2005-02-24 15:34:04 +00:00
Moritz Bunkus
82c413868b Let the compiler deal with memory handling. 2005-02-24 14:19:32 +00:00
Moritz Bunkus
b3ac860ad4 Reworked the code for native MPEG4 B frames completely. Still not working (playback) :( (Recommit because I f'cked up the repository database) 2005-02-24 09:16:23 +00:00
Moritz Bunkus
451cf796a9 Doh... forgot to remove the debug code before the commit. (Recommit because I f'cked the SVN database) 2005-02-24 07:49:13 +00:00
Moritz Bunkus
19770e79dc Moved the bit_cursor_c class into its own file. Removed the byte_cursor_c class because its functionality is completely covered by mm_mem_io_c (and it was not used anywhere). Changed mpeg4_p2_find_frame_types to use a mm_mem_io_c instead of a bit_cursor_c because the former is WAY faster and bit-wise access is not needed. 2005-02-20 18:40:37 +00:00
Moritz Bunkus
4855528dc1 Look for the aspect ratio information in the first 50 frames for some weird files that start with zero-sized frames. 2005-02-01 19:51:11 +00:00
Moritz Bunkus
71827b49ba More preparations for native MPEG-4 storage. Still not working. Split the single ::process() routine into one for each conversion case (native to non-native and the other way round). 2005-02-01 19:41:20 +00:00
Moritz Bunkus
d44cccabd8 Added a new function for finding the MPEG-4 part 2 configuration data. Some more preparations for native MPEG-4 part 2. 2005-01-31 20:15:05 +00:00
Moritz Bunkus
5ad46951bc Renamed the mpeg4_l* functions to mpeg4_p* because it is called "MPEG-4 part n" and not "MPEG-4 layer n". 2005-01-31 18:18:08 +00:00