android_media_MediaHTTPConnection.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright 2013, The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef _ANDROID_MEDIA_MEDIAHTTPCONNECTION_H_
  17. #define _ANDROID_MEDIA_MEDIAHTTPCONNECTION_H_
  18. #include "jni.h"
  19. #include <media/stagefright/foundation/ABase.h>
  20. #include <utils/RefBase.h>
  21. namespace android {
  22. class IMemory;
  23. class MemoryDealer;
  24. struct JMediaHTTPConnection : public RefBase {
  25. enum {
  26. kBufferSize = 32768,
  27. };
  28. JMediaHTTPConnection(JNIEnv *env, jobject thiz);
  29. sp<IMemory> getIMemory();
  30. jbyteArray getByteArrayObj();
  31. protected:
  32. virtual ~JMediaHTTPConnection();
  33. private:
  34. jclass mClass;
  35. jweak mObject;
  36. jbyteArray mByteArrayObj;
  37. sp<MemoryDealer> mDealer;
  38. sp<IMemory> mMemory;
  39. DISALLOW_EVIL_CONSTRUCTORS(JMediaHTTPConnection);
  40. };
  41. } // namespace android
  42. #endif // _ANDROID_MEDIA_MEDIAHTTPCONNECTION_H_