History log of /haiku/src/kits/media/MediaTrack.cpp
Revision Date Author Comments
# 218a8c03 17-May-2019 Augustin Cavalier <waddlesplash@gmail.com>

Revert the Codec Kit.

All of Barrett's individual reverts have been squashed into this
one commit, save a few actual bugfixes.

Change-Id: Ib0a7d0a841d3ac40b1fca7372c58b7f9229bd1f0


# 278d03da 27-Nov-2018 Barrett17 <b.vitruvio@gmail.com>

media_kit: Remove most private dependencies from codec_kit

* Move to BCodecKit namespace and make extensive use
of BCodecRoster.
* This is a first step in the right direction of
decreasing private dependencies. Some APIs are being
translated to the CodecKit. I am doing an investigation
on which APIs are really used among apps, so that the new
kit can be more slim and oriented toward easy development
and can be extended in the right direction instead to
continue maintaning unuseful code.
* BMediaFormats needs still a bit of love.
* General improvements in style and code maintainability.


# ee09c291 24-Nov-2018 Barrett17 <b.vitruvio@gmail.com>

Media Kit: Update private code


# b1c8bb2c 21-Nov-2018 Barrett17 <b.vitruvio@gmail.com>

MediaFile/MediaTrack: Use MetaData API internally


# 9b50ad1d 21-Nov-2018 Barrett17 <b.vitruvio@gmail.com>

MediaFile/MediaTrack: Use metadata to retrieve copyright


# 41e940ca 31-Aug-2013 John Scipione <jscipione@gmail.com>

MediaTrack: gaurd printf's behind TRACE_MEDIA_TRACK


# 72d0921a 31-Aug-2013 John Scipione <jscipione@gmail.com>

MediaTrack: Calling debugger() crashes the program

So, call printf instead, which allows the program to print an error
rather than crashing.


# 8bcc3722 31-Aug-2013 John Scipione <jscipione@gmail.com>

MediaTrack: Style fixes


# 332cc6bc 30-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

64 bit fixes for libmedia.so, ActivityMonitor, and Sudoku.

* Alex, I feel your pain :-)


# 53c00124 22-Feb-2011 Jérôme Duval <korli@users.berlios.de>

gcc 4.5 build fix


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40624 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 69372b55 20-Oct-2010 Stephan Aßmus <superstippi@gmx.de>

* Change the signature of the Writer plugins setup methods such
that they can modify the media_format passed in. For example they
can store information in the user_data section. I don't actually
use this anymore, but it may come in handy again.

