├── .DS_Store ├── LMVideoTest.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── lvming.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── lvming.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── LMVideoTest.xcscheme │ └── xcschememanagement.plist ├── LMVideoTest ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── AudioManager.h ├── AudioManager.m ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── RtmpManager.h ├── RtmpManager.m ├── ViewController.h ├── ViewController.m ├── X264Manager.h ├── X264Manager.m ├── aac │ ├── include │ │ ├── faac.h │ │ └── faaccfg.h │ └── libfaac.a ├── librtmp │ ├── include │ │ ├── librtmp │ │ │ ├── amf.h │ │ │ ├── http.h │ │ │ ├── log.h │ │ │ └── rtmp.h │ │ └── openssl │ │ │ ├── aes.h │ │ │ ├── asn1.h │ │ │ ├── asn1_mac.h │ │ │ ├── asn1t.h │ │ │ ├── bio.h │ │ │ ├── blowfish.h │ │ │ ├── bn.h │ │ │ ├── buffer.h │ │ │ ├── camellia.h │ │ │ ├── cast.h │ │ │ ├── cmac.h │ │ │ ├── cms.h │ │ │ ├── comp.h │ │ │ ├── conf.h │ │ │ ├── conf_api.h │ │ │ ├── crypto.h │ │ │ ├── des.h │ │ │ ├── des_old.h │ │ │ ├── dh.h │ │ │ ├── dsa.h │ │ │ ├── dso.h │ │ │ ├── dtls1.h │ │ │ ├── e_os2.h │ │ │ ├── ebcdic.h │ │ │ ├── ec.h │ │ │ ├── ecdh.h │ │ │ ├── ecdsa.h │ │ │ ├── engine.h │ │ │ ├── err.h │ │ │ ├── evp.h │ │ │ ├── hmac.h │ │ │ ├── idea.h │ │ │ ├── krb5_asn.h │ │ │ ├── kssl.h │ │ │ ├── lhash.h │ │ │ ├── md4.h │ │ │ ├── md5.h │ │ │ ├── mdc2.h │ │ │ ├── modes.h │ │ │ ├── obj_mac.h │ │ │ ├── objects.h │ │ │ ├── ocsp.h │ │ │ ├── opensslconf.h │ │ │ ├── opensslv.h │ │ │ ├── ossl_typ.h │ │ │ ├── pem.h │ │ │ ├── pem2.h │ │ │ ├── pkcs12.h │ │ │ ├── pkcs7.h │ │ │ ├── pqueue.h │ │ │ ├── rand.h │ │ │ ├── rc2.h │ │ │ ├── rc4.h │ │ │ ├── ripemd.h │ │ │ ├── rsa.h │ │ │ ├── safestack.h │ │ │ ├── seed.h │ │ │ ├── sha.h │ │ │ ├── srp.h │ │ │ ├── srtp.h │ │ │ ├── ssl.h │ │ │ ├── ssl2.h │ │ │ ├── ssl23.h │ │ │ ├── ssl3.h │ │ │ ├── stack.h │ │ │ ├── symhacks.h │ │ │ ├── tls1.h │ │ │ ├── ts.h │ │ │ ├── txt_db.h │ │ │ ├── ui.h │ │ │ ├── ui_compat.h │ │ │ ├── whrlpool.h │ │ │ ├── x509.h │ │ │ ├── x509_vfy.h │ │ │ └── x509v3.h │ └── lib │ │ ├── libcrypto.a │ │ ├── librtmp.a │ │ └── libssl.a ├── main.m └── x264 │ ├── include │ ├── x264.h │ └── x264_config.h │ └── libx264.a ├── README.md └── nginx.conf /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvming6816077/LMVideoTest/a2d26791fb1fa1375f8645d4403ba2549115ca77/.DS_Store -------------------------------------------------------------------------------- /LMVideoTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LMVideoTest.xcodeproj/project.xcworkspace/xcuserdata/lvming.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvming6816077/LMVideoTest/a2d26791fb1fa1375f8645d4403ba2549115ca77/LMVideoTest.xcodeproj/project.xcworkspace/xcuserdata/lvming.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /LMVideoTest.xcodeproj/xcuserdata/lvming.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /LMVideoTest.xcodeproj/xcuserdata/lvming.xcuserdatad/xcschemes/LMVideoTest.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /LMVideoTest.xcodeproj/xcuserdata/lvming.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | LMVideoTest.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 4110BF1A1CF33894003AAC0F 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /LMVideoTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // LMVideoTest 4 | // 5 | // Created by lvming on 16/5/23. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /LMVideoTest/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // LMVideoTest 4 | // 5 | // Created by lvming on 16/5/23. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /LMVideoTest/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /LMVideoTest/AudioManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // AudioManager.h 3 | // LMVideoTest 4 | // 5 | // Created by lvming on 16/5/23. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "faac.h" 12 | 13 | #define kNumberOfRecordBuffers 3 14 | #define Bitrate 200//码率 15 | 16 | @interface AudioManager : NSObject 17 | { 18 | AudioStreamBasicDescription basicDescription; 19 | AudioQueueRef queueRef; 20 | AudioQueueBufferRef buffer[3]; 21 | 22 | BOOL recording; 23 | BOOL running; 24 | 25 | faacEncHandle audioEncoder; 26 | unsigned long inputSamples; 27 | unsigned long maxOutputBytes; 28 | unsigned long maxInputBytes; 29 | unsigned char* outputBuffer; 30 | 31 | FILE *fp; 32 | } 33 | 34 | + (instancetype)getInstance; 35 | 36 | /** 37 | * 初始化编码 38 | */ 39 | - (void)initRecording; 40 | 41 | /** 42 | * 开始录制 43 | */ 44 | - (void)startRecording; 45 | 46 | /** 47 | * 暂停录制 48 | */ 49 | - (void)pauseRecording; 50 | 51 | /** 52 | * 结束录制 53 | */ 54 | - (void)stopRecording; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /LMVideoTest/AudioManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // AudioManager.m 3 | // LMVideoTest 4 | // 5 | // Created by lvming on 16/5/23. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | #import "AudioManager.h" 10 | #import "RtmpManager.h" 11 | 12 | #define SAMPLERATE 44100 13 | #define NUMBERCHANNEL 2 14 | #define BUFFERBYTESIZE 16000 15 | 16 | @implementation AudioManager 17 | 18 | static AudioManager* shareInstace = nil; 19 | + (instancetype)getInstance 20 | { 21 | static dispatch_once_t instance; 22 | dispatch_once(&instance, ^{ 23 | shareInstace = [[self alloc] init]; 24 | }); 25 | return shareInstace; 26 | } 27 | 28 | static void OnInputBufferCallback(void *inUserData, 29 | AudioQueueRef inAQ, 30 | AudioQueueBufferRef inBuffer, 31 | const AudioTimeStamp *inStartTime, 32 | UInt32 inNumPackets, 33 | const AudioStreamPacketDescription *inPacketDesc) 34 | { 35 | AudioManager * manager = (__bridge AudioManager*)inUserData; 36 | if (manager == NULL || manager->recording == NO) 37 | { 38 | return; 39 | } 40 | //编码 41 | int nRet = faacEncEncode(manager->audioEncoder, inBuffer->mAudioData, manager->inputSamples, manager->outputBuffer, manager->maxOutputBytes); 42 | 43 | if (nRet > 0) 44 | { 45 | [[RtmpManager getInstance] send_rtmp_audio:manager->outputBuffer andLength:nRet]; 46 | // fwrite(manager->outputBuffer, 1, nRet, manager->fp); 47 | 48 | } 49 | AudioQueueEnqueueBuffer(manager->queueRef, inBuffer, 0, NULL); 50 | } 51 | 52 | static void OnIsRunningCallback(void *inUserData, AudioQueueRef inAQ, AudioQueuePropertyID inID) 53 | { 54 | AudioManager * manager = (__bridge AudioManager*)inUserData; 55 | if (manager == NULL) 56 | { 57 | return; 58 | } 59 | 60 | UInt32 size = sizeof(manager->running); 61 | AudioQueueGetProperty(manager->queueRef, kAudioQueueProperty_IsRunning, &manager->running, &size); 62 | 63 | if (!manager->running) 64 | { 65 | [manager stopRecording]; 66 | } 67 | } 68 | 69 | - (void)initRecording 70 | { 71 | [self openEncoder]; 72 | 73 | // [self initForFilePath]; 74 | 75 | AVAudioSession * audioSession = [AVAudioSession sharedInstance]; 76 | [audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error: nil]; 77 | UInt32 audioRouteOverride = kAudioSessionOverrideAudioRoute_Speaker; 78 | AudioSessionSetProperty (kAudioSessionProperty_OverrideAudioRoute, 79 | sizeof (audioRouteOverride), 80 | &audioRouteOverride); 81 | [audioSession setActive:YES error: nil]; 82 | 83 | basicDescription.mFormatID = kAudioFormatLinearPCM; 84 | basicDescription.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger | kLinearPCMFormatFlagIsPacked; 85 | basicDescription.mSampleRate = SAMPLERATE; 86 | basicDescription.mChannelsPerFrame = NUMBERCHANNEL; 87 | basicDescription.mBitsPerChannel = 16; 88 | basicDescription.mBytesPerPacket = self->basicDescription.mBytesPerFrame = (basicDescription.mBitsPerChannel / 8) * basicDescription.mChannelsPerFrame; 89 | basicDescription.mFramesPerPacket = 1; 90 | 91 | OSStatus status = AudioQueueNewInput(&basicDescription, OnInputBufferCallback, (__bridge void*)self, CFRunLoopGetMain(), kCFRunLoopDefaultMode, 0, &queueRef); 92 | if (status) 93 | { 94 | NSLog(@"Could not establish new queue"); 95 | return; 96 | } 97 | 98 | AudioQueueSetParameter(queueRef, kAudioQueueParam_Volume, 1.0f); 99 | for(int i = 0; i != kNumberOfRecordBuffers; ++i) 100 | { 101 | AudioQueueAllocateBuffer(queueRef, (UInt32)maxInputBytes, &(buffer[i])); 102 | AudioQueueEnqueueBuffer(queueRef, buffer[i], 0, NULL); 103 | } 104 | 105 | //AudioQueueAddPropertyListener(self->queueRef, kAudioQueueProperty_IsRunning, OnIsRunningCallback, (__bridge void*)self); 106 | 107 | UInt32 trueValue = true; 108 | AudioQueueSetProperty(queueRef, kAudioQueueProperty_EnableLevelMetering, &trueValue, sizeof(trueValue)); 109 | 110 | } 111 | 112 | - (void)startRecording 113 | { 114 | OSStatus rst = AudioQueueStart(queueRef, NULL); 115 | 116 | if (rst != 0) 117 | { 118 | AudioQueueStart(queueRef, NULL); 119 | } 120 | recording = YES; 121 | } 122 | 123 | - (void)pauseRecording 124 | { 125 | AudioQueuePause(queueRef); 126 | recording = NO; 127 | } 128 | 129 | - (void)stopRecording 130 | { 131 | AudioQueueStop(queueRef, true); 132 | AudioQueueDispose(queueRef, false); 133 | queueRef = NULL; 134 | 135 | [self stopEncoder]; 136 | } 137 | 138 | 139 | - (void)openEncoder 140 | { 141 | audioEncoder = faacEncOpen(SAMPLERATE, NUMBERCHANNEL, &inputSamples, &maxOutputBytes); 142 | maxInputBytes = inputSamples*16/8; 143 | 144 | faacEncConfigurationPtr ptr = faacEncGetCurrentConfiguration(audioEncoder); 145 | 146 | // 设置配置参数 147 | ptr->inputFormat = FAAC_INPUT_16BIT; 148 | ptr->outputFormat = 1; ////输出是否包含ADTS头,默认1,如果要写文件本地播放则需要加ADTS头 149 | ptr->useTns = true; //时域噪音控制,大概就是消爆音 150 | ptr->useLfe = false; 151 | ptr->aacObjectType = LOW;//LC编码 152 | ptr->shortctl = SHORTCTL_NORMAL; 153 | ptr->quantqual = 50; 154 | ptr->bandWidth = 0;//频宽 155 | ptr->bitRate = 0; 156 | 157 | faacEncSetConfiguration(audioEncoder, ptr); 158 | 159 | printf("\ninputSamples:%ld maxInputBytes:%ld maxOutputBytes:%ld\n", inputSamples, maxInputBytes,maxOutputBytes); 160 | unsigned char *tmp; 161 | unsigned long spec_len; 162 | faacEncGetDecoderSpecificInfo(audioEncoder, &tmp, &spec_len); 163 | [[RtmpManager getInstance] send_rtmp_audio_spec:tmp andLength:(UInt32)spec_len]; 164 | //如果现在释放,可能还没发送就释放了,导致发送的数据不对,因为发送是异步队列发送的。 165 | //如果free的时候同时设置为NULL,那么再引用数据的时候就会报错也能定位到问题了。 166 | //所以以后free的时候也要设置为NULL。 167 | // free(tmp); 168 | // tmp = nil; 169 | 170 | outputBuffer = malloc(maxOutputBytes); 171 | } 172 | 173 | 174 | - (void)stopEncoder 175 | { 176 | faacEncClose(audioEncoder); 177 | } 178 | 179 | 180 | - (void)initForFilePath 181 | { 182 | char *path = [self GetFilePathByfileName:"IOSCamDemo.aac"]; 183 | NSLog(@"%s",path); 184 | fp = fopen(path,"wb"); 185 | } 186 | 187 | 188 | - (char*)GetFilePathByfileName:(char*)filename 189 | { 190 | NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES); 191 | NSString *documentsDirectory = [paths objectAtIndex:0]; 192 | NSString *strName = [NSString stringWithFormat:@"%s",filename]; 193 | 194 | NSString *writablePath = [documentsDirectory stringByAppendingPathComponent:strName]; 195 | 196 | NSUInteger len = [writablePath length]; 197 | 198 | char *filepath = (char*)malloc(sizeof(char) * (len + 1)); 199 | 200 | [writablePath getCString:filepath maxLength:len + 1 encoding:[NSString defaultCStringEncoding]]; 201 | 202 | return filepath; 203 | } 204 | 205 | @end 206 | -------------------------------------------------------------------------------- /LMVideoTest/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LMVideoTest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LMVideoTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /LMVideoTest/RtmpManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // RtmpManager.h 3 | // LMVideoTest 4 | // 5 | // Created by lvming on 16/5/23. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "rtmp.h" 12 | 13 | @interface RtmpManager : NSObject 14 | { 15 | RTMP* rtmp; 16 | double start_time; 17 | dispatch_queue_t workQueue;//异步Queue 18 | } 19 | 20 | @property (nonatomic,copy) NSString* rtmpUrl;//rtmp服务器流地址 21 | 22 | - (RTMP*)getCurrentRtmp; 23 | 24 | /** 25 | * 获取单例 26 | * 27 | * @return 单例 28 | */ 29 | + (instancetype)getInstance; 30 | 31 | /** 32 | * 开始连接服务器 33 | * 34 | * @return 是否成功 35 | */ 36 | - (BOOL)startRtmpConnect; 37 | 38 | /** 39 | * 停止连接服务器 40 | * 41 | * @return 是否成功 42 | */ 43 | - (BOOL)stopRtmpConnect; 44 | 45 | /** 46 | * sps and pps帧 47 | * 48 | * @param sps 第一帧 49 | * @param sps_len 第一帧长度 50 | * @param pps 第二帧 51 | * @param pps_len 第二帧长度 52 | */ 53 | - (void)send_video_sps_pps:(unsigned char*)sps andSpsLength:(int)sps_len andPPs:(unsigned char*)pps andPPsLength:(uint32_t)pps_len; 54 | 55 | /** 56 | * 发送视频 57 | * 58 | * @param buf 关键帧或者非关键帧 59 | * @param len 长度 60 | */ 61 | - (void)send_rtmp_video:(unsigned char*)buf andLength:(uint32_t)len; 62 | 63 | /** 64 | * 发送音频 65 | * 66 | * @param buf 音频数据(aac) 67 | * @param len 音频长度 68 | */ 69 | - (void)send_rtmp_audio:(unsigned char*)buf andLength:(uint32_t)len; 70 | 71 | /** 72 | * 发送音频spec 73 | * 74 | * @param spec_buf spec数据 75 | * @param spec_len spec长度 76 | */ 77 | - (void)send_rtmp_audio_spec:(unsigned char *)spec_buf andLength:(uint32_t) spec_len; 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /LMVideoTest/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // VideoTest 4 | // 5 | // Created by lvming on 16/5/19. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import 13 | @interface ViewController : UIViewController 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /LMVideoTest/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // VideoTest 4 | // 5 | // Created by lvming on 16/5/19. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "X264Manager.h" 11 | #import "RtmpManager.h" 12 | #import "AudioManager.h" 13 | 14 | @interface ViewController () 15 | 16 | @property(nonatomic, strong) AVCaptureSession *session; 17 | @property(nonatomic, strong) AVCaptureVideoPreviewLayer *preViewLayer; 18 | @property(nonatomic,strong) UIButton *btn; 19 | @end 20 | 21 | @implementation ViewController{ 22 | AVCaptureConnection *_videoConnection; 23 | AVCaptureConnection *_audioConnection; 24 | 25 | RtmpManager *_rtmpManager; 26 | 27 | BOOL _runningFlag; 28 | } 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | 33 | // 推流 34 | _rtmpManager = [RtmpManager getInstance]; 35 | _rtmpManager.rtmpUrl = @"rtmp://192.168.1.104:1935/hls/mystream"; 36 | [_rtmpManager startRtmpConnect]; 37 | 38 | //音频 39 | [[AudioManager getInstance] initRecording]; 40 | 41 | 42 | //视频 43 | [[X264Manager getInstance] initForX264WithWidth:480 height:640]; 44 | 45 | 46 | [self setupCaptureSession]; 47 | 48 | [self initUI]; 49 | 50 | 51 | } 52 | 53 | - (void)setupCaptureSession 54 | { 55 | NSError *error = nil; 56 | self.session = [[AVCaptureSession alloc] init]; 57 | 58 | self.session.sessionPreset = AVCaptureSessionPreset640x480; 59 | 60 | AVCaptureDevice *device = [self cameraWithPosition:AVCaptureDevicePositionFront]; 61 | AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error:&error]; 62 | if (error) { 63 | NSLog(@"error input:%@", error.description); 64 | } 65 | if ([_session canAddInput:input]) { 66 | [self.session addInput:input]; 67 | } 68 | 69 | AVCaptureVideoDataOutput *outPut = [[AVCaptureVideoDataOutput alloc] init]; 70 | 71 | 72 | dispatch_queue_t queue = dispatch_queue_create("myQueue", NULL); 73 | 74 | 75 | [outPut setSampleBufferDelegate:self queue:queue]; 76 | 77 | 78 | outPut.videoSettings = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_420YpCbCr8BiPlanarFullRange] forKey:(NSString *)kCVPixelBufferPixelFormatTypeKey]; 79 | 80 | 81 | //表示丢弃延迟的帧 82 | outPut.alwaysDiscardsLateVideoFrames = YES; 83 | 84 | //开启session 执行录制 85 | [self startRunning]; 86 | 87 | 88 | if ([_session canAddOutput:outPut]) { 89 | [self.session addOutput:outPut]; 90 | } 91 | 92 | [self setSession:self.session]; 93 | 94 | 95 | _videoConnection = [outPut connectionWithMediaType:AVMediaTypeVideo]; 96 | 97 | _videoConnection.videoOrientation = AVCaptureVideoOrientationPortrait; 98 | 99 | 100 | 101 | 102 | // 设置视频预览界面 103 | self.preViewLayer = [AVCaptureVideoPreviewLayer layerWithSession:self.session]; 104 | self.preViewLayer.videoGravity = AVLayerVideoGravityResizeAspectFill; 105 | self.preViewLayer.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); 106 | [self.view.layer addSublayer:_preViewLayer]; 107 | 108 | 109 | 110 | } 111 | -(void) initUI { 112 | _runningFlag = YES; 113 | self.btn = [UIButton buttonWithType:UIButtonTypeCustom]; 114 | self.btn.frame = CGRectMake(10, 510, 50, 50); 115 | [self.btn setTitle:@"暂停" forState:UIControlStateNormal]; 116 | [self.btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal]; 117 | [self.btn addTarget:self action:@selector(toggleRunning:) forControlEvents:UIControlEventTouchUpInside]; 118 | [self.view addSubview:self.btn]; 119 | } 120 | -(void) toggleRunning:(UIGestureRecognizer*)reg{ 121 | if (_runningFlag) { 122 | [self stopRunning]; 123 | [self.btn setTitle:@"开始" forState:UIControlStateNormal]; 124 | } else { 125 | [self startRunning]; 126 | [self.btn setTitle:@"暂停" forState:UIControlStateNormal]; 127 | } 128 | 129 | _runningFlag = !_runningFlag; 130 | } 131 | - (void)startRunning 132 | { 133 | NSLog(@"startRunning"); 134 | [self.session startRunning]; 135 | 136 | [[AudioManager getInstance] startRecording]; 137 | 138 | } 139 | 140 | - (void)stopRunning 141 | { 142 | NSLog(@"stopRunning"); 143 | [self.session stopRunning]; 144 | [[AudioManager getInstance] pauseRecording]; 145 | } 146 | 147 | // 关键方法,捕获摄像头每一帧的画面并编码 148 | -(void) captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)connection { 149 | 150 | 151 | if (connection == _videoConnection) { 152 | 153 | [[X264Manager getInstance] encoderToH264:sampleBuffer]; 154 | 155 | } 156 | 157 | if (connection == _audioConnection) { 158 | NSLog(@"yy"); 159 | } 160 | } 161 | 162 | // 选择是前摄像头还是后摄像头 163 | - (AVCaptureDevice *)cameraWithPosition:(AVCaptureDevicePosition) position { 164 | NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; 165 | for (AVCaptureDevice *device in devices) { 166 | if ([device position] == position) { 167 | return device; 168 | } 169 | } 170 | return nil; 171 | } 172 | 173 | 174 | - (AVCaptureDevice *)frontCamera { 175 | return [self cameraWithPosition:AVCaptureDevicePositionFront]; 176 | } 177 | 178 | - (AVCaptureDevice *)backCamera { 179 | return [self cameraWithPosition:AVCaptureDevicePositionBack]; 180 | } 181 | - (void)didReceiveMemoryWarning { 182 | [super didReceiveMemoryWarning]; 183 | // Dispose of any resources that can be recreated. 184 | } 185 | 186 | @end 187 | -------------------------------------------------------------------------------- /LMVideoTest/X264Manager.h: -------------------------------------------------------------------------------- 1 | // 2 | // X264Manager.h 3 | // LMVideoTest 4 | // 5 | // Created by lvming on 16/5/23. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | 10 | #import 11 | #include "x264.h" 12 | #import 13 | 14 | @interface X264Manager : NSObject { 15 | x264_param_t * p264Param; 16 | x264_picture_t * p264Pic; 17 | x264_t *p264Handle; 18 | x264_nal_t *p264Nal; 19 | FILE *fp; 20 | unsigned char sps[30]; 21 | unsigned char pps[10]; 22 | } 23 | 24 | - (void)initForX264WithWidth:(int)width height:(int)height; 25 | 26 | 27 | 28 | 29 | - (void)encoderToH264:(CMSampleBufferRef)sampleBuffer; 30 | 31 | +(X264Manager*)getInstance; 32 | 33 | - (void)stopEncoding; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /LMVideoTest/X264Manager.m: -------------------------------------------------------------------------------- 1 | // 2 | // X264Manager.m 3 | // LMVideoTest 4 | // 5 | // Created by lvming on 16/5/23. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | #import "x264Manager.h" 10 | #import "rtmpManager.h" 11 | 12 | 13 | @implementation X264Manager 14 | 15 | static X264Manager* _instance = nil; 16 | 17 | +(X264Manager*)getInstance 18 | { 19 | if(!_instance) { 20 | _instance = [[X264Manager alloc] init]; 21 | } 22 | return _instance; 23 | } 24 | // 重要参数: 25 | 26 | // i_keyint_max 设置gop长度 单位:间隔帧数 27 | // m_bitRate 设置码率 单位:bps 28 | // i_fps_num 设置帧率 单位:fps 29 | 30 | - (void)initForX264WithWidth:(int)width height:(int)height 31 | { 32 | /* 开辟内存空间*/ 33 | self->p264Param = malloc(sizeof(x264_param_t));//video params use for encoding 34 | self->p264Pic = malloc(sizeof(x264_picture_t));//raw image data for storing image data 35 | memset(self->p264Pic,0,sizeof(x264_picture_t));//clear memory 36 | 37 | x264_param_default_preset(self->p264Param, "fast", "zerolatency");//set encoder params 38 | 39 | 40 | self->p264Param->i_width = width; //set frame width 41 | self->p264Param->i_height = height; //set frame height 42 | 43 | /*video 设置*/ 44 | self->p264Param->i_threads = 1;/* encode multiple frames in parallel */ 45 | self->p264Param->b_sliced_threads = 1; 46 | self->p264Param->i_level_idc = 30;/*编码复杂度*/ /*未知*/ 47 | self->p264Param->analyse.intra = X264_ANALYSE_I4x4;/* 帧间分区*/ /*未知*/ 48 | self->p264Param->analyse.inter = X264_ANALYSE_I4x4; /* 帧内分区 */ /*未知*/ 49 | self->p264Param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_SPATIAL;/*时间空间队运动预测 */ 50 | self->p264Param->analyse.i_weighted_pred = X264_WEIGHTP_NONE; //p帧加权预测 /*未知*/ 51 | self->p264Param->analyse.i_subpel_refine = 4; /* 亚像素运动估计质量 */ 52 | self->p264Param->i_bframe_adaptive = X264_B_ADAPT_FAST; 53 | self->p264Param->i_bframe_pyramid = X264_B_PYRAMID_NONE; /*允许部分B为参考帧,可选值为0,1,2 */ 54 | self->p264Param->b_intra_refresh = 0; //用周期帧内刷新替代IDR 55 | self->p264Param->analyse.i_trellis = 1; /* Trellis量化,对每个8x8的块寻找合适的量化值,需要CABAC,默认0 0:关闭1:只在最后编码时使用2:一直使用*/ 56 | self->p264Param->analyse.b_chroma_me = 1;/* 亚像素色度运动估计和P帧的模式选择 */ 57 | self->p264Param->b_interlaced = 0;/* 隔行扫描 */ 58 | self->p264Param->analyse.b_transform_8x8 = 1;/* 帧间分区*/ 59 | self->p264Param->rc.f_qcompress = 0;/* 0.0 => cbr, 1.0 => constant qp */ 60 | self->p264Param->i_frame_reference = 4;/*参考帧的最大帧数。*/ 61 | self->p264Param->i_bframe = 0; /*两个参考帧之间的B帧数目*/ 62 | self->p264Param->analyse.i_me_range = 16;/* 整像素运动估计搜索范围 (from predicted mv) */ 63 | self->p264Param->analyse.i_me_method = X264_ME_DIA;/* 运动估计算法 (X264_ME_*)*/ 64 | self->p264Param->rc.i_lookahead = 0; 65 | self->p264Param->i_keyint_max = 30;/* GOP 在此间隔设置IDR关键帧(每过多少帧设置一个IDR帧) */ 66 | self->p264Param->b_repeat_headers = 1; //关键帧前面是否放sps跟pps帧 67 | self->p264Param->i_scenecut_threshold = 40;/*如何积极地插入额外的I帧 */ 68 | self->p264Param->rc.i_qp_min = 10;//关键帧最小间隔 69 | self->p264Param->rc.i_qp_max = 50; //关键帧最大间隔 70 | self->p264Param->rc.i_qp_constant = 20; 71 | 72 | // self->p264Param-> 73 | self->p264Param->i_fps_num = 15;/*帧率*/ 74 | self->p264Param->i_fps_den = 1;/*用两个整型的数的比值,来表示帧率*/ 75 | self->p264Param->b_annexb = 1;//如果设置了该项,则在每个NAL单元前加一个四字节的前缀符 76 | self->p264Param->b_cabac = 0; 77 | self->p264Param->rc.i_rc_method = X264_RC_ABR;//参数i_rc_method表示码率控制,CQP(恒定质量),CRF(恒定码率),ABR(平均码率) 78 | int m_bitRate = 96000; 79 | self->p264Param->rc.i_bitrate = m_bitRate / 1000; // 码率(比特率), x264使用的bitrate需要/1000。 80 | p264Param->rc.i_vbv_max_bitrate=(int)((m_bitRate * 1.2) / 1000) ; // 平均码率模式下,最大瞬时码率,默认0(与-B设置相同) 81 | 82 | x264_param_apply_profile(self->p264Param,"baseline"); 83 | if((self->p264Handle =x264_encoder_open(self->p264Param)) == NULL) 84 | { 85 | fprintf(stderr, "x264_encoder_open failed/n" ); 86 | return ; 87 | } 88 | x264_picture_alloc(self->p264Pic,X264_CSP_I420,self->p264Param->i_width,self->p264Param->i_height); 89 | self->p264Pic->i_type = X264_TYPE_AUTO; 90 | 91 | } 92 | 93 | 94 | 95 | 96 | 97 | - (void)encoderToH264:(CMSampleBufferRef)sampleBuffer 98 | { 99 | CVImageBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer); 100 | 101 | if(CVPixelBufferLockBaseAddress(pixelBuffer, 0) == kCVReturnSuccess) 102 | { 103 | int i264Nal = 0; 104 | //输出的图片 105 | x264_picture_t pic_out; 106 | uint32_t sps_len = 0; 107 | uint32_t pps_len = 0; 108 | 109 | 110 | UInt8 *bufferPtr = (UInt8 *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer,0); 111 | UInt8 *bufferPtr1 = (UInt8 *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer,1); 112 | 113 | size_t width = CVPixelBufferGetWidth(pixelBuffer); 114 | size_t height = CVPixelBufferGetHeight(pixelBuffer); 115 | 116 | size_t bytesrow0 = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer,0); 117 | size_t bytesrow1 = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer,1); 118 | 119 | UInt8 *yuv420_data = (UInt8 *)malloc(width * height *3/ 2);//buffer to store YUV with layout YYYYYYYYUUVV 120 | 121 | 122 | /* convert NV12 data to YUV420*/ 123 | UInt8 *pY = bufferPtr ; 124 | UInt8 *pUV = bufferPtr1; 125 | UInt8 *pU = yuv420_data + width * height; 126 | UInt8 *pV = pU + width * height / 4; 127 | for(int i = 0; i < height; i++) 128 | { 129 | memcpy(yuv420_data + i * width, pY + i * bytesrow0, width); 130 | } 131 | for(int j = 0;j < height/2; j++) 132 | { 133 | for(int i = 0; i < width/2; i++) 134 | { 135 | *(pU++) = pUV[i<<1]; 136 | *(pV++) = pUV[(i<<1) + 1]; 137 | } 138 | pUV += bytesrow1; 139 | } 140 | 141 | p264Pic->img.i_plane = 3; 142 | p264Pic->img.plane[0] = yuv420_data; // yuv420_data <==> pInFrame 143 | p264Pic->img.plane[1] = p264Pic->img.plane[0] + p264Param->i_width * p264Param->i_height; 144 | p264Pic->img.plane[2] = p264Pic->img.plane[1] + (p264Param->i_width * p264Param->i_height / 4); 145 | p264Pic->img.i_stride[0] = p264Param->i_width; 146 | p264Pic->img.i_stride[1] = p264Param->i_width / 2; 147 | p264Pic->img.i_stride[2] = p264Param->i_width / 2; 148 | 149 | int i_frame_size = x264_encoder_encode(p264Handle, &p264Nal, &i264Nal,p264Pic ,&pic_out); 150 | if(i_frame_size < 0)//帧总数 151 | { 152 | fprintf(stderr, "x264_encoder_encode failed/n" ); 153 | return; 154 | } 155 | free(yuv420_data); 156 | yuv420_data = NULL; 157 | 158 | if (i264Nal > 0)//解析出帧来了 159 | { 160 | for (int i = 0,last = 0; i < i264Nal; i++) 161 | { 162 | 163 | 164 | if (self->p264Nal[i].i_type == NAL_SPS) 165 | { 166 | sps_len = self->p264Nal[i].i_payload - 4; 167 | memcpy(sps,self->p264Nal[i].p_payload + 4,sps_len); 168 | } 169 | else if (self->p264Nal[i].i_type == NAL_PPS) 170 | { 171 | pps_len = self->p264Nal[i].i_payload - 4; 172 | memcpy(pps,self->p264Nal[i].p_payload + 4,pps_len); 173 | [[RtmpManager getInstance] send_video_sps_pps:sps andSpsLength:sps_len andPPs:pps andPPsLength:pps_len];/*发送sps pps*/ 174 | } 175 | else 176 | { 177 | [[RtmpManager getInstance] send_rtmp_video:self->p264Nal[i].p_payload andLength:i_frame_size - last];/*发送普通帧*/ 178 | break; 179 | } 180 | last += self->p264Nal[i].i_payload; 181 | } 182 | 183 | } 184 | } 185 | CVPixelBufferUnlockBaseAddress(pixelBuffer, 0); 186 | } 187 | 188 | - (void)stopEncoding 189 | { 190 | fclose(self->fp); 191 | } 192 | @end 193 | -------------------------------------------------------------------------------- /LMVideoTest/aac/include/faac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FAAC - Freeware Advanced Audio Coder 3 | * Copyright (C) 2001 Menno Bakker 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: faac.h,v 1.36 2009/01/25 18:50:32 menno Exp $ 20 | */ 21 | 22 | #ifndef _FAAC_H_ 23 | #define _FAAC_H_ 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif /* __cplusplus */ 28 | 29 | #if defined(_WIN32) && !defined(__MINGW32__) 30 | # ifndef FAACAPI 31 | # define FAACAPI __stdcall 32 | # endif 33 | #else 34 | # ifndef FAACAPI 35 | # define FAACAPI 36 | # endif 37 | #endif 38 | 39 | #pragma pack(push, 1) 40 | 41 | typedef struct { 42 | void *ptr; 43 | char *name; 44 | } 45 | psymodellist_t; 46 | 47 | #include "faaccfg.h" 48 | 49 | 50 | typedef void *faacEncHandle; 51 | 52 | #ifndef HAVE_INT32_T 53 | typedef signed int int32_t; 54 | #endif 55 | 56 | /* 57 | Allows an application to get FAAC version info. This is intended 58 | purely for informative purposes. 59 | 60 | Returns FAAC_CFG_VERSION. 61 | */ 62 | int FAACAPI faacEncGetVersion(char **faac_id_string, 63 | char **faac_copyright_string); 64 | 65 | 66 | faacEncConfigurationPtr FAACAPI 67 | faacEncGetCurrentConfiguration(faacEncHandle hEncoder); 68 | 69 | 70 | int FAACAPI faacEncSetConfiguration(faacEncHandle hEncoder, 71 | faacEncConfigurationPtr config); 72 | 73 | 74 | faacEncHandle FAACAPI faacEncOpen(unsigned long sampleRate, 75 | unsigned int numChannels, 76 | unsigned long *inputSamples, 77 | unsigned long *maxOutputBytes); 78 | 79 | 80 | int FAACAPI faacEncGetDecoderSpecificInfo(faacEncHandle hEncoder, unsigned char **ppBuffer, 81 | unsigned long *pSizeOfDecoderSpecificInfo); 82 | 83 | 84 | int FAACAPI faacEncEncode(faacEncHandle hEncoder, int32_t * inputBuffer, unsigned int samplesInput, 85 | unsigned char *outputBuffer, 86 | unsigned int bufferSize); 87 | 88 | 89 | int FAACAPI faacEncClose(faacEncHandle hEncoder); 90 | 91 | 92 | 93 | #pragma pack(pop) 94 | 95 | #ifdef __cplusplus 96 | } 97 | #endif /* __cplusplus */ 98 | 99 | #endif /* _FAAC_H_ */ 100 | -------------------------------------------------------------------------------- /LMVideoTest/aac/include/faaccfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FAAC - Freeware Advanced Audio Coder 3 | * Copyright (C) 2001 Menno Bakker 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 | * 19 | * $Id: faaccfg.h,v 1.3 2004/07/04 12:12:05 corrados Exp $ 20 | */ 21 | 22 | #ifndef _FAACCFG_H_ 23 | #define _FAACCFG_H_ 24 | 25 | #define FAAC_CFG_VERSION 104 26 | 27 | /* MPEG ID's */ 28 | #define MPEG2 1 29 | #define MPEG4 0 30 | 31 | /* AAC object types */ 32 | #define MAIN 1 33 | #define LOW 2 34 | #define SSR 3 35 | #define LTP 4 36 | 37 | /* Input Formats */ 38 | #define FAAC_INPUT_NULL 0 39 | #define FAAC_INPUT_16BIT 1 40 | #define FAAC_INPUT_24BIT 2 41 | #define FAAC_INPUT_32BIT 3 42 | #define FAAC_INPUT_FLOAT 4 43 | 44 | #define SHORTCTL_NORMAL 0 45 | #define SHORTCTL_NOSHORT 1 46 | #define SHORTCTL_NOLONG 2 47 | 48 | #pragma pack(push, 1) 49 | typedef struct faacEncConfiguration 50 | { 51 | /* config version */ 52 | int version; 53 | 54 | /* library version */ 55 | char *name; 56 | 57 | /* copyright string */ 58 | char *copyright; 59 | 60 | /* MPEG version, 2 or 4 */ 61 | unsigned int mpegVersion; 62 | 63 | /* AAC object type */ 64 | unsigned int aacObjectType; 65 | 66 | /* Allow mid/side coding */ 67 | unsigned int allowMidside; 68 | 69 | /* Use one of the channels as LFE channel */ 70 | unsigned int useLfe; 71 | 72 | /* Use Temporal Noise Shaping */ 73 | unsigned int useTns; 74 | 75 | /* bitrate / channel of AAC file */ 76 | unsigned long bitRate; 77 | 78 | /* AAC file frequency bandwidth */ 79 | unsigned int bandWidth; 80 | 81 | /* Quantizer quality */ 82 | unsigned long quantqual; 83 | 84 | /* Bitstream output format (0 = Raw; 1 = ADTS) */ 85 | unsigned int outputFormat; 86 | 87 | /* psychoacoustic model list */ 88 | psymodellist_t *psymodellist; 89 | 90 | /* selected index in psymodellist */ 91 | unsigned int psymodelidx; 92 | 93 | /* 94 | PCM Sample Input Format 95 | 0 FAAC_INPUT_NULL invalid, signifies a misconfigured config 96 | 1 FAAC_INPUT_16BIT native endian 16bit 97 | 2 FAAC_INPUT_24BIT native endian 24bit in 24 bits (not implemented) 98 | 3 FAAC_INPUT_32BIT native endian 24bit in 32 bits (DEFAULT) 99 | 4 FAAC_INPUT_FLOAT 32bit floating point 100 | */ 101 | unsigned int inputFormat; 102 | 103 | /* block type enforcing (SHORTCTL_NORMAL/SHORTCTL_NOSHORT/SHORTCTL_NOLONG) */ 104 | int shortctl; 105 | 106 | /* 107 | Channel Remapping 108 | 109 | Default 0, 1, 2, 3 ... 63 (64 is MAX_CHANNELS in coder.h) 110 | 111 | WAVE 4.0 2, 0, 1, 3 112 | WAVE 5.0 2, 0, 1, 3, 4 113 | WAVE 5.1 2, 0, 1, 4, 5, 3 114 | AIFF 5.1 2, 0, 3, 1, 4, 5 115 | */ 116 | int channel_map[64]; 117 | 118 | } faacEncConfiguration, *faacEncConfigurationPtr; 119 | 120 | #pragma pack(pop) 121 | 122 | #endif /* _FAACCFG_H_ */ 123 | -------------------------------------------------------------------------------- /LMVideoTest/aac/libfaac.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvming6816077/LMVideoTest/a2d26791fb1fa1375f8645d4403ba2549115ca77/LMVideoTest/aac/libfaac.a -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/librtmp/amf.h: -------------------------------------------------------------------------------- 1 | #ifndef __AMF_H__ 2 | #define __AMF_H__ 3 | /* 4 | * Copyright (C) 2005-2008 Team XBMC 5 | * http://www.xbmc.org 6 | * Copyright (C) 2008-2009 Andrej Stepanchuk 7 | * Copyright (C) 2009-2010 Howard Chu 8 | * 9 | * This file is part of librtmp. 10 | * 11 | * librtmp is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU Lesser General Public License as 13 | * published by the Free Software Foundation; either version 2.1, 14 | * or (at your option) any later version. 15 | * 16 | * librtmp is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU Lesser General Public License 22 | * along with librtmp see the file COPYING. If not, write to 23 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 24 | * Boston, MA 02110-1301, USA. 25 | * http://www.gnu.org/copyleft/lgpl.html 26 | */ 27 | 28 | #include 29 | 30 | #ifndef TRUE 31 | #define TRUE 1 32 | #define FALSE 0 33 | #endif 34 | 35 | #ifdef __cplusplus 36 | extern "C" 37 | { 38 | #endif 39 | 40 | typedef enum 41 | { AMF_NUMBER = 0, AMF_BOOLEAN, AMF_STRING, AMF_OBJECT, 42 | AMF_MOVIECLIP, /* reserved, not used */ 43 | AMF_NULL, AMF_UNDEFINED, AMF_REFERENCE, AMF_ECMA_ARRAY, AMF_OBJECT_END, 44 | AMF_STRICT_ARRAY, AMF_DATE, AMF_LONG_STRING, AMF_UNSUPPORTED, 45 | AMF_RECORDSET, /* reserved, not used */ 46 | AMF_XML_DOC, AMF_TYPED_OBJECT, 47 | AMF_AVMPLUS, /* switch to AMF3 */ 48 | AMF_INVALID = 0xff 49 | } AMFDataType; 50 | 51 | typedef enum 52 | { AMF3_UNDEFINED = 0, AMF3_NULL, AMF3_FALSE, AMF3_TRUE, 53 | AMF3_INTEGER, AMF3_DOUBLE, AMF3_STRING, AMF3_XML_DOC, AMF3_DATE, 54 | AMF3_ARRAY, AMF3_OBJECT, AMF3_XML, AMF3_BYTE_ARRAY 55 | } AMF3DataType; 56 | 57 | typedef struct AVal 58 | { 59 | char *av_val; 60 | int av_len; 61 | } AVal; 62 | #define AVC(str) {str,sizeof(str)-1} 63 | #define AVMATCH(a1,a2) ((a1)->av_len == (a2)->av_len && !memcmp((a1)->av_val,(a2)->av_val,(a1)->av_len)) 64 | 65 | struct AMFObjectProperty; 66 | 67 | typedef struct AMFObject 68 | { 69 | int o_num; 70 | struct AMFObjectProperty *o_props; 71 | } AMFObject; 72 | 73 | typedef struct AMFObjectProperty 74 | { 75 | AVal p_name; 76 | AMFDataType p_type; 77 | union 78 | { 79 | double p_number; 80 | AVal p_aval; 81 | AMFObject p_object; 82 | } p_vu; 83 | int16_t p_UTCoffset; 84 | } AMFObjectProperty; 85 | 86 | char *AMF_EncodeString(char *output, char *outend, const AVal * str); 87 | char *AMF_EncodeNumber(char *output, char *outend, double dVal); 88 | char *AMF_EncodeInt16(char *output, char *outend, short nVal); 89 | char *AMF_EncodeInt24(char *output, char *outend, int nVal); 90 | char *AMF_EncodeInt32(char *output, char *outend, int nVal); 91 | char *AMF_EncodeBoolean(char *output, char *outend, int bVal); 92 | 93 | /* Shortcuts for AMFProp_Encode */ 94 | char *AMF_EncodeNamedString(char *output, char *outend, const AVal * name, const AVal * value); 95 | char *AMF_EncodeNamedNumber(char *output, char *outend, const AVal * name, double dVal); 96 | char *AMF_EncodeNamedBoolean(char *output, char *outend, const AVal * name, int bVal); 97 | 98 | unsigned short AMF_DecodeInt16(const char *data); 99 | unsigned int AMF_DecodeInt24(const char *data); 100 | unsigned int AMF_DecodeInt32(const char *data); 101 | void AMF_DecodeString(const char *data, AVal * str); 102 | void AMF_DecodeLongString(const char *data, AVal * str); 103 | int AMF_DecodeBoolean(const char *data); 104 | double AMF_DecodeNumber(const char *data); 105 | 106 | char *AMF_Encode(AMFObject * obj, char *pBuffer, char *pBufEnd); 107 | char *AMF_EncodeEcmaArray(AMFObject *obj, char *pBuffer, char *pBufEnd); 108 | char *AMF_EncodeArray(AMFObject *obj, char *pBuffer, char *pBufEnd); 109 | 110 | int AMF_Decode(AMFObject * obj, const char *pBuffer, int nSize, 111 | int bDecodeName); 112 | int AMF_DecodeArray(AMFObject * obj, const char *pBuffer, int nSize, 113 | int nArrayLen, int bDecodeName); 114 | int AMF3_Decode(AMFObject * obj, const char *pBuffer, int nSize, 115 | int bDecodeName); 116 | void AMF_Dump(AMFObject * obj); 117 | void AMF_Reset(AMFObject * obj); 118 | 119 | void AMF_AddProp(AMFObject * obj, const AMFObjectProperty * prop); 120 | int AMF_CountProp(AMFObject * obj); 121 | AMFObjectProperty *AMF_GetProp(AMFObject * obj, const AVal * name, 122 | int nIndex); 123 | 124 | AMFDataType AMFProp_GetType(AMFObjectProperty * prop); 125 | void AMFProp_SetNumber(AMFObjectProperty * prop, double dval); 126 | void AMFProp_SetBoolean(AMFObjectProperty * prop, int bflag); 127 | void AMFProp_SetString(AMFObjectProperty * prop, AVal * str); 128 | void AMFProp_SetObject(AMFObjectProperty * prop, AMFObject * obj); 129 | 130 | void AMFProp_GetName(AMFObjectProperty * prop, AVal * name); 131 | void AMFProp_SetName(AMFObjectProperty * prop, AVal * name); 132 | double AMFProp_GetNumber(AMFObjectProperty * prop); 133 | int AMFProp_GetBoolean(AMFObjectProperty * prop); 134 | void AMFProp_GetString(AMFObjectProperty * prop, AVal * str); 135 | void AMFProp_GetObject(AMFObjectProperty * prop, AMFObject * obj); 136 | 137 | int AMFProp_IsValid(AMFObjectProperty * prop); 138 | 139 | char *AMFProp_Encode(AMFObjectProperty * prop, char *pBuffer, char *pBufEnd); 140 | int AMF3Prop_Decode(AMFObjectProperty * prop, const char *pBuffer, 141 | int nSize, int bDecodeName); 142 | int AMFProp_Decode(AMFObjectProperty * prop, const char *pBuffer, 143 | int nSize, int bDecodeName); 144 | 145 | void AMFProp_Dump(AMFObjectProperty * prop); 146 | void AMFProp_Reset(AMFObjectProperty * prop); 147 | 148 | typedef struct AMF3ClassDef 149 | { 150 | AVal cd_name; 151 | char cd_externalizable; 152 | char cd_dynamic; 153 | int cd_num; 154 | AVal *cd_props; 155 | } AMF3ClassDef; 156 | 157 | void AMF3CD_AddProp(AMF3ClassDef * cd, AVal * prop); 158 | AVal *AMF3CD_GetProp(AMF3ClassDef * cd, int idx); 159 | 160 | #ifdef __cplusplus 161 | } 162 | #endif 163 | 164 | #endif /* __AMF_H__ */ 165 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/librtmp/http.h: -------------------------------------------------------------------------------- 1 | #ifndef __RTMP_HTTP_H__ 2 | #define __RTMP_HTTP_H__ 3 | /* 4 | * Copyright (C) 2010 Howard Chu 5 | * Copyright (C) 2010 Antti Ajanki 6 | * 7 | * This file is part of librtmp. 8 | * 9 | * librtmp is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU Lesser General Public License as 11 | * published by the Free Software Foundation; either version 2.1, 12 | * or (at your option) any later version. 13 | * 14 | * librtmp is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Lesser General Public License 20 | * along with librtmp see the file COPYING. If not, write to 21 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 22 | * Boston, MA 02110-1301, USA. 23 | * http://www.gnu.org/copyleft/lgpl.html 24 | */ 25 | 26 | typedef enum { 27 | HTTPRES_OK, /* result OK */ 28 | HTTPRES_OK_NOT_MODIFIED, /* not modified since last request */ 29 | HTTPRES_NOT_FOUND, /* not found */ 30 | HTTPRES_BAD_REQUEST, /* client error */ 31 | HTTPRES_SERVER_ERROR, /* server reported an error */ 32 | HTTPRES_REDIRECTED, /* resource has been moved */ 33 | HTTPRES_LOST_CONNECTION /* connection lost while waiting for data */ 34 | } HTTPResult; 35 | 36 | struct HTTP_ctx { 37 | char *date; 38 | int size; 39 | int status; 40 | void *data; 41 | }; 42 | 43 | typedef size_t (HTTP_read_callback)(void *ptr, size_t size, size_t nmemb, void *stream); 44 | 45 | HTTPResult HTTP_get(struct HTTP_ctx *http, const char *url, HTTP_read_callback *cb); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/librtmp/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008-2009 Andrej Stepanchuk 3 | * Copyright (C) 2009-2010 Howard Chu 4 | * 5 | * This file is part of librtmp. 6 | * 7 | * librtmp is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU Lesser General Public License as 9 | * published by the Free Software Foundation; either version 2.1, 10 | * or (at your option) any later version. 11 | * 12 | * librtmp is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Lesser General Public License 18 | * along with librtmp see the file COPYING. If not, write to 19 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 | * Boston, MA 02110-1301, USA. 21 | * http://www.gnu.org/copyleft/lgpl.html 22 | */ 23 | 24 | #ifndef __RTMP_LOG_H__ 25 | #define __RTMP_LOG_H__ 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | /* Enable this to get full debugging output */ 35 | /* #define _DEBUG */ 36 | 37 | #ifdef _DEBUG 38 | #undef NODEBUG 39 | #endif 40 | 41 | typedef enum 42 | { RTMP_LOGCRIT=0, RTMP_LOGERROR, RTMP_LOGWARNING, RTMP_LOGINFO, 43 | RTMP_LOGDEBUG, RTMP_LOGDEBUG2, RTMP_LOGALL 44 | } RTMP_LogLevel; 45 | 46 | extern RTMP_LogLevel RTMP_debuglevel; 47 | 48 | typedef void (RTMP_LogCallback)(int level, const char *fmt, va_list); 49 | void RTMP_LogSetCallback(RTMP_LogCallback *cb); 50 | void RTMP_LogSetOutput(FILE *file); 51 | #ifdef __GNUC__ 52 | void RTMP_LogPrintf(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); 53 | void RTMP_LogStatus(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); 54 | void RTMP_Log(int level, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); 55 | #else 56 | void RTMP_LogPrintf(const char *format, ...); 57 | void RTMP_LogStatus(const char *format, ...); 58 | void RTMP_Log(int level, const char *format, ...); 59 | #endif 60 | void RTMP_LogHex(int level, const uint8_t *data, unsigned long len); 61 | void RTMP_LogHexString(int level, const uint8_t *data, unsigned long len); 62 | void RTMP_LogSetLevel(RTMP_LogLevel lvl); 63 | RTMP_LogLevel RTMP_LogGetLevel(void); 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/aes.h: -------------------------------------------------------------------------------- 1 | /* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */ 2 | /* ==================================================================== 3 | * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * 3. All advertising materials mentioning features or use of this 18 | * software must display the following acknowledgment: 19 | * "This product includes software developed by the OpenSSL Project 20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 21 | * 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23 | * endorse or promote products derived from this software without 24 | * prior written permission. For written permission, please contact 25 | * openssl-core@openssl.org. 26 | * 27 | * 5. Products derived from this software may not be called "OpenSSL" 28 | * nor may "OpenSSL" appear in their names without prior written 29 | * permission of the OpenSSL Project. 30 | * 31 | * 6. Redistributions of any form whatsoever must retain the following 32 | * acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 35 | * 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. 48 | * ==================================================================== 49 | * 50 | */ 51 | 52 | #ifndef HEADER_AES_H 53 | #define HEADER_AES_H 54 | 55 | #include 56 | 57 | #ifdef OPENSSL_NO_AES 58 | #error AES is disabled. 59 | #endif 60 | 61 | #include 62 | 63 | #define AES_ENCRYPT 1 64 | #define AES_DECRYPT 0 65 | 66 | /* Because array size can't be a const in C, the following two are macros. 67 | Both sizes are in bytes. */ 68 | #define AES_MAXNR 14 69 | #define AES_BLOCK_SIZE 16 70 | 71 | #ifdef __cplusplus 72 | extern "C" { 73 | #endif 74 | 75 | /* This should be a hidden type, but EVP requires that the size be known */ 76 | struct aes_key_st { 77 | #ifdef AES_LONG 78 | unsigned long rd_key[4 *(AES_MAXNR + 1)]; 79 | #else 80 | unsigned int rd_key[4 *(AES_MAXNR + 1)]; 81 | #endif 82 | int rounds; 83 | }; 84 | typedef struct aes_key_st AES_KEY; 85 | 86 | const char *AES_options(void); 87 | 88 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits, 89 | AES_KEY *key); 90 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits, 91 | AES_KEY *key); 92 | 93 | int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits, 94 | AES_KEY *key); 95 | int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits, 96 | AES_KEY *key); 97 | 98 | void AES_encrypt(const unsigned char *in, unsigned char *out, 99 | const AES_KEY *key); 100 | void AES_decrypt(const unsigned char *in, unsigned char *out, 101 | const AES_KEY *key); 102 | 103 | void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, 104 | const AES_KEY *key, const int enc); 105 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, 106 | size_t length, const AES_KEY *key, 107 | unsigned char *ivec, const int enc); 108 | void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, 109 | size_t length, const AES_KEY *key, 110 | unsigned char *ivec, int *num, const int enc); 111 | void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, 112 | size_t length, const AES_KEY *key, 113 | unsigned char *ivec, int *num, const int enc); 114 | void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, 115 | size_t length, const AES_KEY *key, 116 | unsigned char *ivec, int *num, const int enc); 117 | void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, 118 | size_t length, const AES_KEY *key, 119 | unsigned char *ivec, int *num); 120 | void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out, 121 | size_t length, const AES_KEY *key, 122 | unsigned char ivec[AES_BLOCK_SIZE], 123 | unsigned char ecount_buf[AES_BLOCK_SIZE], 124 | unsigned int *num); 125 | /* NB: the IV is _two_ blocks long */ 126 | void AES_ige_encrypt(const unsigned char *in, unsigned char *out, 127 | size_t length, const AES_KEY *key, 128 | unsigned char *ivec, const int enc); 129 | /* NB: the IV is _four_ blocks long */ 130 | void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out, 131 | size_t length, const AES_KEY *key, 132 | const AES_KEY *key2, const unsigned char *ivec, 133 | const int enc); 134 | 135 | int AES_wrap_key(AES_KEY *key, const unsigned char *iv, 136 | unsigned char *out, 137 | const unsigned char *in, unsigned int inlen); 138 | int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, 139 | unsigned char *out, 140 | const unsigned char *in, unsigned int inlen); 141 | 142 | 143 | #ifdef __cplusplus 144 | } 145 | #endif 146 | 147 | #endif /* !HEADER_AES_H */ 148 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/blowfish.h: -------------------------------------------------------------------------------- 1 | /* crypto/bf/blowfish.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_BLOWFISH_H 60 | #define HEADER_BLOWFISH_H 61 | 62 | #include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | #ifdef OPENSSL_NO_BF 69 | #error BF is disabled. 70 | #endif 71 | 72 | #define BF_ENCRYPT 1 73 | #define BF_DECRYPT 0 74 | 75 | /* 76 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 77 | * ! BF_LONG has to be at least 32 bits wide. If it's wider, then ! 78 | * ! BF_LONG_LOG2 has to be defined along. ! 79 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 80 | */ 81 | 82 | #if defined(__LP32__) 83 | #define BF_LONG unsigned long 84 | #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 85 | #define BF_LONG unsigned long 86 | #define BF_LONG_LOG2 3 87 | /* 88 | * _CRAY note. I could declare short, but I have no idea what impact 89 | * does it have on performance on none-T3E machines. I could declare 90 | * int, but at least on C90 sizeof(int) can be chosen at compile time. 91 | * So I've chosen long... 92 | * 93 | */ 94 | #else 95 | #define BF_LONG unsigned int 96 | #endif 97 | 98 | #define BF_ROUNDS 16 99 | #define BF_BLOCK 8 100 | 101 | typedef struct bf_key_st 102 | { 103 | BF_LONG P[BF_ROUNDS+2]; 104 | BF_LONG S[4*256]; 105 | } BF_KEY; 106 | 107 | #ifdef OPENSSL_FIPS 108 | void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data); 109 | #endif 110 | void BF_set_key(BF_KEY *key, int len, const unsigned char *data); 111 | 112 | void BF_encrypt(BF_LONG *data,const BF_KEY *key); 113 | void BF_decrypt(BF_LONG *data,const BF_KEY *key); 114 | 115 | void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, 116 | const BF_KEY *key, int enc); 117 | void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 118 | const BF_KEY *schedule, unsigned char *ivec, int enc); 119 | void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, long length, 120 | const BF_KEY *schedule, unsigned char *ivec, int *num, int enc); 121 | void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, long length, 122 | const BF_KEY *schedule, unsigned char *ivec, int *num); 123 | const char *BF_options(void); 124 | 125 | #ifdef __cplusplus 126 | } 127 | #endif 128 | 129 | #endif 130 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/buffer.h: -------------------------------------------------------------------------------- 1 | /* crypto/buffer/buffer.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_BUFFER_H 60 | #define HEADER_BUFFER_H 61 | 62 | #include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | #include 69 | 70 | #if !defined(NO_SYS_TYPES_H) 71 | #include 72 | #endif 73 | 74 | /* Already declared in ossl_typ.h */ 75 | /* typedef struct buf_mem_st BUF_MEM; */ 76 | 77 | struct buf_mem_st 78 | { 79 | size_t length; /* current number of bytes */ 80 | char *data; 81 | size_t max; /* size of buffer */ 82 | }; 83 | 84 | BUF_MEM *BUF_MEM_new(void); 85 | void BUF_MEM_free(BUF_MEM *a); 86 | int BUF_MEM_grow(BUF_MEM *str, size_t len); 87 | int BUF_MEM_grow_clean(BUF_MEM *str, size_t len); 88 | char * BUF_strdup(const char *str); 89 | char * BUF_strndup(const char *str, size_t siz); 90 | void * BUF_memdup(const void *data, size_t siz); 91 | void BUF_reverse(unsigned char *out, unsigned char *in, size_t siz); 92 | 93 | /* safe string functions */ 94 | size_t BUF_strlcpy(char *dst,const char *src,size_t siz); 95 | size_t BUF_strlcat(char *dst,const char *src,size_t siz); 96 | 97 | 98 | /* BEGIN ERROR CODES */ 99 | /* The following lines are auto generated by the script mkerr.pl. Any changes 100 | * made after this point may be overwritten when the script is next run. 101 | */ 102 | void ERR_load_BUF_strings(void); 103 | 104 | /* Error codes for the BUF functions. */ 105 | 106 | /* Function codes. */ 107 | #define BUF_F_BUF_MEMDUP 103 108 | #define BUF_F_BUF_MEM_GROW 100 109 | #define BUF_F_BUF_MEM_GROW_CLEAN 105 110 | #define BUF_F_BUF_MEM_NEW 101 111 | #define BUF_F_BUF_STRDUP 102 112 | #define BUF_F_BUF_STRNDUP 104 113 | 114 | /* Reason codes. */ 115 | 116 | #ifdef __cplusplus 117 | } 118 | #endif 119 | #endif 120 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/camellia.h: -------------------------------------------------------------------------------- 1 | /* crypto/camellia/camellia.h -*- mode:C; c-file-style: "eay" -*- */ 2 | /* ==================================================================== 3 | * Copyright (c) 2006 The OpenSSL Project. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in 14 | * the documentation and/or other materials provided with the 15 | * distribution. 16 | * 17 | * 3. All advertising materials mentioning features or use of this 18 | * software must display the following acknowledgment: 19 | * "This product includes software developed by the OpenSSL Project 20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 21 | * 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23 | * endorse or promote products derived from this software without 24 | * prior written permission. For written permission, please contact 25 | * openssl-core@openssl.org. 26 | * 27 | * 5. Products derived from this software may not be called "OpenSSL" 28 | * nor may "OpenSSL" appear in their names without prior written 29 | * permission of the OpenSSL Project. 30 | * 31 | * 6. Redistributions of any form whatsoever must retain the following 32 | * acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 35 | * 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. 48 | * ==================================================================== 49 | * 50 | */ 51 | 52 | #ifndef HEADER_CAMELLIA_H 53 | #define HEADER_CAMELLIA_H 54 | 55 | #include 56 | 57 | #ifdef OPENSSL_NO_CAMELLIA 58 | #error CAMELLIA is disabled. 59 | #endif 60 | 61 | #include 62 | 63 | #define CAMELLIA_ENCRYPT 1 64 | #define CAMELLIA_DECRYPT 0 65 | 66 | /* Because array size can't be a const in C, the following two are macros. 67 | Both sizes are in bytes. */ 68 | 69 | #ifdef __cplusplus 70 | extern "C" { 71 | #endif 72 | 73 | /* This should be a hidden type, but EVP requires that the size be known */ 74 | 75 | #define CAMELLIA_BLOCK_SIZE 16 76 | #define CAMELLIA_TABLE_BYTE_LEN 272 77 | #define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) 78 | 79 | typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match with WORD */ 80 | 81 | struct camellia_key_st 82 | { 83 | union { 84 | double d; /* ensures 64-bit align */ 85 | KEY_TABLE_TYPE rd_key; 86 | } u; 87 | int grand_rounds; 88 | }; 89 | typedef struct camellia_key_st CAMELLIA_KEY; 90 | 91 | #ifdef OPENSSL_FIPS 92 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, 93 | CAMELLIA_KEY *key); 94 | #endif 95 | int Camellia_set_key(const unsigned char *userKey, const int bits, 96 | CAMELLIA_KEY *key); 97 | 98 | void Camellia_encrypt(const unsigned char *in, unsigned char *out, 99 | const CAMELLIA_KEY *key); 100 | void Camellia_decrypt(const unsigned char *in, unsigned char *out, 101 | const CAMELLIA_KEY *key); 102 | 103 | void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, 104 | const CAMELLIA_KEY *key, const int enc); 105 | void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, 106 | size_t length, const CAMELLIA_KEY *key, 107 | unsigned char *ivec, const int enc); 108 | void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, 109 | size_t length, const CAMELLIA_KEY *key, 110 | unsigned char *ivec, int *num, const int enc); 111 | void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, 112 | size_t length, const CAMELLIA_KEY *key, 113 | unsigned char *ivec, int *num, const int enc); 114 | void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, 115 | size_t length, const CAMELLIA_KEY *key, 116 | unsigned char *ivec, int *num, const int enc); 117 | void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, 118 | size_t length, const CAMELLIA_KEY *key, 119 | unsigned char *ivec, int *num); 120 | void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, 121 | size_t length, const CAMELLIA_KEY *key, 122 | unsigned char ivec[CAMELLIA_BLOCK_SIZE], 123 | unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], 124 | unsigned int *num); 125 | 126 | #ifdef __cplusplus 127 | } 128 | #endif 129 | 130 | #endif /* !HEADER_Camellia_H */ 131 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/cast.h: -------------------------------------------------------------------------------- 1 | /* crypto/cast/cast.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CAST_H 60 | #define HEADER_CAST_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | #include 67 | 68 | #ifdef OPENSSL_NO_CAST 69 | #error CAST is disabled. 70 | #endif 71 | 72 | #define CAST_ENCRYPT 1 73 | #define CAST_DECRYPT 0 74 | 75 | #define CAST_LONG unsigned int 76 | 77 | #define CAST_BLOCK 8 78 | #define CAST_KEY_LENGTH 16 79 | 80 | typedef struct cast_key_st 81 | { 82 | CAST_LONG data[32]; 83 | int short_key; /* Use reduced rounds for short key */ 84 | } CAST_KEY; 85 | 86 | #ifdef OPENSSL_FIPS 87 | void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 88 | #endif 89 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 90 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, const CAST_KEY *key, 91 | int enc); 92 | void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); 93 | void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); 94 | void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 95 | const CAST_KEY *ks, unsigned char *iv, int enc); 96 | void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 97 | long length, const CAST_KEY *schedule, unsigned char *ivec, 98 | int *num, int enc); 99 | void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 100 | long length, const CAST_KEY *schedule, unsigned char *ivec, 101 | int *num); 102 | 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif 108 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/cmac.h: -------------------------------------------------------------------------------- 1 | /* crypto/cmac/cmac.h */ 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 | * project. 4 | */ 5 | /* ==================================================================== 6 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in 17 | * the documentation and/or other materials provided with the 18 | * distribution. 19 | * 20 | * 3. All advertising materials mentioning features or use of this 21 | * software must display the following acknowledgment: 22 | * "This product includes software developed by the OpenSSL Project 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 24 | * 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 26 | * endorse or promote products derived from this software without 27 | * prior written permission. For written permission, please contact 28 | * licensing@OpenSSL.org. 29 | * 30 | * 5. Products derived from this software may not be called "OpenSSL" 31 | * nor may "OpenSSL" appear in their names without prior written 32 | * permission of the OpenSSL Project. 33 | * 34 | * 6. Redistributions of any form whatsoever must retain the following 35 | * acknowledgment: 36 | * "This product includes software developed by the OpenSSL Project 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 38 | * 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. 51 | * ==================================================================== 52 | */ 53 | 54 | 55 | #ifndef HEADER_CMAC_H 56 | #define HEADER_CMAC_H 57 | 58 | #ifdef __cplusplus 59 | extern "C" { 60 | #endif 61 | 62 | #include 63 | 64 | /* Opaque */ 65 | typedef struct CMAC_CTX_st CMAC_CTX; 66 | 67 | CMAC_CTX *CMAC_CTX_new(void); 68 | void CMAC_CTX_cleanup(CMAC_CTX *ctx); 69 | void CMAC_CTX_free(CMAC_CTX *ctx); 70 | EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); 71 | int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); 72 | 73 | int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, 74 | const EVP_CIPHER *cipher, ENGINE *impl); 75 | int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); 76 | int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); 77 | int CMAC_resume(CMAC_CTX *ctx); 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/comp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef HEADER_COMP_H 3 | #define HEADER_COMP_H 4 | 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | typedef struct comp_ctx_st COMP_CTX; 12 | 13 | typedef struct comp_method_st 14 | { 15 | int type; /* NID for compression library */ 16 | const char *name; /* A text string to identify the library */ 17 | int (*init)(COMP_CTX *ctx); 18 | void (*finish)(COMP_CTX *ctx); 19 | int (*compress)(COMP_CTX *ctx, 20 | unsigned char *out, unsigned int olen, 21 | unsigned char *in, unsigned int ilen); 22 | int (*expand)(COMP_CTX *ctx, 23 | unsigned char *out, unsigned int olen, 24 | unsigned char *in, unsigned int ilen); 25 | /* The following two do NOTHING, but are kept for backward compatibility */ 26 | long (*ctrl)(void); 27 | long (*callback_ctrl)(void); 28 | } COMP_METHOD; 29 | 30 | struct comp_ctx_st 31 | { 32 | COMP_METHOD *meth; 33 | unsigned long compress_in; 34 | unsigned long compress_out; 35 | unsigned long expand_in; 36 | unsigned long expand_out; 37 | 38 | CRYPTO_EX_DATA ex_data; 39 | }; 40 | 41 | 42 | COMP_CTX *COMP_CTX_new(COMP_METHOD *meth); 43 | void COMP_CTX_free(COMP_CTX *ctx); 44 | int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen, 45 | unsigned char *in, int ilen); 46 | int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen, 47 | unsigned char *in, int ilen); 48 | COMP_METHOD *COMP_rle(void ); 49 | COMP_METHOD *COMP_zlib(void ); 50 | void COMP_zlib_cleanup(void); 51 | 52 | #ifdef HEADER_BIO_H 53 | #ifdef ZLIB 54 | BIO_METHOD *BIO_f_zlib(void); 55 | #endif 56 | #endif 57 | 58 | /* BEGIN ERROR CODES */ 59 | /* The following lines are auto generated by the script mkerr.pl. Any changes 60 | * made after this point may be overwritten when the script is next run. 61 | */ 62 | void ERR_load_COMP_strings(void); 63 | 64 | /* Error codes for the COMP functions. */ 65 | 66 | /* Function codes. */ 67 | #define COMP_F_BIO_ZLIB_FLUSH 99 68 | #define COMP_F_BIO_ZLIB_NEW 100 69 | #define COMP_F_BIO_ZLIB_READ 101 70 | #define COMP_F_BIO_ZLIB_WRITE 102 71 | 72 | /* Reason codes. */ 73 | #define COMP_R_ZLIB_DEFLATE_ERROR 99 74 | #define COMP_R_ZLIB_INFLATE_ERROR 100 75 | #define COMP_R_ZLIB_NOT_SUPPORTED 101 76 | 77 | #ifdef __cplusplus 78 | } 79 | #endif 80 | #endif 81 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/conf_api.h: -------------------------------------------------------------------------------- 1 | /* conf_api.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_CONF_API_H 60 | #define HEADER_CONF_API_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /* Up until OpenSSL 0.9.5a, this was new_section */ 70 | CONF_VALUE *_CONF_new_section(CONF *conf, const char *section); 71 | /* Up until OpenSSL 0.9.5a, this was get_section */ 72 | CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section); 73 | /* Up until OpenSSL 0.9.5a, this was CONF_get_section */ 74 | STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf, 75 | const char *section); 76 | 77 | int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value); 78 | char *_CONF_get_string(const CONF *conf, const char *section, 79 | const char *name); 80 | long _CONF_get_number(const CONF *conf, const char *section, const char *name); 81 | 82 | int _CONF_new_data(CONF *conf); 83 | void _CONF_free_data(CONF *conf); 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | #endif 89 | 90 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* crypto/ebcdic.h */ 2 | 3 | #ifndef HEADER_EBCDIC_H 4 | #define HEADER_EBCDIC_H 5 | 6 | #include 7 | 8 | /* Avoid name clashes with other applications */ 9 | #define os_toascii _openssl_os_toascii 10 | #define os_toebcdic _openssl_os_toebcdic 11 | #define ebcdic2ascii _openssl_ebcdic2ascii 12 | #define ascii2ebcdic _openssl_ascii2ebcdic 13 | 14 | extern const unsigned char os_toascii[256]; 15 | extern const unsigned char os_toebcdic[256]; 16 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 17 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* crypto/ecdh/ecdh.h */ 2 | /* ==================================================================== 3 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 4 | * 5 | * The Elliptic Curve Public-Key Crypto Library (ECC Code) included 6 | * herein is developed by SUN MICROSYSTEMS, INC., and is contributed 7 | * to the OpenSSL project. 8 | * 9 | * The ECC Code is licensed pursuant to the OpenSSL open source 10 | * license provided below. 11 | * 12 | * The ECDH software is originally written by Douglas Stebila of 13 | * Sun Microsystems Laboratories. 14 | * 15 | */ 16 | /* ==================================================================== 17 | * Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved. 18 | * 19 | * Redistribution and use in source and binary forms, with or without 20 | * modification, are permitted provided that the following conditions 21 | * are met: 22 | * 23 | * 1. Redistributions of source code must retain the above copyright 24 | * notice, this list of conditions and the following disclaimer. 25 | * 26 | * 2. Redistributions in binary form must reproduce the above copyright 27 | * notice, this list of conditions and the following disclaimer in 28 | * the documentation and/or other materials provided with the 29 | * distribution. 30 | * 31 | * 3. All advertising materials mentioning features or use of this 32 | * software must display the following acknowledgment: 33 | * "This product includes software developed by the OpenSSL Project 34 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 35 | * 36 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 37 | * endorse or promote products derived from this software without 38 | * prior written permission. For written permission, please contact 39 | * licensing@OpenSSL.org. 40 | * 41 | * 5. Products derived from this software may not be called "OpenSSL" 42 | * nor may "OpenSSL" appear in their names without prior written 43 | * permission of the OpenSSL Project. 44 | * 45 | * 6. Redistributions of any form whatsoever must retain the following 46 | * acknowledgment: 47 | * "This product includes software developed by the OpenSSL Project 48 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 49 | * 50 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 51 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 52 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 53 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 54 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 55 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 56 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 57 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 58 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 59 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 60 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 61 | * OF THE POSSIBILITY OF SUCH DAMAGE. 62 | * ==================================================================== 63 | * 64 | * This product includes cryptographic software written by Eric Young 65 | * (eay@cryptsoft.com). This product includes software written by Tim 66 | * Hudson (tjh@cryptsoft.com). 67 | * 68 | */ 69 | #ifndef HEADER_ECDH_H 70 | #define HEADER_ECDH_H 71 | 72 | #include 73 | 74 | #ifdef OPENSSL_NO_ECDH 75 | #error ECDH is disabled. 76 | #endif 77 | 78 | #include 79 | #include 80 | #ifndef OPENSSL_NO_DEPRECATED 81 | #include 82 | #endif 83 | 84 | #ifdef __cplusplus 85 | extern "C" { 86 | #endif 87 | 88 | const ECDH_METHOD *ECDH_OpenSSL(void); 89 | 90 | void ECDH_set_default_method(const ECDH_METHOD *); 91 | const ECDH_METHOD *ECDH_get_default_method(void); 92 | int ECDH_set_method(EC_KEY *, const ECDH_METHOD *); 93 | 94 | int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, 95 | void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)); 96 | 97 | int ECDH_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new 98 | *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); 99 | int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg); 100 | void *ECDH_get_ex_data(EC_KEY *d, int idx); 101 | 102 | 103 | /* BEGIN ERROR CODES */ 104 | /* The following lines are auto generated by the script mkerr.pl. Any changes 105 | * made after this point may be overwritten when the script is next run. 106 | */ 107 | void ERR_load_ECDH_strings(void); 108 | 109 | /* Error codes for the ECDH functions. */ 110 | 111 | /* Function codes. */ 112 | #define ECDH_F_ECDH_CHECK 102 113 | #define ECDH_F_ECDH_COMPUTE_KEY 100 114 | #define ECDH_F_ECDH_DATA_NEW_METHOD 101 115 | 116 | /* Reason codes. */ 117 | #define ECDH_R_KDF_FAILED 102 118 | #define ECDH_R_NON_FIPS_METHOD 103 119 | #define ECDH_R_NO_PRIVATE_VALUE 100 120 | #define ECDH_R_POINT_ARITHMETIC_FAILURE 101 121 | 122 | #ifdef __cplusplus 123 | } 124 | #endif 125 | #endif 126 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/hmac.h: -------------------------------------------------------------------------------- 1 | /* crypto/hmac/hmac.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | #ifndef HEADER_HMAC_H 59 | #define HEADER_HMAC_H 60 | 61 | #include 62 | 63 | #ifdef OPENSSL_NO_HMAC 64 | #error HMAC is disabled. 65 | #endif 66 | 67 | #include 68 | 69 | #define HMAC_MAX_MD_CBLOCK 128 /* largest known is SHA512 */ 70 | 71 | #ifdef __cplusplus 72 | extern "C" { 73 | #endif 74 | 75 | typedef struct hmac_ctx_st 76 | { 77 | const EVP_MD *md; 78 | EVP_MD_CTX md_ctx; 79 | EVP_MD_CTX i_ctx; 80 | EVP_MD_CTX o_ctx; 81 | unsigned int key_length; 82 | unsigned char key[HMAC_MAX_MD_CBLOCK]; 83 | } HMAC_CTX; 84 | 85 | #define HMAC_size(e) (EVP_MD_size((e)->md)) 86 | 87 | 88 | void HMAC_CTX_init(HMAC_CTX *ctx); 89 | void HMAC_CTX_cleanup(HMAC_CTX *ctx); 90 | 91 | #define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */ 92 | 93 | int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, 94 | const EVP_MD *md); /* deprecated */ 95 | int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 96 | const EVP_MD *md, ENGINE *impl); 97 | int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len); 98 | int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len); 99 | unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 100 | const unsigned char *d, size_t n, unsigned char *md, 101 | unsigned int *md_len); 102 | int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 103 | 104 | void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 105 | 106 | #ifdef __cplusplus 107 | } 108 | #endif 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/idea.h: -------------------------------------------------------------------------------- 1 | /* crypto/idea/idea.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_IDEA_H 60 | #define HEADER_IDEA_H 61 | 62 | #include /* IDEA_INT, OPENSSL_NO_IDEA */ 63 | 64 | #ifdef OPENSSL_NO_IDEA 65 | #error IDEA is disabled. 66 | #endif 67 | 68 | #define IDEA_ENCRYPT 1 69 | #define IDEA_DECRYPT 0 70 | 71 | #define IDEA_BLOCK 8 72 | #define IDEA_KEY_LENGTH 16 73 | 74 | #ifdef __cplusplus 75 | extern "C" { 76 | #endif 77 | 78 | typedef struct idea_key_st 79 | { 80 | IDEA_INT data[9][6]; 81 | } IDEA_KEY_SCHEDULE; 82 | 83 | const char *idea_options(void); 84 | void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, 85 | IDEA_KEY_SCHEDULE *ks); 86 | #ifdef OPENSSL_FIPS 87 | void private_idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 88 | #endif 89 | void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 90 | void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 91 | void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, 92 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); 93 | void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, 94 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 95 | int *num,int enc); 96 | void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, 97 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); 98 | void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif 104 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/kssl.h: -------------------------------------------------------------------------------- 1 | /* ssl/kssl.h -*- mode: C; c-file-style: "eay" -*- */ 2 | /* Written by Vern Staats for the OpenSSL project 2000. 3 | * project 2000. 4 | */ 5 | /* ==================================================================== 6 | * Copyright (c) 2000 The OpenSSL Project. All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in 17 | * the documentation and/or other materials provided with the 18 | * distribution. 19 | * 20 | * 3. All advertising materials mentioning features or use of this 21 | * software must display the following acknowledgment: 22 | * "This product includes software developed by the OpenSSL Project 23 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 24 | * 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 26 | * endorse or promote products derived from this software without 27 | * prior written permission. For written permission, please contact 28 | * licensing@OpenSSL.org. 29 | * 30 | * 5. Products derived from this software may not be called "OpenSSL" 31 | * nor may "OpenSSL" appear in their names without prior written 32 | * permission of the OpenSSL Project. 33 | * 34 | * 6. Redistributions of any form whatsoever must retain the following 35 | * acknowledgment: 36 | * "This product includes software developed by the OpenSSL Project 37 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 38 | * 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. 51 | * ==================================================================== 52 | * 53 | * This product includes cryptographic software written by Eric Young 54 | * (eay@cryptsoft.com). This product includes software written by Tim 55 | * Hudson (tjh@cryptsoft.com). 56 | * 57 | */ 58 | 59 | /* 60 | ** 19990701 VRS Started. 61 | */ 62 | 63 | #ifndef KSSL_H 64 | #define KSSL_H 65 | 66 | #include 67 | 68 | #ifndef OPENSSL_NO_KRB5 69 | 70 | #include 71 | #include 72 | #include 73 | 74 | #ifdef __cplusplus 75 | extern "C" { 76 | #endif 77 | 78 | /* 79 | ** Depending on which KRB5 implementation used, some types from 80 | ** the other may be missing. Resolve that here and now 81 | */ 82 | #ifdef KRB5_HEIMDAL 83 | typedef unsigned char krb5_octet; 84 | #define FAR 85 | #else 86 | 87 | #ifndef FAR 88 | #define FAR 89 | #endif 90 | 91 | #endif 92 | 93 | /* Uncomment this to debug kssl problems or 94 | ** to trace usage of the Kerberos session key 95 | ** 96 | ** #define KSSL_DEBUG 97 | */ 98 | 99 | #ifndef KRB5SVC 100 | #define KRB5SVC "host" 101 | #endif 102 | 103 | #ifndef KRB5KEYTAB 104 | #define KRB5KEYTAB "/etc/krb5.keytab" 105 | #endif 106 | 107 | #ifndef KRB5SENDAUTH 108 | #define KRB5SENDAUTH 1 109 | #endif 110 | 111 | #ifndef KRB5CHECKAUTH 112 | #define KRB5CHECKAUTH 1 113 | #endif 114 | 115 | #ifndef KSSL_CLOCKSKEW 116 | #define KSSL_CLOCKSKEW 300; 117 | #endif 118 | 119 | #define KSSL_ERR_MAX 255 120 | typedef struct kssl_err_st { 121 | int reason; 122 | char text[KSSL_ERR_MAX+1]; 123 | } KSSL_ERR; 124 | 125 | 126 | /* Context for passing 127 | ** (1) Kerberos session key to SSL, and 128 | ** (2) Config data between application and SSL lib 129 | */ 130 | typedef struct kssl_ctx_st 131 | { 132 | /* used by: disposition: */ 133 | char *service_name; /* C,S default ok (kssl) */ 134 | char *service_host; /* C input, REQUIRED */ 135 | char *client_princ; /* S output from krb5 ticket */ 136 | char *keytab_file; /* S NULL (/etc/krb5.keytab) */ 137 | char *cred_cache; /* C NULL (default) */ 138 | krb5_enctype enctype; 139 | int length; 140 | krb5_octet FAR *key; 141 | } KSSL_CTX; 142 | 143 | #define KSSL_CLIENT 1 144 | #define KSSL_SERVER 2 145 | #define KSSL_SERVICE 3 146 | #define KSSL_KEYTAB 4 147 | 148 | #define KSSL_CTX_OK 0 149 | #define KSSL_CTX_ERR 1 150 | #define KSSL_NOMEM 2 151 | 152 | /* Public (for use by applications that use OpenSSL with Kerberos 5 support */ 153 | krb5_error_code kssl_ctx_setstring(KSSL_CTX *kssl_ctx, int which, char *text); 154 | KSSL_CTX *kssl_ctx_new(void); 155 | KSSL_CTX *kssl_ctx_free(KSSL_CTX *kssl_ctx); 156 | void kssl_ctx_show(KSSL_CTX *kssl_ctx); 157 | krb5_error_code kssl_ctx_setprinc(KSSL_CTX *kssl_ctx, int which, 158 | krb5_data *realm, krb5_data *entity, int nentities); 159 | krb5_error_code kssl_cget_tkt(KSSL_CTX *kssl_ctx, krb5_data **enc_tktp, 160 | krb5_data *authenp, KSSL_ERR *kssl_err); 161 | krb5_error_code kssl_sget_tkt(KSSL_CTX *kssl_ctx, krb5_data *indata, 162 | krb5_ticket_times *ttimes, KSSL_ERR *kssl_err); 163 | krb5_error_code kssl_ctx_setkey(KSSL_CTX *kssl_ctx, krb5_keyblock *session); 164 | void kssl_err_set(KSSL_ERR *kssl_err, int reason, char *text); 165 | void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data); 166 | krb5_error_code kssl_build_principal_2(krb5_context context, 167 | krb5_principal *princ, int rlen, const char *realm, 168 | int slen, const char *svc, int hlen, const char *host); 169 | krb5_error_code kssl_validate_times(krb5_timestamp atime, 170 | krb5_ticket_times *ttimes); 171 | krb5_error_code kssl_check_authent(KSSL_CTX *kssl_ctx, krb5_data *authentp, 172 | krb5_timestamp *atimep, KSSL_ERR *kssl_err); 173 | unsigned char *kssl_skip_confound(krb5_enctype enctype, unsigned char *authn); 174 | 175 | void SSL_set0_kssl_ctx(SSL *s, KSSL_CTX *kctx); 176 | KSSL_CTX * SSL_get0_kssl_ctx(SSL *s); 177 | char *kssl_ctx_get0_client_princ(KSSL_CTX *kctx); 178 | 179 | #ifdef __cplusplus 180 | } 181 | #endif 182 | #endif /* OPENSSL_NO_KRB5 */ 183 | #endif /* KSSL_H */ 184 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/md4.h: -------------------------------------------------------------------------------- 1 | /* crypto/md4/md4.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MD4_H 60 | #define HEADER_MD4_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | #ifdef OPENSSL_NO_MD4 70 | #error MD4 is disabled. 71 | #endif 72 | 73 | /* 74 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 75 | * ! MD4_LONG has to be at least 32 bits wide. If it's wider, then ! 76 | * ! MD4_LONG_LOG2 has to be defined along. ! 77 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 78 | */ 79 | 80 | #if defined(__LP32__) 81 | #define MD4_LONG unsigned long 82 | #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 83 | #define MD4_LONG unsigned long 84 | #define MD4_LONG_LOG2 3 85 | /* 86 | * _CRAY note. I could declare short, but I have no idea what impact 87 | * does it have on performance on none-T3E machines. I could declare 88 | * int, but at least on C90 sizeof(int) can be chosen at compile time. 89 | * So I've chosen long... 90 | * 91 | */ 92 | #else 93 | #define MD4_LONG unsigned int 94 | #endif 95 | 96 | #define MD4_CBLOCK 64 97 | #define MD4_LBLOCK (MD4_CBLOCK/4) 98 | #define MD4_DIGEST_LENGTH 16 99 | 100 | typedef struct MD4state_st 101 | { 102 | MD4_LONG A,B,C,D; 103 | MD4_LONG Nl,Nh; 104 | MD4_LONG data[MD4_LBLOCK]; 105 | unsigned int num; 106 | } MD4_CTX; 107 | 108 | #ifdef OPENSSL_FIPS 109 | int private_MD4_Init(MD4_CTX *c); 110 | #endif 111 | int MD4_Init(MD4_CTX *c); 112 | int MD4_Update(MD4_CTX *c, const void *data, size_t len); 113 | int MD4_Final(unsigned char *md, MD4_CTX *c); 114 | unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); 115 | void MD4_Transform(MD4_CTX *c, const unsigned char *b); 116 | #ifdef __cplusplus 117 | } 118 | #endif 119 | 120 | #endif 121 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/md5.h: -------------------------------------------------------------------------------- 1 | /* crypto/md5/md5.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MD5_H 60 | #define HEADER_MD5_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | #ifdef OPENSSL_NO_MD5 70 | #error MD5 is disabled. 71 | #endif 72 | 73 | /* 74 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 75 | * ! MD5_LONG has to be at least 32 bits wide. If it's wider, then ! 76 | * ! MD5_LONG_LOG2 has to be defined along. ! 77 | * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 78 | */ 79 | 80 | #if defined(__LP32__) 81 | #define MD5_LONG unsigned long 82 | #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 83 | #define MD5_LONG unsigned long 84 | #define MD5_LONG_LOG2 3 85 | /* 86 | * _CRAY note. I could declare short, but I have no idea what impact 87 | * does it have on performance on none-T3E machines. I could declare 88 | * int, but at least on C90 sizeof(int) can be chosen at compile time. 89 | * So I've chosen long... 90 | * 91 | */ 92 | #else 93 | #define MD5_LONG unsigned int 94 | #endif 95 | 96 | #define MD5_CBLOCK 64 97 | #define MD5_LBLOCK (MD5_CBLOCK/4) 98 | #define MD5_DIGEST_LENGTH 16 99 | 100 | typedef struct MD5state_st 101 | { 102 | MD5_LONG A,B,C,D; 103 | MD5_LONG Nl,Nh; 104 | MD5_LONG data[MD5_LBLOCK]; 105 | unsigned int num; 106 | } MD5_CTX; 107 | 108 | #ifdef OPENSSL_FIPS 109 | int private_MD5_Init(MD5_CTX *c); 110 | #endif 111 | int MD5_Init(MD5_CTX *c); 112 | int MD5_Update(MD5_CTX *c, const void *data, size_t len); 113 | int MD5_Final(unsigned char *md, MD5_CTX *c); 114 | unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); 115 | void MD5_Transform(MD5_CTX *c, const unsigned char *b); 116 | #ifdef __cplusplus 117 | } 118 | #endif 119 | 120 | #endif 121 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/mdc2.h: -------------------------------------------------------------------------------- 1 | /* crypto/mdc2/mdc2.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_MDC2_H 60 | #define HEADER_MDC2_H 61 | 62 | #include 63 | 64 | #ifdef __cplusplus 65 | extern "C" { 66 | #endif 67 | 68 | #ifdef OPENSSL_NO_MDC2 69 | #error MDC2 is disabled. 70 | #endif 71 | 72 | #define MDC2_BLOCK 8 73 | #define MDC2_DIGEST_LENGTH 16 74 | 75 | typedef struct mdc2_ctx_st 76 | { 77 | unsigned int num; 78 | unsigned char data[MDC2_BLOCK]; 79 | DES_cblock h,hh; 80 | int pad_type; /* either 1 or 2, default 1 */ 81 | } MDC2_CTX; 82 | 83 | 84 | #ifdef OPENSSL_FIPS 85 | int private_MDC2_Init(MDC2_CTX *c); 86 | #endif 87 | int MDC2_Init(MDC2_CTX *c); 88 | int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); 89 | int MDC2_Final(unsigned char *md, MDC2_CTX *c); 90 | unsigned char *MDC2(const unsigned char *d, size_t n, 91 | unsigned char *md); 92 | 93 | #ifdef __cplusplus 94 | } 95 | #endif 96 | 97 | #endif 98 | 99 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/modes.h: -------------------------------------------------------------------------------- 1 | /* ==================================================================== 2 | * Copyright (c) 2008 The OpenSSL Project. All rights reserved. 3 | * 4 | * Rights for redistribution and usage in source and binary 5 | * forms are granted according to the OpenSSL license. 6 | */ 7 | 8 | #include 9 | 10 | typedef void (*block128_f)(const unsigned char in[16], 11 | unsigned char out[16], 12 | const void *key); 13 | 14 | typedef void (*cbc128_f)(const unsigned char *in, unsigned char *out, 15 | size_t len, const void *key, 16 | unsigned char ivec[16], int enc); 17 | 18 | typedef void (*ctr128_f)(const unsigned char *in, unsigned char *out, 19 | size_t blocks, const void *key, 20 | const unsigned char ivec[16]); 21 | 22 | typedef void (*ccm128_f)(const unsigned char *in, unsigned char *out, 23 | size_t blocks, const void *key, 24 | const unsigned char ivec[16],unsigned char cmac[16]); 25 | 26 | void CRYPTO_cbc128_encrypt(const unsigned char *in, unsigned char *out, 27 | size_t len, const void *key, 28 | unsigned char ivec[16], block128_f block); 29 | void CRYPTO_cbc128_decrypt(const unsigned char *in, unsigned char *out, 30 | size_t len, const void *key, 31 | unsigned char ivec[16], block128_f block); 32 | 33 | void CRYPTO_ctr128_encrypt(const unsigned char *in, unsigned char *out, 34 | size_t len, const void *key, 35 | unsigned char ivec[16], unsigned char ecount_buf[16], 36 | unsigned int *num, block128_f block); 37 | 38 | void CRYPTO_ctr128_encrypt_ctr32(const unsigned char *in, unsigned char *out, 39 | size_t len, const void *key, 40 | unsigned char ivec[16], unsigned char ecount_buf[16], 41 | unsigned int *num, ctr128_f ctr); 42 | 43 | void CRYPTO_ofb128_encrypt(const unsigned char *in, unsigned char *out, 44 | size_t len, const void *key, 45 | unsigned char ivec[16], int *num, 46 | block128_f block); 47 | 48 | void CRYPTO_cfb128_encrypt(const unsigned char *in, unsigned char *out, 49 | size_t len, const void *key, 50 | unsigned char ivec[16], int *num, 51 | int enc, block128_f block); 52 | void CRYPTO_cfb128_8_encrypt(const unsigned char *in, unsigned char *out, 53 | size_t length, const void *key, 54 | unsigned char ivec[16], int *num, 55 | int enc, block128_f block); 56 | void CRYPTO_cfb128_1_encrypt(const unsigned char *in, unsigned char *out, 57 | size_t bits, const void *key, 58 | unsigned char ivec[16], int *num, 59 | int enc, block128_f block); 60 | 61 | size_t CRYPTO_cts128_encrypt_block(const unsigned char *in, unsigned char *out, 62 | size_t len, const void *key, 63 | unsigned char ivec[16], block128_f block); 64 | size_t CRYPTO_cts128_encrypt(const unsigned char *in, unsigned char *out, 65 | size_t len, const void *key, 66 | unsigned char ivec[16], cbc128_f cbc); 67 | size_t CRYPTO_cts128_decrypt_block(const unsigned char *in, unsigned char *out, 68 | size_t len, const void *key, 69 | unsigned char ivec[16], block128_f block); 70 | size_t CRYPTO_cts128_decrypt(const unsigned char *in, unsigned char *out, 71 | size_t len, const void *key, 72 | unsigned char ivec[16], cbc128_f cbc); 73 | 74 | size_t CRYPTO_nistcts128_encrypt_block(const unsigned char *in, unsigned char *out, 75 | size_t len, const void *key, 76 | unsigned char ivec[16], block128_f block); 77 | size_t CRYPTO_nistcts128_encrypt(const unsigned char *in, unsigned char *out, 78 | size_t len, const void *key, 79 | unsigned char ivec[16], cbc128_f cbc); 80 | size_t CRYPTO_nistcts128_decrypt_block(const unsigned char *in, unsigned char *out, 81 | size_t len, const void *key, 82 | unsigned char ivec[16], block128_f block); 83 | size_t CRYPTO_nistcts128_decrypt(const unsigned char *in, unsigned char *out, 84 | size_t len, const void *key, 85 | unsigned char ivec[16], cbc128_f cbc); 86 | 87 | typedef struct gcm128_context GCM128_CONTEXT; 88 | 89 | GCM128_CONTEXT *CRYPTO_gcm128_new(void *key, block128_f block); 90 | void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx,void *key,block128_f block); 91 | void CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx, const unsigned char *iv, 92 | size_t len); 93 | int CRYPTO_gcm128_aad(GCM128_CONTEXT *ctx, const unsigned char *aad, 94 | size_t len); 95 | int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx, 96 | const unsigned char *in, unsigned char *out, 97 | size_t len); 98 | int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx, 99 | const unsigned char *in, unsigned char *out, 100 | size_t len); 101 | int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx, 102 | const unsigned char *in, unsigned char *out, 103 | size_t len, ctr128_f stream); 104 | int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx, 105 | const unsigned char *in, unsigned char *out, 106 | size_t len, ctr128_f stream); 107 | int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx,const unsigned char *tag, 108 | size_t len); 109 | void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len); 110 | void CRYPTO_gcm128_release(GCM128_CONTEXT *ctx); 111 | 112 | typedef struct ccm128_context CCM128_CONTEXT; 113 | 114 | void CRYPTO_ccm128_init(CCM128_CONTEXT *ctx, 115 | unsigned int M, unsigned int L, void *key,block128_f block); 116 | int CRYPTO_ccm128_setiv(CCM128_CONTEXT *ctx, 117 | const unsigned char *nonce, size_t nlen, size_t mlen); 118 | void CRYPTO_ccm128_aad(CCM128_CONTEXT *ctx, 119 | const unsigned char *aad, size_t alen); 120 | int CRYPTO_ccm128_encrypt(CCM128_CONTEXT *ctx, 121 | const unsigned char *inp, unsigned char *out, size_t len); 122 | int CRYPTO_ccm128_decrypt(CCM128_CONTEXT *ctx, 123 | const unsigned char *inp, unsigned char *out, size_t len); 124 | int CRYPTO_ccm128_encrypt_ccm64(CCM128_CONTEXT *ctx, 125 | const unsigned char *inp, unsigned char *out, size_t len, 126 | ccm128_f stream); 127 | int CRYPTO_ccm128_decrypt_ccm64(CCM128_CONTEXT *ctx, 128 | const unsigned char *inp, unsigned char *out, size_t len, 129 | ccm128_f stream); 130 | size_t CRYPTO_ccm128_tag(CCM128_CONTEXT *ctx, unsigned char *tag, size_t len); 131 | 132 | typedef struct xts128_context XTS128_CONTEXT; 133 | 134 | int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16], 135 | const unsigned char *inp, unsigned char *out, size_t len, int enc); 136 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/opensslconf.h: -------------------------------------------------------------------------------- 1 | /* opensslconf.h */ 2 | /* WARNING: Generated automatically from opensslconf.h.in by Configure. */ 3 | 4 | /* OpenSSL was configured with the following options: */ 5 | #ifndef OPENSSL_SYSNAME_iOS 6 | # define OPENSSL_SYSNAME_iOS 7 | #endif 8 | #ifndef OPENSSL_DOING_MAKEDEPEND 9 | 10 | 11 | #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 12 | # define OPENSSL_NO_EC_NISTP_64_GCC_128 13 | #endif 14 | #ifndef OPENSSL_NO_GMP 15 | # define OPENSSL_NO_GMP 16 | #endif 17 | #ifndef OPENSSL_NO_JPAKE 18 | # define OPENSSL_NO_JPAKE 19 | #endif 20 | #ifndef OPENSSL_NO_KRB5 21 | # define OPENSSL_NO_KRB5 22 | #endif 23 | #ifndef OPENSSL_NO_MD2 24 | # define OPENSSL_NO_MD2 25 | #endif 26 | #ifndef OPENSSL_NO_RC5 27 | # define OPENSSL_NO_RC5 28 | #endif 29 | #ifndef OPENSSL_NO_RFC3779 30 | # define OPENSSL_NO_RFC3779 31 | #endif 32 | #ifndef OPENSSL_NO_SCTP 33 | # define OPENSSL_NO_SCTP 34 | #endif 35 | #ifndef OPENSSL_NO_STORE 36 | # define OPENSSL_NO_STORE 37 | #endif 38 | 39 | #endif /* OPENSSL_DOING_MAKEDEPEND */ 40 | 41 | #ifndef OPENSSL_THREADS 42 | # define OPENSSL_THREADS 43 | #endif 44 | #ifndef OPENSSL_NO_ASM 45 | # define OPENSSL_NO_ASM 46 | #endif 47 | #ifndef OPENSSL_NO_DYNAMIC_ENGINE 48 | # define OPENSSL_NO_DYNAMIC_ENGINE 49 | #endif 50 | 51 | /* The OPENSSL_NO_* macros are also defined as NO_* if the application 52 | asks for it. This is a transient feature that is provided for those 53 | who haven't had the time to do the appropriate changes in their 54 | applications. */ 55 | #ifdef OPENSSL_ALGORITHM_DEFINES 56 | # if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128) 57 | # define NO_EC_NISTP_64_GCC_128 58 | # endif 59 | # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) 60 | # define NO_GMP 61 | # endif 62 | # if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE) 63 | # define NO_JPAKE 64 | # endif 65 | # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) 66 | # define NO_KRB5 67 | # endif 68 | # if defined(OPENSSL_NO_MD2) && !defined(NO_MD2) 69 | # define NO_MD2 70 | # endif 71 | # if defined(OPENSSL_NO_RC5) && !defined(NO_RC5) 72 | # define NO_RC5 73 | # endif 74 | # if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779) 75 | # define NO_RFC3779 76 | # endif 77 | # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) 78 | # define NO_SCTP 79 | # endif 80 | # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) 81 | # define NO_STORE 82 | # endif 83 | #endif 84 | 85 | /* crypto/opensslconf.h.in */ 86 | 87 | /* Generate 80386 code? */ 88 | #undef I386_ONLY 89 | 90 | #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ 91 | #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) 92 | #define ENGINESDIR "/Users/ashleysampson/Source/Livestation/librtmp-iOS/build/openssl-iPhoneSimulator7.1-i386.sdk/lib/engines" 93 | #define OPENSSLDIR "/Users/ashleysampson/Source/Livestation/librtmp-iOS/build/openssl-iPhoneSimulator7.1-i386.sdk" 94 | #endif 95 | #endif 96 | 97 | #undef OPENSSL_UNISTD 98 | #define OPENSSL_UNISTD 99 | 100 | #undef OPENSSL_EXPORT_VAR_AS_FUNCTION 101 | 102 | #if defined(HEADER_IDEA_H) && !defined(IDEA_INT) 103 | #define IDEA_INT unsigned int 104 | #endif 105 | 106 | #if defined(HEADER_MD2_H) && !defined(MD2_INT) 107 | #define MD2_INT unsigned int 108 | #endif 109 | 110 | #if defined(HEADER_RC2_H) && !defined(RC2_INT) 111 | /* I need to put in a mod for the alpha - eay */ 112 | #define RC2_INT unsigned int 113 | #endif 114 | 115 | #if defined(HEADER_RC4_H) 116 | #if !defined(RC4_INT) 117 | /* using int types make the structure larger but make the code faster 118 | * on most boxes I have tested - up to %20 faster. */ 119 | /* 120 | * I don't know what does "most" mean, but declaring "int" is a must on: 121 | * - Intel P6 because partial register stalls are very expensive; 122 | * - elder Alpha because it lacks byte load/store instructions; 123 | */ 124 | #define RC4_INT unsigned char 125 | #endif 126 | #if !defined(RC4_CHUNK) 127 | /* 128 | * This enables code handling data aligned at natural CPU word 129 | * boundary. See crypto/rc4/rc4_enc.c for further details. 130 | */ 131 | #define RC4_CHUNK unsigned long 132 | #endif 133 | #endif 134 | 135 | #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) 136 | /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a 137 | * %20 speed up (longs are 8 bytes, int's are 4). */ 138 | #ifndef DES_LONG 139 | #define DES_LONG unsigned long 140 | #endif 141 | #endif 142 | 143 | #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) 144 | #define CONFIG_HEADER_BN_H 145 | #define BN_LLONG 146 | 147 | /* Should we define BN_DIV2W here? */ 148 | 149 | /* Only one for the following should be defined */ 150 | #undef SIXTY_FOUR_BIT_LONG 151 | #undef SIXTY_FOUR_BIT 152 | #define THIRTY_TWO_BIT 153 | #endif 154 | 155 | #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) 156 | #define CONFIG_HEADER_RC4_LOCL_H 157 | /* if this is defined data[i] is used instead of *data, this is a %20 158 | * speedup on x86 */ 159 | #undef RC4_INDEX 160 | #endif 161 | 162 | #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) 163 | #define CONFIG_HEADER_BF_LOCL_H 164 | #define BF_PTR 165 | #endif /* HEADER_BF_LOCL_H */ 166 | 167 | #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) 168 | #define CONFIG_HEADER_DES_LOCL_H 169 | #ifndef DES_DEFAULT_OPTIONS 170 | /* the following is tweaked from a config script, that is why it is a 171 | * protected undef/define */ 172 | #ifndef DES_PTR 173 | #undef DES_PTR 174 | #endif 175 | 176 | /* This helps C compiler generate the correct code for multiple functional 177 | * units. It reduces register dependancies at the expense of 2 more 178 | * registers */ 179 | #ifndef DES_RISC1 180 | #undef DES_RISC1 181 | #endif 182 | 183 | #ifndef DES_RISC2 184 | #undef DES_RISC2 185 | #endif 186 | 187 | #if defined(DES_RISC1) && defined(DES_RISC2) 188 | YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! 189 | #endif 190 | 191 | /* Unroll the inner loop, this sometimes helps, sometimes hinders. 192 | * Very mucy CPU dependant */ 193 | #ifndef DES_UNROLL 194 | #define DES_UNROLL 195 | #endif 196 | 197 | /* These default values were supplied by 198 | * Peter Gutman 199 | * They are only used if nothing else has been defined */ 200 | #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) 201 | /* Special defines which change the way the code is built depending on the 202 | CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find 203 | even newer MIPS CPU's, but at the moment one size fits all for 204 | optimization options. Older Sparc's work better with only UNROLL, but 205 | there's no way to tell at compile time what it is you're running on */ 206 | 207 | #if defined( sun ) /* Newer Sparc's */ 208 | # define DES_PTR 209 | # define DES_RISC1 210 | # define DES_UNROLL 211 | #elif defined( __ultrix ) /* Older MIPS */ 212 | # define DES_PTR 213 | # define DES_RISC2 214 | # define DES_UNROLL 215 | #elif defined( __osf1__ ) /* Alpha */ 216 | # define DES_PTR 217 | # define DES_RISC2 218 | #elif defined ( _AIX ) /* RS6000 */ 219 | /* Unknown */ 220 | #elif defined( __hpux ) /* HP-PA */ 221 | /* Unknown */ 222 | #elif defined( __aux ) /* 68K */ 223 | /* Unknown */ 224 | #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ 225 | # define DES_UNROLL 226 | #elif defined( __sgi ) /* Newer MIPS */ 227 | # define DES_PTR 228 | # define DES_RISC2 229 | # define DES_UNROLL 230 | #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ 231 | # define DES_PTR 232 | # define DES_RISC1 233 | # define DES_UNROLL 234 | #endif /* Systems-specific speed defines */ 235 | #endif 236 | 237 | #endif /* DES_DEFAULT_OPTIONS */ 238 | #endif /* HEADER_DES_LOCL_H */ 239 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/opensslv.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_OPENSSLV_H 2 | #define HEADER_OPENSSLV_H 3 | 4 | /* Numeric release version identifier: 5 | * MNNFFPPS: major minor fix patch status 6 | * The status nibble has one of the values 0 for development, 1 to e for betas 7 | * 1 to 14, and f for release. The patch level is exactly that. 8 | * For example: 9 | * 0.9.3-dev 0x00903000 10 | * 0.9.3-beta1 0x00903001 11 | * 0.9.3-beta2-dev 0x00903002 12 | * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) 13 | * 0.9.3 0x0090300f 14 | * 0.9.3a 0x0090301f 15 | * 0.9.4 0x0090400f 16 | * 1.2.3z 0x102031af 17 | * 18 | * For continuity reasons (because 0.9.5 is already out, and is coded 19 | * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level 20 | * part is slightly different, by setting the highest bit. This means 21 | * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start 22 | * with 0x0090600S... 23 | * 24 | * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) 25 | * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for 26 | * major minor fix final patch/beta) 27 | */ 28 | #define OPENSSL_VERSION_NUMBER 0x1000105fL 29 | #ifdef OPENSSL_FIPS 30 | #define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1e-fips 11 Feb 2013" 31 | #else 32 | #define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1e 11 Feb 2013" 33 | #endif 34 | #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT 35 | 36 | 37 | /* The macros below are to be used for shared library (.so, .dll, ...) 38 | * versioning. That kind of versioning works a bit differently between 39 | * operating systems. The most usual scheme is to set a major and a minor 40 | * number, and have the runtime loader check that the major number is equal 41 | * to what it was at application link time, while the minor number has to 42 | * be greater or equal to what it was at application link time. With this 43 | * scheme, the version number is usually part of the file name, like this: 44 | * 45 | * libcrypto.so.0.9 46 | * 47 | * Some unixen also make a softlink with the major verson number only: 48 | * 49 | * libcrypto.so.0 50 | * 51 | * On Tru64 and IRIX 6.x it works a little bit differently. There, the 52 | * shared library version is stored in the file, and is actually a series 53 | * of versions, separated by colons. The rightmost version present in the 54 | * library when linking an application is stored in the application to be 55 | * matched at run time. When the application is run, a check is done to 56 | * see if the library version stored in the application matches any of the 57 | * versions in the version string of the library itself. 58 | * This version string can be constructed in any way, depending on what 59 | * kind of matching is desired. However, to implement the same scheme as 60 | * the one used in the other unixen, all compatible versions, from lowest 61 | * to highest, should be part of the string. Consecutive builds would 62 | * give the following versions strings: 63 | * 64 | * 3.0 65 | * 3.0:3.1 66 | * 3.0:3.1:3.2 67 | * 4.0 68 | * 4.0:4.1 69 | * 70 | * Notice how version 4 is completely incompatible with version, and 71 | * therefore give the breach you can see. 72 | * 73 | * There may be other schemes as well that I haven't yet discovered. 74 | * 75 | * So, here's the way it works here: first of all, the library version 76 | * number doesn't need at all to match the overall OpenSSL version. 77 | * However, it's nice and more understandable if it actually does. 78 | * The current library version is stored in the macro SHLIB_VERSION_NUMBER, 79 | * which is just a piece of text in the format "M.m.e" (Major, minor, edit). 80 | * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, 81 | * we need to keep a history of version numbers, which is done in the 82 | * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and 83 | * should only keep the versions that are binary compatible with the current. 84 | */ 85 | #define SHLIB_VERSION_HISTORY "" 86 | #define SHLIB_VERSION_NUMBER "1.0.0" 87 | 88 | 89 | #endif /* HEADER_OPENSSLV_H */ 90 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* ==================================================================== 2 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * 3. All advertising materials mentioning features or use of this 17 | * software must display the following acknowledgment: 18 | * "This product includes software developed by the OpenSSL Project 19 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 20 | * 21 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 22 | * endorse or promote products derived from this software without 23 | * prior written permission. For written permission, please contact 24 | * licensing@OpenSSL.org. 25 | * 26 | * 5. Products derived from this software may not be called "OpenSSL" 27 | * nor may "OpenSSL" appear in their names without prior written 28 | * permission of the OpenSSL Project. 29 | * 30 | * 6. Redistributions of any form whatsoever must retain the following 31 | * acknowledgment: 32 | * "This product includes software developed by the OpenSSL Project 33 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 34 | * 35 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 36 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 37 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 38 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 39 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 40 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 41 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 42 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 43 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 44 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 45 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 46 | * OF THE POSSIBILITY OF SUCH DAMAGE. 47 | * ==================================================================== 48 | * 49 | * This product includes cryptographic software written by Eric Young 50 | * (eay@cryptsoft.com). This product includes software written by Tim 51 | * Hudson (tjh@cryptsoft.com). 52 | * 53 | */ 54 | 55 | /* 56 | * This header only exists to break a circular dependency between pem and err 57 | * Ben 30 Jan 1999. 58 | */ 59 | 60 | #ifdef __cplusplus 61 | extern "C" { 62 | #endif 63 | 64 | #ifndef HEADER_PEM_H 65 | void ERR_load_PEM_strings(void); 66 | #endif 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/pqueue.h: -------------------------------------------------------------------------------- 1 | /* crypto/pqueue/pqueue.h */ 2 | /* 3 | * DTLS implementation written by Nagendra Modadugu 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 5 | */ 6 | /* ==================================================================== 7 | * Copyright (c) 1999-2005 The OpenSSL Project. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. All advertising materials mentioning features or use of this 22 | * software must display the following acknowledgment: 23 | * "This product includes software developed by the OpenSSL Project 24 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 25 | * 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 | * endorse or promote products derived from this software without 28 | * prior written permission. For written permission, please contact 29 | * openssl-core@OpenSSL.org. 30 | * 31 | * 5. Products derived from this software may not be called "OpenSSL" 32 | * nor may "OpenSSL" appear in their names without prior written 33 | * permission of the OpenSSL Project. 34 | * 35 | * 6. Redistributions of any form whatsoever must retain the following 36 | * acknowledgment: 37 | * "This product includes software developed by the OpenSSL Project 38 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * ==================================================================== 53 | * 54 | * This product includes cryptographic software written by Eric Young 55 | * (eay@cryptsoft.com). This product includes software written by Tim 56 | * Hudson (tjh@cryptsoft.com). 57 | * 58 | */ 59 | 60 | #ifndef HEADER_PQUEUE_H 61 | #define HEADER_PQUEUE_H 62 | 63 | #include 64 | #include 65 | #include 66 | 67 | typedef struct _pqueue *pqueue; 68 | 69 | typedef struct _pitem 70 | { 71 | unsigned char priority[8]; /* 64-bit value in big-endian encoding */ 72 | void *data; 73 | struct _pitem *next; 74 | } pitem; 75 | 76 | typedef struct _pitem *piterator; 77 | 78 | pitem *pitem_new(unsigned char *prio64be, void *data); 79 | void pitem_free(pitem *item); 80 | 81 | pqueue pqueue_new(void); 82 | void pqueue_free(pqueue pq); 83 | 84 | pitem *pqueue_insert(pqueue pq, pitem *item); 85 | pitem *pqueue_peek(pqueue pq); 86 | pitem *pqueue_pop(pqueue pq); 87 | pitem *pqueue_find(pqueue pq, unsigned char *prio64be); 88 | pitem *pqueue_iterator(pqueue pq); 89 | pitem *pqueue_next(piterator *iter); 90 | 91 | void pqueue_print(pqueue pq); 92 | int pqueue_size(pqueue pq); 93 | 94 | #endif /* ! HEADER_PQUEUE_H */ 95 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/rand.h: -------------------------------------------------------------------------------- 1 | /* crypto/rand/rand.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RAND_H 60 | #define HEADER_RAND_H 61 | 62 | #include 63 | #include 64 | #include 65 | 66 | #if defined(OPENSSL_SYS_WINDOWS) 67 | #include 68 | #endif 69 | 70 | #ifdef __cplusplus 71 | extern "C" { 72 | #endif 73 | 74 | #if defined(OPENSSL_FIPS) 75 | #define FIPS_RAND_SIZE_T size_t 76 | #endif 77 | 78 | /* Already defined in ossl_typ.h */ 79 | /* typedef struct rand_meth_st RAND_METHOD; */ 80 | 81 | struct rand_meth_st 82 | { 83 | void (*seed)(const void *buf, int num); 84 | int (*bytes)(unsigned char *buf, int num); 85 | void (*cleanup)(void); 86 | void (*add)(const void *buf, int num, double entropy); 87 | int (*pseudorand)(unsigned char *buf, int num); 88 | int (*status)(void); 89 | }; 90 | 91 | #ifdef BN_DEBUG 92 | extern int rand_predictable; 93 | #endif 94 | 95 | int RAND_set_rand_method(const RAND_METHOD *meth); 96 | const RAND_METHOD *RAND_get_rand_method(void); 97 | #ifndef OPENSSL_NO_ENGINE 98 | int RAND_set_rand_engine(ENGINE *engine); 99 | #endif 100 | RAND_METHOD *RAND_SSLeay(void); 101 | void RAND_cleanup(void ); 102 | int RAND_bytes(unsigned char *buf,int num); 103 | int RAND_pseudo_bytes(unsigned char *buf,int num); 104 | void RAND_seed(const void *buf,int num); 105 | void RAND_add(const void *buf,int num,double entropy); 106 | int RAND_load_file(const char *file,long max_bytes); 107 | int RAND_write_file(const char *file); 108 | const char *RAND_file_name(char *file,size_t num); 109 | int RAND_status(void); 110 | int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); 111 | int RAND_egd(const char *path); 112 | int RAND_egd_bytes(const char *path,int bytes); 113 | int RAND_poll(void); 114 | 115 | #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) 116 | 117 | void RAND_screen(void); 118 | int RAND_event(UINT, WPARAM, LPARAM); 119 | 120 | #endif 121 | 122 | #ifdef OPENSSL_FIPS 123 | void RAND_set_fips_drbg_type(int type, int flags); 124 | int RAND_init_fips(void); 125 | #endif 126 | 127 | /* BEGIN ERROR CODES */ 128 | /* The following lines are auto generated by the script mkerr.pl. Any changes 129 | * made after this point may be overwritten when the script is next run. 130 | */ 131 | void ERR_load_RAND_strings(void); 132 | 133 | /* Error codes for the RAND functions. */ 134 | 135 | /* Function codes. */ 136 | #define RAND_F_RAND_GET_RAND_METHOD 101 137 | #define RAND_F_RAND_INIT_FIPS 102 138 | #define RAND_F_SSLEAY_RAND_BYTES 100 139 | 140 | /* Reason codes. */ 141 | #define RAND_R_ERROR_INITIALISING_DRBG 102 142 | #define RAND_R_ERROR_INSTANTIATING_DRBG 103 143 | #define RAND_R_NO_FIPS_RANDOM_METHOD_SET 101 144 | #define RAND_R_PRNG_NOT_SEEDED 100 145 | 146 | #ifdef __cplusplus 147 | } 148 | #endif 149 | #endif 150 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/rc2.h: -------------------------------------------------------------------------------- 1 | /* crypto/rc2/rc2.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC2_H 60 | #define HEADER_RC2_H 61 | 62 | #include /* OPENSSL_NO_RC2, RC2_INT */ 63 | #ifdef OPENSSL_NO_RC2 64 | #error RC2 is disabled. 65 | #endif 66 | 67 | #define RC2_ENCRYPT 1 68 | #define RC2_DECRYPT 0 69 | 70 | #define RC2_BLOCK 8 71 | #define RC2_KEY_LENGTH 16 72 | 73 | #ifdef __cplusplus 74 | extern "C" { 75 | #endif 76 | 77 | typedef struct rc2_key_st 78 | { 79 | RC2_INT data[64]; 80 | } RC2_KEY; 81 | 82 | #ifdef OPENSSL_FIPS 83 | void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); 84 | #endif 85 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); 86 | void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, 87 | int enc); 88 | void RC2_encrypt(unsigned long *data,RC2_KEY *key); 89 | void RC2_decrypt(unsigned long *data,RC2_KEY *key); 90 | void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 91 | RC2_KEY *ks, unsigned char *iv, int enc); 92 | void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, 93 | long length, RC2_KEY *schedule, unsigned char *ivec, 94 | int *num, int enc); 95 | void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, 96 | long length, RC2_KEY *schedule, unsigned char *ivec, 97 | int *num); 98 | 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif 104 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* crypto/rc4/rc4.h */ 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RC4_H 60 | #define HEADER_RC4_H 61 | 62 | #include /* OPENSSL_NO_RC4, RC4_INT */ 63 | #ifdef OPENSSL_NO_RC4 64 | #error RC4 is disabled. 65 | #endif 66 | 67 | #include 68 | 69 | #ifdef __cplusplus 70 | extern "C" { 71 | #endif 72 | 73 | typedef struct rc4_key_st 74 | { 75 | RC4_INT x,y; 76 | RC4_INT data[256]; 77 | } RC4_KEY; 78 | 79 | 80 | const char *RC4_options(void); 81 | void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 82 | void private_RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 83 | void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, 84 | unsigned char *outdata); 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | 90 | #endif 91 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/ripemd.h: -------------------------------------------------------------------------------- 1 | /* crypto/ripemd/ripemd.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_RIPEMD_H 60 | #define HEADER_RIPEMD_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | #ifdef OPENSSL_NO_RIPEMD 70 | #error RIPEMD is disabled. 71 | #endif 72 | 73 | #if defined(__LP32__) 74 | #define RIPEMD160_LONG unsigned long 75 | #elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__) 76 | #define RIPEMD160_LONG unsigned long 77 | #define RIPEMD160_LONG_LOG2 3 78 | #else 79 | #define RIPEMD160_LONG unsigned int 80 | #endif 81 | 82 | #define RIPEMD160_CBLOCK 64 83 | #define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 84 | #define RIPEMD160_DIGEST_LENGTH 20 85 | 86 | typedef struct RIPEMD160state_st 87 | { 88 | RIPEMD160_LONG A,B,C,D,E; 89 | RIPEMD160_LONG Nl,Nh; 90 | RIPEMD160_LONG data[RIPEMD160_LBLOCK]; 91 | unsigned int num; 92 | } RIPEMD160_CTX; 93 | 94 | #ifdef OPENSSL_FIPS 95 | int private_RIPEMD160_Init(RIPEMD160_CTX *c); 96 | #endif 97 | int RIPEMD160_Init(RIPEMD160_CTX *c); 98 | int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 99 | int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 100 | unsigned char *RIPEMD160(const unsigned char *d, size_t n, 101 | unsigned char *md); 102 | void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif 108 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/seed.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 KISA(Korea Information Security Agency). All rights reserved. 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 1. Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * 2. Neither the name of author nor the names of its contributors may 10 | * be used to endorse or promote products derived from this software 11 | * without specific prior written permission. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 14 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 17 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | * SUCH DAMAGE. 24 | * 25 | */ 26 | /* ==================================================================== 27 | * Copyright (c) 1998-2007 The OpenSSL Project. All rights reserved. 28 | * 29 | * Redistribution and use in source and binary forms, with or without 30 | * modification, are permitted provided that the following conditions 31 | * are met: 32 | * 33 | * 1. Redistributions of source code must retain the above copyright 34 | * notice, this list of conditions and the following disclaimer. 35 | * 36 | * 2. Redistributions in binary form must reproduce the above copyright 37 | * notice, this list of conditions and the following disclaimer in 38 | * the documentation and/or other materials provided with the 39 | * distribution. 40 | * 41 | * 3. All advertising materials mentioning features or use of this 42 | * software must display the following acknowledgment: 43 | * "This product includes software developed by the OpenSSL Project 44 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 45 | * 46 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 47 | * endorse or promote products derived from this software without 48 | * prior written permission. For written permission, please contact 49 | * openssl-core@openssl.org. 50 | * 51 | * 5. Products derived from this software may not be called "OpenSSL" 52 | * nor may "OpenSSL" appear in their names without prior written 53 | * permission of the OpenSSL Project. 54 | * 55 | * 6. Redistributions of any form whatsoever must retain the following 56 | * acknowledgment: 57 | * "This product includes software developed by the OpenSSL Project 58 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 59 | * 60 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 61 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 62 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 63 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 64 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 65 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 66 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 67 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 68 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 69 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 70 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 71 | * OF THE POSSIBILITY OF SUCH DAMAGE. 72 | * ==================================================================== 73 | * 74 | * This product includes cryptographic software written by Eric Young 75 | * (eay@cryptsoft.com). This product includes software written by Tim 76 | * Hudson (tjh@cryptsoft.com). 77 | * 78 | */ 79 | 80 | 81 | #ifndef HEADER_SEED_H 82 | #define HEADER_SEED_H 83 | 84 | #include 85 | #include 86 | #include 87 | 88 | #ifdef OPENSSL_NO_SEED 89 | #error SEED is disabled. 90 | #endif 91 | 92 | #ifdef AES_LONG /* look whether we need 'long' to get 32 bits */ 93 | # ifndef SEED_LONG 94 | # define SEED_LONG 1 95 | # endif 96 | #endif 97 | 98 | #if !defined(NO_SYS_TYPES_H) 99 | # include 100 | #endif 101 | 102 | #define SEED_BLOCK_SIZE 16 103 | #define SEED_KEY_LENGTH 16 104 | 105 | 106 | #ifdef __cplusplus 107 | extern "C" { 108 | #endif 109 | 110 | 111 | typedef struct seed_key_st { 112 | #ifdef SEED_LONG 113 | unsigned long data[32]; 114 | #else 115 | unsigned int data[32]; 116 | #endif 117 | } SEED_KEY_SCHEDULE; 118 | 119 | #ifdef OPENSSL_FIPS 120 | void private_SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks); 121 | #endif 122 | void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], SEED_KEY_SCHEDULE *ks); 123 | 124 | void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE], unsigned char d[SEED_BLOCK_SIZE], const SEED_KEY_SCHEDULE *ks); 125 | void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE], unsigned char d[SEED_BLOCK_SIZE], const SEED_KEY_SCHEDULE *ks); 126 | 127 | void SEED_ecb_encrypt(const unsigned char *in, unsigned char *out, const SEED_KEY_SCHEDULE *ks, int enc); 128 | void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, 129 | size_t len, const SEED_KEY_SCHEDULE *ks, unsigned char ivec[SEED_BLOCK_SIZE], int enc); 130 | void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out, 131 | size_t len, const SEED_KEY_SCHEDULE *ks, unsigned char ivec[SEED_BLOCK_SIZE], int *num, int enc); 132 | void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out, 133 | size_t len, const SEED_KEY_SCHEDULE *ks, unsigned char ivec[SEED_BLOCK_SIZE], int *num); 134 | 135 | #ifdef __cplusplus 136 | } 137 | #endif 138 | 139 | #endif /* HEADER_SEED_H */ 140 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/srp.h: -------------------------------------------------------------------------------- 1 | /* crypto/srp/srp.h */ 2 | /* Written by Christophe Renou (christophe.renou@edelweb.fr) with 3 | * the precious help of Peter Sylvester (peter.sylvester@edelweb.fr) 4 | * for the EdelKey project and contributed to the OpenSSL project 2004. 5 | */ 6 | /* ==================================================================== 7 | * Copyright (c) 2004 The OpenSSL Project. All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 16 | * 2. Redistributions in binary form must reproduce the above copyright 17 | * notice, this list of conditions and the following disclaimer in 18 | * the documentation and/or other materials provided with the 19 | * distribution. 20 | * 21 | * 3. All advertising materials mentioning features or use of this 22 | * software must display the following acknowledgment: 23 | * "This product includes software developed by the OpenSSL Project 24 | * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)" 25 | * 26 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 27 | * endorse or promote products derived from this software without 28 | * prior written permission. For written permission, please contact 29 | * licensing@OpenSSL.org. 30 | * 31 | * 5. Products derived from this software may not be called "OpenSSL" 32 | * nor may "OpenSSL" appear in their names without prior written 33 | * permission of the OpenSSL Project. 34 | * 35 | * 6. Redistributions of any form whatsoever must retain the following 36 | * acknowledgment: 37 | * "This product includes software developed by the OpenSSL Project 38 | * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)" 39 | * 40 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 41 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 43 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 44 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 46 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 47 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 49 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 50 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 51 | * OF THE POSSIBILITY OF SUCH DAMAGE. 52 | * ==================================================================== 53 | * 54 | * This product includes cryptographic software written by Eric Young 55 | * (eay@cryptsoft.com). This product includes software written by Tim 56 | * Hudson (tjh@cryptsoft.com). 57 | * 58 | */ 59 | #ifndef __SRP_H__ 60 | #define __SRP_H__ 61 | 62 | #ifndef OPENSSL_NO_SRP 63 | 64 | #include 65 | #include 66 | 67 | #ifdef __cplusplus 68 | extern "C" { 69 | #endif 70 | 71 | #include 72 | #include 73 | #include 74 | 75 | typedef struct SRP_gN_cache_st 76 | { 77 | char *b64_bn; 78 | BIGNUM *bn; 79 | } SRP_gN_cache; 80 | 81 | 82 | DECLARE_STACK_OF(SRP_gN_cache) 83 | 84 | typedef struct SRP_user_pwd_st 85 | { 86 | char *id; 87 | BIGNUM *s; 88 | BIGNUM *v; 89 | const BIGNUM *g; 90 | const BIGNUM *N; 91 | char *info; 92 | } SRP_user_pwd; 93 | 94 | DECLARE_STACK_OF(SRP_user_pwd) 95 | 96 | typedef struct SRP_VBASE_st 97 | { 98 | STACK_OF(SRP_user_pwd) *users_pwd; 99 | STACK_OF(SRP_gN_cache) *gN_cache; 100 | /* to simulate a user */ 101 | char *seed_key; 102 | BIGNUM *default_g; 103 | BIGNUM *default_N; 104 | } SRP_VBASE; 105 | 106 | 107 | /*Structure interne pour retenir les couples N et g*/ 108 | typedef struct SRP_gN_st 109 | { 110 | char *id; 111 | BIGNUM *g; 112 | BIGNUM *N; 113 | } SRP_gN; 114 | 115 | DECLARE_STACK_OF(SRP_gN) 116 | 117 | SRP_VBASE *SRP_VBASE_new(char *seed_key); 118 | int SRP_VBASE_free(SRP_VBASE *vb); 119 | int SRP_VBASE_init(SRP_VBASE *vb, char * verifier_file); 120 | SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username); 121 | char *SRP_create_verifier(const char *user, const char *pass, char **salt, 122 | char **verifier, const char *N, const char *g); 123 | int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt, BIGNUM **verifier, BIGNUM *N, BIGNUM *g); 124 | 125 | 126 | #define SRP_NO_ERROR 0 127 | #define SRP_ERR_VBASE_INCOMPLETE_FILE 1 128 | #define SRP_ERR_VBASE_BN_LIB 2 129 | #define SRP_ERR_OPEN_FILE 3 130 | #define SRP_ERR_MEMORY 4 131 | 132 | #define DB_srptype 0 133 | #define DB_srpverifier 1 134 | #define DB_srpsalt 2 135 | #define DB_srpid 3 136 | #define DB_srpgN 4 137 | #define DB_srpinfo 5 138 | #undef DB_NUMBER 139 | #define DB_NUMBER 6 140 | 141 | #define DB_SRP_INDEX 'I' 142 | #define DB_SRP_VALID 'V' 143 | #define DB_SRP_REVOKED 'R' 144 | #define DB_SRP_MODIF 'v' 145 | 146 | 147 | /* see srp.c */ 148 | char * SRP_check_known_gN_param(BIGNUM* g, BIGNUM* N); 149 | SRP_gN *SRP_get_default_gN(const char * id) ; 150 | 151 | /* server side .... */ 152 | BIGNUM *SRP_Calc_server_key(BIGNUM *A, BIGNUM *v, BIGNUM *u, BIGNUM *b, BIGNUM *N); 153 | BIGNUM *SRP_Calc_B(BIGNUM *b, BIGNUM *N, BIGNUM *g, BIGNUM *v); 154 | int SRP_Verify_A_mod_N(BIGNUM *A, BIGNUM *N); 155 | BIGNUM *SRP_Calc_u(BIGNUM *A, BIGNUM *B, BIGNUM *N) ; 156 | 157 | 158 | 159 | /* client side .... */ 160 | BIGNUM *SRP_Calc_x(BIGNUM *s, const char *user, const char *pass); 161 | BIGNUM *SRP_Calc_A(BIGNUM *a, BIGNUM *N, BIGNUM *g); 162 | BIGNUM *SRP_Calc_client_key(BIGNUM *N, BIGNUM *B, BIGNUM *g, BIGNUM *x, BIGNUM *a, BIGNUM *u); 163 | int SRP_Verify_B_mod_N(BIGNUM *B, BIGNUM *N); 164 | 165 | #define SRP_MINIMAL_N 1024 166 | 167 | #ifdef __cplusplus 168 | } 169 | #endif 170 | 171 | #endif 172 | #endif 173 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/srtp.h: -------------------------------------------------------------------------------- 1 | /* ssl/tls1.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | /* ==================================================================== 59 | * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 60 | * 61 | * Redistribution and use in source and binary forms, with or without 62 | * modification, are permitted provided that the following conditions 63 | * are met: 64 | * 65 | * 1. Redistributions of source code must retain the above copyright 66 | * notice, this list of conditions and the following disclaimer. 67 | * 68 | * 2. Redistributions in binary form must reproduce the above copyright 69 | * notice, this list of conditions and the following disclaimer in 70 | * the documentation and/or other materials provided with the 71 | * distribution. 72 | * 73 | * 3. All advertising materials mentioning features or use of this 74 | * software must display the following acknowledgment: 75 | * "This product includes software developed by the OpenSSL Project 76 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 77 | * 78 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 79 | * endorse or promote products derived from this software without 80 | * prior written permission. For written permission, please contact 81 | * openssl-core@openssl.org. 82 | * 83 | * 5. Products derived from this software may not be called "OpenSSL" 84 | * nor may "OpenSSL" appear in their names without prior written 85 | * permission of the OpenSSL Project. 86 | * 87 | * 6. Redistributions of any form whatsoever must retain the following 88 | * acknowledgment: 89 | * "This product includes software developed by the OpenSSL Project 90 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 91 | * 92 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 93 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 94 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 95 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 96 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 97 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 98 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 99 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 100 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 101 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 102 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 103 | * OF THE POSSIBILITY OF SUCH DAMAGE. 104 | * ==================================================================== 105 | * 106 | * This product includes cryptographic software written by Eric Young 107 | * (eay@cryptsoft.com). This product includes software written by Tim 108 | * Hudson (tjh@cryptsoft.com). 109 | * 110 | */ 111 | /* 112 | DTLS code by Eric Rescorla 113 | 114 | Copyright (C) 2006, Network Resonance, Inc. 115 | Copyright (C) 2011, RTFM, Inc. 116 | */ 117 | 118 | #ifndef HEADER_D1_SRTP_H 119 | #define HEADER_D1_SRTP_H 120 | 121 | #ifdef __cplusplus 122 | extern "C" { 123 | #endif 124 | 125 | 126 | #define SRTP_AES128_CM_SHA1_80 0x0001 127 | #define SRTP_AES128_CM_SHA1_32 0x0002 128 | #define SRTP_AES128_F8_SHA1_80 0x0003 129 | #define SRTP_AES128_F8_SHA1_32 0x0004 130 | #define SRTP_NULL_SHA1_80 0x0005 131 | #define SRTP_NULL_SHA1_32 0x0006 132 | 133 | int SSL_CTX_set_tlsext_use_srtp(SSL_CTX *ctx, const char *profiles); 134 | int SSL_set_tlsext_use_srtp(SSL *ctx, const char *profiles); 135 | SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); 136 | 137 | STACK_OF(SRTP_PROTECTION_PROFILE) *SSL_get_srtp_profiles(SSL *ssl); 138 | SRTP_PROTECTION_PROFILE *SSL_get_selected_srtp_profile(SSL *s); 139 | 140 | #ifdef __cplusplus 141 | } 142 | #endif 143 | 144 | #endif 145 | 146 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/ssl23.h: -------------------------------------------------------------------------------- 1 | /* ssl/ssl23.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_SSL23_H 60 | #define HEADER_SSL23_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | /*client */ 67 | /* write to server */ 68 | #define SSL23_ST_CW_CLNT_HELLO_A (0x210|SSL_ST_CONNECT) 69 | #define SSL23_ST_CW_CLNT_HELLO_B (0x211|SSL_ST_CONNECT) 70 | /* read from server */ 71 | #define SSL23_ST_CR_SRVR_HELLO_A (0x220|SSL_ST_CONNECT) 72 | #define SSL23_ST_CR_SRVR_HELLO_B (0x221|SSL_ST_CONNECT) 73 | 74 | /* server */ 75 | /* read from client */ 76 | #define SSL23_ST_SR_CLNT_HELLO_A (0x210|SSL_ST_ACCEPT) 77 | #define SSL23_ST_SR_CLNT_HELLO_B (0x211|SSL_ST_ACCEPT) 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | 84 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/stack.h: -------------------------------------------------------------------------------- 1 | /* crypto/stack/stack.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_STACK_H 60 | #define HEADER_STACK_H 61 | 62 | #ifdef __cplusplus 63 | extern "C" { 64 | #endif 65 | 66 | typedef struct stack_st 67 | { 68 | int num; 69 | char **data; 70 | int sorted; 71 | 72 | int num_alloc; 73 | int (*comp)(const void *, const void *); 74 | } _STACK; /* Use STACK_OF(...) instead */ 75 | 76 | #define M_sk_num(sk) ((sk) ? (sk)->num:-1) 77 | #define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) 78 | 79 | int sk_num(const _STACK *); 80 | void *sk_value(const _STACK *, int); 81 | 82 | void *sk_set(_STACK *, int, void *); 83 | 84 | _STACK *sk_new(int (*cmp)(const void *, const void *)); 85 | _STACK *sk_new_null(void); 86 | void sk_free(_STACK *); 87 | void sk_pop_free(_STACK *st, void (*func)(void *)); 88 | int sk_insert(_STACK *sk, void *data, int where); 89 | void *sk_delete(_STACK *st, int loc); 90 | void *sk_delete_ptr(_STACK *st, void *p); 91 | int sk_find(_STACK *st, void *data); 92 | int sk_find_ex(_STACK *st, void *data); 93 | int sk_push(_STACK *st, void *data); 94 | int sk_unshift(_STACK *st, void *data); 95 | void *sk_shift(_STACK *st); 96 | void *sk_pop(_STACK *st); 97 | void sk_zero(_STACK *st); 98 | int (*sk_set_cmp_func(_STACK *sk, int (*c)(const void *, const void *))) 99 | (const void *, const void *); 100 | _STACK *sk_dup(_STACK *st); 101 | void sk_sort(_STACK *st); 102 | int sk_is_sorted(const _STACK *st); 103 | 104 | #ifdef __cplusplus 105 | } 106 | #endif 107 | 108 | #endif 109 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/txt_db.h: -------------------------------------------------------------------------------- 1 | /* crypto/txt_db/txt_db.h */ 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 | * All rights reserved. 4 | * 5 | * This package is an SSL implementation written 6 | * by Eric Young (eay@cryptsoft.com). 7 | * The implementation was written so as to conform with Netscapes SSL. 8 | * 9 | * This library is free for commercial and non-commercial use as long as 10 | * the following conditions are aheared to. The following conditions 11 | * apply to all code found in this distribution, be it the RC4, RSA, 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation 13 | * included with this distribution is covered by the same copyright terms 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). 15 | * 16 | * Copyright remains Eric Young's, and as such any Copyright notices in 17 | * the code are not to be removed. 18 | * If this package is used in a product, Eric Young should be given attribution 19 | * as the author of the parts of the library used. 20 | * This can be in the form of a textual message at program startup or 21 | * in documentation (online or textual) provided with the package. 22 | * 23 | * Redistribution and use in source and binary forms, with or without 24 | * modification, are permitted provided that the following conditions 25 | * are met: 26 | * 1. Redistributions of source code must retain the copyright 27 | * notice, this list of conditions and the following disclaimer. 28 | * 2. Redistributions in binary form must reproduce the above copyright 29 | * notice, this list of conditions and the following disclaimer in the 30 | * documentation and/or other materials provided with the distribution. 31 | * 3. All advertising materials mentioning features or use of this software 32 | * must display the following acknowledgement: 33 | * "This product includes cryptographic software written by 34 | * Eric Young (eay@cryptsoft.com)" 35 | * The word 'cryptographic' can be left out if the rouines from the library 36 | * being used are not cryptographic related :-). 37 | * 4. If you include any Windows specific code (or a derivative thereof) from 38 | * the apps directory (application code) you must include an acknowledgement: 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 40 | * 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 51 | * SUCH DAMAGE. 52 | * 53 | * The licence and distribution terms for any publically available version or 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be 55 | * copied and put under another distribution licence 56 | * [including the GNU Public Licence.] 57 | */ 58 | 59 | #ifndef HEADER_TXT_DB_H 60 | #define HEADER_TXT_DB_H 61 | 62 | #include 63 | #ifndef OPENSSL_NO_BIO 64 | #include 65 | #endif 66 | #include 67 | #include 68 | 69 | #define DB_ERROR_OK 0 70 | #define DB_ERROR_MALLOC 1 71 | #define DB_ERROR_INDEX_CLASH 2 72 | #define DB_ERROR_INDEX_OUT_OF_RANGE 3 73 | #define DB_ERROR_NO_INDEX 4 74 | #define DB_ERROR_INSERT_INDEX_CLASH 5 75 | 76 | #ifdef __cplusplus 77 | extern "C" { 78 | #endif 79 | 80 | typedef OPENSSL_STRING *OPENSSL_PSTRING; 81 | DECLARE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING) 82 | 83 | typedef struct txt_db_st 84 | { 85 | int num_fields; 86 | STACK_OF(OPENSSL_PSTRING) *data; 87 | LHASH_OF(OPENSSL_STRING) **index; 88 | int (**qual)(OPENSSL_STRING *); 89 | long error; 90 | long arg1; 91 | long arg2; 92 | OPENSSL_STRING *arg_row; 93 | } TXT_DB; 94 | 95 | #ifndef OPENSSL_NO_BIO 96 | TXT_DB *TXT_DB_read(BIO *in, int num); 97 | long TXT_DB_write(BIO *out, TXT_DB *db); 98 | #else 99 | TXT_DB *TXT_DB_read(char *in, int num); 100 | long TXT_DB_write(char *out, TXT_DB *db); 101 | #endif 102 | int TXT_DB_create_index(TXT_DB *db,int field,int (*qual)(OPENSSL_STRING *), 103 | LHASH_HASH_FN_TYPE hash, LHASH_COMP_FN_TYPE cmp); 104 | void TXT_DB_free(TXT_DB *db); 105 | OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx, OPENSSL_STRING *value); 106 | int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/ui_compat.h: -------------------------------------------------------------------------------- 1 | /* crypto/ui/ui.h -*- mode:C; c-file-style: "eay" -*- */ 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 3 | * project 2001. 4 | */ 5 | /* ==================================================================== 6 | * Copyright (c) 2001 The OpenSSL Project. All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in 17 | * the documentation and/or other materials provided with the 18 | * distribution. 19 | * 20 | * 3. All advertising materials mentioning features or use of this 21 | * software must display the following acknowledgment: 22 | * "This product includes software developed by the OpenSSL Project 23 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 24 | * 25 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 26 | * endorse or promote products derived from this software without 27 | * prior written permission. For written permission, please contact 28 | * openssl-core@openssl.org. 29 | * 30 | * 5. Products derived from this software may not be called "OpenSSL" 31 | * nor may "OpenSSL" appear in their names without prior written 32 | * permission of the OpenSSL Project. 33 | * 34 | * 6. Redistributions of any form whatsoever must retain the following 35 | * acknowledgment: 36 | * "This product includes software developed by the OpenSSL Project 37 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 38 | * 39 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 40 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 41 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 42 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 43 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 44 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 45 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 46 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 48 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 49 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50 | * OF THE POSSIBILITY OF SUCH DAMAGE. 51 | * ==================================================================== 52 | * 53 | * This product includes cryptographic software written by Eric Young 54 | * (eay@cryptsoft.com). This product includes software written by Tim 55 | * Hudson (tjh@cryptsoft.com). 56 | * 57 | */ 58 | 59 | #ifndef HEADER_UI_COMPAT_H 60 | #define HEADER_UI_COMPAT_H 61 | 62 | #include 63 | #include 64 | 65 | #ifdef __cplusplus 66 | extern "C" { 67 | #endif 68 | 69 | /* The following functions were previously part of the DES section, 70 | and are provided here for backward compatibility reasons. */ 71 | 72 | #define des_read_pw_string(b,l,p,v) \ 73 | _ossl_old_des_read_pw_string((b),(l),(p),(v)) 74 | #define des_read_pw(b,bf,s,p,v) \ 75 | _ossl_old_des_read_pw((b),(bf),(s),(p),(v)) 76 | 77 | int _ossl_old_des_read_pw_string(char *buf,int length,const char *prompt,int verify); 78 | int _ossl_old_des_read_pw(char *buf,char *buff,int size,const char *prompt,int verify); 79 | 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #endif 84 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/include/openssl/whrlpool.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADER_WHRLPOOL_H 2 | #define HEADER_WHRLPOOL_H 3 | 4 | #include 5 | #include 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define WHIRLPOOL_DIGEST_LENGTH (512/8) 12 | #define WHIRLPOOL_BBLOCK 512 13 | #define WHIRLPOOL_COUNTER (256/8) 14 | 15 | typedef struct { 16 | union { 17 | unsigned char c[WHIRLPOOL_DIGEST_LENGTH]; 18 | /* double q is here to ensure 64-bit alignment */ 19 | double q[WHIRLPOOL_DIGEST_LENGTH/sizeof(double)]; 20 | } H; 21 | unsigned char data[WHIRLPOOL_BBLOCK/8]; 22 | unsigned int bitoff; 23 | size_t bitlen[WHIRLPOOL_COUNTER/sizeof(size_t)]; 24 | } WHIRLPOOL_CTX; 25 | 26 | #ifndef OPENSSL_NO_WHIRLPOOL 27 | #ifdef OPENSSL_FIPS 28 | int private_WHIRLPOOL_Init(WHIRLPOOL_CTX *c); 29 | #endif 30 | int WHIRLPOOL_Init (WHIRLPOOL_CTX *c); 31 | int WHIRLPOOL_Update (WHIRLPOOL_CTX *c,const void *inp,size_t bytes); 32 | void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,const void *inp,size_t bits); 33 | int WHIRLPOOL_Final (unsigned char *md,WHIRLPOOL_CTX *c); 34 | unsigned char *WHIRLPOOL(const void *inp,size_t bytes,unsigned char *md); 35 | #endif 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /LMVideoTest/librtmp/lib/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvming6816077/LMVideoTest/a2d26791fb1fa1375f8645d4403ba2549115ca77/LMVideoTest/librtmp/lib/libcrypto.a -------------------------------------------------------------------------------- /LMVideoTest/librtmp/lib/librtmp.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvming6816077/LMVideoTest/a2d26791fb1fa1375f8645d4403ba2549115ca77/LMVideoTest/librtmp/lib/librtmp.a -------------------------------------------------------------------------------- /LMVideoTest/librtmp/lib/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvming6816077/LMVideoTest/a2d26791fb1fa1375f8645d4403ba2549115ca77/LMVideoTest/librtmp/lib/libssl.a -------------------------------------------------------------------------------- /LMVideoTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LMVideoTest 4 | // 5 | // Created by lvming on 16/5/23. 6 | // Copyright © 2016年 lvming. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LMVideoTest/x264/include/x264_config.h: -------------------------------------------------------------------------------- 1 | #define X264_BIT_DEPTH 8 2 | #define X264_GPL 1 3 | #define X264_INTERLACED 1 4 | #define X264_CHROMA_FORMAT 0 5 | #define X264_VERSION "x264-snapshot-20140930-2245" 6 | #define X264_POINTVER "0.142.x" 7 | -------------------------------------------------------------------------------- /LMVideoTest/x264/libx264.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lvming6816077/LMVideoTest/a2d26791fb1fa1375f8645d4403ba2549115ca77/LMVideoTest/x264/libx264.a -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LMVideoTest 2 | ios采集音视频数据并通过rtmp上传到nginx 3 | 4 | ### 说明 5 | 本demo是利用ios客户端采集音视频数据并通过rtmp上传到nginx服务器上,html5页面可以通过video标签引入.m3u8文件即可播放直播视频。 6 | 7 | ### 相关博文 8 | http://www.alloyteam.com/2016/05/h5-camera-literacy/ 9 | 10 | 如果对你有用,可以给个star👍 11 | 12 | -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | 2 | #user nobody; 3 | worker_processes 1; 4 | 5 | #error_log logs/error.log; 6 | #error_log logs/error.log notice; 7 | #error_log logs/error.log info; 8 | 9 | #pid logs/nginx.pid; 10 | 11 | 12 | events { 13 | worker_connections 1024; 14 | } 15 | 16 | rtmp { 17 | 18 | server { 19 | 20 | listen 1935; #监听的端口 21 | 22 | chunk_size 4000; 23 | 24 | 25 | application hls { #rtmp推流请求路径 26 | live on; 27 | hls on; 28 | hls_path /usr/local/var/www/hls; 29 | hls_fragment 5s; 30 | } 31 | } 32 | } 33 | 34 | http { 35 | include mime.types; 36 | default_type application/octet-stream; 37 | 38 | #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 39 | # '$status $body_bytes_sent "$http_referer" ' 40 | # '"$http_user_agent" "$http_x_forwarded_for"'; 41 | 42 | #access_log logs/access.log main; 43 | 44 | sendfile on; 45 | #tcp_nopush on; 46 | 47 | #keepalive_timeout 0; 48 | keepalive_timeout 65; 49 | 50 | #gzip on; 51 | 52 | server { 53 | listen 8080; 54 | server_name localhost; 55 | 56 | #charset koi8-r; 57 | 58 | #access_log logs/host.access.log main; 59 | 60 | location / { 61 | root html; 62 | index index.html index.htm; 63 | } 64 | location /hls { 65 | # Serve HLS fragments 66 | types { 67 | application/vnd.apple.mpegurl m3u8; 68 | video/mp2t ts; 69 | } 70 | root html; 71 | expires -1; 72 | } 73 | #error_page 404 /404.html; 74 | 75 | # redirect server error pages to the static page /50x.html 76 | # 77 | error_page 500 502 503 504 /50x.html; 78 | location = /50x.html { 79 | root html; 80 | } 81 | 82 | # proxy the PHP scripts to Apache listening on 127.0.0.1:80 83 | # 84 | #location ~ \.php$ { 85 | # proxy_pass http://127.0.0.1; 86 | #} 87 | 88 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 89 | # 90 | #location ~ \.php$ { 91 | # root html; 92 | # fastcgi_pass 127.0.0.1:9000; 93 | # fastcgi_index index.php; 94 | # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 95 | # include fastcgi_params; 96 | #} 97 | 98 | # deny access to .htaccess files, if Apache's document root 99 | # concurs with nginx's one 100 | # 101 | #location ~ /\.ht { 102 | # deny all; 103 | #} 104 | } 105 | 106 | 107 | # another virtual host using mix of IP-, name-, and port-based configuration 108 | # 109 | #server { 110 | # listen 8000; 111 | # listen somename:8080; 112 | # server_name somename alias another.alias; 113 | 114 | # location / { 115 | # root html; 116 | # index index.html index.htm; 117 | # } 118 | #} 119 | 120 | 121 | # HTTPS server 122 | # 123 | #server { 124 | # listen 443 ssl; 125 | # server_name localhost; 126 | 127 | # ssl_certificate cert.pem; 128 | # ssl_certificate_key cert.key; 129 | 130 | # ssl_session_cache shared:SSL:1m; 131 | # ssl_session_timeout 5m; 132 | 133 | # ssl_ciphers HIGH:!aNULL:!MD5; 134 | # ssl_prefer_server_ciphers on; 135 | 136 | # location / { 137 | # root html; 138 | # index index.html index.htm; 139 | # } 140 | #} 141 | include servers/*; 142 | } 143 | --------------------------------------------------------------------------------