Commit Graph

1061 Commits

Author SHA1 Message Date
François Revol
40f0a87316 - cleanup: one file per line for clarity,
- add url about a linux driver for a new webcam (topro, 06a2:0003) I found today.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-01 01:45:25 +00:00
Stefano Ceccherini
fac8f83095 Don't call avcodec_close() on an unopened codec, as that causes a crash.
Happens for example when you create a BMediaFile and close it without
committing the header


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-30 14:29:09 +00:00
Michael Lotz
6c4570c807 Also name these BLockers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-21 15:29:31 +00:00
Stephan Aßmus
78a6097283 Do not crash when a node tries to change the format during runtime, as long as
this is actually not implemented.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-20 14:14:00 +00:00
Oliver Tappe
571d840abf * dropped svn:keywords property from all files that carried it
to avoid recurring problems during migration of subversion checkouts
  (restored binary files that were garbled by subversions during checkout)
* added appropriate svn:mime-type property for problematic (binary) files
* removed a single (mistyped) svn:mimetype property 
* dropped svn:eol-style property for cleanup (they all contained 'native')



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-19 22:42:52 +00:00
Stephan Aßmus
e445909631 Fixed a few problems with extracting the output audio buffer size and setting
it in the media_format (encoded versus raw).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-19 16:31:14 +00:00
David McPaul
ff67bc43da Cleanup and preparation for h264/aac in mov
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-17 04:57:01 +00:00
Stephan Aßmus
0d77f605b5 Updated comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-29 19:39:37 +00:00
Stephan Aßmus
bf38341488 * Use the block-alignment from the codec context as the buffer size suggestion.
The audio decoding in AVDecoder needs this to work at all.
* Set the infoBuffer and infoSize correctly in GetStreamInfo(). At least this
  is what I extract from what the AVDecoder expects.
* Use a slightly more precise timeStamp calculation in the Seek() method.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-29 19:37:22 +00:00
Stephan Aßmus
967fcd2c41 Sorry, this was supposed to be part of the last commit...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33356 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-29 19:32:41 +00:00
Stephan Aßmus
ed4313bca9 * Improvements in tracing.
* Added TODO about a probable mix-up to use the media_format meta data
  because the FFmpeg Reader plug-in forgot to set the info-buffer correctly
  from GetStreamInfo().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-29 19:31:52 +00:00
Stephan Aßmus
bcc4e4bb37 We should only swap the FOURCCs on little endian machines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-29 19:29:05 +00:00
Stephan Aßmus
885513f0a0 Apparantly, FFmpeg has lock management now, and from the tracing, it is indeed
used. Spotted this on the libav*-user mailing list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-29 09:04:05 +00:00
Philippe Houdoin
b501083349 Update theora to latest v1.1, which improve performance and quality.
Untested yet...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-29 00:37:35 +00:00
David McPaul
4966c05232 register another xvid fourcc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-25 09:26:00 +00:00
David McPaul
cf78cd8986 improve workaround
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-24 11:43:41 +00:00
David McPaul
d88759d47a Add workaround for some broken avi files with 0 length chunks. See issue 4620
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-24 10:13:20 +00:00
David McPaul
c3d1699fcd removed use of MMX registers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-20 11:15:13 +00:00
David McPaul
507cac021c C comments do not mix with assembly comments
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-20 02:11:34 +00:00
David McPaul
6bfbea62cd Added SSE2 yuv to rgb conversion code. This code needs to move into the media kit though
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-19 23:34:23 +00:00
Jérôme Duval
bd7b0937db the float format is not supposed to be selected yet, as we don't support the float format in multi_audio.
dump more audio formats in hda.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-06 19:22:01 +00:00
Stephan Aßmus
e168f3257f This restores playback of AVC-HD videos from my video camera. The reported
codec tags in FFmpeg have changed. However, with the FFmpeg AC-3 decoder, I
am no longer getting sound. I suspect it's something to do with the channel
count.