AVFormatWriter:
* Adjust the AVCodecContext flags not only for video, but also
for audio streams (as the API example does). This mechanism
may not yet work, since the AVCodecEncoder actually uses a
different AVCodecContext instance.
* Use the encodeInfo->flags and specify the key frame flag
for the AVPacket. This finally makes videos encoded on Haiku
seekable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39035 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e54e93f 18-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Finall changed the Seek() method of Decoder plug-ins to
SeekedTo(), since it's only informative to decoders. They
can't modify the seeked frame/time. This also mirrors what
all existing decoders were doing in Seek(). BMediaTrack
is simplified accordingly (resolved two TODOs).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7cd3a249 17-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Implemented an API to get arbitrary meta-data about
BMediaFiles and about BMediaTracks in BMessages. As an
example, one can get chapter meta-data or the language
name of an audio-track.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8b74f90 06-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Resolved TODO. The current time should point to
the beginning of the next buffer. GetNextChunk()
still has the same problem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38544 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 575fd7c2 01-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Of course the same fix needs to be applied
to SeekToTime(). The extractor may have
modified the time, don't let the decoder
overwrite the actually seeked time. I am thinking
the API should be called SeekedTo() or Seeked(),
and would be purely informative for decoders,
without even a return value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38499 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9297e303 01-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Do not override the seek frame which the extractor may
have adjusted. (The API is somewhat silly, since Decoders
can't really do anything with the seek frame, it can only
be told to them. But current decoders will assign the seeked
frame from the wanted frame, which would override the seeked
frame from the extractor... the API should be fixed.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38496 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4f3cf20 24-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

* Renamed _plugin_manager to gPluginManager.
* Improved tracing in PluginManager.cpp when loading an add-on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38330 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eddec292 21-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 547934cb 12-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Reverted some of my changes with regards to fCurrentTime and added respective
TODOs. For now, it is easier for applications to work around the status quo
until the TODOs are implemented.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35032 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ea74f6c 06-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

It's late, forgot to remove debugging output...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34924 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a57be2a 06-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

* Indentation and naming cleanup in the header
* Small coding style cleanups in the .cpp
* When reading raw chunks, keep fCurrentFrame updated anyway
* When decoding frames and chunks, don't change the meaning of fCurrentTime,
it's supposed to be the start time of the next chunk/frame, same as
CurrentFrame(), not the time of the frame/chunk we just decoded/read.
BMediaTrack::CurrentFrame() is actually documented like this in the BeBook,
but CurrentTime() is not. However, when seeking to a specific time, it is
understood that this is the time of the next frame/chunk. If we decode/read
it and set fCurrentTime to the start_time as specified in the media_header,
it would actually not change for the first frame/chunk after seeking.
To be able to know the duration of chunks, fWriterFormat had to be changed
to just fFormat and is now used for decoding as well.
* Simplified handling of media_header in some methods, saves one assignment.

These changes are not so well tested, yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34923 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb4b63e7 05-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed last minute change that I apparently didn't compile. Sorry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32125 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6780c24d 05-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

Encoder:
* Fleshed out the Encoder API to support parameter setters/getters and returning
a BView for configuration. (Not yet sure if this is a good idea.)

BMediaTrack:
* Implemented all but one of the unimplemented methods in BMediaTrack. It should
be working as far as that class is concerned, unless I missed some of the
vision. ReplaceFrames() remains a stub, added a comment on why it probably
stays that way.
* Release the Encoder reference in the destructor.

FFmpeg plugin:
* Refactoring to delay opening the AVCodec until encoding the first chunk,
so that we can still adjust parameters.
* Support adjusting parameters via [Set|Get]EncodeParameters(). Currently,
only quality is supported, added TODOs about supporting the bit_rate setup
versus the automatically calculated bit_rate.
* Extended EncoderDescription by a bit_rate scale. The Encoder calculates the
raw bitrate needed by the current media format, and then divides that
number by the specific codec's bit_rate_scale, while taking into account the
desired quality. This seems to work very well already (tested with MPEG4),
although a lot more parameters could be specified for libavcodec, depending
on the desired quality.
* Enabled the ogg muxer in libavformat, although it is currently still disabled
in MuxerTable.cpp, because it rejects unknown codecs. Added TODO to this
effect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32124 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4384acf6 31-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* Tweaked the Writer API. Basically, we need an Init() method that takes the
media_file_format as input, so that the Writer knows what kind of file is
needed.
* Also, since information about the stream format is going to be needed at the
Writer level as well, the AllocateCookie() method gets the stream
media_format.
* Fleshed out some aspects of AVFormatWriter, many TODOs are left.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32025 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fa770e4c 31-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* Writer::WriteChunk() takes media_encode_info* instead of flags.
* Improved Encoder API towards what we need for the get_next_encoder() variants
and the BMediaTrack API.
* Implemented the rest of MediaWriter. Still undecided what to make of
AddTrackInfo(). BMediaEncoder has that as well, which hints that this is
something the Encoder needs to support. But it could also be that this is
only possible to support in Writer.
* Wired a lot of previously unimplemented methods in BMediaFile and BMediaTrack
needed for write support. If I have not overlooked anything, only the
parameter stuff is still unimplemented now.

This is all untested, since the FFMpeg Encoder and Writer are still only stubs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32013 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8316d9f 30-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Cleanup and preparations for BPrivate::media::MediaWriter, which will soon
exist.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31983 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b60892ce 31-Mar-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

* As suggested by Axel, BMediaTrack::GetCodecInfo() don't anymore say
"Haiku Media Kit: ", as it's given for any caller of a Media Kit API ;-)
* This remove an systematic line feed in the codec pretty name returned;
* Updated MediaPlayer info window text layout to take this change into account.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29836 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae4ebbcc 06-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

* Use NULL instead of 0 for some pointer initializations.
* Slightly more debug output for failed atempts to create a decoder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e26120ae 25-May-2008 François Revol <revol@free.fr>

Add char * version of ReadFrames, for compatibility with some R5 games.
Patch by genki0. I didn't see any reason not to commit it, so...
This should fix #897.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25656 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d830aa92 20-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* Added FindKeyFrame() method to MediaExtractor, it is similar to Seek(),
but operates "read-only".
* Added FindKeyFrame() method to ReaderPlugin, see above.
* Reformated ReaderPlugin header. Added const qualifier to Source() method.
* Small cleanups in BMediaTrack::SeekToTime() and SeekToFrame(). Added TODOs
with regards to "seeking" in decoders, wich should IMHO be revised. (Codecs
cannot seek in the stream, they only get fed chunk data. The only thing they
can do is reset themselves in preparation for a discontinuity of the chunk
data...)
* Implemented BMediaTrack::FindKeyframeByXX() methods via the new
MediaExtractor::FindKeyFrame() method.
* Implemented Seek() and FindKeyFrame() methods in the Reader base class,
returning B_NOT_SUPPORTED. I think this makes sense and also I don't have
to adapt all existing Reader plugins for the new FindKeyFrame() call. :-)
* Implemeneted FindKeyFrame() in the avi_reader. The OpenDMLFile class
gets Seek() extended for a "read-only" mode. Currently the implementation
is broken (as before) with regards to keyframes. These were ignored before
and I have not changed them to actually support the seek flags with regards
to keyframes. That's the interesting TODO...
* Some reformatting here and there in avi_reader code, sorry for the mixup.
The only actual change is the support for the read-only flag to Seek().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3bac9fe1 19-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

