1 /*
2 * Copyright 2002-2015, Haiku Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7 #include <MediaDefs.h>
8 #include <MediaRoster.h>
9 #include <SupportDefs.h>
10
11 #include "MediaDebug.h"
12
13 // This file contains parts of the media_kit that can be removed
14 // as considered useless, deprecated and/or not worth to be
15 // implemented.
16
17 // BMediaRoster
18
19 status_t
SetRealtimeFlags(uint32 enabled)20 BMediaRoster::SetRealtimeFlags(uint32 enabled)
21 {
22 UNIMPLEMENTED();
23 return B_ERROR;
24 }
25
26
27 status_t
GetRealtimeFlags(uint32 * _enabled)28 BMediaRoster::GetRealtimeFlags(uint32* _enabled)
29 {
30 UNIMPLEMENTED();
31 return B_ERROR;
32 }
33
34
35 /*static*/ status_t
ParseCommand(BMessage & reply)36 BMediaRoster::ParseCommand(BMessage& reply)
37 {
38 UNIMPLEMENTED();
39 return B_ERROR;
40 }
41
42
43 status_t
GetDefaultInfo(media_node_id forDefault,BMessage & config)44 BMediaRoster::GetDefaultInfo(media_node_id forDefault, BMessage& config)
45 {
46 UNIMPLEMENTED();
47 return B_ERROR;
48 }
49
50
51 status_t
SetRunningDefault(media_node_id forDefault,const media_node & node)52 BMediaRoster::SetRunningDefault(media_node_id forDefault,
53 const media_node& node)
54 {
55 UNIMPLEMENTED();
56 return B_ERROR;
57 }
58
59
60 //! Deprecated call.
61 status_t
SetOutputBuffersFor(const media_source & output,BBufferGroup * group,bool willReclaim)62 BMediaRoster::SetOutputBuffersFor(const media_source& output,
63 BBufferGroup* group, bool willReclaim)
64 {
65 UNIMPLEMENTED();
66 debugger("BMediaRoster::SetOutputBuffersFor missing\n");
67 return B_ERROR;
68 }
69
70 // MediaDefs.h
71
72 status_t launch_media_server(uint32 flags);
73
74 status_t media_realtime_init_image(image_id image, uint32 flags);
75
76 status_t media_realtime_init_thread(thread_id thread, size_t stack_used,
77 uint32 flags);
78
79
80 status_t
launch_media_server(uint32 flags)81 launch_media_server(uint32 flags)
82 {
83 return launch_media_server(0, NULL, NULL, flags);
84 }
85
86
87 // Given an image_id, prepare that image_id for realtime media
88 // If the kind of media indicated by "flags" is not enabled for real-time,
89 // B_MEDIA_REALTIME_DISABLED is returned.
90 // If there are not enough system resources to enable real-time performance,
91 // B_MEDIA_REALTIME_UNAVAILABLE is returned.
92 status_t
media_realtime_init_image(image_id image,uint32 flags)93 media_realtime_init_image(image_id image, uint32 flags)
94 {
95 UNIMPLEMENTED();
96 return B_OK;
97 }
98
99
100 // Given a thread ID, and an optional indication of what the thread is
101 // doing in "flags", prepare the thread for real-time media performance.
102 // Currently, this means locking the thread stack, up to size_used bytes,
103 // or all of it if 0 is passed. Typically, you will not be using all
104 // 256 kB of the stack, so you should pass some smaller value you determine
105 // from profiling the thread; typically in the 32-64kB range.
106 // Return values are the same as for media_prepare_realtime_image().
107 status_t
media_realtime_init_thread(thread_id thread,size_t stack_used,uint32 flags)108 media_realtime_init_thread(thread_id thread, size_t stack_used, uint32 flags)
109 {
110 UNIMPLEMENTED();
111 return B_OK;
112 }
113