P.S. I should really fix the endianess mess of the codec tags...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-29 08:41:42 +00:00
Stephan Aßmus
7e7886bdda Reenable the VC1 Decoder. It has been (accidentally?) disabled during the
last FFmpeg update. This let's WMV videos play again. Tested on GCC4 and
GGC2 builds.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-29 08:21:56 +00:00
François Revol
fb086488a9 - style fixes,
- fix error handling in CamDevice.cpp,
- implemented PowerOnSensor() for Sonix,
- add a ProbeByIICSignature method to CamSensor, that takes a list of regs and values to match, as some Linux drivers do,
- add (unfinished, mostly copied from TAS5110C1B) support for TAS5130D1B sensor,
- add (unfinished) support for PAS106 sensor, probe by IIC signature as the Linux driver does,
- add probing by IIC signature for the HV7131E1 sensor as the Linux driver does,
- use -lusb for BeOS (actually ZETA) builds, don't try to use the Haiku USB Kit,
- for the TAS5110C1B sensor, use remove code dup and call SetVideoFrame(), tweaked the values to match those sniffed from the XP driver,
- disabled gain control for now on sonix, doesn't seem to work on all models.
This gets another sonix-based webcam working, partially at least, so if you want to get one to try until UVC works, try this one:
http://www.macally.com/EN/product/ArticleShow.asp?ArticleID=119
We should at least have one webcam supported in the alpha :D
+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-28 22:08:22 +00:00
Jérôme Duval
99e369b76e add libswscale arch files, needed when INCLUDE_GPL_ADDONS is activated on x86
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-22 13:25:38 +00:00
Jérôme Duval
9a5d35d09d obviously forgot these
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-22 12:44:13 +00:00
Jérôme Duval
d44c1412ce * the ac3 frames detection doesn't work nice with big frames (1792) and buffer size of 2048
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-22 12:24:19 +00:00
Jérôme Duval
f0bdc7699c * synced with ffmpeg-r19678, keeping gcc2 compiler #ifdef we introduced, build only tested on Haiku gcc2
* activated ac3 audio file format support
* uses format metadata to keep the codec context extra data (now needed for flac)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-22 12:16:20 +00:00
Stephan Aßmus
5de5d05605 Fixed error in FFmpeg code that defined a function which is only enabled in
GPL mode. Later in the code, the function would only be used in GPL compile mode,
but this fixes the linking in non-GPL mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-07 21:55:15 +00:00
Stephan Aßmus
38d967a3ea Include GPL code in the FFmpeg plugin during compilation, if the Haiku build
system has been configured to include GPL add-ons. This cannot be switched on
the fly without rebuilding all of the FFmpeg plugin, since the change in the
Jamfile defines will not automatically trigger a rebuild. So if you change your
configuration with regards to --include-gpl-addons, you have to touch config.h
(this commit touches it anyway).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-07 17:19:32 +00:00
Stephan Aßmus
630f5e2579 Disabled the rest of the GPL code as per the FFmpeg 0.5 README.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-07 15:21:37 +00:00
Stephan Aßmus
6d15d13087 * Disabled GPL H.264 ASM code
* Enabled WAV muxer.
* Updated configure line in config.h to be closer to what it could have been
  to produce the current config.h, but a lot of encoders and muxers are enabled
  manually at the moment, so this line wouldn't produce the config.h as is.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-07 14:54:17 +00:00
Stephan Aßmus
23190db721 Sorry, reverted r32185, as it was complete bogus and didn't even compile (got
confused about what I already compiled here). The sample format was already
specified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-07 13:54:18 +00:00
Stephan Aßmus
e48452878e * In the AVCodecDecoder, use the audio format of the original input format,
but specify it to 16bits/sample if it's still a wildcard. Make sure to
  allocate the scrub buffer with the correct sample size (was hardcoded to 2
  bytes per sample).
