Commit Graph

5170 Commits

Author SHA1 Message Date
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 048d05a613 Small cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32123 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-05 10:11:06 +00:00
François Revol 98977abc9b Fix m68k build, still unimplemented.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 21:17:03 +00:00
Axel Dörfler 8318af01b9 * Added a basic tool tip API, and implementation.
* The BView API can probably be regarded as good enough; the implementation
  might need to be improved over time (also, some things as archivability
  aren't fully implemented yet). The ToolTip.h header should get public once
  finalized.
* Added new B_MOUSE_IDLE message that is sent to a BView after a certain
  time has passed (BToolTipManager::ShowDelay()).
* Added small test app (ToolTipTest) that shows what is already working.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 14:47:41 +00:00
François Revol 56c6c0fefb - introduced an "argumetns" field in stage2_args to hold command line args from chaining loader,
- added some multiboot support code:
	- dump some of the passed info,
	- parse command line (skip the 'kernel' name and pass the rest to stage2_args.arguments),
- added an add_stage2_driver_settings() function which takes stage2_args.arguments and translates it into safe mode driver settings, a bit dumb for now.
This allows using qemu -kernel haiku_loader -append 'debug_screen true' and get debug output without having to enter the menu (once multiboot info is used to determine the boot device too).
The idea is to allow passing driver settings and using them to pass extra stuff (like 'force_keymap fr' and other stuff for demo), and to help automate tests ('run_test /bin/sometest').
This should answer Axel's question :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 14:39:41 +00:00
Michael Lotz 255c9104e5 * Rework the heap locking strategy. Use a read-write lock for the area lock to
allow for more parallelism. Also introduce seperate locks for the bins and
  for page allocation. This greatly reduces lock contention and reduces the
  duration the locks are held due to them overall protecting less code. Now only
  allocations of the same size hitting the same allocator or allocating larger
  chunks of memory should block. Previously, basically any allocation and also
  free would be mutually exclusive, making it scale pretty badely.
* Added memalign_nogrow(). As it uses heap_memalign() anyway, there's no real
  reason not to allow for an alignment.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 13:59:45 +00:00
Ingo Weinhold ea2abd110b * Renamed the ROUNDOWN macro to ROUNDDOWN. Also changed the implementation of
ROUNDUP to use '*' and '/' -- the compiler will optimize that for powers of
  two anyway and this implementation works for other numbers as well.
* The thread::fault_handler use in C[++] code was broken with gcc 4. At least
  when other functions were invoked. Trying to trick the compiler wasn't a
  particularly good idea anyway, since the next compiler version could break
  the trick again. So the general policy is to use the fault handlers only in
  assembly code where we have full control. Changed that for x86 (save for the
  vm86 mode, which has a similar mechanism), but not for the other
  architectures.
* Introduced fault_handler, fault_handler_stack_pointer, and fault_jump_buffer
  fields in the cpu_ent structure, which must be used instead of
  thread::fault_handler in the kernel debugger. Consequently user_memcpy() must
  not be used in the kernel debugger either. Introduced a debug_memcpy()
  instead.
* Introduced debug_call_with_fault_handler() function which calls a function
  in a setjmp() and fault handler context. The architecture specific backend
  arch_debug_call_with_fault_handler() has only been implemented for x86 yet.
* Introduced debug_is_kernel_memory_accessible() for use in the kernel
  debugger. It determines whether a range of memory can be accessed in the
  way specified. The architecture specific back end
  arch_vm_translation_map_is_kernel_page_accessible() has only been implemented
  for x86 yet.
* Added arch_debug_unset_current_thread() (only implemented for x86) to unset
  the current thread pointer in the kernel debugger. When entering the kernel
  debugger we do some basic sanity checks of the currently set thread structure
  and unset it, if they fail. This allows certain commands (most importantly
  the stack trace command) to avoid accessing the thread structure.
* x86: When handling a double fault, we do now install a special handler for
  page faults. This allows us to gracefully catch faulting commands, even if
  e.g. the thread structure is toast.

We are now in much better shape to deal with double faults. Hopefully avoiding
the triple faults that some people have been experiencing on their hardware
and ideally even allowing to use the kernel debugger normally.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 12:39:56 +00:00
François Revol 4b8d0e6856 Some ppc fixes for #4115, patch by kallisti5 (without the #ifdef _BOOT_MODE):
- stubbed out arch_cpu_init_percpu(),
- make atomic ops declarations extern "C",
- move calls to [i]sync inside the asm code that needs it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 10:10:22 +00:00
Stefano Ceccherini dcc8ae9118 Some cleanups: made the bitmaps static, moved variables around. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-01 08:14:18 +00:00
Ingo Weinhold 671a2442d9 More work towards making our double fault handler less triple fault prone:
* SMP:
  - Added smp_send_broadcast_ici_interrupts_disabled(), which is basically
    equivalent to smp_send_broadcast_ici(), but is only called with interrupts
    disabled and gets the CPU index, so it doesn't have to use
    smp_get_current_cpu() (which dereferences the current thread).
  - Added cpu index parameter to smp_intercpu_int_handler().
* x86:
  - arch_int.c -> arch_int.cpp
  - Set up an IDT per CPU. We were using a single IDT for all CPUs, but that
    can't work, since we need different tasks for the double fault interrupt
    vector.
  - Set the per CPU double fault task gates correctly.
  - Renamed set_intr_gate() to set_interrupt_gate and set_system_gate() to
    set_trap_gate() and documented them a bit.
  - Renamed double_fault_exception() x86_double_fault_exception() and fixed
    it not to use smp_get_current_cpu(). Instead we have the new
    x86_double_fault_get_cpu() that deducts the CPU index from the used stack.
  - Fixed the double_fault interrupt handler: It no longer calls int_bottom to
    avoid accessing the current thread.
* debug.cpp:
  - Introduced explicit debug_double_fault() to enter the kernel debugger from
    a double fault handler.
  - Avoid using smp_get_current_cpu().
  - Don't use kprintf() before sDebuggerOnCPU is set. Otherwise
    acquire_spinlock() is invoked by arch_debug_serial_puts().

Things look a bit better when the current thread pointer is broken -- we run
into kernel_debugger_loop() and successfully print the "Welcome to KDL"
message -- but we still dereference the thread pointer afterwards, so that we
don't get a usable kernel debugger yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-01 01:53:54 +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
Michael Lotz d7a16b238f * Fully switch to the Haiku message format so that it is also used for on-disk
storage.
* Remove reduntant information from the header (field_count vs. fields_size).
* Remove checksums previously used to validate the message passing by area
  mechanism.
* Move variables that are purely used by the instance out of the header and into
  the BMessage object.
* Use more sensible types for the different message fields.
* Reduce some field sizes to realistic values.
* Make size_t values into uint32 values so the message format will not change
  when later moving to 64 bits.
* Pack the structures used for flat message storage so it doesn't change
  because of padding.
* Fix message passing by area. It never worked because the created area was
  never actually filled with any data!
* Some more allocation checks with graceful fallbacks (should be all now).
* Some more checks for negative index values (should also be all now).
* Make printing more inline with how the rest of the class works and make some
  of the output more consistent.
* Also add the new unsigned types to PrintToStream() output.
* Fix printing of unknown types and invalid BMessages, it would always have
  printed only the first entry respectively the same error.
* Added some clarifying comments.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 22:19:36 +00:00
Rene Gollent 2252911973 Add missing definition for wcsstr. This was preventing clucene from building with wide chars enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32038 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 22:16:58 +00:00
Axel Dörfler e90b90daf6 * Added desperately missing Trim() method.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 21:13:19 +00:00
Ingo Weinhold cc77aba101 * Allocate a separate double fault stack for each CPU.
* Added x86_double_fault_get_cpu(), a save way to get the CPU index when in
  the double fault handler. smp_get_current_cpu() requires at least a somewhat
  intact thread structure, so we rather want to avoid it when handling a double
  fault. There are a lot more of those dependencies in the KDL entry code.
  Working on it...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 16:14:18 +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
Axel Dörfler 61b6f38cfc * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-31 14:11:12 +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 377e95304a * This header couldn't actually be used from C code, since C doesn't support
overloading functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 22:10:11 +00:00
Stephan Aßmus 7cd2513b82 Changed the way Encoders are published by EncoderPlugins. Encoder retrieval
in PluginManager is reenabled. We use the media_codec_info.id to reference
a specific plugin, while the sub_id will be used to reference individual
Encoders that the plugin supports. No idea if that's how it was intented, but
some comments hint in this direction. I failed to mention this before, but
comments are of course very welcome on any of these commits, as always.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 20:05:11 +00:00
Ingo Weinhold 3fccf0679f C++ified the code. Introduced new trace entry flags, which will eventually be
used to mark entries after recovering a tracing log from a previous session.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 19:50:50 +00:00
Stephan Aßmus a07b059b16 Implemented first version of MediaWriter, which is the bridge between
BMediaFile/BMediaTrack and Writer plugins.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 17:56:01 +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 efd1469d4f Encoders will most likely be found by media_codec_info, not by media_format,
changed method signature accordingly and disabled the code for now, since
the media_server communication has not been adapted yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 17:52:14 +00:00
Stephan Aßmus b8316d9f93 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
2009-07-30 17:47:54 +00:00
Stefano Ceccherini c2c39a98a2 Moved functions declarations to InterfacePrivate.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 16:46:19 +00:00
Stephan Aßmus ee9408a18d Re-wrote MediaFormats.h header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31978 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 16:34:06 +00:00
Axel Dörfler 753365b433 * Added new (private) calls {get|set}_workspaces_layout().
* Implemented old count_workspaces(), and set_workspace_count() using the
  new functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 14:13:14 +00:00
Ingo Weinhold 07745f2a0b Added support for new notify_io_request() function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 14:12:47 +00:00
Axel Dörfler 617ebd8897 * Added convenience methods to add BTextControls and BMenuFields to a grid
layout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 14:03:48 +00:00
Ingo Weinhold 213d2d8f9d Added syscall _kern_kernel_debugger() to enter the kernel debugger.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 12:35:42 +00:00
Stefano Ceccherini 7a8567e61d Moved MenuPrivate implementation to its own file. Made MenuPrivate.h
self-contained. Adjusted other files accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 10:41:33 +00:00
Stefano Ceccherini c3d7cee2d9 Instead of creating the Modifiers bitmaps on demand, for every DrawItem invocation,
for every BMenuItem, have them created in _init_interface_kit(), and keep
them cached. This required some reorganisation of the code in Menu and MenuItem.
Also has the side effect that BMenuItem doesn't have to know about the
alt/ctrl/command keys stuff.
Added a comment in BMenu::AttachedToWindow().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 10:33:46 +00:00
Ingo Weinhold cdcacd7f9f * Added missing ToReferenceable().
* _SetTo(const BVariant&): Acquire a reference for the wrong object.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31959 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 02:34:41 +00:00
Axel Dörfler 69f9a367bc * The app_server no longer uses workspace counts internally, but only columns,
and rows.
* set_workspace_count() now uses the logic formerly found in
  WorkspacesView::_GetGrid() to determine the layout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 00:52:21 +00:00
Stephan Aßmus 60c85abee5 Resolved TODO, make it clear who maintains the allocation of the
media_file_format array (it remains with the plugin itself, as with
DecoderPlugins).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-30 00:11:02 +00:00
Stephan Aßmus 7c06546a8e Implement the backend of get_next_file_format(). The AddOnManager maintains
a list for known media_file_formats. The internal IDs map to plugins.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 22:49:23 +00:00
Ingo Weinhold d3b44ccb14 Added explicit physical address parameter to vm_create_anonymous_area() and
create_area_etc(). 0 for the default behavior.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 21:30:35 +00:00
Oliver Tappe 31a41b605d Fixing #3460:
* resolved a couple of redundant function declaration in our public headers
* adjusted zipomatic accordingly - everything else built fine

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 19:45:09 +00:00
Stephan Aßmus c30ef79def Small cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 19:11:50 +00:00
Stephan Aßmus 92d809b687 Added interface to WriterPlugin to get all supported media_format_families.
Don't yet know if that's the way it's supposed to work...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 19:11:32 +00:00
Ingo Weinhold 069b477dd7 * Introduced CREATE_AREA_DONT_CLEAR create_area_etc() flag, which allows the
call to fetch non-clear pages.
* B_PHYSICAL_BASE_ADDRESS does now imply B_CONTIGUOUS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 18:57:21 +00:00
Oliver Tappe a64a5357f2 * added missing declarations of all the scanf() variants, as we now provide
those, too. Among other things, this should facilitate making use of wstring
  with gcc4.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 17:41:10 +00:00
Oliver Tappe 51c5e9f685 fixing #4031:
* added declaration of strtof() to stdlib.h, as we now provide it alongside
  with strtod()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 17:33:30 +00:00
Stephan Aßmus 57bb0b9fcd * Added DataExchange message constants and server communication structs for
retrieving WriterPlugins and EncoderPlugins from the media_addon_server.
* Enabled respective code in PluginManager (and fixed the copy&paste bugs),
  the server side is still missing, though...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 16:35:37 +00:00
Stephan Aßmus f3d79634e6 Beginnings of Encoder[Plugin] and Writer[Plugin] base classes and add-on
management.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 16:25:30 +00:00
Stephan Aßmus 3575ad0034 Small style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31921 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 16:24:00 +00:00
Stephan Aßmus 9d72a129c6 * Cleanup
* Added copyright.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 16:01:28 +00:00
Stephan Aßmus ddcf2f7a64 Removed unused headers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 15:54:56 +00:00
Stephan Aßmus b1e235937a * Style cleanup.
* Added copyright.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 15:54:12 +00:00
Axel Dörfler 0d22b1a78c * Fixed copyright years, thanks Urias!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 14:14:08 +00:00
Rene Gollent 9fba8251e9 Since wchar support now works, the wstring typedef should now also be safe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 14:09:43 +00:00
Axel Dörfler 533cba7eff bonefish + axeld:
* Reverted r31809 as it introduced a race condition; if the I/O request had been
  notified, it could already been deleted at that point.
* Instead, we need to notify the request in each file system/driver that uses
  it. Added new notify_io_request() function that does that exactly.
* Added a TODO comment to the userlandfs where the request notification needs
  a bit more thought.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 12:16:15 +00:00
Axel Dörfler c881516f65 * Accidently committed the wrong bash history line... these are the files that
were supposed to be deleted/changed with the previous commit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 01:31:19 +00:00
Axel Dörfler d37f15ebee * Updated license header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 00:57:41 +00:00
Axel Dörfler 8ae594ffd4 * Introduced dedicated syscalls for the deprecated BeOS fs_attr API. Before,
each attribute access needed 3 syscalls, now only one as it should.
* Renamed the new Haiku call fs_open_attr() to fs_fopen_attr(), and added a new
  function fs_open_attr() that takes a path (same semantics as the
  fs_[f]open_attr_dir() functions already present in BeOS).
* Merged former _kern_open_attr(), and _kern_create_attr() into one syscall.
* Cleaned up vfs.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-29 00:34:44 +00:00
Ingo Weinhold 86e89f1207 Added BDebugEventInputStream::Seek() to seek in the stream. Works for data
buffer based stream only ATM.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 18:51:38 +00:00
Stefano Ceccherini 8752f52d71 Added an (empty) destructor. Use a const BRegion (since we can now), honour
the 80 column limit. Some comment clarification.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 16:56:29 +00:00
Stephan Aßmus 20f7be247e Actually, make B_PLAIN_BORDER look the default for simple separator lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31848 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 15:48:51 +00:00
Stephan Aßmus 79f2db07a8 Implemented a BSeparatorView. It can be a horizontal or vertical line/border,
or also a label, optionally with a BView for the label. Some aspects of it have
not been exposed to throughrough testing, yet (archiving, label view),
the BAlignment support is also not well tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 14:15:55 +00:00
Stefano Ceccherini 2e6adc56e4 Added a _BPictureExtent_::Flatten(), moved some code from BPicture::Flatten()
into it. Renamed ImportData() to Unflatten(). Some code shuffling.
No functional change.
Some style cleanup needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 12:33:47 +00:00
Axel Dörfler 47d9ed62d3 * Added AS_GET_WORKSPACE_LAYOUT to get the number of columns/rows of the
workspaces.
* Added shortcuts Ctrl-Alt-{Left|Right|Up|Down} to switch to adjacent
  workspaces.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 17:22:11 +00:00
François Revol bb1325a30e [GSoC] [ARM] Patch by Johannes Wischert.
Placeholder private headers for the kernel and libroot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 16:23:08 +00:00
Stephan Aßmus 5147963dcd headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than
Tracker's OpenHashTable.h which it should eventually replace. We've renamed the
class to BOpenHashTable and changed the interface slightly so that HashTableLink
became superfluous.
Adapted all the code that used it. Since the OpenHashTables no longer clash,
this should fix the GCC4 build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 00:39:12 +00:00
Michael Lotz 8e1857f795 * Completely rework the USB HID driver to make use of the HID framework
introduced earlier.
* Reworked the previous device classes to make them ProtocolHandlers handling
  their respective input_server <-> driver protocol.
* Implement setting report item data and building/sending reports based on that.
* Remove the old HID parsing code.

This enables us to use all HID devices as we now parse and use the HID
descriptors/reports. Non-boot-porotocol devices should therefore work.

The next step will be to implement a generic input/output framework in userland
that can communicate with a generic protocol handler in usb_hid. This will then
enable applications to make use of all the non-mapped HID stuff directly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31790 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 00:35:21 +00:00
Stephan Aßmus e343673a0b * The app_server implements modifiers for performing decorator actions anywhere
inside the window. These are Command + Alt. In X11, it's just Alt, but that
  is already used in various Haiku/BeOS apps.
* Introduced new window flag B_NO_SERVER_SIDE_WINDOW_MODIFIERS to disable the
  above.
* Made click to front in FFM mode less strict, you can slightly move the mouse
  now and still click windows to front.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 20:45:04 +00:00
Axel Dörfler f75b8de3fc * Discarded the "parametersSize" parameter from various disk device manager
functions.
* Since we now use UserStringParameter, this fixes the missing null termination
  of the parameter string, and thus bug #4045.
* Removed UserMemoryParameter, as it's no longer in use.
* Adjusted syscalls accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 17:27:27 +00:00
Axel Dörfler 6ef35ef770 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 17:23:59 +00:00
Ingo Weinhold 64ccb6b58a Synced the different definitions of BUFSIZ with the internal one. What a mess...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31776 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 15:28:33 +00:00
Axel Dörfler 63c07622f6 * Some style cleanups, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 11:25:14 +00:00
Stefano Ceccherini ab53bb2086 Export get_bytes_per_row() from InterfacePrivate.h, and use it in ServerBitmap
in place of the own rolled implementation. Comment typo fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-26 07:59:16 +00:00
Ingo Weinhold d8c41ef38f Added support for containing BReferenceables of arbitrary actual type.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-25 00:20:53 +00:00
Ingo Weinhold 6feb776265 Alias Referenceable as BReferenceable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31743 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-25 00:20:06 +00:00
Axel Dörfler b8e5a675e5 * Implemented missing date parsing; queries like "last_modified > %-5 minutes%"
are now working as they should.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31711 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-23 10:05:20 +00:00
Axel Dörfler 8315ac2417 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-23 09:45:54 +00:00
Axel Dörfler bdee97bc3a * Applied slightly changed patch by Alexander von Gluck.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-23 08:22:01 +00:00
François Revol 77777c5389 Of course, using warnings as placeholders for code to write works fine until it's included when building an arch with -Werror...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 18:14:32 +00:00
François Revol ff84453736 [GSoC] [ARM] Patch by Johannes Wischert.
Add dummy args structs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 18:10:06 +00:00
François Revol 735be9db97 [GSoC] [ARM] Patch by Johannes Wischert.
Include ARM struct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 18:04:35 +00:00
François Revol 8666a725ac [GSoC] [ARM] Patch by Johannes Wischert.
Add ARM header for debugger.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 18:03:42 +00:00
François Revol 9463ff4cb7 [GSoC] [ARM] Patch by Johannes Wischert.
Add ARM defines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 17:19:02 +00:00
Ingo Weinhold 0b11ecb18c * Always include the public arch_debugger.h headers. The structures defined
there are prefixed with the respective architecture name. Useful for remote
  debugging a different architecture.
* <x86/arch_debugger.h>: Introduced a structure for the FPU state, so that it
  isn't left to the debugger.
* Removed the _kern_get_thread_cpu_state() syscall. Was originally intended for
  bdb compatiblity, but isn't really needed.
* Kernel x86 arch_get_debug_cpu_state(): The use of fnsave was broken, since
  it reinits the FPU after saving the state. This resulted in weird results
  when debugging functions using the FPU. We now use fxsave, if available.
  Otherwise fnsave + frstor should be used -- not fully implemented yet.
  Same for arch_set_debug_cpu_state().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31682 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 22:18:39 +00:00
Axel Dörfler 13aa1795dd * It seems we always have to specify all flags to make it work; removed "flags"
parameter from start_system_profiler().
* Added stack depth, and interval parameters to it, though.
* Profiling the boot process is now possible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 12:09:15 +00:00
Axel Dörfler f74fedd9ba * Made header self-contained.
* Added missing license.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 09:24:07 +00:00
Ingo Weinhold 1746066cde * Made _Allocate() static.
* Moved the private inline methods up in the source file, so they can actually
  be inlined.
* UnlockBuffer(): Removed superfluous "if". Maybe the one who wrote it can have
  a look and check whether something else was intended originally.
* _MakeWritable() (both versions): Removed the superfluous ref count increment
  and the matching decrements.
* _Resize(): Fixed ref count ASSERT. It would always be triggered when called
  from UnlockBuffer(), since the ref count is -1 in that case.
* Clarified some comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-21 00:04:46 +00:00
Axel Dörfler c755ecfe96 * Added an emergency key mechanism to the kernel, inspired by Jan Klötzke's
patch from about a year ago (I couldn't use any code of his yet, though,
  but there are a few things left). The emergency keys are triggered by
  pressing Alt-SysReq + key.
* By default, only Alt-SysReq+'d' is used as a means to deliberately enter
  the kernel debugger. F12 belongs to userland again, now :-)
