1 // MediaDemultiplexerAddOn.cpp
3 // Andrew Bachmann, 2002
5 // MediaDemultiplexerAddOn is an add-on
6 // that can make instances of MediaDemultiplexerNode
8 // MediaDemultiplexerNode handles a file and a multistream
11 #include <MediaDefs.h>
12 #include <MediaAddOn.h>
15 #include "MediaDemultiplexerNode.h"
16 #include "MediaDemultiplexerAddOn.h"
22 // instantiation function
23 extern "C" _EXPORT BMediaAddOn
* make_media_addon(image_id image
)
25 return new MediaDemultiplexerAddOn(image
);
28 // -------------------------------------------------------- //
30 // -------------------------------------------------------- //
32 MediaDemultiplexerAddOn::~MediaDemultiplexerAddOn()
36 MediaDemultiplexerAddOn::MediaDemultiplexerAddOn(image_id image
) :
39 fprintf(stderr
,"MediaDemultiplexerAddOn::MediaDemultiplexerAddOn\n");
43 // -------------------------------------------------------- //
45 // -------------------------------------------------------- //
47 status_t
MediaDemultiplexerAddOn::InitCheck(
48 const char ** out_failure_text
)
50 fprintf(stderr
,"MediaDemultiplexerAddOn::InitCheck\n");
54 int32
MediaDemultiplexerAddOn::CountFlavors()
56 fprintf(stderr
,"MediaDemultiplexerAddOn::CountFlavors\n");
60 status_t
MediaDemultiplexerAddOn::GetFlavorAt(
62 const flavor_info
** out_info
)
64 fprintf(stderr
,"MediaDemultiplexerAddOn::GetFlavorAt\n");
66 fprintf(stderr
,"<- B_BAD_INDEX\n");
69 flavor_info
* infos
= new flavor_info
[1];
70 MediaDemultiplexerNode::GetFlavor(&infos
[0],n
);
75 BMediaNode
* MediaDemultiplexerAddOn::InstantiateNodeFor(
76 const flavor_info
* info
,
80 fprintf(stderr
,"MediaDemultiplexerAddOn::InstantiateNodeFor\n");
81 MediaDemultiplexerNode
* node
82 = new MediaDemultiplexerNode(info
,config
,this);
84 *out_error
= B_NO_MEMORY
;
85 fprintf(stderr
,"<- B_NO_MEMORY\n");
87 *out_error
= node
->InitCheck();
92 status_t
MediaDemultiplexerAddOn::GetConfigurationFor(
93 BMediaNode
* your_node
,
94 BMessage
* into_message
)
96 fprintf(stderr
,"MediaDemultiplexerAddOn::GetConfigurationFor\n");
97 MediaDemultiplexerNode
* node
98 = dynamic_cast<MediaDemultiplexerNode
*>(your_node
);
100 fprintf(stderr
,"<- B_BAD_TYPE\n");
103 return node
->GetConfigurationFor(into_message
);
106 bool MediaDemultiplexerAddOn::WantsAutoStart()
108 fprintf(stderr
,"MediaDemultiplexerAddOn::WantsAutoStart\n");
112 status_t
MediaDemultiplexerAddOn::AutoStart(
114 BMediaNode
** out_node
,
115 int32
* out_internal_id
,
118 fprintf(stderr
,"MediaDemultiplexerAddOn::AutoStart\n");
122 // -------------------------------------------------------- //
124 // -------------------------------------------------------- //
126 int main(int argc
, char *argv
[])
128 fprintf(stderr
,"main called for MediaDemultiplexerAddOn\n");
131 // -------------------------------------------------------- //
133 // -------------------------------------------------------- //
135 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_0(void *) {};
136 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_1(void *) {};
137 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_2(void *) {};
138 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_3(void *) {};
139 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_4(void *) {};
140 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_5(void *) {};
141 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_6(void *) {};
142 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_7(void *) {};
143 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_8(void *) {};
144 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_9(void *) {};
145 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_10(void *) {};
146 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_11(void *) {};
147 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_12(void *) {};
148 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_13(void *) {};
149 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_14(void *) {};
150 status_t
MediaDemultiplexerAddOn::_Reserved_MediaDemultiplexerAddOn_15(void *) {};