Failing to find a suitable decoder for a stream is reported in three different
modules, I left the one from MediaExtractor::CreateDecoder, since it also
mentions the stream index.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a08f6a39 19-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

Return B_ERROR for the FindKeyFrameFor*() methods, unless the time/frame
is 0, in which case it is almost save to assume it is a keyframe. Added
TODO though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24474 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c844c208 19-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* Use tracing facilities in BMediaTrack.
* Turn off tracing in the Media Kit.
* Notify of unimplemented functions regardless of tracing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24473 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d182929 02-Jun-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Moved creating and destroying of Reader and Decoder plugins into the PluginManager class.
Removed deferred initialization from BMediaDecoder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21296 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e77acd69 08-May-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

disabled some debug output


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17379 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08a32bf9 19-Feb-2006 Jérôme Duval <korli@users.berlios.de>

replaced printf with PRINT (our Terminal doesn't handle so much data)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16466 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d1adad3 29-Jun-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

Media Codec API just got a visit from the coding style police.
We now use "const" for the chunk buffer pointer returned by GetNextChunk,
because the buffer is not supposed to be modified by the codec.
size_t is used for the size where applicable. This matches BMediaDecoder.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fa96039f 20-Nov-2004 shatty <shatty@nowhere.fake>

address compiler warnings


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10076 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5463e6f 23-Oct-2004 beveloper <beveloper@nowhere.fake>

better debug output


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9465 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4d07a3e 15-Aug-2004 beveloper <beveloper@nowhere.fake>

Added some new functions which seem to be required for Xentronics SampleStudio Pro.
Added missing license to implementation files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8590 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 146e9286 15-Aug-2004 beveloper <beveloper@nowhere.fake>

This is now the Haiku Media Kit


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8588 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0df25da 29-Feb-2004 beveloper <beveloper@nowhere.fake>

removed debug output


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6823 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bac2b3f1 29-Feb-2004 beveloper <beveloper@nowhere.fake>

When the decoder doesn't support the requested format, the raw decoder is utilized
to provide a format conversion to the requested raw format.
Added a few workarounds for applications that don't requst the required format
but instead assume to get a specific one.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2ca77a1 08-Feb-2004 beveloper <beveloper@nowhere.fake>

provide zero media_header, and let reader or decoder set up missing values


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6538 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a6423eea 29-Jan-2004 beveloper <beveloper@nowhere.fake>

improved media_header usage


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6420 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 21aea2f3 28-Jan-2004 beveloper <beveloper@nowhere.fake>

make failures more visible


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 35678406 27-Dec-2003 beveloper <beveloper@nowhere.fake>

to aid decoder debugging


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5775 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d52474b 08-Dec-2003 beveloper <beveloper@nowhere.fake>

a couple of fixes to the error handling code


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25305239 06-Dec-2003 beveloper <beveloper@nowhere.fake>

codec output format negotiation has been moved into NegotiateOutputFormat,
Setup is now only called once


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5596 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac800e9c 05-Dec-2003 beveloper <beveloper@nowhere.fake>

fixed BMediaTrack::EncodedFormat(), BeOS MediaPlayer now recognizes the tracks!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5583 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0b86c0f 05-Dec-2003 beveloper <beveloper@nowhere.fake>

mp3 decoding and seeking works now


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5581 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1210ab70 04-Dec-2003 beveloper <beveloper@nowhere.fake>

Huge hack to load the mp3 reader and decoder.
Soundplay loads it and can play a crackling mp3, but MediaPlayer doesn't


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5572 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f741a83 01-Dec-2003 beveloper <beveloper@nowhere.fake>

more codec api enhancements


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d8591482 23-Nov-2003 beveloper <beveloper@nowhere.fake>

integration of codec API into BMediaFile and BMediaTrack


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5468 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 48ff964f 12-Jul-2002 beveloper <beveloper@nowhere.fake>

removed warnigs


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 41e940ca3bad8656a4f69d194fcd1638e52111ed 31-Aug-2013 John Scipione <jscipione@gmail.com>

MediaTrack: gaurd printf's behind TRACE_MEDIA_TRACK


# 72d0921ae8a63926e0e49667a6c22bef64691227 31-Aug-2013 John Scipione <jscipione@gmail.com>

MediaTrack: Calling debugger() crashes the program

So, call printf instead, which allows the program to print an error
rather than crashing.


# 8bcc3722ba5c7db7cfdfb5b61c6d918dbccb1589 31-Aug-2013 John Scipione <jscipione@gmail.com>

MediaTrack: Style fixes


# 332cc6bc3b696473169bb9e43340b69a0a3fc4f1 30-Nov-2012 Axel Dörfler <axeld@pinc-software.de>

64 bit fixes for libmedia.so, ActivityMonitor, and Sudoku.

* Alex, I feel your pain :-)


