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 15 Encoder::Encoder() 16 : 17 fChunkWriter(NULL), 18 fMediaPlugin(NULL) 19 { 20 } 21 22 23 Encoder::~Encoder() 24 { 25 delete fChunkWriter; 26 } 27 28 29 // #pragma mark - Convenience stubs 30 31 32 status_t 33 Encoder::AddTrackInfo(uint32 code, const void* data, size_t size, uint32 flags) 34 { 35 return B_NOT_SUPPORTED; 36 } 37 38 39 BView* 40 Encoder::ParameterView() 41 { 42 return NULL; 43 } 44 45 46 BParameterWeb* 47 Encoder::ParameterWeb() 48 { 49 return NULL; 50 } 51 52 53 status_t 54 Encoder::GetParameterValue(int32 id, void* value, size_t* size) const 55 { 56 return B_NOT_SUPPORTED; 57 } 58 59 60 status_t 61 Encoder::SetParameterValue(int32 id, const void* value, size_t size) 62 { 63 return B_NOT_SUPPORTED; 64 } 65 66 67 status_t 68 Encoder::GetEncodeParameters(encode_parameters* parameters) const 69 { 70 return B_NOT_SUPPORTED; 71 } 72 73 74 status_t 75 Encoder::SetEncodeParameters(encode_parameters* parameters) 76 { 77 return B_NOT_SUPPORTED; 78 } 79 80 81 // #pragma mark - 82 83 84 status_t 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 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 104 Encoder::Perform(perform_code code, void* data) 105 { 106 return B_OK; 107 } 108 109 110 void Encoder::_ReservedEncoder1() {} 111 void Encoder::_ReservedEncoder2() {} 112 void Encoder::_ReservedEncoder3() {} 113 void Encoder::_ReservedEncoder4() {} 114 void Encoder::_ReservedEncoder5() {} 115 void Encoder::_ReservedEncoder6() {} 116 void Encoder::_ReservedEncoder7() {} 117 void Encoder::_ReservedEncoder8() {} 118 void Encoder::_ReservedEncoder9() {} 119 void Encoder::_ReservedEncoder10() {} 120 void Encoder::_ReservedEncoder11() {} 121 void Encoder::_ReservedEncoder12() {} 122 void Encoder::_ReservedEncoder13() {} 123 void Encoder::_ReservedEncoder14() {} 124 void Encoder::_ReservedEncoder15() {} 125 void Encoder::_ReservedEncoder16() {} 126 void Encoder::_ReservedEncoder17() {} 127 void Encoder::_ReservedEncoder18() {} 128 void Encoder::_ReservedEncoder19() {} 129 void Encoder::_ReservedEncoder20() {} 130 131 132 // #pragma mark - EncoderPlugin 133 134 135 EncoderPlugin::EncoderPlugin() 136 { 137 } 138