summaryrefslogtreecommitdiffstats
path: root/timeline/tl_cue.c
Commit message (Collapse)AuthorAgeFilesLines
* core, timeline: don't keep separate stream fieldwm42012-09-071-14/+6
| | | | | | | | | | | The timeline code kept pairs of stream and demuxer references around. The reference to the stream is redundant, because it can be accessed through the demuxer. Simplify the code by removing the redundant stream reference. Also, set mpctx->stream to the current segment when using timeline. Fix a small memory leak in tl_matroska.c introduced earlier.
* bstr: rename bstr() function to bstr0(), and typedef bstr to struct bstrwm42012-07-281-8/+8
| | | | | Replace all uses of bstr() with bstr0(). Also remove the ridiculous C++ workaround.
* Merge remote-tracking branch 'origin/master'wm42012-07-281-1/+1
| | | | | | | | | | | | | | | | | | | Conflicts: .gitignore bstr.c cfg-mplayer.h defaultopts.c libvo/video_out.c The conflict in bstr.c is due to uau adding a bstr_getline function in commit 2ba8b91a97e7e8. This function already existed in this branch. While uau's function is obviously derived from mine, it's incompatible. His function preserves line breaks, while mine strips them. Add a bstr_strip_linebreaks function, fix all other uses of bstr_getline, and pick uau's implementation. In .gitignore, change vo_gl3_shaders.h to use an absolute path additional to resolving the merge conflict.
* cue: play .bin files as raw PCM audio (even if it means playing noise)wm42012-02-261-0/+14
| | | | | | | | | | The cue code will open the .bin file with demux_rawaudio if the file can't be opened otherwise. In case the .bin file isn't in the exact format demux_rawaudio uses (usually 44100 Hz, 2 ch, s16le PCM), noise will be played. This is done only if no other demuxer could open the file, and the file extension is ".bin".
* core: add new support for reading .cue fileswm42012-01-181-0/+422
Playing a .cue file directly will now parse the .cue file, and load and play the file(s) referenced in the cue. If multiple files are referenced, a timeline including all files will be created to create the impression of a single, flat audio file containing all the tracks. For each track, a chapter is created. The chapter navigation commands can be used to jump between tracks. The chapter titles will use the string provided by the track's TITLE cue command. (The -identify command can be used to print all chapters in a not so user friendly way.) Other than the chapter names, there is no attempt at displaying or exposing any other meta data contained in the cue files yet. The handling (or lack of thereof) of gaps (track pregaps and postgaps) is probably not correct yet. In general, mplayer's mapping of tracks to the source audio files can be verified by examining the timeline, which will be printed when passing the -v switch. Note that this has nothing to do with the old cue:// support. The old code isn't touched, and is still only able to play .cue/.bin pairs. Prefixing a .cue file with cue:// will always invoke the old code, while playing a .cue file directly (i.e. "mplayer file.cue") will always use the new code. Playing audio images (.cue/.bin pairs of files) doesn't work yet.