# 53c001249b627cdaebe76371407d7a61f035a205 22-Feb-2011 Jérôme Duval <korli@users.berlios.de>

gcc 4.5 build fix


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40624 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 69372b55450310f3f82caebdd5b9f87a4f4edad9 20-Oct-2010 Stephan Aßmus <superstippi@gmx.de>

* Change the signature of the Writer plugins setup methods such
that they can modify the media_format passed in. For example they
can store information in the user_data section. I don't actually
use this anymore, but it may come in handy again.

AVFormatWriter:
* Adjust the AVCodecContext flags not only for video, but also
for audio streams (as the API example does). This mechanism
may not yet work, since the AVCodecEncoder actually uses a
different AVCodecContext instance.
* Use the encodeInfo->flags and specify the key frame flag
for the AVPacket. This finally makes videos encoded on Haiku
seekable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39035 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e54e93fbf76098340f69d0d1bc9d82579fb0069 18-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Finall changed the Seek() method of Decoder plug-ins to
SeekedTo(), since it's only informative to decoders. They
can't modify the seeked frame/time. This also mirrors what
all existing decoders were doing in Seek(). BMediaTrack
is simplified accordingly (resolved two TODOs).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7cd3a2490b94cecc15ce451c8d1c97c04dc852bd 17-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Implemented an API to get arbitrary meta-data about
BMediaFiles and about BMediaTracks in BMessages. As an
example, one can get chapter meta-data or the language
name of an audio-track.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38685 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8b74f90f4e3920f5379d532189a4182b698ea55 06-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Resolved TODO. The current time should point to
the beginning of the next buffer. GetNextChunk()
still has the same problem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38544 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 575fd7c2bff5615f6b8224a9746e46e5eae9c2e5 01-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Of course the same fix needs to be applied
to SeekToTime(). The extractor may have
modified the time, don't let the decoder
overwrite the actually seeked time. I am thinking
the API should be called SeekedTo() or Seeked(),
and would be purely informative for decoders,
without even a return value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38499 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9297e303c51fca9714d474b873e92418ae460b3b 01-Sep-2010 Stephan Aßmus <superstippi@gmx.de>

