summaryrefslogtreecommitdiffstats
path: root/demux/packet.h
Commit message (Collapse)AuthorAgeFilesLines
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* demux_mkv: refactor packet parsingwm42015-02-051-0/+2
| | | | | | | | Makes it somewhat more uniform, and breaks up the awfully deep nesting. This implicitly changes multiple small details, rather than only moving code around. In particular, this computes the packet fields first and parses them afterwards, which is needed for the next commit.
* demux_mkv: implement audio skipping/trimmingwm42014-11-031-0/+2
| | | | | | | | | | | | | This mechanism was introduced for Opus, and allows correct skipping of "preroll" data, as well as discarding trailing audio if the file's length isn't a multiple of the audio frame size. Not sure how to handle seeking. I don't understand the purpose of the SeekPreRoll element. This was tested with correctness_trimming_nobeeps.opus, remuxed to mka with mkvmerge v7.2.0. It seems to be correct, although the reported file duration is incorrect (maybe a mkvmerge issue).
* demux: always use AVPacketwm42014-08-251-4/+2
| | | | | | | | | | | | | | | | | | | | | This is a simplification, because it lets us use the AVPacket functions, instead of handling the details manually. It also allows the libavcodec rawvideo decoder to use reference counting, so it doesn't have to memcpy() the full image data. The change in av_common.c enables this. This change is somewhat risky, because we rely on the following AVPacket implementation details and assumptions: - av_packet_ref() doesn't access the input padding, and just copies the data. By the API, AVPacket is always padded, and we violate this. The lavc implementation would have to go out of its way to make this a real problem, though. - We hope that the way we make the AVPacket refcountable in av_common.c is actually supported API-usage. It's hard to tell whether it is. Of course we still use our own "old" demux_packet struct, just so that libav* API usage is somewhat isolated.
* Remove stream_pts stuffwm42014-07-061-1/+0
| | | | | This was used by DVD/BD, but its usage was removed with one of the previous commits.
* demux: move packet functions to a separate source filewm42014-07-051-0/+9
|
* demux: export dts from demux_lavf, use it for aviwm42013-11-251-0/+1
| | | | | | | | | Having the DTS directly can be useful for restoring PTS values. The avi file format doesn't actually store PTS values, just DTS. An older hack explicitly exported the DTS as PTS (ignoring the [I assume] genpts generated non-sense PTS), which is not necessary anymore due to this change.
* demux: rename demux_packet.h to packet.hwm42013-11-181-0/+40
This always bothered me.