* Debugger add-ons now have another optional method to implement their own
  emergency keys - 'd' for the debugger cannot be overridden, though.
* The mechanism can be turned off via a new kernel setting, so it's not that
  easy anymore to "crash" Haiku if you don't want to.
* Right now, the PS/2 driver, and the pre-input_server in-kernel debugger
  keyboard mini-driver support this, USB not yet.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-20 20:39:37 +00:00
Ingo Weinhold 7f96148cac Patch by Bryce Groff with changes by myself:
* Added missing name parameter to the partitioning system module child creation
  and child creation validation hooks. Pass the name to them.
* Added BPartitionParameterEditor interface, which is/will be used for editing
  disk system specific parameters.
* Implemented partition parameter editors for BFS initialization and Intel
  partition map child creation.
* Fixed the incorrect supported child partition type iteration in the Intel
  partition map add-on. It does now return actual types.
* Handle the "active" flag parameter in the Intel partitioning system module.
* DriveSetup:
  - Replaced the "Create" submenu by a simple menu item. The type can now by
    chosen in the dialog.
  - Make use of initialization and child creation parameter editors. Some
    non-generic code has been moved to the respective editor implementations
    (BFS, intel partitioning system).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31658 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-20 20:29:16 +00:00
Axel Dörfler c7544c1390 * Enabled default time for shutting off the monitor (after 20 minutes).
* Removed BeOS R5 network password retrieval code.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-20 14:03:30 +00:00
Ingo Weinhold b5d6fc7173 * Added missing bool type support.
* Added Bytes(), returning a pointer to the "raw" data, and Size(), returning
  the data size.