Do not override the seek frame which the extractor may
have adjusted. (The API is somewhat silly, since Decoders
can't really do anything with the seek frame, it can only
be told to them. But current decoders will assign the seeked
frame from the wanted frame, which would override the seeked
frame from the extractor... the API should be fixed.)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38496 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4f3cf203ce3aa7bd0422cac0931052261a398b5 24-Aug-2010 Stephan Aßmus <superstippi@gmx.de>

* Renamed _plugin_manager to gPluginManager.
* Improved tracing in PluginManager.cpp when loading an add-on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38330 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eddec292d5dd8251a00851880e16e6a5c07c1e3f 21-Jul-2010 Oliver Tappe <zooey@hirschkaefer.de>

* applied patch by kaliber that fixes more than 100 warnings - thanks a lot!
Closes #6349

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37670 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 547934cbbd4b41e377ed35e3b4367c5285c7219b 12-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Reverted some of my changes with regards to fCurrentTime and added respective
TODOs. For now, it is easier for applications to work around the status quo
until the TODOs are implemented.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35032 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9ea74f6c0b400dc7d4debf1820d0775e2be9b102 06-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

It's late, forgot to remove debugging output...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34924 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a57be2aea3a9cac9e7f89c5fed73329b6e85098 06-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

* Indentation and naming cleanup in the header
* Small coding style cleanups in the .cpp
* When reading raw chunks, keep fCurrentFrame updated anyway
* When decoding frames and chunks, don't change the meaning of fCurrentTime,
it's supposed to be the start time of the next chunk/frame, same as
CurrentFrame(), not the time of the frame/chunk we just decoded/read.
BMediaTrack::CurrentFrame() is actually documented like this in the BeBook,
but CurrentTime() is not. However, when seeking to a specific time, it is
understood that this is the time of the next frame/chunk. If we decode/read
it and set fCurrentTime to the start_time as specified in the media_header,
it would actually not change for the first frame/chunk after seeking.
To be able to know the duration of chunks, fWriterFormat had to be changed
to just fFormat and is now used for decoding as well.
* Simplified handling of media_header in some methods, saves one assignment.

These changes are not so well tested, yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34923 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb4b63e744919048c6a9f038ac4e59f30b9164f9 05-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed last minute change that I apparently didn't compile. Sorry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32125 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6780c24d36ada936c1d3a1095d2ed9730ef1e0c7 05-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

Encoder:
* Fleshed out the Encoder API to support parameter setters/getters and returning
a BView for configuration. (Not yet sure if this is a good idea.)

BMediaTrack:
* Implemented all but one of the unimplemented methods in BMediaTrack. It should
be working as far as that class is concerned, unless I missed some of the
vision. ReplaceFrames() remains a stub, added a comment on why it probably
stays that way.
* Release the Encoder reference in the destructor.

FFmpeg plugin:
* Refactoring to delay opening the AVCodec until encoding the first chunk,
so that we can still adjust parameters.
* Support adjusting parameters via [Set|Get]EncodeParameters(). Currently,
only quality is supported, added TODOs about supporting the bit_rate setup
versus the automatically calculated bit_rate.
* Extended EncoderDescription by a bit_rate scale. The Encoder calculates the
raw bitrate needed by the current media format, and then divides that
number by the specific codec's bit_rate_scale, while taking into account the
desired quality. This seems to work very well already (tested with MPEG4),
although a lot more parameters could be specified for libavcodec, depending
on the desired quality.
* Enabled the ogg muxer in libavformat, although it is currently still disabled
in MuxerTable.cpp, because it rejects unknown codecs. Added TODO to this
effect.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32124 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4384acf6c1a8ab4d4a944354d95ecfcc23e30fc2 31-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* Tweaked the Writer API. Basically, we need an Init() method that takes the
media_file_format as input, so that the Writer knows what kind of file is
needed.
* Also, since information about the stream format is going to be needed at the
Writer level as well, the AllocateCookie() method gets the stream
media_format.
* Fleshed out some aspects of AVFormatWriter, many TODOs are left.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32025 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fa770e4c84d6b6e9721a6072041aba4468e79b98 31-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* Writer::WriteChunk() takes media_encode_info* instead of flags.
* Improved Encoder API towards what we need for the get_next_encoder() variants
and the BMediaTrack API.
* Implemented the rest of MediaWriter. Still undecided what to make of
AddTrackInfo(). BMediaEncoder has that as well, which hints that this is
something the Encoder needs to support. But it could also be that this is
only possible to support in Writer.
* Wired a lot of previously unimplemented methods in BMediaFile and BMediaTrack
needed for write support. If I have not overlooked anything, only the
parameter stuff is still unimplemented now.

