Commit Graph

318 Commits

Author SHA1 Message Date
Stefano Ceccherini
b0acb3febf Don't leak the BMediaFile. CID 5
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-23 08:14:07 +00:00
David McPaul
ac847fc895 Don't call Reader methods with invalid cookies
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-16 02:24:19 +00:00
David McPaul
086dbe90c8 limit no of retries to prevent infinite loop
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-10 13:54:03 +00:00
Stephan Aßmus
b66837d4cd Better debug output, print the error string when failing to get a Reader or Decoder.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-19 15:30:29 +00:00
Alexandre Deckner
abe0b5c858 - MakeViewFor didn't return a view with a good default size when no hintRect was provided (as
in Cortex). This happened only when needing a tabbed view. It will now return a view with the 
most fitting size. This fixes #597



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-11 01:47:49 +00:00
Rene Gollent
642695c2fe Build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25827 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-06 15:27:28 +00:00
Stephan Aßmus
ae4ebbcca6 * 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
2008-06-06 13:07:02 +00:00
Stephan Aßmus
bddb4413d7 Do not remove the plugin from the list if the ref count has not reached
zero, otherwise we leak these plugins, since the ref counting is based
on the plugin still being in the list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25792 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-03 17:09:13 +00:00
Stephan Aßmus
cc4ed3f7e7 Honor the 80 char per line limit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-03 17:07:47 +00:00
François Revol
e26120ae27 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
2008-05-25 21:45:32 +00:00
Maurice Kalinowski
8b1e3b1af8 - Implemented MediaExtractor::Copyright, which just calls the instantiated reader
- Implemented BMediaFile::Copyright, which just calls Copyright() of the extractor. So this is just a simple pass through.
- Style cleanup (mostly whitespaces)

Problem is that our readers currently return the copyright of the source code, not the copyright of the MediaFile itself, like the BeBook documents. Thus, we might need to change all readers to return appropiate data or behave differently for Haiku readers.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-07 21:09:56 +00:00
Jérôme Duval
fc1ca2da5c style cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 12:16:53 +00:00
Jérôme Duval
a74d92608d style cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 11:31:00 +00:00
Maurice Kalinowski
a7fb4c16b6 fix some gcc4 related warnings...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 20:28:55 +00:00
Maurice Kalinowski
3c08ed4a34 Don't reset the duration value after passing it to SetRef as pointed out by Marcus.
Sorry for taking so long to commit this...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-09 19:43:49 +00:00
Jérôme Duval
b5c24e59f2 fix typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 18:14:52 +00:00
Maurice Kalinowski
6938364b39 * Implemented BMediaRoster hooks GetRefFor, SetRefFor, SniffRefFor to access BFileInterface related file functions.
* Implemented BFileInterface class which was nearly empty so far. Added handling of messages passed to BFileInterface class.
* Added needed structs and message values to DataExchange.
* This is needed to get for instance the reader.media_addon to work. Usually one calls above functions to set a file to be decoded by the node. If the target is a consumer, they are used for setting the target for encoding data.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 01:35:58 +00:00
Maurice Kalinowski
999cd0acee * implemented BMediaRoster::StartControlPanel(). It queries a BControllable node with CONTROLLABE_START_CONTROL_PANEL message and returns the result to the caller (thx for help/suggestions from Marcus here). Needed to add appropiate structs and message value to DataExchange.h
* implemented BControllable::StartControlPanel(). The behaviour is supposed to be the one documented in the BeBook, meaning that it first checks if the BControllable node has been instantiated over an BMediaAddOn. If so, we investigate where the addon is located and try to launch it. Thus media_addons which have a control panel need to be compiled as an Application, not as an Addon. See r24664 as an example.
* inside BControllable::HandleMessage() call StartControlPanel for the message.
* MediaNodes having such a ControlPanel are rarely used as parameterwebs should provide you everything. But for instance the vst MediaAddOn uses it and some others do as well.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 20:53:01 +00:00
Stephan Aßmus
9def3bf783 * Rewrote MediaRoster.h
* Removed appearantly unused satic variables. Hope this does not break
  binary compatibility, going to test.
* There are three more private methods, which could probably be removed
  as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 15:42:58 +00:00
Stephan Aßmus
a715f908f2 * Use new (std::nothrow), check for out of memory conditions and report them.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 15:25:52 +00:00
Stephan Aßmus
8b940bb400 * Set the global BMediaRoster instance pointer to NULL in the destructor,
the DefaultDeleter is not the only situation in which the instance might
  be deleted, a client app can also call Quit() on the BMediaRoster instance.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 15:16:55 +00:00