* Added SetToTypedData(), which initializes the object from a data buffer and a
  type code.
* Added SwapEndianess() to swap the endianess of the contained data (if
  possible).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-18 23:01:48 +00:00
Axel Dörfler 5fbad060b3 * Work-in-progress on a kernel profile service that can be evaluated from
userland afterwards.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-17 16:21:06 +00:00
Oliver Tappe da82d38f42 * Removed hack used by BeOS to trick stl allocator into using malloc/free for
all allocations, instead we now directly request the use of malloc/free in
  stl_config.h. This avoids warnings about 'arrays of size 0' when building
  any stl-code with -pedantic (like e.g. ICU does).
  Alternatively, we could active pthread-type threading support, but since in
  some small tests, I have not been able to see any advantage, I've just added
  a respective comment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-16 21:27:21 +00:00
Michael Lotz 63d557f06f Fixing random GCC4 warnings. Mostly missing consts, some parentheses, some braces... Should all be harmless and not change anything.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-16 02:42:03 +00:00
Michael Lotz b78c74fdc4 Fix GCC4 build. Duplicate parameter names generate a warning there.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 23:38:15 +00:00
Axel Dörfler 0ca5323479 * Changed the enum into defines, so that apps can check whether or not they
exist (as mDNSResponder does, for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 15:28:49 +00:00
Axel Dörfler 78888c44da Applied patch by Ma Jie adding functionality needed by mDNSResponder:
* added new protocol method process_ancillary_data_no_container() that does not
  need a container to fill the cmsghdr data.
* Added support for the IP_RECVDSTADDR option using this call.
* Implemented support for IP_MULTICAST_IF.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 11:53:29 +00:00
Jérôme Duval 1a90d61b47 synth is already in the data directory, removed the one in the etc directory.
change B_SYNTH_DIRECTORY to use the data directory


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31562 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-14 17:05:57 +00:00
Ingo Weinhold 3b859de22e Added handy static method SizeOfType().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-13 18:33:06 +00:00
Michael Pfeiffer 504033fbbe Clean up. Renamed spool_file to spoolFile.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-11 14:37:11 +00:00
Ingo Weinhold a365e1cfbb Patch by Bryce Groff, some changes by myself:
* devfs:
  - devfs_[un]publish_partition(): They no longer get the partition path as
    parameter, but rather the device path and the partition name.
  - Added devfs_rename_partition(), which renames an already published
    partition node.
* KPartition/KDiskDevice:
  - Replaced the fPublished flag by fPublishedName, the name under which the
    partition is published. This simplifies UnpublishDevice() and makes it
    practically infallible.
  - Added GetFileName(), which only returns the partition's file name.
    Simplified GetPath() by using it.
  - When a partition is added/removed the subsequent sibling partitions get a
    new index. Now we also rename their published device nodes (and those of
    their descendents). When something goes wrong we unpublish the concerned
    partition's device to be on the safe side. Would be a shame to accidentally
    format the wrong partition, eh? :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-11 14:35:04 +00:00