This is all untested, since the FFMpeg Encoder and Writer are still only stubs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32013 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b8316d9f936a7478cf94aa54e078894761cb4ca7 30-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Cleanup and preparations for BPrivate::media::MediaWriter, which will soon
exist.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31983 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b60892ce1c2ea10d2906df498f5db8fd5a62e185 31-Mar-2009 Philippe Houdoin <philippe.houdoin@gmail.com>

* As suggested by Axel, BMediaTrack::GetCodecInfo() don't anymore say
"Haiku Media Kit: ", as it's given for any caller of a Media Kit API ;-)
* This remove an systematic line feed in the codec pretty name returned;
* Updated MediaPlayer info window text layout to take this change into account.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29836 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae4ebbcca62e1f32933c3e6846c20b2ff5044af4 06-Jun-2008 Stephan Aßmus <superstippi@gmx.de>

* Use NULL instead of 0 for some pointer initializations.
* Slightly more debug output for failed atempts to create a decoder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25825 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e26120ae27f408b19f5ac9d777a7774b9defb478 25-May-2008 François Revol <revol@free.fr>

Add char * version of ReadFrames, for compatibility with some R5 games.
Patch by genki0. I didn't see any reason not to commit it, so...
This should fix #897.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25656 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d830aa92ce5e5063357b44483277e931f0276307 20-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* Added FindKeyFrame() method to MediaExtractor, it is similar to Seek(),
but operates "read-only".
* Added FindKeyFrame() method to ReaderPlugin, see above.
* Reformated ReaderPlugin header. Added const qualifier to Source() method.
* Small cleanups in BMediaTrack::SeekToTime() and SeekToFrame(). Added TODOs
with regards to "seeking" in decoders, wich should IMHO be revised. (Codecs
cannot seek in the stream, they only get fed chunk data. The only thing they
can do is reset themselves in preparation for a discontinuity of the chunk
data...)
* Implemented BMediaTrack::FindKeyframeByXX() methods via the new
MediaExtractor::FindKeyFrame() method.
* Implemented Seek() and FindKeyFrame() methods in the Reader base class,
returning B_NOT_SUPPORTED. I think this makes sense and also I don't have
to adapt all existing Reader plugins for the new FindKeyFrame() call. :-)
* Implemeneted FindKeyFrame() in the avi_reader. The OpenDMLFile class
gets Seek() extended for a "read-only" mode. Currently the implementation
is broken (as before) with regards to keyframes. These were ignored before
and I have not changed them to actually support the seek flags with regards
to keyframes. That's the interesting TODO...
* Some reformatting here and there in avi_reader code, sorry for the mixup.
The only actual change is the support for the read-only flag to Seek().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24495 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3bac9fe16c19307136b55e2e91772aa7e4adcf57 19-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

Failing to find a suitable decoder for a stream is reported in three different
modules, I left the one from MediaExtractor::CreateDecoder, since it also
mentions the stream index.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a08f6a39d8b0692e2aaca54d60e11922547a7abe 19-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

Return B_ERROR for the FindKeyFrameFor*() methods, unless the time/frame
is 0, in which case it is almost save to assume it is a keyframe. Added
TODO though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24474 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c844c20840961b156eb965c3b1c0d0a2709cfd37 19-Mar-2008 Stephan Aßmus <superstippi@gmx.de>

* Use tracing facilities in BMediaTrack.
* Turn off tracing in the Media Kit.
* Notify of unimplemented functions regardless of tracing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24473 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1d18292953efe255c6d4b365db6a61473acc0b12 02-Jun-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

Moved creating and destroying of Reader and Decoder plugins into the PluginManager class.
Removed deferred initialization from BMediaDecoder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21296 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e77acd698aa34a81e62d6108bdb9f972035a2fe2 08-May-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

disabled some debug output


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17379 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08a32bf95d88df3625a97004cf5a2e66f33234cb 19-Feb-2006 Jérôme Duval <korli@users.berlios.de>

