| /* |
| * Copyright (C) 2021 The Android Open Source Project |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| #include <stdlib.h> |
| #include <APacketSource.h> |
| #include <ASessionDescription.h> |
| |
| using namespace android; |
| |
| int main(void) { |
| sp<ASessionDescription> desc = new ASessionDescription; |
| static const char *raw = |
| "m=mFormats 20\r\n" |
| "a=rtpmap:20 MP4V-ES/1/2\r\n" |
| "a=fmtp:20 config=0000012000004000280020008061616161616161616161616161" |
| "61616161616161616161616161616161616161616161616161616161616161616161" |
| "61616161616161616161616161616161616161616161616161616161616161616161" |
| "616161616161616161616161616161616161616161616161616161\r\n" |
| "a=range:npt=1.1-2.2\r\n" |
| "a=framesize:1-9 \r\n" |
| "a=control:abc\r\n" |
| "a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r\n"; |
| |
| if(!desc->setTo(raw, strlen(raw))) { |
| return EXIT_FAILURE; |
| } |
| |
| sp<APacketSource> source = new APacketSource(desc, 1); |
| return EXIT_SUCCESS; |
| } |