* In the AVFormatReader, specify the sample format for B_MEDIA_ENCODED_AUDIO.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-07 13:18:26 +00:00
François Revol
5a9c3ff54c Alpha sort.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-06 16:36:32 +00:00
Stephan Aßmus
b9b5bf07db Fixed bugs when freeing the AVCodecEncoder.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-05 10:40:06 +00:00
Stephan Aßmus
6780c24d36 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
2009-08-05 10:21:36 +00:00
Stephan Aßmus
037d052235 I have no idea how that ended up there... set the decoded audio format correctly
again. Should fix playback of any file where the ffmpeg plugin was responsible
for sound. (The symptoms were a crash into the debugger because of an unspecified
audio format...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-04 07:21:22 +00:00
Stephan Aßmus
b785870101 Free the AVFifoBuffer data in the destructor...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 22:59:23 +00:00
Stephan Aßmus
6e567425c6 Now supports encoded audio. Added Dolby Digital (AC-3) encoding to test this.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 22:53:52 +00:00
Stephan Aßmus
0c72a8aed4 * AVWriter::StreamCookie::~StreamCookie() incorrectly freed packet data that it
didn't own.
* We are supposed to open the AVCodecContext in the writer, even though we never
  use it. According to libav-users mailing list, this is necessary, since that
  will allocate and initialize some structures that are later needed in
  av_write_header(). How this is supposed to work for encoders that libavcodec
  does not support, or which we don't know how to map, I do not yet know. For
  now it doesn't matter and resolves the problem that audio tracks report the
  wrong stream duration.
* Some more improvements with regards to what information we need to fill out
  and which we don't.
* Use more sensible defaults for the stream bitrate, so that we get better
  quality video by default. This and other parameters can be calculated when
  we implement setting the quality.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 21:32:03 +00:00
Stephan Aßmus
3ca4a7b1be Implemented audio track encoding. There is something wrong with the PTS
generation for the packets and how I set the time_base in the AVStream and
AVStream->codec structures. This results in the audio streams of the written
files to report a much too long duration.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 09:35:30 +00:00
Stephan Aßmus
1e3ef6135f Quiet down some debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-01 01:59:34 +00:00
Stephan Aßmus
54897d5c06 * Also pass the media_codec_info to the Writer::AllocateCookie(), since that
info is not part of the media_format otherwise.
* Finished enough in the AVFormatWriter and AVCodecEncoder that we can now
  actually create AVIs and MPGs and encode MPEG1, MPEG2 and MPEG4 video.
  But no audio as of yet. Also, there is no bit-rate/quality setup, so it seems
  libavformat is using the least possible bit-rate/quality.
* Enable some more muxers and encoders in the FFmpeg libs.
* Uses pixel format conversion from libswsscale, need to read the documentation
  again, but I think it makes the plugin GPL.
* Fixed includes in libswscale/swscale.h, this is now an unmodified FFmpeg 0.5
  header again (AFAICT).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-01 01:16:12 +00:00
Stephan Aßmus
7a97958b0b This should fix the GCC 4 build. The avformat code expects a non-const buffer
for the write() hook.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 22:12:03 +00:00
Stephan Aßmus
4384acf6c1 * 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
2009-07-31 15:29:08 +00:00
Stephan Aßmus
f9acacb7d1 Enabled a couple encoders and muxers, included files in build which we need
for that...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32024 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 15:25:57 +00:00
Stephan Aßmus
2e9d65abf5 Implemented static Write and Seek hooks to be passed to libavformat...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 13:49:11 +00:00
Stephan Aßmus
313fedacc1 * Let the Encoders use the media_codec_info.sub_id field for their own purposes.
* Implemented some of AVCodecEncoder. Maybe video encoding already works, but
  we don't know until the AVFormatWriter is more than just stubs... but I doubt
  it. :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32016 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 13:06:34 +00:00
Stephan Aßmus
3ae83fe3c7 * Automatic whitespace cleanup.
* media_decode_info member was never used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 13:04:14 +00:00
Stephan Aßmus
fa770e4c84 * 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
2009-07-31 10:46:58 +00:00
Stephan Aßmus
6033e52a83 Implemented support for get_next_encoder() variations from MediaFormats.h.
The AddOnManager in the media_server registers one encoder entry per
successful EncoderPlugin::RegisterNextEncoder(). This gives us a first idea
what media_format_family and input/output media_type is supported. The
mechanism may have to be extended, or the Encoder needs an API to specialize
a format further. In that case, the get_next_encoder() version that takes
optional _acceptedInput/OutputFormat needs to instantiate the plugin and
needs to ask the Encoder. But AFAIK, no app uses it like that anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 00:46:36 +00:00
Stephan Aßmus
435924897f Hack to automatically deinterlace video, this needs to be improved later on,
but is better than before in any case. The deinterlacing is nothing fancy,
basically, it just drops the first field... the implementation to use this
is also not as efficient as it could be, it currently allocates a temporary
frame always...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 20:49:04 +00:00
Stephan Aßmus
eeb4be0c7f Hack for interlaced video. We cannot know if video is interlaced from the
current libavformat API. FFmpeg is a little inconsistent in this regard. For
interlaced video, it will report a frame rate which is the field rate, but
still decode both fields into a single frame. For the time being, we reduce
the frame rate from 50.0 to 25.0 and handle interlaced video transparently
for the clients. This needs to be fixed later on...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 20:47:05 +00:00
Stephan Aßmus
0876f8d08e Stubbed out implementation of an Encoder and EncoderPlugin. This will probably
need to work differently, such that supported media_formats come into play,
I will know soon when I implement some of the stuff from MediaFormats.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 20:42:26 +00:00
Stephan Aßmus
c98ea33596 Let's call it WriteChunk() instead of WriteNextChunk() and make the signature
consistent everywhere (according to BMediaTracker::WriteChunk()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 17:54:03 +00:00
Stephan Aßmus
6ac391b3ea Stubbed out Writer and WriterPlugin implementation. So far, Clockwerk shows
"AVI (Audio Video Interleave)" in the available output formats popup... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 00:17:53 +00:00
Jérôme Duval
4b57427974 uses different preferred media formats for input and output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 22:17:37 +00:00
Stephan Aßmus
a0f0618739 Enlarge the OpenSound buffer size a bit to reduce the chance of
skipping audio.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 23:41:56 +00:00
François Revol
591eab0aba - add PowerOnSensor() virtual,
- Add Or/And reg helpers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-18 15:34:51 +00:00
François Revol
586b09a499 Add method ProbeByIICSignature().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-18 14:52:45 +00:00
François Revol
e48c731ca7 Add a name to UVC cams.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-18 14:03:24 +00:00
Stephan Aßmus
c854f14029 * Cleanup
* Added TODO note with regards to BDataIO streams.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-17 11:58:33 +00:00
Stephan Aßmus
f06ec9ec92 Fallback to detecting the stream duration from the AVFormatContext, if the
AVStream does not provide it. For my test Flash Videos, I can at least get
a duration now, although seeking is pretty broken.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-17 09:32:09 +00:00
Stephan Aßmus
c340785238 * Added support for Flash Video (VP6F video and MP3 audio tested only).
* Seeking does not work, since the duration extraction from libavformat does
  not work for this container (maybe there are ways/workarounds but I didn't
  look into it).
* Automatic white space cleanup.

TODO: Add MIME type with sniffer rule.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-16 12:59:54 +00:00
Jérôme Duval
6e94d29882 added flac to the codec table and the demuxer table.
audio format is now taken into account by the decoder when negociating the media output format.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 22:28:13 +00:00
Jérôme Duval
b739c6a866 recognizes the ac3 codec as part of the WAV format family (the one published by ac3_decoder).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31575 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-14 23:23:52 +00:00
Jérôme Duval
6fd02522ea fix debug mode
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-14 23:14:42 +00:00
Stephan Aßmus
691c650397 Do not set the pixel_*_aspect fields wrongly, just leave them at 0, which
hopefully any app interpretes as to be ignored.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 17:49:50 +00:00
Stephan Aßmus
c463715d25 Fix the GCC2 build, though I have no idea why this worked on Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 16:56:13 +00:00
Stephan Aßmus
4cc0f297e9 This seems to be the only change required for the GCC2 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 14:41:02 +00:00
Stephan Aßmus
4c3fe04bd3 * More cleanup and removal of code duplication in the Jamfiles. Moved
the HAIKU_FFMPEG_DEFINES and friends to the toplevel ffmpeg Jamfile.
* Define the X86 CPU acceleration features in global Jamfile variables,
  so that we can build specific source files depending on those defines
  later (used for libavcodec_x86.a).
* In config.h, a whole bunch of parsers were defined off, which was the
  actual reason why plain old .MPG files and also my .MTS streams with
  H.264 video gave only scrambled video.
* Removed some files from the build by comparing which files are build
  by a pristine FFmpeg libavcodec Makefile.

Attention: The following changes may break the GCC2 build:
* Remove Haiku specific changes from
	- libavcodec/x86/cavsdsp_mmx.c
	- libavcodec/x86/dsputil_mmx.c
	- libavcodec/x86/h264dsp_mmx.c

I will test this next after switching my GCC. If you are impatiant, the
following changes were previously done to the pristine FFmpeg 0.5 files:

libavcodec/x86/cavsdsp_mmx.c:
* commented out line 426 to 429

libavcodec/x86/h264dsp_mmx.c
* h264_loop_filter_strength_mmx2() was commented out.

libavcodec/x86/dsputil_mmx.c
* gmc_mmx() was commented out.
* commented out line 2665 (assigning c->gmc)
* commented out line 2786 (assigning c->h264_loop_filter_strength)

However, I would now make similar changes by checking the GCC version. Also,
the libavcodec/x86/dsputil_mmx.c:2786 was still assigning the dummy
h264_loop_filter_strength_mmx2() version.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 14:34:11 +00:00
Stephan Aßmus
8ca0ccd187 * Fixed compilation with TRACE_IO defined.
* Improved Seek(). If wence is not SEEK_SET, make sure to check the current
  source position and adjust it to what the stream points to. Also, return
  just -1 on error since this is used for libavformat code. And don't set
  the stream position to the error return value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 14:23:47 +00:00
Stephan Aßmus
219858ad31 * Simplified "extra data" handling/allocation code a bit.
* Added debugging facility to dump the first 100 packets of a video stream
  to a debug file on the Desktop.
* When needing to flush packets, avcodec_flush_buffers() is unfortunately
  not reliable. For audio codecs, the work around was to close and reopen
  the codec in Seek(). Do this also for video codecs. Makes H.264 more
  reliable here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-10 14:20:48 +00:00
Stephan Aßmus
c85e773511 Forgot to remove invalid TODO.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 13:10:29 +00:00
Stephan Aßmus
0f3f344fb4 * Implemented calculating the correct display aspect ratio.
* Removed some dead code.
* Fixed a style violation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 13:09:23 +00:00
Stephan Aßmus
f9aac21f11 Define the proper FFmpeg flag.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 13:08:00 +00:00
Jérôme Duval
1001e99388 This file is based on previous work in fwcontrol from FreeBSD. Adjusted the header accordingly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 21:52:54 +00:00
Jérôme Duval
c7ec967019 added raw dv format support. tested with PAL DV, I don't know for NTSC though
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 21:41:31 +00:00
Stephan Aßmus
dec28f85e0 * Better debug output.
* We can actually tell libavformat to discard packets for streams that
  we are not interested in. Found this in the ffplay code. This should hopefully
  avoid the efficiency impact of using one AVFormatContext per stream.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 11:09:49 +00:00
Stephan Aßmus
12a9eb5d93 * Coding style cleanup, some removal of dead code.
* Refactored NegotiateOutputFormat() and Decode() into two separate private
  methods each, one for video and one for audio.
* Keep reading chunks when video decoding, until we have got a picture. This
  gets us scrambled video instead of a black picture for h264 in mpegts.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 09:43:06 +00:00
Stephan Aßmus
0c4d88d353 Added "mpegts" to the supported demuxers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 09:41:00 +00:00
Stephan Aßmus
274f43b917 * Virtualize the stream index and implement finding streams when the
context has AVPrograms. I gather this feature is for container streams
  that contain multiple "groups of streams" like how it would work for
  satilite mpeg-ts streams with multiple TV channels in one stream. For this
  to be properly supported, we should extend the BMediaFile/Track API. For
  now, the AVFormatReader uses the first program, if one is there. This
  was also needed to get make mpegts demuxer work, but it is not yet enabled
  for other reasons.
* Read more probe data. 1024 bytes were not enough to detect "mpegts" properly
  for example.
* For now, I disabled the locking in the AVFormatReader hooks themselves,
  this should not be necessary, though I hope libavformat is reentrant as
  long as you have your own AVFormatContext for each thread. So far everything
  hints that it is the case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-08 08:51:31 +00:00
Oliver Tappe
16d5c24e53 * merged 32bit-wchar_t branches of buildtools and haiku back into
the respective trunk

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-07 10:30:09 +00:00
Stephan Aßmus
5d9b65c488 * Dump the libavformat string again in Sniff().
* Separate TRACE output for seeking related methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-06 22:52:49 +00:00
Stephan Aßmus
a612697fc9 Actually, use a more style compliant name, and since the flags don't contain
just architecture specific flags, call them just HAIKU_FFMPEG_DEFINES.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-06 22:05:00 +00:00
Stephan Aßmus
7486c08251 Avoid some code duplication for setting the architecture depending Cc and C++
flags, using a global variable FFMPEG_PLATFORM_DEFINES.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-06 21:57:08 +00:00
Stephan Aßmus
922c7be61c Do not leak the first StreamCookie that we used in Sniff() and do not free
in FreeCookie().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-06 15:05:52 +00:00
Stephan Aßmus
f0eb77fee4 Doh, of course we had ASF before! Sorry about that. Must have been blind.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-06 14:52:50 +00:00
Stephan Aßmus
fcb875cdf4 Do no re-use the same packet again if not supposed to. Was not a problem with
how everything currently worked. (Packet peaking was only done once in Init().)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-06 14:40:09 +00:00
Stephan Aßmus
7965dde0ca Get the AVFormatReader into a usable state. DemuxerTable.cpp controls which
container formats we support. I hope I have turned on only those that don't
have an implementation already (did we support ASF already?). I mostly tested
with AVI and that works reasonably well, but I only tested raw audio so far.
However, the backend for Marcus' avi_reader is much nicer than FFmpeg, so I
think it should stay and have disabled the support for AVI in AVFormatReader.
A big disappointment is that MPG containers only give scrambled video. It may
be a problem of the AVCodecDecoder, but I am not so sure. After all, it works
fine for other container formats. If I am not mistaken, VLC also does not use
the mpeg demuxer from FFmpeg. :-\ On top of that, libavformat detects the
time_base and stream duration wrongly for one of my test MPGs.
As for the implementation: Although seeking in libavformat happens for an
individual stream, in reality, the packets for all other streams need to be
flushed (that's also what happens in the libavformat tutorials I've seen).
Since our MediaKit API allows to seek tracks indivually, this is of course
a no-go, since then all other tracks would be out of sync. My solution is to
simply open the demuxer once for each stream and then completely ignore the
packets of the respective other streams. This also works around the problem
that libavformat is unable to provide packets by stream, requiring the
API user to queue the packets that he needs not now, but later for other
streams. It also means we have to no memory copies, since we can directly
use the packet buffer until the next call to GetNextChunk().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-06 13:43:02 +00:00
Stephan Aßmus
db627302b7 Support MP2 audio also in MPEG containers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-06 13:31:38 +00:00
Stephan Aßmus
827faf77a4 * Fleshed out some more of the format detection.
* Moved stuff from testing in Sniff() into class members.
* Added function to gfx_utils() that converts an FFmpeg pix_fmt to color_space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-03 21:40:19 +00:00
Stephan Aßmus
a244fc3ac7 * It actually helps a lot to turn on all the demuxers if you want to use any.
* The URLProtocol idea seems not to work out, so I removed that code, but
  the other idea of setting up a ByteIOContext actually works, once I seek
  back to the beginning of the stream after reading the initial probe buffer,
  we may also offset the buffer pointer in the ByteIOContext to where we
  have already read, but I am not sure of possible side effects of that.

We can now probe for the correct demuxer and detect streams.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-03 00:26:11 +00:00
Stephan Aßmus
b4ef57412c Work in Progress of trying to get libavformat to detect anything...
unsuccessful so far.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-02 13:31:50 +00:00
Stephan Aßmus
668ed70bd0 * Use a static global object to initialize libavformat and libavcodec.
* Turn off tracing in the AVCodecDecoder which I accidentally turned on in
  a previous commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 21:16:55 +00:00
Stephan Aßmus
53db45b7d3 * Added libavcodec to include dirs of libavformat
* Removed inclusion of internal.h from libavcodec.h, it's not there in the
  plain FFmpeg 0.5 version of the file.
The last item fixes the GCC2 build, at least AFAICT.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 20:39:18 +00:00
Stephan Aßmus
5f25b3a353 Removed ffmpeg build system left-over.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 19:20:52 +00:00
Stephan Aßmus
27f6fb6ce7 * Renamed avcodec folder to ffmpeg.
* Cleaned up plugins Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 19:19:49 +00:00
Stephan Aßmus
043eaa5c3f Cleaned up the source file names and code locations in the avcodec plugin,
unified the Reader and Decoder plugins and renamed the add-on to "ffmpeg".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 18:52:48 +00:00
Stephan Aßmus
cd170ddc34 * Added libavformat. I would like to rename the plugin from "avcodec" to
"ffmpeg" and export multiple plugin types from the same plugin (Decoder and
  Reader).
* Work in progress on an libavformat based Reader plugin, does nothing yet.
* Moved config.h from libavcodec subfolder up one level, so that it's used
  by libavformat as well. Adjusted libavutil/common.h accordingly.
* Turned off GPL code in config.h
* Turned off BeOS muxers in config.h
* Turned on HAVE_THREADS and HAVE_PTHREADS, although that is nowhere used
  in the ffmpeg code (it appears).
* Indentation cleanup in avcodecplugin.h

I have built this with GCC4, but last night I built libavformat.a with GCC2
so I am hoping this doesn't break the GCC2 built.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-01 14:45:20 +00:00
Jérôme Duval
e602845c35 the first index is zero, not one
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-29 22:12:20 +00:00
Jérôme Duval
bb52f762f2 typo fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-29 21:19:23 +00:00
Michael Lotz
46d4d11ff6 Need to stop the roster before deleting it. Should fix bug #4017.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31013 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 15:19:43 +00:00
Rene Gollent
e47b453ffd Be a bit more defensive here just in case the wav header has invalid data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-10 14:47:57 +00:00
Rene Gollent
6b9846f69d Fix gcc4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31005 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-10 12:51:17 +00:00
David McPaul
16a89fee58 Read Extra Data needed by MSADPCM and others
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-10 02:53:26 +00:00
David McPaul
cbec1ef4af Ensure extra data is passed to decoder
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-10 02:49:45 +00:00
Jérôme Duval
ce684bcc33 Adding lrintf declarations conflicts on avcodec when building gcc4. Noticed by Michael Weirauch.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-03 20:36:29 +00:00
David McPaul
4cf2271b57 Bring matroska library up to latest version. Allows V2 matroska file playback
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-02 09:34:16 +00:00
David McPaul
938fd5a7e0 Update to v1.61 of MatroskaParser library
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-02 09:15:14 +00:00
David McPaul
e5d9cba691 They seek him here, they seek him there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-08 13:04:27 +00:00
Rene Gollent
671eb7421d If I owed Axel a beer for every style violation, I'd quite likely be bankrupt by now...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-02 17:42:13 +00:00
Rene Gollent
cbb809dc42 gcc4 build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-02 14:45:56 +00:00
David McPaul
4d97ad948b return LAST_BUFFER_ERROR when last buffer reached
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30549 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-02 04:32:01 +00:00
David McPaul
008c3af957 Now plays 2 out of 3 files and that is good yes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-02 04:29:36 +00:00
David McPaul
ce487efa98 Slight performance optimisations
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-30 22:41:56 +00:00
David McPaul
527e8f9dd4 modfy debug a bit, no functional change
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-30 22:37:57 +00:00
David McPaul
2cbce7bb7a Add support for mpeg audio in wav format files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-30 22:36:22 +00:00
David McPaul
5b8ab325b5 add asf_reader to build for real this time
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-30 12:54:48 +00:00
David McPaul
218e947cde rollbaack accidental commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-30 10:46:41 +00:00
David McPaul
22245b2dce include asf_reader in compilation may break GCC4 builds
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-30 10:23:13 +00:00
David McPaul
94793d4d86 Pictures they move and everything and hark what is that noise
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-30 10:21:34 +00:00
David McPaul
595fb3689a Now plays sound but lots of work still needed
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-27 14:06:17 +00:00
David McPaul
a0be875ae3 let asf config data through to decoders
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-27 14:04:47 +00:00
David McPaul
0faab0e222 add codecs in use by wmv files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-26 03:21:25 +00:00
David McPaul
6e06058804 initial commit of windows media reader. Not really working yet
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-26 03:20:07 +00:00
Stephan Aßmus
8152b7d177 Coding style consistency.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-17 09:56:58 +00:00
Stephan Aßmus
b71c18c4e8 Revert the unintentional commit from r30222. Sorry.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-17 09:55:38 +00:00
Stephan Aßmus
4970545477 Make header self-contained.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-17 09:52:53 +00:00
Philippe Houdoin
2ee8423101 Fixed altivec code compilation.
Unfortunatly, avcodec plugin don't build yet, llint and lrint symbols are missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-17 02:10:51 +00:00
Philippe Houdoin
40d058a628 Enabled ppc and sparc specific yuv2rgb convertion code. UNTESTED yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-16 23:11:02 +00:00
Philippe Houdoin
b0e6125616 When $(TARGET_ARCH) is obvious, stop checking it, start assume it :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-16 22:56:50 +00:00
Philippe Houdoin
8a3c8a66b3 * Imported ppc and sparc architectures optimized codes from ffmpeg 0.5.
* Added Jamfiles to build libavcodec_ppc.a and libavcodec_sparc.a. 
  UNTESTED.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-15 23:38:05 +00:00
Philippe Houdoin
370ed3de61 Updated to support other $(TARGET_ARCH) specific optimization more
easily: moved out of config.h some definitions that we could do 
dynamically per target architecture.

NOTE: ppc, m68k and sparc optimizations are currently missing and should 
be imported from ffmpeg 0.5 before we can build avcodec plugin for these 
targets. Hence why it's still X86_ONLY qualified.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-15 23:11:01 +00:00
Philippe Houdoin
ba63f109ee First step to build arch-specific libavcodec_$(TARGET_ARCH).a, in order
to support more than just x86. Not yet SubInclude'd, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-15 18:44:38 +00:00
Jérôme Duval
36f4b5cc7b build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-14 21:09:58 +00:00
David McPaul
4e5a71dd76 add h264 and ac3 support in matroska
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-13 06:14:30 +00:00
David McPaul
c1ee694618 Add seeking support (my first commit from haiku)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-13 05:45:32 +00:00
Rene Gollent
010f5aa422 Possibly less than ideal, but gets ape_reader building on both gcc2 and 4. (The previous gcc4 fixes broke it again on gcc2). I'm uncertain as to why the include order of <algorithm> seems to matter though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-12 12:45:12 +00:00
Rene Gollent
be878f6087 These were using CR/LF for some reason.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-12 12:32:49 +00:00
Ingo Weinhold
0b8b543af8 Build fixes (gcc4).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-12 10:08:22 +00:00
David McPaul
25b3d00ba8 finally h264 decoding
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-12 03:34:24 +00:00
David McPaul
2ad2768adc ifdef out another function that causes issues under linux
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-11 22:53:43 +00:00
David McPaul
da4c34f2a2 ifdef out function that has a problem asm instruction. It does not seem to be called anyway
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-11 13:26:01 +00:00
David McPaul
78bec5f3c6 change ape_reader to lower case
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-11 06:49:46 +00:00
David McPaul
959dd58287 cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-11 06:48:44 +00:00
David McPaul
b51fbe43f5 change to lower case
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-11 06:48:18 +00:00
David McPaul
7ab08187b3 correct avcodec build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-11 06:30:53 +00:00
Michael Lotz
96e5f9e535 * Don't build avcodec with assembly targets using yasm - because it breaks the
build.
* Remove the APE reader from the image as it also depends on the non-working
  yasm rule.

Please don't just leave the build in such a broken state. It's really annoying
when you're held up by stuff like that when you want to work on something.
Just leave changes like those disabled until you have verified that they work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-11 00:00:19 +00:00
François Revol
d73c25b6c7 Make it less ugly. At least it doesn't try to create files in non existent dirs. But it should really be split. Besides it only supports x86.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-10 10:05:07 +00:00
David McPaul
ccb46ae54b Build avcodec with assembly targets using yasm
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-10 03:21:56 +00:00
David McPaul
d477c2ba88 Include APE_reader in build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-10 03:15:16 +00:00
Axel Dörfler
e7cdf7f3f5 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-09 17:22:00 +00:00
Axel Dörfler
a353e90fa0 * The audio mixer is supposed to support getting/setting only a single value,
such that all channels are affected.
* This fixes the "setvolume" command under Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30013 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 23:32:00 +00:00
Rene Gollent
0f617d4476 Fix several cases of forgetting to include libstdc++ in the libs. This allows a successful build of Haiku on gcc4 Haiku, though it's presently unclear to me why this didn't prevent linking on any other platform (gcc2 haiku, and gcc2/4 cross compilers from FBSD had no issues here).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-05 22:33:53 +00:00
Rene Gollent
0ae9a91575 gcc4 build fix - thanks to Artur Wyszynski for submitting. Closes ticket #3652.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-02 03:03:16 +00:00
David McPaul
81ed336ed1 Add AC-3 support, fix audio seeking
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 21:02:12 +00:00
David McPaul
653dac15d2 performance improvements
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 21:00:06 +00:00
David McPaul
a1f8af1f44 Audio output buffer must now equal AVCODEC_MAX_AUDIO_FRAME_SIZE
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 20:58:57 +00:00
David McPaul
e83fd628ae APE Reader from sources donated by SHINTA
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29799 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-30 06:55:56 +00:00
David McPaul
5bdaad49f9 include some bug fixes from libmpg123
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-22 07:24:44 +00:00
David McPaul
7eae23728e Standard Index now handles entries that are absolute offsets instead of relative
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-22 07:22:39 +00:00
Stephan Aßmus
edb449545f Followed David McPaul's suggestion and disabled usage of EBX register in the
libavcodec ASM code to fix the GCC4 build. Tested with GCC4 on Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-16 09:23:11 +00:00
David McPaul
888b341a2e Missed a file on ffmpeg 0.5 commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 01:39:23 +00:00
David McPaul
499e71a657 sync with ffmpeg 0.5 release
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 01:37:36 +00:00
David McPaul
51cb342a77 sync with ffmpeg 0.5 release
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 01:35:02 +00:00
David McPaul
3d50ba22de sync with ffmpeg 0.5 release
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 01:34:41 +00:00
David McPaul
6608bd7c78 sync with ffmpeg 0.5 release
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-15 01:34:21 +00:00
François Revol
2c4e929f54 - force 320x240 for now
- fixed uninitialized fields in CamDeframer, it works also in Haiku now :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-14 03:51:39 +00:00
David McPaul
42e4132ed3 made comment a TODO
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-27 09:06:53 +00:00
David McPaul
905faca0bf Output as Stereo as AudioChannelConverter cannot handle > 2 channels
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-27 08:58:59 +00:00
David McPaul
be125ae02f Remove wrong format
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 12:50:31 +00:00
Stephan Aßmus
50d6da5a0e Fix GCC 4 build. Implemented constructors/destructors and standard operators.
Hopefully, I am not stepping on your toes, David! Please check these changes,
I've added some TODOs where problems may be lurking.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 12:15:40 +00:00
David McPaul
201970d309 First cut at improving avi seeking
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 08:12:27 +00:00
David McPaul
3e02e6ae4d Seek functionality changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 08:05:18 +00:00
David McPaul
379d4bb08f implement basic C yuv422toRGB function
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 08:00:46 +00:00
David McPaul
decfff7c4d implement seek function
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 08:00:06 +00:00
David McPaul
c6527ff508 add additional motion jpeg fourcc
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-24 07:56:25 +00:00
François Revol
d29cb41521 Fix ZETA build, USBKit doesn't have the AltInterface stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-22 15:27:39 +00:00
Ithamar R. Adema
19b602bcb0 Some initial code for USB Video-based Webcams. It currently parses the USB Video descriptors and dumps the information out via stdout. I'd be very pleased if anyone with a USB Video webcam (or other device) could take the following steps:
* hey media_server QUIT
* /system/servers/media_server > /boot/home/media_server.log
* listusb -v > /boot/home/listusb.log

and mail the two resulting files to ithamar AT unet DOT nl. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29282 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-22 13:19:13 +00:00
Ithamar R. Adema
32bf83a34b * Fix initialisation of CamDevice::fIsoIn.
* Fix debug message on IsoIn path.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-22 10:53:13 +00:00
Ithamar R. Adema
6595d6836d * Make usb device detection in usb_webcam identical to the way the usb bus_manager handles it.
* Fix some minor printf()-style warnings in the debug build of usb_webcam.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-22 10:39:31 +00:00
François Revol
5fc1932331 This is the source for the FinePix webcam driver on http://bebits.com/app/4185
I have received permission from Øyvind Smestad to use the part he wrote under MIT licence, but some other parts are GPL sources from Linux.
The plan is to merge the core part into usb_webcam, and use either the JPEG Translator or libjpeg to replace the GPLed jpeg decoding part.
Here is what he said:

From Øyvind Smestad (o.smestad AT gmail.com):

When it comes to licencing, the media addon part is heavily based on
the VideoProducer sample code from Be (I don't remember their exact
licensing terms, but they were quite liberal weren't they?). The
driver part is partially based on the Linux FinePix driver by Frank
Zago (http://www.zago.net/v4l2/finepix/ -
http://sourceforge.net/projects/fpix/), that is where the Linux JPEG
code came from and also where I got the device IDs. If the JPEG part
is removed I don't think there should be enough left there to break
the GPL, as the rest of the code is probably more "inspired by" than
"copied from" the Linux driver. At least I remember having to monitor
the USB traffic under Windows to get the setup commands right, and I
also think there were some articles on writing a BeOS webcam driver
and on using the USBKit that I used as references.

I hope that made it a bit more clear!
As for what I did, I'm more than happy for it to be under MIT licence.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-27 22:19:35 +00:00
Michael Lotz
fb3e35fcec Fixing all headers/namespaces/name lookup problems that hinder a GCC 4.3.2
build. I sure hope that this doesn't break the build for anyone else.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-23 03:05:15 +00:00
David McPaul
f1ee5448a9 Implement seeking support
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-11 07:07:14 +00:00
David McPaul
1a50289baa Implement seeking support
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-11 07:06:51 +00:00
David McPaul
b459205340 Implement seeking support
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-11 07:06:18 +00:00
David McPaul
2405fee747 Better check for end of data
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-10 01:05:39 +00:00
David McPaul
d06fb5745a add ffds fourcc, some sort of xvid variant
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-10 01:03:28 +00:00
Jérôme Duval
04a72492c0 fix my last change for muxers controls
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28815 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-15 23:32:19 +00:00
Jérôme Duval
c6e951f4e6 use control index as parameter id, instead of control id
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-12-14 14:05:36 +00:00
Jérôme Duval
f12491c7f9 added Headphones and SPDIF string constants
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-17 19:44:36 +00:00
Jérôme Duval
4eebe02c1d check one more frame as we were detecting ActivityMonitor as an MP3 file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-16 14:09:02 +00:00
Ryan Leavengood
2b0feeea60 Removed now unused constants as suggested by Marcus. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-07 00:11:57 +00:00
Ryan Leavengood
02c774cbd2 Bug #1571: I think diver is right, the Info tab is pretty useless on the
mixer's controls, so I am removing it.

If someone disagrees, this code can be added back easily.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-04 23:47:54 +00:00
David McPaul
79216f18c9 Turn off TRACE and some cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 23:08:08 +00:00
David McPaul
e19363c6a2 Turn on more decoders
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 23:03:15 +00:00
David McPaul
d2c702af77 Log an error before returning error result
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 22:59:52 +00:00
David McPaul
dfa31d6f48 improve error logging message
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 22:58:43 +00:00