xref: /haiku/src/kits/media/EncoderPlugin.cpp (revision 218a8c03cbadd95d8888b218930f514fa0b4fac4)
1 /*
2  * Copyright 2009, Stephan Aßmus <superstippi@gmx.de>. All rights reserved.
3  * Copyright 2004, Marcus Overhagen. All rights reserved.
4  * Distributed under the terms of the MIT License.
5  */
6 
7 #include "EncoderPlugin.h"
8 
9 #include <stdio.h>
10 #include <string.h>
11 
12 #include <MediaFormats.h>
13 
14 
Encoder()15 Encoder::Encoder()
16 	:
17 	fChunkWriter(NULL),
18 	fMediaPlugin(NULL)
19 {
20 }
21 
22 
~Encoder()23 Encoder::~Encoder()
24 {
25 	delete fChunkWriter;
26 }
27 
28 
29 // #pragma mark - Convenience stubs
30 
31 
32 status_t
AddTrackInfo(uint32 code,const void * data,size_t size,uint32 flags)33 Encoder::AddTrackInfo(uint32 code, const void* data, size_t size, uint32 flags)
34 {
35 	return B_NOT_SUPPORTED;
36 }
37 
38 
39 BView*
ParameterView()40 Encoder::ParameterView()
41 {
42 	return NULL;
43 }
44 
45 
46 BParameterWeb*
ParameterWeb()47 Encoder::ParameterWeb()
48 {
49 	return NULL;
50 }
51 
52 
53 status_t
GetParameterValue(int32 id,void * value,size_t * size) const54 Encoder::GetParameterValue(int32 id, void* value, size_t* size) const
55 {
56 	return B_NOT_SUPPORTED;
57 }
58 
59 
60 status_t
SetParameterValue(int32 id,const void * value,size_t size)61 Encoder::SetParameterValue(int32 id, const void* value, size_t size)
62 {
63 	return B_NOT_SUPPORTED;
64 }
65 
66 
67 status_t
GetEncodeParameters(encode_parameters * parameters) const68 Encoder::GetEncodeParameters(encode_parameters* parameters) const
69 {
70 	return B_NOT_SUPPORTED;
71 }
72 
73 
74 status_t
SetEncodeParameters(encode_parameters * parameters)75 Encoder::SetEncodeParameters(encode_parameters* parameters)
76 {
77 	return B_NOT_SUPPORTED;
78 }
79 
80 
81 // #pragma mark -
82 
83 
84 status_t
WriteChunk(const void * chunkBuffer,size_t chunkSize,media_encode_info * encodeInfo)85 Encoder::WriteChunk(const void* chunkBuffer, size_t chunkSize,
86 	media_encode_info* encodeInfo)
87 {
88 	return fChunkWriter->WriteChunk(chunkBuffer, chunkSize, encodeInfo);
89 }
90 
91 
92 void
SetChunkWriter(ChunkWriter * writer)93 Encoder::SetChunkWriter(ChunkWriter* writer)
94 {
95 	delete fChunkWriter;
96 	fChunkWriter = writer;
97 }
98 
99 
100 // #pragma mark - FBC padding
101 
102 
103 status_t
Perform(perform_code code,void * data)104 Encoder::Perform(perform_code code, void* data)
105 {
106 	return B_OK;
107 }
108 
109 
_ReservedEncoder1()110 void Encoder::_ReservedEncoder1() {}
_ReservedEncoder2()111 void Encoder::_ReservedEncoder2() {}
_ReservedEncoder3()112 void Encoder::_ReservedEncoder3() {}
_ReservedEncoder4()113 void Encoder::_ReservedEncoder4() {}
_ReservedEncoder5()114 void Encoder::_ReservedEncoder5() {}
_ReservedEncoder6()115 void Encoder::_ReservedEncoder6() {}
_ReservedEncoder7()116 void Encoder::_ReservedEncoder7() {}
_ReservedEncoder8()117 void Encoder::_ReservedEncoder8() {}
_ReservedEncoder9()118 void Encoder::_ReservedEncoder9() {}
_ReservedEncoder10()119 void Encoder::_ReservedEncoder10() {}
_ReservedEncoder11()120 void Encoder::_ReservedEncoder11() {}
_ReservedEncoder12()121 void Encoder::_ReservedEncoder12() {}
_ReservedEncoder13()122 void Encoder::_ReservedEncoder13() {}
_ReservedEncoder14()123 void Encoder::_ReservedEncoder14() {}
_ReservedEncoder15()124 void Encoder::_ReservedEncoder15() {}
_ReservedEncoder16()125 void Encoder::_ReservedEncoder16() {}
_ReservedEncoder17()126 void Encoder::_ReservedEncoder17() {}
_ReservedEncoder18()127 void Encoder::_ReservedEncoder18() {}
_ReservedEncoder19()128 void Encoder::_ReservedEncoder19() {}
_ReservedEncoder20()129 void Encoder::_ReservedEncoder20() {}
130 
131 
132 //	#pragma mark - EncoderPlugin
133 
134 
EncoderPlugin()135 EncoderPlugin::EncoderPlugin()
136 {
137 }
138