replaced printf with PRINT (our Terminal doesn't handle so much data)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16466 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d1adad317d12e39380ee4876ca4b36fd7814901 29-Jun-2005 Marcus Overhagen <marcusoverhagen@gmail.com>

Media Codec API just got a visit from the coding style police.
We now use "const" for the chunk buffer pointer returned by GetNextChunk,
because the buffer is not supposed to be modified by the codec.
size_t is used for the size where applicable. This matches BMediaDecoder.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13361 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fa96039f9c477d1346f7afc6cc8b887cd366b86d 20-Nov-2004 shatty <shatty@nowhere.fake>

address compiler warnings


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10076 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5463e6f2f4d5954e8348c64b32dbcea3f6dd216 23-Oct-2004 beveloper <beveloper@nowhere.fake>

better debug output


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9465 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4d07a3e7185e6d020d418c241613d566ccd7b15 15-Aug-2004 beveloper <beveloper@nowhere.fake>

Added some new functions which seem to be required for Xentronics SampleStudio Pro.
Added missing license to implementation files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8590 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 146e92861a1cde3fc80516fecc2738375f119c68 15-Aug-2004 beveloper <beveloper@nowhere.fake>

This is now the Haiku Media Kit


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8588 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c0df25dada740503e4a0b986ccabcffd07d8c605 29-Feb-2004 beveloper <beveloper@nowhere.fake>

removed debug output


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6823 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bac2b3f15ca3b7ac97c4211606583b0309f3d654 29-Feb-2004 beveloper <beveloper@nowhere.fake>

When the decoder doesn't support the requested format, the raw decoder is utilized
to provide a format conversion to the requested raw format.
Added a few workarounds for applications that don't requst the required format
but instead assume to get a specific one.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2ca77a1b1af0a30383b12072b12891d8f325bba 08-Feb-2004 beveloper <beveloper@nowhere.fake>

provide zero media_header, and let reader or decoder set up missing values


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6538 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a6423eea41409d069e26c0ce483ebbb76929df59 29-Jan-2004 beveloper <beveloper@nowhere.fake>

improved media_header usage


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6420 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 21aea2f3df0243e3546e046af045282ccc622602 28-Jan-2004 beveloper <beveloper@nowhere.fake>

make failures more visible


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 356784062cc409278eaf2465acb236281f60d42a 27-Dec-2003 beveloper <beveloper@nowhere.fake>

to aid decoder debugging


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5775 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d52474bc70c165c0cd4217af59d148ed810fa11 08-Dec-2003 beveloper <beveloper@nowhere.fake>

a couple of fixes to the error handling code


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5631 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2530523976c41f4c5219b00cd5a328b84ce6d38d 06-Dec-2003 beveloper <beveloper@nowhere.fake>

codec output format negotiation has been moved into NegotiateOutputFormat,
Setup is now only called once


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5596 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ac800e9cd847a1792bb0f713d6ae1036d01480de 05-Dec-2003 beveloper <beveloper@nowhere.fake>

fixed BMediaTrack::EncodedFormat(), BeOS MediaPlayer now recognizes the tracks!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5583 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0b86c0f31ec58c29fdce972f8e892235c22768b 05-Dec-2003 beveloper <beveloper@nowhere.fake>

mp3 decoding and seeking works now


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5581 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1210ab70ac360af3e24f04ef2a1fa5bdef4f0b70 04-Dec-2003 beveloper <beveloper@nowhere.fake>

Huge hack to load the mp3 reader and decoder.
Soundplay loads it and can play a crackling mp3, but MediaPlayer doesn't


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5572 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0f741a83c13166cac9f5dc011c3bb47e12405033 01-Dec-2003 beveloper <beveloper@nowhere.fake>

more codec api enhancements


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d859148201db6e851ba0a8ed96b12af21fbf06c0 23-Nov-2003 beveloper <beveloper@nowhere.fake>

integration of codec API into BMediaFile and BMediaTrack


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5468 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 48ff964fe775ad879dbb4ae16b0f2566bcacebe4 12-Jul-2002 beveloper <beveloper@nowhere.fake>

removed warnigs


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@131 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 52a380120846174213ccce9c4aab0dda17c72083 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96