Stephan Aßmus
e339f8165b Also don't print error on B_BAD_PORT_ID in BMediaNode::WaitForMessage(),
it just means the port has been deleted while the node was waiting, like
when a program quits.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-21 13:02:01 +00:00
Stephan Aßmus
6b8545a4fe * Improve line breaks in BMediaNode::WaitForMessage() for 80 char width
according to coding style guide.
* Print the error string for read_port_etc() instead of the error code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-21 12:40:46 +00:00
Stephan Aßmus
8056f0db19 * Failing to find an add-on for a BMediaNode could simply mean that the
node was instantiated by an application, therefor it is not an error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-21 12:37:43 +00:00
Stephan Aßmus
d830aa92ce * 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
2008-03-20 23:36:14 +00:00
Stephan Aßmus
3bac9fe16c 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
2008-03-20 12:59:45 +00:00
Stephan Aßmus
4a46d818c9 * Implemented ERROR as fprintf(stderr, ...) with tracing turned off as well.
* Fixed all but one compiler warnings in libmedia.so.
* Truncated lines to 80 char width where I looked at code.
* Turned printf()s into TRACE/ERROR calls in MediaExtractor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-19 19:39:07 +00:00
Stephan Aßmus
a08f6a39d8 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
2008-03-19 17:15:12 +00:00
Stephan Aßmus
c844c20840 * 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
2008-03-19 17:12:05 +00:00
Stephan Aßmus
c2848f102b * Improved debug output.
* fTrackList was deleted with delete, but needed delete[].


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-19 17:09:26 +00:00
Marcus Overhagen
4ca14fe1a6 Fixed harmless copy & paste bug.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-12 23:19:52 +00:00
Marcus Overhagen
eb5b2f6fde Removed a lot of unsave memory handling.
Check for memory allocation errors.
Added limit to maximum flavor format count (300).
No longer crashes when out_format_count is invalid for B_BUFFER_CONSUMER,
or in_format_count is invalid for B_BUFFER_PRODUCER.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-11 23:24:40 +00:00
Marcus Overhagen
05b79eadff Removed the no longer needed debug code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-06 22:08:25 +00:00
Stephan Aßmus
00f378126a First part of a patch sent by Clemens zeidler:
* The BMediaTheme now uses B_WIDTH_FROM_LABEL for tabs in tabviews, 
  this makes tabs as wide as they need to be.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-05 08:04:03 +00:00
Stephan Aßmus
034e2b7f94 applied patch by Maurice Kalinowski:
* BTimeSource now checks if it is about to add itself as a slave node
  and refuses to.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-05 08:00:08 +00:00
Stephan Aßmus
67abb56fcd patch by aldeck:
* fixes the content inside the tabview in the Media preflet spanning over
  the wrong area (wrong insets)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 13:46:35 +00:00
Marcus Overhagen
b571493666 drop into debugger when things go wrong
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-10 22:04:34 +00:00
Stefano Ceccherini
b085f27f8c Return an error in BSound methods, since they aren't implemented. Should
fix bug #1573, although I can't really test.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-20 08:41:18 +00:00
Ingo Weinhold
6e927a5fc0 malloc.h ain't no standard header. Use stdlib.h instead.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-30 17:32:27 +00:00
Jérôme Duval
287cc7652b fix gcc4 build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-16 19:02:28 +00:00
Axel Dörfler
f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Axel Dörfler
332d5f437e Some cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22568 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 14:09:14 +00:00
Marcus Overhagen
31cf24c13e debugging instrumentation for Cortex lockup bug (some weeks old already)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-21 18:44:55 +00:00
Marcus Overhagen
9e448b6224 cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-02 23:16:54 +00:00
Marcus Overhagen
1d18292953 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
2007-06-02 20:00:48 +00:00
Jérôme Duval
80856c970f fixed typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 19:37:11 +00:00
Jérôme Duval
88ec4b1dbe fixed some warnings
code style of MMediaFilesManager.* 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-15 13:59:59 +00:00
François Revol
0ba2462a6d Added a stub BTextParameter as in Dano, I'd need that for ESDSink at least.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-16 23:40:49 +00:00
Axel Dörfler
9d00b1d56d * The "no theme available" string is now resized as needed.
* Rewrote header, cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-02 12:54:33 +00:00
Jérôme Duval
c332e7f74e fixed build for R5 : now uses inttypes.h because it's present on R5 also
HaikuBuildCompatibily.h exposes INT64_MAX based on limits.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-21 12:29:49 +00:00