├── README.md
├── RtspCamera
├── .classpath
├── .gitignore
├── .project
├── .settings
│ └── org.jboss.ide.eclipse.as.core.prefs
├── AndroidManifest.xml
├── docs
│ └── wire-udp4000-h264-with-inband-sps.pps-nativeencoder.pcap
├── gpl.txt
├── jni
│ ├── Android.mk
│ ├── Application.mk
│ ├── avc_h264
│ │ ├── Android.mk
│ │ ├── common
│ │ │ ├── include
│ │ │ │ ├── avcapi_common.h
│ │ │ │ ├── avcint_common.h
│ │ │ │ └── avclib_common.h
│ │ │ └── src
│ │ │ │ ├── deblock.cpp
│ │ │ │ ├── dpb.cpp
│ │ │ │ ├── fmo.cpp
│ │ │ │ ├── mb_access.cpp
│ │ │ │ └── reflist.cpp
│ │ ├── dec
│ │ │ ├── Android.mk
│ │ │ ├── include
│ │ │ │ ├── avcdec_api.h
│ │ │ │ ├── pvavcdecoder.h
│ │ │ │ ├── pvavcdecoder_factory.h
│ │ │ │ └── pvavcdecoderinterface.h
│ │ │ └── src
│ │ │ │ ├── 3GPVideoParser.cpp
│ │ │ │ ├── 3GPVideoParser.h
│ │ │ │ ├── NativeH264Decoder.cpp
│ │ │ │ ├── NativeH264Decoder.h
│ │ │ │ ├── avc_bitstream.cpp
│ │ │ │ ├── avcdec_api.cpp
│ │ │ │ ├── avcdec_bitstream.h
│ │ │ │ ├── avcdec_int.h
│ │ │ │ ├── avcdec_lib.h
│ │ │ │ ├── header.cpp
│ │ │ │ ├── itrans.cpp
│ │ │ │ ├── pred_inter.cpp
│ │ │ │ ├── pred_intra.cpp
│ │ │ │ ├── pvavcdecoder.cpp
│ │ │ │ ├── pvavcdecoder_factory.cpp
│ │ │ │ ├── residual.cpp
│ │ │ │ ├── slice.cpp
│ │ │ │ ├── vlc.cpp
│ │ │ │ ├── yuv2rgb.cpp
│ │ │ │ └── yuv2rgb.h
│ │ ├── enc
│ │ │ ├── Android.mk
│ │ │ ├── include
│ │ │ │ ├── pvavcencoder.h
│ │ │ │ ├── pvavcencoder_factory.h
│ │ │ │ └── pvavcencoderinterface.h
│ │ │ └── src
│ │ │ │ ├── NativeH264Encoder.cpp
│ │ │ │ ├── NativeH264Encoder.cpp__orig
│ │ │ │ ├── NativeH264Encoder.h
│ │ │ │ ├── avcenc_api.cpp
│ │ │ │ ├── avcenc_api.h
│ │ │ │ ├── avcenc_int.h
│ │ │ │ ├── avcenc_lib.h
│ │ │ │ ├── bitstream_io.cpp
│ │ │ │ ├── block.cpp
│ │ │ │ ├── findhalfpel.cpp
│ │ │ │ ├── header.cpp
│ │ │ │ ├── init.cpp
│ │ │ │ ├── intra_est.cpp
│ │ │ │ ├── motion_comp.cpp
│ │ │ │ ├── motion_est.cpp
│ │ │ │ ├── pvavcencoder.cpp
│ │ │ │ ├── pvavcencoder_factory.cpp
│ │ │ │ ├── rate_control.cpp
│ │ │ │ ├── residual.cpp
│ │ │ │ ├── sad.cpp
│ │ │ │ ├── sad_halfpel.cpp
│ │ │ │ ├── sad_halfpel_inline.h
│ │ │ │ ├── sad_inline.h
│ │ │ │ ├── sad_mb_offset.h
│ │ │ │ ├── slice.cpp
│ │ │ │ └── vlc_encode.cpp
│ │ └── oscl
│ │ │ ├── oscl_base.h
│ │ │ ├── oscl_base_macros.h
│ │ │ ├── oscl_config.h
│ │ │ ├── oscl_dll.h
│ │ │ ├── oscl_error.h
│ │ │ ├── oscl_error_codes.h
│ │ │ ├── oscl_exception.h
│ │ │ ├── oscl_math.h
│ │ │ ├── oscl_mem.h
│ │ │ ├── oscl_string.h
│ │ │ ├── oscl_types.h
│ │ │ └── osclconfig_compiler_warnings.h
│ └── m4v_h263
│ │ ├── Android.mk
│ │ ├── dec
│ │ ├── Android.mk
│ │ ├── include
│ │ │ ├── mp4dec_api.h
│ │ │ ├── pvm4vdecoder.h
│ │ │ ├── pvm4vdecoder_dpi.h
│ │ │ ├── pvm4vdecoder_factory.h
│ │ │ ├── pvvideodecoderinterface.h
│ │ │ └── visual_header.h
│ │ ├── oscl
│ │ │ ├── oscl_base.h
│ │ │ ├── oscl_base_macros.h
│ │ │ ├── oscl_config.h
│ │ │ ├── oscl_dll.h
│ │ │ ├── oscl_error.h
│ │ │ ├── oscl_error_codes.h
│ │ │ ├── oscl_exception.h
│ │ │ ├── oscl_math.h
│ │ │ ├── oscl_mem.h
│ │ │ ├── oscl_types.h
│ │ │ └── osclconfig_compiler_warnings.h
│ │ └── src
│ │ │ ├── 3GPVideoParser.cpp
│ │ │ ├── 3GPVideoParser.h
│ │ │ ├── adaptive_smooth_no_mmx.cpp
│ │ │ ├── bitstream.cpp
│ │ │ ├── bitstream.h
│ │ │ ├── block_idct.cpp
│ │ │ ├── cal_dc_scaler.cpp
│ │ │ ├── chv_filter.cpp
│ │ │ ├── chvr_filter.cpp
│ │ │ ├── com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_decoder_NativeH263Decoder.cpp
│ │ │ ├── com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_decoder_NativeH263Decoder.h
│ │ │ ├── combined_decode.cpp
│ │ │ ├── conceal.cpp
│ │ │ ├── datapart_decode.cpp
│ │ │ ├── dcac_prediction.cpp
│ │ │ ├── dec_pred_intra_dc.cpp
│ │ │ ├── deringing_chroma.cpp
│ │ │ ├── deringing_luma.cpp
│ │ │ ├── find_min_max.cpp
│ │ │ ├── get_pred_adv_b_add.cpp
│ │ │ ├── get_pred_outside.cpp
│ │ │ ├── idct.cpp
│ │ │ ├── idct.h
│ │ │ ├── idct_vca.cpp
│ │ │ ├── max_level.h
│ │ │ ├── mb_motion_comp.cpp
│ │ │ ├── mb_utils.cpp
│ │ │ ├── mbtype_mode.h
│ │ │ ├── motion_comp.h
│ │ │ ├── mp4dec_lib.h
│ │ │ ├── mp4def.h
│ │ │ ├── mp4lib_int.h
│ │ │ ├── packet_util.cpp
│ │ │ ├── post_filter.cpp
│ │ │ ├── post_proc.h
│ │ │ ├── post_proc_semaphore.cpp
│ │ │ ├── pp_semaphore_chroma_inter.cpp
│ │ │ ├── pp_semaphore_luma.cpp
│ │ │ ├── pvdec_api.cpp
│ │ │ ├── pvm4vdecoder.cpp
│ │ │ ├── pvm4vdecoder_factory.cpp
│ │ │ ├── scaling.h
│ │ │ ├── scaling_tab.cpp
│ │ │ ├── vlc_dec_tab.h
│ │ │ ├── vlc_decode.cpp
│ │ │ ├── vlc_decode.h
│ │ │ ├── vlc_dequant.cpp
│ │ │ ├── vlc_tab.cpp
│ │ │ ├── vop.cpp
│ │ │ ├── yuv2rgb.cpp
│ │ │ ├── yuv2rgb.h
│ │ │ ├── zigzag.h
│ │ │ └── zigzag_tab.cpp
│ │ └── enc
│ │ ├── Android.mk
│ │ ├── include
│ │ ├── cvei.h
│ │ ├── mp4enc_api.h
│ │ └── pvm4vencoder.h
│ │ ├── oscl
│ │ ├── oscl_base.h
│ │ ├── oscl_base_macros.h
│ │ ├── oscl_config.h
│ │ ├── oscl_dll.h
│ │ ├── oscl_error.h
│ │ ├── oscl_error_codes.h
│ │ ├── oscl_exception.h
│ │ ├── oscl_math.h
│ │ ├── oscl_mem.h
│ │ ├── oscl_types.h
│ │ └── osclconfig_compiler_warnings.h
│ │ └── src
│ │ ├── bitstream_io.cpp
│ │ ├── bitstream_io.h
│ │ ├── com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder.cpp
│ │ ├── com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder.h
│ │ ├── combined_encode.cpp
│ │ ├── datapart_encode.cpp
│ │ ├── dct.cpp
│ │ ├── dct.h
│ │ ├── dct_inline.h
│ │ ├── fastcodemb.cpp
│ │ ├── fastcodemb.h
│ │ ├── fastidct.cpp
│ │ ├── fastquant.cpp
│ │ ├── fastquant_inline.h
│ │ ├── findhalfpel.cpp
│ │ ├── m4venc_oscl.h
│ │ ├── me_utils.cpp
│ │ ├── motion_comp.cpp
│ │ ├── motion_est.cpp
│ │ ├── mp4def.h
│ │ ├── mp4enc_api.cpp
│ │ ├── mp4enc_api.cpp.original
│ │ ├── mp4enc_lib.h
│ │ ├── mp4lib_int.h
│ │ ├── pvm4vencoder.cpp
│ │ ├── rate_control.cpp
│ │ ├── rate_control.h
│ │ ├── sad.cpp
│ │ ├── sad_halfpel.cpp
│ │ ├── sad_halfpel_inline.h
│ │ ├── sad_inline.h
│ │ ├── sad_mb_offset.h
│ │ ├── vlc_enc_tab.h
│ │ ├── vlc_encode.cpp
│ │ ├── vlc_encode.h
│ │ ├── vlc_encode_inline.h
│ │ └── vop.cpp
├── libs
│ └── armeabi
│ │ ├── libH263Decoder.so
│ │ ├── libH263Encoder.so
│ │ ├── libH264Decoder.so
│ │ └── libH264Encoder.so
├── proguard.cfg
├── project.properties
├── res
│ ├── drawable-hdpi
│ │ └── icon.png
│ ├── drawable-ldpi
│ │ └── icon.png
│ ├── drawable-mdpi
│ │ └── icon.png
│ ├── layout
│ │ ├── cameraapicodecs.xml
│ │ └── cameranativecodecs.xml
│ └── values
│ │ └── strings.xml
└── src
│ ├── com
│ └── orangelabs
│ │ └── rcs
│ │ ├── core
│ │ ├── CoreException.java
│ │ └── ims
│ │ │ └── protocol
│ │ │ └── rtp
│ │ │ ├── CodecChain.java
│ │ │ ├── MediaRegistry.java
│ │ │ ├── MediaRtpReceiver.java
│ │ │ ├── Processor.java
│ │ │ ├── RtpException.java
│ │ │ ├── codec
│ │ │ ├── Codec.java
│ │ │ └── video
│ │ │ │ ├── VideoCodec.java
│ │ │ │ ├── h263
│ │ │ │ ├── H263Config.java
│ │ │ │ ├── H263RtpHeader.java
│ │ │ │ ├── JavaDepacketizer.java
│ │ │ │ ├── JavaPacketizer.java
│ │ │ │ ├── decoder
│ │ │ │ │ ├── NativeH263Decoder.java
│ │ │ │ │ └── VideoSample.java
│ │ │ │ └── encoder
│ │ │ │ │ ├── NativeH263Encoder.java
│ │ │ │ │ └── NativeH263EncoderParams.java
│ │ │ │ └── h264
│ │ │ │ ├── H264Config.java
│ │ │ │ ├── decoder
│ │ │ │ └── NativeH264Decoder.java
│ │ │ │ └── encoder
│ │ │ │ └── NativeH264Encoder.java
│ │ │ ├── core
│ │ │ ├── RtcpAppPacket.java
│ │ │ ├── RtcpByePacket.java
│ │ │ ├── RtcpCompoundPacket.java
│ │ │ ├── RtcpPacket.java
│ │ │ ├── RtcpPacketReceiver.java
│ │ │ ├── RtcpPacketTransmitter.java
│ │ │ ├── RtcpPacketUtils.java
│ │ │ ├── RtcpReceiverReportPacket.java
│ │ │ ├── RtcpReport.java
│ │ │ ├── RtcpSdesBlock.java
│ │ │ ├── RtcpSdesItem.java
│ │ │ ├── RtcpSdesPacket.java
│ │ │ ├── RtcpSenderReportPacket.java
│ │ │ ├── RtcpSession.java
│ │ │ ├── RtcpStatisticsReceiver.java
│ │ │ ├── RtcpStatisticsTransmitter.java
│ │ │ ├── RtpPacket.java
│ │ │ ├── RtpPacketReceiver.java
│ │ │ ├── RtpPacketTransmitter.java
│ │ │ ├── RtpSource.java
│ │ │ ├── RtpStatisticsReceiver.java
│ │ │ └── RtpStatisticsTransmitter.java
│ │ │ ├── event
│ │ │ ├── RtcpApplicationEvent.java
│ │ │ ├── RtcpByeEvent.java
│ │ │ ├── RtcpEvent.java
│ │ │ ├── RtcpEventListener.java
│ │ │ ├── RtcpReceiverReportEvent.java
│ │ │ ├── RtcpSdesEvent.java
│ │ │ └── RtcpSenderReportEvent.java
│ │ │ ├── format
│ │ │ ├── DummyFormat.java
│ │ │ ├── Format.java
│ │ │ ├── audio
│ │ │ │ ├── AudioFormat.java
│ │ │ │ └── PcmuAudioFormat.java
│ │ │ └── video
│ │ │ │ ├── H263VideoFormat.java
│ │ │ │ ├── H264VideoFormat.java
│ │ │ │ └── VideoFormat.java
│ │ │ ├── media
│ │ │ ├── MediaException.java
│ │ │ ├── MediaInput.java
│ │ │ ├── MediaOutput.java
│ │ │ └── MediaSample.java
│ │ │ ├── stream
│ │ │ ├── DummyPacketSourceStream.java
│ │ │ ├── MediaCaptureStream.java
│ │ │ ├── MediaRendererStream.java
│ │ │ ├── ProcessorInputStream.java
│ │ │ ├── ProcessorOutputStream.java
│ │ │ └── RtpInputStream.java
│ │ │ └── util
│ │ │ ├── Buffer.java
│ │ │ ├── Packet.java
│ │ │ └── SystemTimeBase.java
│ │ ├── platform
│ │ ├── AndroidFactory.java
│ │ ├── FactoryException.java
│ │ ├── file
│ │ │ ├── FileDescription.java
│ │ │ └── FileFactory.java
│ │ ├── logger
│ │ │ └── AndroidAppender.java
│ │ ├── network
│ │ │ ├── AndroidDatagramConnection.java
│ │ │ ├── AndroidHttpConnection.java
│ │ │ ├── AndroidNetworkFactory.java
│ │ │ ├── AndroidSocketConnection.java
│ │ │ ├── AndroidSocketServerConnection.java
│ │ │ ├── DatagramConnection.java
│ │ │ ├── HttpConnection.java
│ │ │ ├── NetworkFactory.java
│ │ │ ├── SocketConnection.java
│ │ │ └── SocketServerConnection.java
│ │ └── registry
│ │ │ ├── AndroidRegistryFactory.java
│ │ │ └── RegistryFactory.java
│ │ ├── provider
│ │ └── settings
│ │ │ ├── RcsSettings.java
│ │ │ └── RcsSettingsData.java
│ │ ├── service
│ │ └── api
│ │ │ └── client
│ │ │ ├── capability
│ │ │ └── Capabilities.java
│ │ │ └── media
│ │ │ ├── IMediaEventListener.aidl
│ │ │ ├── IMediaPlayer.aidl
│ │ │ ├── IMediaRenderer.aidl
│ │ │ ├── MediaCodec.aidl
│ │ │ ├── MediaCodec.java
│ │ │ └── video
│ │ │ ├── VideoCodec.java
│ │ │ └── VideoSurfaceView.java
│ │ └── utils
│ │ ├── FifoBuffer.java
│ │ ├── NetworkRessourceManager.java
│ │ └── logger
│ │ ├── Appender.java
│ │ └── Logger.java
│ └── de
│ └── kp
│ ├── net
│ ├── rtp
│ │ ├── RtpPacket.java
│ │ ├── RtpRandom.java
│ │ ├── RtpSender.java
│ │ ├── RtpSocket.java
│ │ ├── packetizer
│ │ │ ├── AbstractPacketizer.java
│ │ │ ├── H263Packetizer.java
│ │ │ ├── H264Fifo.java
│ │ │ └── H264Packetizer.java
│ │ ├── recorder
│ │ │ ├── MediaRtpSender.java
│ │ │ └── RtspVideoRecorder.java
│ │ ├── stream
│ │ │ └── RtpOutputStream.java
│ │ └── viewer
│ │ │ └── RtpVideoRenderer.java
│ └── rtsp
│ │ ├── RtspConstants.java
│ │ ├── client
│ │ ├── RtspClient.java
│ │ ├── RtspControl.java
│ │ ├── api
│ │ │ ├── EntityMessage.java
│ │ │ ├── Message.java
│ │ │ ├── MessageFactory.java
│ │ │ ├── Request.java
│ │ │ ├── RequestListener.java
│ │ │ ├── Response.java
│ │ │ ├── Transport.java
│ │ │ └── TransportListener.java
│ │ ├── header
│ │ │ ├── CSeqHeader.java
│ │ │ ├── ContentEncodingHeader.java
│ │ │ ├── ContentLengthHeader.java
│ │ │ ├── ContentTypeHeader.java
│ │ │ ├── RtspBaseIntegerHeader.java
│ │ │ ├── RtspBaseStringHeader.java
│ │ │ ├── RtspContent.java
│ │ │ ├── RtspHeader.java
│ │ │ ├── SessionHeader.java
│ │ │ └── TransportHeader.java
│ │ ├── message
│ │ │ ├── MessageBuffer.java
│ │ │ ├── RtspDescriptor.java
│ │ │ ├── RtspEntityMessage.java
│ │ │ ├── RtspMedia.java
│ │ │ ├── RtspMessage.java
│ │ │ └── RtspMessageFactory.java
│ │ ├── request
│ │ │ ├── RtspDescribeRequest.java
│ │ │ ├── RtspOptionsRequest.java
│ │ │ ├── RtspPauseRequest.java
│ │ │ ├── RtspPlayRequest.java
│ │ │ ├── RtspRequest.java
│ │ │ ├── RtspSetupRequest.java
│ │ │ └── RtspTeardownRequest.java
│ │ ├── response
│ │ │ └── RtspResponse.java
│ │ └── transport
│ │ │ ├── TCPTransport.java
│ │ │ └── TCPTransportListener.java
│ │ └── server
│ │ ├── RtspServer.java
│ │ └── response
│ │ ├── Parser.java
│ │ ├── RtspAnnounceResponse.java
│ │ ├── RtspDescribeResponse.java
│ │ ├── RtspError.java
│ │ ├── RtspOptionsResponse.java
│ │ ├── RtspPauseResponse.java
│ │ ├── RtspPlayResponse.java
│ │ ├── RtspResponse.java
│ │ ├── RtspResponseTeardown.java
│ │ ├── RtspSetupResponse.java
│ │ └── SDP.java
│ └── rtspcamera
│ ├── MediaConstants.java
│ ├── RtspApiCodecsCamera.java
│ └── RtspNativeCodecsCamera.java
└── RtspViewer
├── .classpath
├── .gitignore
├── .project
├── AndroidManifest.xml
├── bin
└── res
│ ├── drawable-hdpi
│ └── icon.png
│ ├── drawable-ldpi
│ └── icon.png
│ └── drawable-mdpi
│ └── icon.png
├── gpl.txt
├── proguard-project.txt
├── project.properties
├── res
├── drawable-hdpi
│ ├── ic_launcher.png
│ └── icon.png
├── drawable-ldpi
│ ├── ic_launcher.png
│ └── icon.png
├── drawable-mdpi
│ ├── ic_launcher.png
│ └── icon.png
├── drawable-xhdpi
│ └── ic_launcher.png
├── layout
│ └── videoview.xml
└── values
│ └── strings.xml
└── src
└── de
└── kp
└── rtspviewer
└── RtspViewerActivity.java
/README.md:
--------------------------------------------------------------------------------
1 | # RTSP-Camera-for-Android
2 | Android based RTSP Server which is able to serve live camera view to multiple RTSP clients, such as VLC.
3 |
4 | This project is not maintained anymore (in fact since 2end of 2012).
5 | It exists to share the code how to implement this back in the days.
6 |
7 | I've not tested out the following gitHub project on my own, but if you are looking for a more actual Android RTSP based solution, pls check out:
8 | * https://github.com/hypeapps/Endoscope
9 |
10 | thanks for all the fish
11 | (=PA=)
12 |
--------------------------------------------------------------------------------
/RtspCamera/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RtspCamera/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 | /gen
3 |
--------------------------------------------------------------------------------
/RtspCamera/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | RtspCamera
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/RtspCamera/.settings/org.jboss.ide.eclipse.as.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.jboss.ide.eclipse.as.core.singledeployable.deployableList=
3 |
--------------------------------------------------------------------------------
/RtspCamera/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
22 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/RtspCamera/docs/wire-udp4000-h264-with-inband-sps.pps-nativeencoder.pcap:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspCamera/docs/wire-udp4000-h264-with-inband-sps.pps-nativeencoder.pcap
--------------------------------------------------------------------------------
/RtspCamera/jni/Android.mk:
--------------------------------------------------------------------------------
1 | include $(call all-subdir-makefiles)
2 |
--------------------------------------------------------------------------------
/RtspCamera/jni/Application.mk:
--------------------------------------------------------------------------------
1 | APP_PROJECT_PATH := /arwa/git/RTSP-Camera-for-Android/RtspCamera
2 | APP_MODULES := libH264Decoder libH264Encoder libH263Encoder libH263Decoder
3 |
4 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/Android.mk:
--------------------------------------------------------------------------------
1 | AVC_ROOT:= $(call my-dir)
2 | include $(call all-subdir-makefiles)
3 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/dec/include/pvavcdecoder_factory.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef PVAVCDECODER_FACTORY_H_INCLUDED
19 | #define PVAVCDECODER_FACTORY_H_INCLUDED
20 |
21 | #ifndef OSCL_BASE_H_INCLUDED
22 | #include "oscl_base.h"
23 | #endif
24 |
25 | #ifndef OSCL_MEM_H_INCLUDED
26 | #include "oscl_mem.h"
27 | #endif
28 |
29 | class PVAVCDecoderInterface;
30 |
31 | class PVAVCDecoderFactory
32 | {
33 | public:
34 | /**
35 | * Creates an instance of a PVAVCDecoder. If the creation fails, this function will leave.
36 | *
37 | * @returns A pointer to an instance of PVAVCDecoder as PVAVCDecoderInterface reference or leaves if instantiation fails
38 | **/
39 | OSCL_IMPORT_REF static PVAVCDecoderInterface* CreatePVAVCDecoder(void);
40 |
41 | /**
42 | * Deletes an instance of PVAVCDecoder and reclaims all allocated resources.
43 | *
44 | * @param aVideoDec The PVAVCDecoder instance to be deleted
45 | * @returns A status code indicating success or failure of deletion
46 | **/
47 | OSCL_IMPORT_REF static bool DeletePVAVCDecoder(PVAVCDecoderInterface* aVideoDec);
48 | };
49 |
50 | #endif
51 |
52 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/dec/include/pvavcdecoderinterface.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef PVAVCDECODERINTERFACE_H_INCLUDED
19 | #define PVAVCDECODERINTERFACE_H_INCLUDED
20 |
21 | // includes
22 | #ifndef OSCL_BASE_H_INCLUDED
23 | #include "oscl_base.h"
24 | #endif
25 |
26 | #ifndef AVCDEC_API_H_INCLUDED
27 | #include "avcdec_api.h"
28 | #endif
29 |
30 | typedef void (*FunctionType_Unbind)(void *, int);
31 | typedef int (*FunctionType_Alloc)(void *, int, uint8 **);
32 | typedef int (*FunctionType_SPS)(void *, uint, uint);
33 | typedef int (*FunctionType_Malloc)(void *, int32, int);
34 | typedef void(*FunctionType_Free)(void *, int);
35 |
36 |
37 | // PVAVCDecoderInterface pure virtual interface class
38 | class PVAVCDecoderInterface
39 | {
40 | public:
41 | virtual ~PVAVCDecoderInterface() {};
42 | virtual void CleanUpAVCDecoder(void) = 0;
43 | virtual void ResetAVCDecoder(void) = 0;
44 | virtual int32 DecodeSPS(uint8 *bitstream, int32 buffer_size) = 0;
45 | virtual int32 DecodePPS(uint8 *bitstream, int32 buffer_size) = 0;
46 | virtual int32 DecodeAVCSlice(uint8 *bitstream, int32 *buffer_size) = 0;
47 | virtual bool GetDecOutput(int *indx, int *release, AVCFrameIO* output) = 0;
48 | virtual void GetVideoDimensions(int32 *width, int32 *height, int32 *top, int32 *left, int32 *bottom, int32 *right) = 0;
49 | };
50 |
51 | #endif // PVAVCDECODERINTERFACE_H_INCLUDED
52 |
53 |
54 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/dec/src/3GPVideoParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009 OrangeLabs
3 | * 3GPVideoParser.h
4 | *
5 | * Created on: 12 août 2009
6 | * Author: rglt1266
7 | */
8 |
9 | #ifndef _3GPVIDEOPARSER_H_
10 | #define _3GPVIDEOPARSER_H_
11 |
12 | /* Define new types */
13 | typedef unsigned char uint8;
14 | typedef unsigned short uint16;
15 | typedef short int16;
16 | typedef unsigned long uint32;
17 | typedef long int32;
18 |
19 | #define DEBUG 1;
20 |
21 | /* Define important atoms 4Bytes code (char)*/
22 | #define AtomFtyp 0x66747970 /* File type compatibility atom */
23 | #define AtomMdat 0x6D646174 /* Movie sample data atom */
24 | #define AtomMoov 0x6D6F6F76 /* Movie ressource metadata atom */
25 | #define AtomMdhd 0x6D646864 /* Video media information header atom */
26 | #define AtomMvhd 0x6D766864 /* Video media information header atom */
27 | #define AtomStts 0x73747473 /* Time-to-sample atom */
28 | #define AtomStco 0x7374636F /* Sample-to-chunck atom */
29 | #define AtomTrak 0x7472616B /* Trak atom */
30 | #define AtomStsz 0x7374737A /* Sample size atom */
31 | #define AtomStsc 0x73747363 /* Nb of sample per chunck */
32 | #define AtomStsd 0x73747364 /* Nb of sample per chunck */
33 | #define AtomVmhd 0x766D6864 /* Identifier of a video track */
34 |
35 | /* Define error codes */
36 | #define VPAtomError 0
37 | #define VPAtomSucces 1
38 |
39 | typedef struct {
40 | uint32 ptr;
41 | uint32 size;
42 | } Atom;
43 |
44 | struct sample {
45 | uint32 addr;
46 | uint32 size;
47 | uint32 timestamp;
48 | struct sample *next;
49 | };
50 | typedef struct sample Sample;
51 |
52 | int Init3GPVideoParser (char *);
53 | int release();
54 | int getFrame (uint8*,uint32*, uint32*);
55 | uint32 getVideoDuration();
56 | uint32 getVideoWidth();
57 | uint32 getVideoHeight();
58 | char* getVideoCodec();
59 |
60 | #endif /* 3GPVIDEOPARSER_H_ */
61 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/dec/src/pvavcdecoder_factory.cpp:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | /**
19 | * @file pvavcdecoder_factory.cpp
20 | * @brief Singleton factory for PVAVCDecoder
21 | */
22 |
23 | #include "oscl_base.h"
24 |
25 | #include "pvavcdecoder.h"
26 | #include "pvavcdecoder_factory.h"
27 |
28 | #include "oscl_error_codes.h"
29 | #include "oscl_exception.h"
30 |
31 | // Use default DLL entry point
32 | #include "oscl_dll.h"
33 |
34 | OSCL_DLL_ENTRY_POINT_DEFAULT()
35 |
36 |
37 | ////////////////////////////////////////////////////////////////////////////
38 | OSCL_EXPORT_REF PVAVCDecoderInterface* PVAVCDecoderFactory::CreatePVAVCDecoder()
39 | {
40 | PVAVCDecoderInterface* videodec = NULL;
41 | videodec = PVAVCDecoder::New();
42 | if (videodec == NULL)
43 | {
44 | OSCL_LEAVE(OsclErrNoMemory);
45 | }
46 | return videodec;
47 | }
48 |
49 | ////////////////////////////////////////////////////////////////////////////
50 | OSCL_EXPORT_REF bool PVAVCDecoderFactory::DeletePVAVCDecoder(PVAVCDecoderInterface* aVideoDec)
51 | {
52 | if (aVideoDec)
53 | {
54 | OSCL_DELETE(aVideoDec);
55 | return true;
56 | }
57 |
58 | return false;
59 | }
60 |
61 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/dec/src/yuv2rgb.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * yuv2rgb.cpp
3 | *
4 | * Created on: 29 juil. 2009
5 | * Author: rglt1266
6 | */
7 | #include
8 | #include "yuv2rgb.h"
9 |
10 | void convert (int width,int height, uint8 *in,uint32 *out){
11 | uint8 *pY;
12 | uint8 *pU;
13 | uint8 *pV;
14 | int Y,U,V;
15 | int i,j;
16 | int R,G,B,Cr,Cb;
17 |
18 | /* Init */
19 | pY = in;
20 | pU = in + (width*height);
21 | pV = pU + (width*height/4);
22 |
23 | for(i=0;i>8);
33 | G = Y - ((88*Cb+183*Cr)>>8);
34 | B = Y + ((454*Cb)>>8);
35 | if (R>255)R=255; else if (R<0)R=0;
36 | if (G>255)G=255; else if (G<0)G=0;
37 | if (B>255)B=255; else if (B<0)B=0;
38 |
39 | /* Write data */
40 | out[((i*width) + j)]=((((R & 0xFF) << 16) | ((G & 0xFF) << 8) | (B & 0xFF))& 0xFFFFFFFF);
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/dec/src/yuv2rgb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * yuv2rgb.h
3 | *
4 | * Created on: 29 juil. 2009
5 | * Author: rglt1266
6 | */
7 |
8 | #include "oscl_types.h"
9 |
10 | #ifndef YUV2RGB_H_
11 | #define YUV2RGB_H_
12 |
13 | void convert (int width,int height, uint8 *in,uint32 *out);
14 |
15 | #endif /* YUV2RGB_H_ */
16 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/enc/include/pvavcencoder_factory.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef PVAVCENCODER_FACTORY_H_INCLUDED
19 | #define PVAVCENCODER_FACTORY_H_INCLUDED
20 |
21 | #ifndef OSCL_BASE_H_INCLUDED
22 | #include "oscl_base.h"
23 | #endif
24 |
25 | #ifndef OSCL_MEM_H_INCLUDED
26 | #include "oscl_mem.h"
27 | #endif
28 |
29 | class PVAVCEncoderInterface;
30 |
31 | class PVAVCEncoderFactory
32 | {
33 | public:
34 | /**
35 | * Creates an instance of a PVAVCDecoder. If the creation fails, this function will leave.
36 | *
37 | * @returns A pointer to an instance of PVAVCDecoder as PVAVCDecoderInterface reference or leaves if instantiation fails
38 | **/
39 | OSCL_IMPORT_REF static PVAVCEncoderInterface* CreatePVAVCEncoder();
40 |
41 | /**
42 | * Deletes an instance of PVAVCDecoder and reclaims all allocated resources.
43 | *
44 | * @param aVideoDec The PVAVCDecoder instance to be deleted
45 | * @returns A status code indicating success or failure of deletion
46 | **/
47 | OSCL_IMPORT_REF static bool DeletePVAVCEncoder(PVAVCEncoderInterface* aVideoEnc);
48 | };
49 |
50 | #endif
51 |
52 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/enc/src/NativeH264Encoder.h:
--------------------------------------------------------------------------------
1 | /* DO NOT EDIT THIS FILE - it is machine generated */
2 | #include
3 | /* Header for class com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h264_encoder_NativeH264Encoder */
4 |
5 | #ifndef _Included_NativeH264Encoder
6 | #define _Included_NativeH264Encoder
7 | #ifdef __cplusplus
8 | extern "C" {
9 | #endif
10 | /*
11 | * Class: com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h264_encoder_NativeH264Encoder
12 | * Method: InitEncoder
13 | * Signature: (IIF)I
14 | */
15 | JNIEXPORT jint JNICALL Java_com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h264_encoder_NativeH264Encoder_InitEncoder
16 | (JNIEnv *, jclass, jint, jint, jint);
17 |
18 | /*
19 | * Class: com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h264_encoder_NativeH264Encoder
20 | * Method: EncodeFrame
21 | * Signature: ([BJ)[B
22 | */
23 | JNIEXPORT jbyteArray JNICALL Java_com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h264_encoder_NativeH264Encoder_EncodeFrame
24 | (JNIEnv *, jclass, jbyteArray, jlong);
25 |
26 | /*
27 | * Class: com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h264_encoder_NativeH264Encoder
28 | * Method: DeinitEncoder
29 | * Signature: ()I
30 | */
31 | JNIEXPORT jint JNICALL Java_com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h264_encoder_NativeH264Encoder_DeinitEncoder
32 | (JNIEnv *, jclass);
33 |
34 | /*
35 | * Class: com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h264_encoder_NativeH264Encoder
36 | * Method: getLastEncodeStatus
37 | * Signature: ()I
38 | */
39 | JNIEXPORT jint JNICALL Java_com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h264_encoder_NativeH264Encoder_getLastEncodeStatus
40 | (JNIEnv *env, jclass clazz);
41 |
42 | #ifdef __cplusplus
43 | }
44 | #endif
45 | #endif
46 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/enc/src/pvavcencoder_factory.cpp:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | /**
19 | * @file pvavcencoder_factory.cpp
20 | * @brief Singleton factory for PVAVCEncoder
21 | */
22 |
23 | #include "oscl_base.h"
24 |
25 | #include "pvavcencoder.h"
26 | #include "pvavcencoder_factory.h"
27 |
28 | #include "oscl_error_codes.h"
29 | #include "oscl_exception.h"
30 |
31 | // Use default DLL entry point
32 | #include "oscl_dll.h"
33 |
34 | OSCL_DLL_ENTRY_POINT_DEFAULT()
35 |
36 | ////////////////////////////////////////////////////////////////////////////
37 | OSCL_EXPORT_REF PVAVCEncoderInterface* PVAVCEncoderFactory::CreatePVAVCEncoder()
38 | {
39 | PVAVCEncoderInterface* videoenc = NULL;
40 | videoenc = PVAVCEncoder::New();
41 | if (videoenc == NULL)
42 | {
43 | OSCL_LEAVE(OsclErrNoMemory);
44 | }
45 | return videoenc;
46 | }
47 |
48 | ////////////////////////////////////////////////////////////////////////////
49 | OSCL_EXPORT_REF bool PVAVCEncoderFactory::DeletePVAVCEncoder(PVAVCEncoderInterface* aVideoEnc)
50 | {
51 | if (aVideoEnc)
52 | {
53 | delete aVideoEnc;
54 | return true;
55 | }
56 |
57 | return false;
58 | }
59 |
60 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/oscl_base_macros.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_BASE_MACROS_H_INCLUDED
19 | #define OSCL_BASE_MACROS_H_INCLUDED
20 |
21 | #ifndef OSCL_UNUSED_ARG
22 | #define OSCL_UNUSED_ARG(x) (void)(x)
23 | #endif
24 |
25 | #endif // OSCL_BASE_MACROS_H_INCLUDED
26 |
27 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/oscl_config.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_CONFIG_H_INCLUDED
19 | #define OSCL_CONFIG_H_INCLUDED
20 |
21 | #define OSCL_HAS_BREW_SUPPORT 0 //Not yet supported
22 |
23 | #define OSCL_HAS_SYMBIAN_SUPPORT 0 // Not yet supported
24 |
25 | #define OSCL_HAS_LINUX_SUPPORT 1
26 |
27 | #endif // OSCL_CONFIG_H_INCLUDED
28 |
29 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/oscl_dll.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_DLL_H_INCLUDED
19 | #define OSCL_DLL_H_INCLUDED
20 |
21 | #define OSCL_DLL_ENTRY_POINT() void oscl_dll_entry_point() {}
22 |
23 |
24 | /**
25 | * Default DLL entry/exit point function.
26 | *
27 | * The body of the DLL entry point is given. The macro
28 | * only needs to be declared within the source file.
29 | *
30 | * Usage :
31 | *
32 | * OSCL_DLL_ENTRY_POINT_DEFAULT()
33 | */
34 |
35 | #define OSCL_DLL_ENTRY_POINT_DEFAULT()
36 |
37 |
38 |
39 | #endif // OSCL_DLL_H_INCLUDED
40 |
41 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/oscl_error.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_ERROR_H_INCLUDED
19 | #define OSCL_ERROR_H_INCLUDED
20 |
21 |
22 | #define OSCL_LEAVE(x)
23 |
24 |
25 | #endif //OSCL_ERROR_H_INCLUDED
26 |
27 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/oscl_error_codes.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OSCL_ERROR_CODES_H_INCLUDED
20 | #define OSCL_ERROR_CODES_H_INCLUDED
21 |
22 |
23 | /** Leave Codes
24 | */
25 | typedef int32 OsclLeaveCode;
26 |
27 | #define OsclErrNone 0
28 | #define OsclErrGeneral 100
29 | #define OsclErrNoMemory 101
30 | #define OsclErrCancelled 102
31 | #define OsclErrNotSupported 103
32 | #define OsclErrArgument 104
33 | #define OsclErrBadHandle 105
34 | #define OsclErrAlreadyExists 106
35 | #define OsclErrBusy 107
36 | #define OsclErrNotReady 108
37 | #define OsclErrCorrupt 109
38 | #define OsclErrTimeout 110
39 | #define OsclErrOverflow 111
40 | #define OsclErrUnderflow 112
41 | #define OsclErrInvalidState 113
42 | #define OsclErrNoResources 114
43 |
44 | /** For backward compatibility with old definitions
45 | */
46 | #define OSCL_ERR_NONE OsclErrNone
47 | #define OSCL_BAD_ALLOC_EXCEPTION_CODE OsclErrNoMemory
48 |
49 | /** Return Codes
50 | */
51 | typedef int32 OsclReturnCode;
52 |
53 | #define OsclSuccess 0
54 | #define OsclPending 1
55 | #define OsclFailure -1
56 |
57 | #endif
58 |
59 | /*! @} */
60 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/oscl_exception.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OSCL_EXCEPTION_H_INCLUDED
20 | #define OSCL_EXCEPTION_H_INCLUDED
21 |
22 |
23 |
24 | #endif // INCLUDED_OSCL_EXCEPTION_H
25 |
26 |
27 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/oscl_math.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_MATH_H_INCLUDED
19 | #define OSCL_MATH_H_INCLUDED
20 |
21 | #include
22 |
23 |
24 |
25 | #define oscl_pow pow
26 | #define oscl_exp exp
27 | #define oscl_sqrt sqrt
28 | #define oscl_log log
29 | #define oscl_cos cos
30 | #define oscl_sin sin
31 | #define oscl_tan tan
32 | #define oscl_asin asin
33 |
34 | #endif // OSCL_MATH_H_INCLUDED
35 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/oscl_mem.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_MEM_H_INCLUDED
19 | #define OSCL_MEM_H_INCLUDED
20 |
21 | #include "oscl_types.h"
22 |
23 | #define OSCLMemSizeT size_t
24 |
25 | #define oscl_memcpy(dest, src, count) memcpy((void *)(dest), (const void *)(src), (OSCLMemSizeT)(count))
26 | #define oscl_memset(dest, ch, count) memset((void *)(dest), (unsigned char)(ch), (OSCLMemSizeT)(count))
27 | #define oscl_memmove(dest, src, bytecount) memmove((void *)(dest), (const void *)(src), (OSCLMemSizeT)(bytecount))
28 | #define oscl_memcmp(buf1, buf2, count) memcmp( (const void *)(buf1), (const void *)(buf2), (OSCLMemSizeT)(count))
29 | #define oscl_malloc(size) malloc((OSCLMemSizeT)(size))
30 | #define oscl_free(memblock) free((void *)(memblock))
31 | #define OSCL_ARRAY_DELETE(ptr) delete [] ptr
32 | #define OSCL_ARRAY_NEW(T, count) new T[count]
33 | #define OSCL_DELETE(memblock) delete memblock
34 | #define OSCL_NEW(arg) new arg
35 |
36 | #endif // OSCL_MEM_H_INCLUDED
37 |
38 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/oscl_string.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | // -*- c++ -*-
19 | // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
20 |
21 | // O S C L_ S T R I N G C L A S S
22 |
23 | // This file contains a standardized set of string containers that
24 | // can be used in place of character arrays.
25 |
26 | // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
27 |
28 | /*! \addtogroup osclutil OSCL Util
29 | *
30 | * @{
31 | */
32 |
33 |
34 | /*!
35 | * \file oscl_string.h
36 | * \brief Provides a standardized set of string containers that
37 | * can be used in place of character arrays.
38 | *
39 | */
40 |
41 |
42 | #ifndef OSCL_STRING_H_INCLUDED
43 | #define OSCL_STRING_H_INCLUDED
44 |
45 |
46 | #ifndef OSCL_BASE_H_INCLUDED
47 | #include "oscl_base.h"
48 | #endif
49 |
50 | #ifndef OSCL_MEM_H_INCLUDED
51 | #include "oscl_mem.h"
52 | #endif
53 |
54 |
55 |
56 | #endif // OSCL_STRING_H_INCLUDED
57 |
58 | /*! @} */
59 |
--------------------------------------------------------------------------------
/RtspCamera/jni/avc_h264/oscl/osclconfig_compiler_warnings.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | // -*- c++ -*-
19 | // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
20 |
21 | // O S C L C O N F I G _ C O M P I L E R _ W A R N I N G S
22 |
23 | // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
24 |
25 |
26 | /*! \file osclconfig_compiler_warnings.h
27 | * \brief This file contains the ability to turn off/on compiler warnings
28 | *
29 | */
30 |
31 | // This macro enables the "#pragma GCC system_header" found in any header file that
32 | // includes this config file.
33 | // "#pragma GCC system_header" suppresses compiler warnings in the rest of that header
34 | // file by treating the header as a system header file.
35 | // For instance, foo.h has 30 lines, "#pragma GCC system_header" is inserted at line 10,
36 | // from line 11 to the end of file, all compiler warnings are disabled.
37 | // However, this does not affect any files that include foo.h.
38 | //
39 | #ifdef __GNUC__
40 | #define OSCL_DISABLE_GCC_WARNING_SYSTEM_HEADER
41 | #endif
42 |
43 | #define OSCL_FUNCTION_PTR(x) (&x)
44 |
45 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/Android.mk:
--------------------------------------------------------------------------------
1 | include $(call all-subdir-makefiles)
2 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/include/pvm4vdecoder_factory.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef PVM4VDECODER_FACTORY_H_INCLUDED
19 | #define PVM4VDECODER_FACTORY_H_INCLUDED
20 |
21 | #ifndef OSCL_BASE_H_INCLUDED
22 | #include "oscl_base.h"
23 | #endif
24 |
25 | #ifndef OSCL_MEM_H_INCLUDED
26 | #include "oscl_mem.h"
27 | #endif
28 |
29 | class PVVideoDecoderInterface;
30 |
31 | class PVM4VDecoderFactory
32 | {
33 | public:
34 | /**
35 | * Creates an instance of a PVM4VDecoder. If the creation fails, this function will leave.
36 | *
37 | * @returns A pointer to an instance of PVM4VDecoder as PVVideoDecoderInterface reference or leaves if instantiation fails
38 | **/
39 | OSCL_IMPORT_REF static PVVideoDecoderInterface* CreatePVM4VDecoder(void);
40 |
41 | /**
42 | * Deletes an instance of PVM4VDecoder and reclaims all allocated resources.
43 | *
44 | * @param aVideoDec The PVM4VDecoder instance to be deleted
45 | * @returns A status code indicating success or failure of deletion
46 | **/
47 | OSCL_IMPORT_REF static bool DeletePVM4VDecoder(PVVideoDecoderInterface* aVideoDec);
48 | };
49 |
50 | #endif
51 |
52 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/include/visual_header.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef _VISUAL_HEADER_H
19 | #define _VISUAL_HEADER_H
20 |
21 | #ifndef _PV_TYPES_ // In order to compile in MDF wrapper
22 | #define _PV_TYPES_
23 |
24 | typedef uint Bool;
25 |
26 | #endif // #ifndef _PV_TYPES_
27 |
28 |
29 | typedef struct tagVolInfo
30 | {
31 | int32 shortVideoHeader; /* shortVideoHeader mode */
32 |
33 | /* Error Resilience Flags */
34 | int32 errorResDisable; /* VOL disable error resilence mode(Use Resynch markers) */
35 | int32 useReverseVLC; /* VOL reversible VLCs */
36 | int32 dataPartitioning; /* VOL data partitioning */
37 |
38 | /* Parameters used for scalability */
39 | int32 scalability; /* VOL scalability (flag) */
40 |
41 | int32 nbitsTimeIncRes; /* number of bits for time increment () */
42 |
43 | int32 profile_level_id; /* profile and level */
44 |
45 |
46 | } VolInfo;
47 |
48 | #endif // #ifndef _VISUAL_HEADER_H
49 |
50 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/oscl/oscl_base_macros.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_BASE_MACROS_H_INCLUDED
19 | #define OSCL_BASE_MACROS_H_INCLUDED
20 |
21 | #ifndef OSCL_UNUSED_ARG
22 | #define OSCL_UNUSED_ARG(x) (void)(x)
23 | #endif
24 |
25 | #endif // OSCL_BASE_MACROS_H_INCLUDED
26 |
27 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/oscl/oscl_config.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_CONFIG_H_INCLUDED
19 | #define OSCL_CONFIG_H_INCLUDED
20 |
21 | #define OSCL_HAS_BREW_SUPPORT 0 //Not yet supported
22 |
23 | #define OSCL_HAS_SYMBIAN_SUPPORT 0 // Not yet supported
24 |
25 | #define OSCL_HAS_LINUX_SUPPORT 1
26 |
27 | #endif // OSCL_CONFIG_H_INCLUDED
28 |
29 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/oscl/oscl_dll.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_DLL_H_INCLUDED
19 | #define OSCL_DLL_H_INCLUDED
20 |
21 | #define OSCL_DLL_ENTRY_POINT() void oscl_dll_entry_point() {}
22 |
23 |
24 | /**
25 | * Default DLL entry/exit point function.
26 | *
27 | * The body of the DLL entry point is given. The macro
28 | * only needs to be declared within the source file.
29 | *
30 | * Usage :
31 | *
32 | * OSCL_DLL_ENTRY_POINT_DEFAULT()
33 | */
34 |
35 | #define OSCL_DLL_ENTRY_POINT_DEFAULT()
36 |
37 |
38 |
39 | #endif // OSCL_DLL_H_INCLUDED
40 |
41 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/oscl/oscl_error.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_ERROR_H_INCLUDED
19 | #define OSCL_ERROR_H_INCLUDED
20 |
21 |
22 | #define OSCL_LEAVE(x)
23 |
24 |
25 | #endif //OSCL_ERROR_H_INCLUDED
26 |
27 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/oscl/oscl_error_codes.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OSCL_ERROR_CODES_H_INCLUDED
20 | #define OSCL_ERROR_CODES_H_INCLUDED
21 |
22 |
23 | /** Leave Codes
24 | */
25 | typedef int32 OsclLeaveCode;
26 |
27 | #define OsclErrNone 0
28 | #define OsclErrGeneral 100
29 | #define OsclErrNoMemory 101
30 | #define OsclErrCancelled 102
31 | #define OsclErrNotSupported 103
32 | #define OsclErrArgument 104
33 | #define OsclErrBadHandle 105
34 | #define OsclErrAlreadyExists 106
35 | #define OsclErrBusy 107
36 | #define OsclErrNotReady 108
37 | #define OsclErrCorrupt 109
38 | #define OsclErrTimeout 110
39 | #define OsclErrOverflow 111
40 | #define OsclErrUnderflow 112
41 | #define OsclErrInvalidState 113
42 | #define OsclErrNoResources 114
43 |
44 | /** For backward compatibility with old definitions
45 | */
46 | #define OSCL_ERR_NONE OsclErrNone
47 | #define OSCL_BAD_ALLOC_EXCEPTION_CODE OsclErrNoMemory
48 |
49 | /** Return Codes
50 | */
51 | typedef int32 OsclReturnCode;
52 |
53 | #define OsclSuccess 0
54 | #define OsclPending 1
55 | #define OsclFailure -1
56 |
57 | #endif
58 |
59 | /*! @} */
60 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/oscl/oscl_exception.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OSCL_EXCEPTION_H_INCLUDED
20 | #define OSCL_EXCEPTION_H_INCLUDED
21 |
22 |
23 |
24 | #endif // INCLUDED_OSCL_EXCEPTION_H
25 |
26 |
27 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/oscl/oscl_math.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_MATH_H_INCLUDED
19 | #define OSCL_MATH_H_INCLUDED
20 |
21 | #include
22 |
23 |
24 |
25 | #define oscl_pow pow
26 | #define oscl_exp exp
27 | #define oscl_sqrt sqrt
28 | #define oscl_log log
29 | #define oscl_cos cos
30 | #define oscl_sin sin
31 | #define oscl_tan tan
32 | #define oscl_asin asin
33 |
34 | #endif // OSCL_MATH_H_INCLUDED
35 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/oscl/oscl_mem.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_MEM_H_INCLUDED
19 | #define OSCL_MEM_H_INCLUDED
20 |
21 | #include "oscl_types.h"
22 |
23 | #define OSCLMemSizeT size_t
24 |
25 | #define oscl_memcpy(dest, src, count) memcpy((void *)(dest), (const void *)(src), (OSCLMemSizeT)(count))
26 | #define oscl_memset(dest, ch, count) memset((void *)(dest), (unsigned char)(ch), (OSCLMemSizeT)(count))
27 | #define oscl_memmove(dest, src, bytecount) memmove((void *)(dest), (const void *)(src), (OSCLMemSizeT)(bytecount))
28 | #define oscl_memcmp(buf1, buf2, count) memcmp( (const void *)(buf1), (const void *)(buf2), (OSCLMemSizeT)(count))
29 | #define oscl_malloc(size) malloc((OSCLMemSizeT)(size))
30 | #define oscl_free(memblock) free((void *)(memblock))
31 | #define OSCL_ARRAY_DELETE(ptr) delete [] ptr
32 | #define OSCL_ARRAY_NEW(T, count) new T[count]
33 | #define OSCL_DELETE(memblock) delete memblock
34 | #define OSCL_NEW(arg) new arg
35 |
36 | #endif // OSCL_MEM_H_INCLUDED
37 |
38 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/oscl/osclconfig_compiler_warnings.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | // -*- c++ -*-
19 | // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
20 |
21 | // O S C L C O N F I G _ C O M P I L E R _ W A R N I N G S
22 |
23 | // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
24 |
25 |
26 | /*! \file osclconfig_compiler_warnings.h
27 | * \brief This file contains the ability to turn off/on compiler warnings
28 | *
29 | */
30 |
31 | // This macro enables the "#pragma GCC system_header" found in any header file that
32 | // includes this config file.
33 | // "#pragma GCC system_header" suppresses compiler warnings in the rest of that header
34 | // file by treating the header as a system header file.
35 | // For instance, foo.h has 30 lines, "#pragma GCC system_header" is inserted at line 10,
36 | // from line 11 to the end of file, all compiler warnings are disabled.
37 | // However, this does not affect any files that include foo.h.
38 | //
39 | #ifdef __GNUC__
40 | #define OSCL_DISABLE_GCC_WARNING_SYSTEM_HEADER
41 | #endif
42 |
43 | #define OSCL_FUNCTION_PTR(x) (&x)
44 |
45 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/src/3GPVideoParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2009 OrangeLabs
3 | * 3GPVideoParser.h
4 | *
5 | * Created on: 12 août 2009
6 | * Author: rglt1266
7 | */
8 |
9 | #ifndef _3GPVIDEOPARSER_H_
10 | #define _3GPVIDEOPARSER_H_
11 |
12 | /* Define new types */
13 | typedef unsigned char uint8;
14 | typedef unsigned short uint16;
15 | typedef short int16;
16 | typedef unsigned long uint32;
17 | typedef long int32;
18 |
19 | #define DEBUG 1;
20 |
21 | /* Define important atoms 4Bytes code (char)*/
22 | #define AtomFtyp 0x66747970 /* File type compatibility atom */
23 | #define AtomMdat 0x6D646174 /* Movie sample data atom */
24 | #define AtomMoov 0x6D6F6F76 /* Movie ressource metadata atom */
25 | #define AtomMdhd 0x6D646864 /* Video media information header atom */
26 | #define AtomMvhd 0x6D766864 /* Video media information header atom */
27 | #define AtomStts 0x73747473 /* Time-to-sample atom */
28 | #define AtomStco 0x7374636F /* Sample-to-chunck atom */
29 | #define AtomTrak 0x7472616B /* Trak atom */
30 | #define AtomStsz 0x7374737A /* Sample size atom */
31 | #define AtomStsc 0x73747363 /* Nb of sample per chunck */
32 | #define AtomStsd 0x73747364 /* Nb of sample per chunck */
33 | #define AtomVmhd 0x766D6864 /* Identifier of a video track */
34 |
35 | /* Define error codes */
36 | #define VPAtomError 0
37 | #define VPAtomSucces 1
38 |
39 | typedef struct {
40 | uint32 ptr;
41 | uint32 size;
42 | } Atom;
43 |
44 | struct sample {
45 | uint32 addr;
46 | uint32 size;
47 | uint32 timestamp;
48 | struct sample *next;
49 | };
50 | typedef struct sample Sample;
51 |
52 | int Init3GPVideoParser (char *);
53 | int release();
54 | int getFrame (uint8*,uint32*, uint32*);
55 | uint32 getVideoDuration();
56 | uint32 getVideoWidth();
57 | uint32 getVideoHeight();
58 | char* getVideoCodec();
59 |
60 | #endif /* 3GPVIDEOPARSER_H_ */
61 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/src/mbtype_mode.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | const static int MBtype_mode[] =
19 | {
20 | MODE_INTER,
21 | MODE_INTER_Q,
22 | MODE_INTER4V,
23 | MODE_INTRA,
24 | MODE_INTRA_Q,
25 | #ifdef PV_ANNEX_IJKT_SUPPORT
26 | MODE_INTER4V_Q,
27 | #endif
28 | MODE_SKIPPED
29 | };
30 | #ifdef PV_ANNEX_IJKT_SUPPORT
31 | const static int16 DQ_tab_Annex_T_10[32] = {0, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3};
32 | const static int16 DQ_tab_Annex_T_11[32] = {0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, -5};
33 | const static int16 MQ_chroma_QP_table[32] = {0, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13,
34 | 14, 14, 14, 14, 14, 15, 15, 15, 15, 15
35 | };
36 | #endif
37 |
38 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/src/pvm4vdecoder_factory.cpp:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | /**
19 | * @file pvm4vdecoder_factory.cpp
20 | * @brief Singleton factory for PVM4VDecoder
21 | */
22 |
23 | #include "oscl_base.h"
24 |
25 | #include "pvm4vdecoder.h"
26 | #include "pvm4vdecoder_factory.h"
27 |
28 | #include "oscl_error_codes.h"
29 | #include "oscl_exception.h"
30 |
31 | // Use default DLL entry point
32 | #include "oscl_dll.h"
33 |
34 | OSCL_DLL_ENTRY_POINT_DEFAULT()
35 |
36 |
37 | ////////////////////////////////////////////////////////////////////////////
38 | OSCL_EXPORT_REF PVVideoDecoderInterface* PVM4VDecoderFactory::CreatePVM4VDecoder()
39 | {
40 | PVVideoDecoderInterface* videodec = NULL;
41 | videodec = PVM4VDecoder::New();
42 | if (videodec == NULL)
43 | {
44 | OSCL_LEAVE(OsclErrNoMemory);
45 | }
46 | return videodec;
47 | }
48 |
49 | ////////////////////////////////////////////////////////////////////////////
50 | OSCL_EXPORT_REF bool PVM4VDecoderFactory::DeletePVM4VDecoder(PVVideoDecoderInterface* aVideoDec)
51 | {
52 | if (aVideoDec)
53 | {
54 | OSCL_DELETE(aVideoDec);
55 | return true;
56 | }
57 |
58 | return false;
59 | }
60 |
61 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/src/scaling.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifdef __cplusplus
20 | extern "C"
21 | {
22 | #endif
23 |
24 | extern const int32 scale[63];
25 |
26 | #define PV_GET_ROW(a,b) ((a)/(b))
27 |
28 | /*----------------------------------------------------------------------------
29 | ; SIMPLE TYPEDEF'S
30 | ----------------------------------------------------------------------------*/
31 |
32 | /*----------------------------------------------------------------------------
33 | ; ENUMERATED TYPEDEF'S
34 | ----------------------------------------------------------------------------*/
35 |
36 | /*----------------------------------------------------------------------------
37 | ; STRUCTURES TYPEDEF'S
38 | ----------------------------------------------------------------------------*/
39 |
40 | /*----------------------------------------------------------------------------
41 | ; GLOBAL FUNCTION DEFINITIONS
42 | ; Function Prototype declaration
43 | ----------------------------------------------------------------------------*/
44 |
45 | /*----------------------------------------------------------------------------
46 | ; END
47 | ----------------------------------------------------------------------------*/
48 | #ifdef __cplusplus
49 | }
50 | #endif
51 |
52 |
53 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/src/yuv2rgb.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * yuv2rgb.cpp
3 | *
4 | * Created on: 29 juil. 2009
5 | * Author: rglt1266
6 | */
7 | #include
8 | #include "yuv2rgb.h"
9 |
10 | int convert (int width,int height, uint8 *in,uint32 *out){
11 | uint8 *pY;
12 | uint8 *pU;
13 | uint8 *pV;
14 | int Y,U,V;
15 | int i,j;
16 | int R,G,B,Cr,Cb;
17 |
18 | /* Init */
19 | pY = in;
20 | pU = in + (width*height);
21 | pV = pU + (width*height/4);
22 |
23 | for(i=0;i>8);
33 | G = Y - ((88*Cb+183*Cr)>>8);
34 | B = Y + ((454*Cb)>>8);
35 | if (R>255)R=255; else if (R<0)R=0;
36 | if (G>255)G=255; else if (G<0)G=0;
37 | if (B>255)B=255; else if (B<0)B=0;
38 |
39 | /* Write data */
40 | out[((i*width) + j)]=((((R & 0xFF) << 16) | ((G & 0xFF) << 8) | (B & 0xFF))& 0xFFFFFFFF);
41 | }
42 | }
43 | return 1;
44 | }
45 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/dec/src/yuv2rgb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * yuv2rgb.h
3 | *
4 | * Created on: 29 juil. 2009
5 | * Author: rglt1266
6 | */
7 |
8 | #include "oscl_types.h"
9 |
10 | #ifndef YUV2RGB_H_
11 | #define YUV2RGB_H_
12 |
13 | int convert (int width,int height, uint8 *in,uint32 *out);
14 |
15 | #endif /* YUV2RGB_H_ */
16 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2008 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 |
17 | # This makefile supplies the rules for building a library of JNI code for
18 | # use by our example platform shared library.
19 |
20 | LOCAL_PATH:= $(call my-dir)
21 | include $(CLEAR_VARS)
22 |
23 | LOCAL_MODULE_TAGS := optional
24 |
25 | # This is the target being built.
26 | LOCAL_MODULE:= libH263Encoder
27 |
28 | # All of the source files that we will compile.
29 | LOCAL_SRC_FILES:= \
30 | src/com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder.cpp \
31 | src/bitstream_io.cpp \
32 | src/combined_encode.cpp \
33 | src/datapart_encode.cpp \
34 | src/dct.cpp \
35 | src/fastcodemb.cpp \
36 | src/fastidct.cpp \
37 | src/fastquant.cpp \
38 | src/findhalfpel.cpp \
39 | src/me_utils.cpp \
40 | src/motion_comp.cpp \
41 | src/motion_est.cpp \
42 | src/mp4enc_api.cpp \
43 | src/rate_control.cpp \
44 | src/sad.cpp \
45 | src/sad_halfpel.cpp \
46 | src/vlc_encode.cpp \
47 | src/vop.cpp
48 |
49 | # All of the shared libraries we link against.
50 | LOCAL_SHARED_LIBRARIES :=
51 |
52 | # No static libraries.
53 | LOCAL_STATIC_LIBRARIES :=
54 |
55 | # Also need the JNI headers.
56 | LOCAL_C_INCLUDES += \
57 | $(JNI_H_INCLUDE) \
58 | $(LOCAL_PATH)/src \
59 | $(LOCAL_PATH)/include \
60 | $(LOCAL_PATH)/oscl
61 |
62 | # No specia compiler flags.
63 | LOCAL_CFLAGS +=
64 |
65 | # Don't prelink this library. For more efficient code, you may want
66 | # to add this library to the prelink map and set this to true.
67 | LOCAL_PRELINK_MODULE := false
68 |
69 | include $(BUILD_SHARED_LIBRARY)
70 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/oscl/oscl_base_macros.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_BASE_MACROS_H_INCLUDED
19 | #define OSCL_BASE_MACROS_H_INCLUDED
20 |
21 | #ifndef OSCL_UNUSED_ARG
22 | #define OSCL_UNUSED_ARG(x) (void)(x)
23 | #endif
24 |
25 | #endif // OSCL_BASE_MACROS_H_INCLUDED
26 |
27 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/oscl/oscl_config.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_CONFIG_H_INCLUDED
19 | #define OSCL_CONFIG_H_INCLUDED
20 |
21 | #define OSCL_HAS_BREW_SUPPORT 0 //Not yet supported
22 |
23 | #define OSCL_HAS_SYMBIAN_SUPPORT 0 // Not yet supported
24 |
25 | #define OSCL_HAS_LINUX_SUPPORT 1
26 |
27 | #endif // OSCL_CONFIG_H_INCLUDED
28 |
29 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/oscl/oscl_dll.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_DLL_H_INCLUDED
19 | #define OSCL_DLL_H_INCLUDED
20 |
21 | #define OSCL_DLL_ENTRY_POINT() void oscl_dll_entry_point() {}
22 |
23 |
24 | /**
25 | * Default DLL entry/exit point function.
26 | *
27 | * The body of the DLL entry point is given. The macro
28 | * only needs to be declared within the source file.
29 | *
30 | * Usage :
31 | *
32 | * OSCL_DLL_ENTRY_POINT_DEFAULT()
33 | */
34 |
35 | #define OSCL_DLL_ENTRY_POINT_DEFAULT()
36 |
37 |
38 |
39 | #endif // OSCL_DLL_H_INCLUDED
40 |
41 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/oscl/oscl_error.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_ERROR_H_INCLUDED
19 | #define OSCL_ERROR_H_INCLUDED
20 |
21 |
22 | #define OSCL_LEAVE(x)
23 |
24 |
25 | #endif //OSCL_ERROR_H_INCLUDED
26 |
27 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/oscl/oscl_error_codes.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OSCL_ERROR_CODES_H_INCLUDED
20 | #define OSCL_ERROR_CODES_H_INCLUDED
21 |
22 |
23 | /** Leave Codes
24 | */
25 | typedef int32 OsclLeaveCode;
26 |
27 | #define OsclErrNone 0
28 | #define OsclErrGeneral 100
29 | #define OsclErrNoMemory 101
30 | #define OsclErrCancelled 102
31 | #define OsclErrNotSupported 103
32 | #define OsclErrArgument 104
33 | #define OsclErrBadHandle 105
34 | #define OsclErrAlreadyExists 106
35 | #define OsclErrBusy 107
36 | #define OsclErrNotReady 108
37 | #define OsclErrCorrupt 109
38 | #define OsclErrTimeout 110
39 | #define OsclErrOverflow 111
40 | #define OsclErrUnderflow 112
41 | #define OsclErrInvalidState 113
42 | #define OsclErrNoResources 114
43 |
44 | /** For backward compatibility with old definitions
45 | */
46 | #define OSCL_ERR_NONE OsclErrNone
47 | #define OSCL_BAD_ALLOC_EXCEPTION_CODE OsclErrNoMemory
48 |
49 | /** Return Codes
50 | */
51 | typedef int32 OsclReturnCode;
52 |
53 | #define OsclSuccess 0
54 | #define OsclPending 1
55 | #define OsclFailure -1
56 |
57 | #endif
58 |
59 | /*! @} */
60 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/oscl/oscl_exception.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 |
19 | #ifndef OSCL_EXCEPTION_H_INCLUDED
20 | #define OSCL_EXCEPTION_H_INCLUDED
21 |
22 |
23 |
24 | #endif // INCLUDED_OSCL_EXCEPTION_H
25 |
26 |
27 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/oscl/oscl_math.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_MATH_H_INCLUDED
19 | #define OSCL_MATH_H_INCLUDED
20 |
21 | #include
22 |
23 |
24 |
25 | #define oscl_pow pow
26 | #define oscl_exp exp
27 | #define oscl_sqrt sqrt
28 | #define oscl_log log
29 | #define oscl_cos cos
30 | #define oscl_sin sin
31 | #define oscl_tan tan
32 | #define oscl_asin asin
33 |
34 | #endif // OSCL_MATH_H_INCLUDED
35 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/oscl/oscl_mem.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | #ifndef OSCL_MEM_H_INCLUDED
19 | #define OSCL_MEM_H_INCLUDED
20 |
21 | #include "oscl_types.h"
22 |
23 | #define OSCLMemSizeT size_t
24 |
25 | #define oscl_memcpy(dest, src, count) memcpy((void *)(dest), (const void *)(src), (OSCLMemSizeT)(count))
26 | #define oscl_memset(dest, ch, count) memset((void *)(dest), (unsigned char)(ch), (OSCLMemSizeT)(count))
27 | #define oscl_memmove(dest, src, bytecount) memmove((void *)(dest), (const void *)(src), (OSCLMemSizeT)(bytecount))
28 | #define oscl_memcmp(buf1, buf2, count) memcmp( (const void *)(buf1), (const void *)(buf2), (OSCLMemSizeT)(count))
29 | #define oscl_malloc(size) malloc((OSCLMemSizeT)(size))
30 | #define oscl_free(memblock) free((void *)(memblock))
31 | #define OSCL_ARRAY_DELETE(ptr) delete [] ptr
32 | #define OSCL_ARRAY_NEW(T, count) new T[count]
33 | #define OSCL_DELETE(memblock) delete memblock
34 | #define OSCL_NEW(arg) new arg
35 |
36 | #endif // OSCL_MEM_H_INCLUDED
37 |
38 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/oscl/osclconfig_compiler_warnings.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | // -*- c++ -*-
19 | // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
20 |
21 | // O S C L C O N F I G _ C O M P I L E R _ W A R N I N G S
22 |
23 | // = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
24 |
25 |
26 | /*! \file osclconfig_compiler_warnings.h
27 | * \brief This file contains the ability to turn off/on compiler warnings
28 | *
29 | */
30 |
31 | // This macro enables the "#pragma GCC system_header" found in any header file that
32 | // includes this config file.
33 | // "#pragma GCC system_header" suppresses compiler warnings in the rest of that header
34 | // file by treating the header as a system header file.
35 | // For instance, foo.h has 30 lines, "#pragma GCC system_header" is inserted at line 10,
36 | // from line 11 to the end of file, all compiler warnings are disabled.
37 | // However, this does not affect any files that include foo.h.
38 | //
39 | #ifdef __GNUC__
40 | #define OSCL_DISABLE_GCC_WARNING_SYSTEM_HEADER
41 | #endif
42 |
43 | #define OSCL_FUNCTION_PTR(x) (&x)
44 |
45 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/src/com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder.h:
--------------------------------------------------------------------------------
1 | /* DO NOT EDIT THIS FILE - it is machine generated */
2 | #include
3 | /* Header for class com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder */
4 |
5 | #ifndef _Included_com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder
6 | #define _Included_com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder
7 | #ifdef __cplusplus
8 | extern "C" {
9 | #endif
10 | /*
11 | * Class: com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder
12 | * Method: InitEncoder
13 | * Signature: (Lcom/orangelabs/rcs/core/ims/protocol/rtp/codec/h263/encoder/EncOptions;)I
14 | */
15 | JNIEXPORT jint JNICALL Java_com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder_InitEncoder
16 | (JNIEnv *, jclass, jobject);
17 |
18 | /*
19 | * Class: com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder
20 | * Method: EncodeFrame
21 | * Signature: ([BJ)[B
22 | */
23 | JNIEXPORT jbyteArray JNICALL Java_com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder_EncodeFrame
24 | (JNIEnv *, jclass, jbyteArray, jlong);
25 |
26 | /*
27 | * Class: com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder
28 | * Method: DeinitEncoder
29 | * Signature: ()I
30 | */
31 | JNIEXPORT jint JNICALL Java_com_orangelabs_rcs_core_ims_protocol_rtp_codec_video_h263_encoder_NativeH263Encoder_DeinitEncoder
32 | (JNIEnv *, jclass);
33 |
34 | #ifdef __cplusplus
35 | }
36 | #endif
37 | #endif
38 |
--------------------------------------------------------------------------------
/RtspCamera/jni/m4v_h263/enc/src/m4venc_oscl.h:
--------------------------------------------------------------------------------
1 | /* ------------------------------------------------------------------
2 | * Copyright (C) 1998-2009 PacketVideo
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
13 | * express or implied.
14 | * See the License for the specific language governing permissions
15 | * and limitations under the License.
16 | * -------------------------------------------------------------------
17 | */
18 | /*********************************************************************************/
19 | /* Description: Created for abstracting out OSCL such that the code can be used */
20 | /* by both V3 and V4 OSCL library. This file is for V4. */
21 | /*********************************************************************************/
22 |
23 | #ifndef _M4VENC_OSCL_H_
24 | #define _M4VENC_OSCL_H_
25 |
26 |
27 | #define OSCL_DISABLE_WARNING_CONV_POSSIBLE_LOSS_OF_DATA
28 | #include "osclconfig_compiler_warnings.h"
29 |
30 | #include "oscl_mem.h"
31 |
32 | #define M4VENC_MALLOC(size) oscl_malloc(size)
33 | #define M4VENC_FREE(ptr) oscl_free(ptr)
34 |
35 | #define M4VENC_MEMSET(ptr,val,size) oscl_memset(ptr,val,size)
36 | #define M4VENC_MEMCPY(dst,src,size) oscl_memcpy(dst,src,size)
37 |
38 | #include "oscl_math.h"
39 | #define M4VENC_LOG(x) oscl_log(x)
40 | #define M4VENC_SQRT(x) oscl_sqrt(x)
41 | #define M4VENC_POW(x,y) oscl_pow(x,y)
42 |
43 | #define M4VENC_HAS_SYMBIAN_SUPPORT OSCL_HAS_SYMBIAN_SUPPORT
44 |
45 | #endif //_M4VENC_OSCL_H_
46 |
--------------------------------------------------------------------------------
/RtspCamera/libs/armeabi/libH263Decoder.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspCamera/libs/armeabi/libH263Decoder.so
--------------------------------------------------------------------------------
/RtspCamera/libs/armeabi/libH263Encoder.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspCamera/libs/armeabi/libH263Encoder.so
--------------------------------------------------------------------------------
/RtspCamera/libs/armeabi/libH264Decoder.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspCamera/libs/armeabi/libH264Decoder.so
--------------------------------------------------------------------------------
/RtspCamera/libs/armeabi/libH264Encoder.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspCamera/libs/armeabi/libH264Encoder.so
--------------------------------------------------------------------------------
/RtspCamera/proguard.cfg:
--------------------------------------------------------------------------------
1 | -optimizationpasses 5
2 | -dontusemixedcaseclassnames
3 | -dontskipnonpubliclibraryclasses
4 | -dontpreverify
5 | -verbose
6 | -optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
7 |
8 | -keep public class * extends android.app.Activity
9 | -keep public class * extends android.app.Application
10 | -keep public class * extends android.app.Service
11 | -keep public class * extends android.content.BroadcastReceiver
12 | -keep public class * extends android.content.ContentProvider
13 | -keep public class * extends android.app.backup.BackupAgentHelper
14 | -keep public class * extends android.preference.Preference
15 | -keep public class com.android.vending.licensing.ILicensingService
16 |
17 | -keepclasseswithmembernames class * {
18 | native ;
19 | }
20 |
21 | -keepclasseswithmembers class * {
22 | public (android.content.Context, android.util.AttributeSet);
23 | }
24 |
25 | -keepclasseswithmembers class * {
26 | public (android.content.Context, android.util.AttributeSet, int);
27 | }
28 |
29 | -keepclassmembers class * extends android.app.Activity {
30 | public void *(android.view.View);
31 | }
32 |
33 | -keepclassmembers enum * {
34 | public static **[] values();
35 | public static ** valueOf(java.lang.String);
36 | }
37 |
38 | -keep class * implements android.os.Parcelable {
39 | public static final android.os.Parcelable$Creator *;
40 | }
41 |
--------------------------------------------------------------------------------
/RtspCamera/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system use,
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 |
10 | # Project target.
11 | target=android-10
12 | android.library=true
13 |
--------------------------------------------------------------------------------
/RtspCamera/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspCamera/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/RtspCamera/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspCamera/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/RtspCamera/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspCamera/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/RtspCamera/res/layout/cameraapicodecs.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/RtspCamera/res/layout/cameranativecodecs.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/RtspCamera/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Spydroid running...
4 | RtspCamera
5 |
6 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/CoreException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core;
20 |
21 | /**
22 | * Core module exception
23 | *
24 | * @author JM. Auffret
25 | */
26 | public class CoreException extends java.lang.Exception {
27 | static final long serialVersionUID = 1L;
28 |
29 | /**
30 | * Constructor
31 | *
32 | * @param error Error message
33 | */
34 | public CoreException(String error) {
35 | super(error);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/RtpException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp;
20 |
21 | /**
22 | * RTP exception
23 | *
24 | * @author JM. Auffret
25 | */
26 | public class RtpException extends java.lang.Exception {
27 | static final long serialVersionUID = 1L;
28 |
29 | /**
30 | * Constructor
31 | *
32 | * @param error Error message
33 | */
34 | public RtpException(String error) {
35 | super(error);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/codec/video/VideoCodec.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.codec.Codec;
22 |
23 | /**
24 | * Video codec abstract class
25 | *
26 | * @author jexa7410
27 | */
28 | public abstract class VideoCodec extends Codec {
29 | }
30 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/codec/video/h263/H263Config.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h263;
20 |
21 | /**
22 | * Default H263 settings.
23 | *
24 | * @author hlxn7157
25 | */
26 | public class H263Config {
27 | /**
28 | * H263 Codec Name
29 | */
30 | public final static String CODEC_NAME = "h263-2000";
31 |
32 | /**
33 | * Default clock rate
34 | */
35 | public final static int CLOCK_RATE = 90000;
36 |
37 | /**
38 | * Default codec params
39 | */
40 | public final static String CODEC_PARAMS = "profile=0;level=10";
41 | // public final static String CODEC_PARAMS = "profile=0;level=20";
42 |
43 | /**
44 | * Default video width
45 | */
46 | // public final static int VIDEO_WIDTH = 176;
47 | public final static int VIDEO_WIDTH = 352;
48 |
49 | /**
50 | * Default video height
51 | */
52 | // public final static int VIDEO_HEIGHT = 144;
53 | public final static int VIDEO_HEIGHT = 288;
54 |
55 | /**
56 | * Default video frame rate
57 | */
58 | public final static int FRAME_RATE = 12;
59 |
60 | /**
61 | * Default video bit rate
62 | */
63 | public final static int BIT_RATE = 128000;
64 | }
65 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/codec/video/h263/decoder/NativeH263Decoder.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h263.decoder;
20 |
21 |
22 | // Referenced classes of package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h263.decoder:
23 | // VideoSample
24 |
25 | public class NativeH263Decoder
26 | {
27 |
28 | public NativeH263Decoder()
29 | {
30 | }
31 |
32 | public static native int InitDecoder(int i, int j);
33 |
34 | public static native int DeinitDecoder();
35 |
36 | public static native int DecodeAndConvert(byte abyte0[], int ai[], long l);
37 |
38 | public static native int InitParser(String s);
39 |
40 | public static native int DeinitParser();
41 |
42 | public static native int getVideoLength();
43 |
44 | public static native int getVideoWidth();
45 |
46 | public static native int getVideoHeight();
47 |
48 | public static native String getVideoCoding();
49 |
50 | public static native VideoSample getVideoSample(int ai[]);
51 |
52 | static
53 | {
54 | String libname = "H263Decoder";
55 | try
56 | {
57 | System.loadLibrary(libname);
58 | }
59 | catch(Exception exception) { }
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/codec/video/h263/decoder/VideoSample.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h263.decoder;
20 |
21 |
22 | public class VideoSample
23 | {
24 |
25 | public byte data[];
26 | public int timestamp;
27 |
28 | public VideoSample(byte data[], int timestamp)
29 | {
30 | this.data = null;
31 | this.timestamp = 0;
32 | this.data = data;
33 | this.timestamp = timestamp;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/codec/video/h263/encoder/NativeH263Encoder.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h263.encoder;
20 |
21 |
22 | // Referenced classes of package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h263.encoder:
23 | // NativeH263EncoderParams
24 |
25 | public class NativeH263Encoder
26 | {
27 |
28 | public NativeH263Encoder()
29 | {
30 | }
31 |
32 | public static native int InitEncoder(NativeH263EncoderParams nativeh263encoderparams);
33 |
34 | public static native byte[] EncodeFrame(byte abyte0[], long l);
35 |
36 | public static native int DeinitEncoder();
37 |
38 | static
39 | {
40 | String libname = "H263Encoder";
41 | try
42 | {
43 | System.loadLibrary(libname);
44 | }
45 | catch(UnsatisfiedLinkError unsatisfiedlinkerror) { }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/codec/video/h264/H264Config.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h264;
20 |
21 | /**
22 | * Default H264 Settings
23 | *
24 | * @author hlxn7157
25 | */
26 | public class H264Config {
27 | /**
28 | * H264 Codec Name
29 | */
30 | public final static String CODEC_NAME = "h264";
31 |
32 | /**
33 | * Default clock rate
34 | */
35 | public final static int CLOCK_RATE = 90000;
36 |
37 | /**
38 | * Default codec params
39 | */
40 | public final static String CODEC_PARAMS = "profile-level-id=42900B";
41 |
42 | /**
43 | * Default video width
44 | */
45 | // public final static int VIDEO_WIDTH = 176;
46 | public final static int VIDEO_WIDTH = 352;
47 |
48 | /**
49 | * Default video height
50 | */
51 | // public final static int VIDEO_HEIGHT = 144;
52 | public final static int VIDEO_HEIGHT = 288;
53 |
54 | /**
55 | * Default video frame rate
56 | */
57 | public final static int FRAME_RATE = 15;
58 |
59 | /**
60 | * Default video bit rate
61 | */
62 | // public final static int BIT_RATE = 64000;
63 | public final static int BIT_RATE = 384000;
64 | }
65 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/codec/video/h264/decoder/NativeH264Decoder.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h264.decoder;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h263.decoder.VideoSample;
22 |
23 | public class NativeH264Decoder
24 | {
25 |
26 | public NativeH264Decoder()
27 | {
28 | }
29 |
30 | public static native int InitDecoder();
31 |
32 | public static native int DeinitDecoder();
33 |
34 | public static synchronized native int DecodeAndConvert(byte abyte0[], int ai[]);
35 |
36 | public static native int InitParser(String s);
37 |
38 | public static native int DeinitParser();
39 |
40 | public static native int getVideoLength();
41 |
42 | public static native int getVideoWidth();
43 |
44 | public static native int getVideoHeight();
45 |
46 | public static native String getVideoCoding();
47 |
48 | public static native VideoSample getVideoSample(int ai[]);
49 |
50 | static
51 | {
52 | String libname = "H264Decoder";
53 | try
54 | {
55 | System.loadLibrary(libname);
56 | }
57 | catch(Exception exception) { }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/codec/video/h264/encoder/NativeH264Encoder.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.codec.video.h264.encoder;
20 |
21 |
22 | public class NativeH264Encoder
23 | {
24 |
25 | public NativeH264Encoder()
26 | {
27 | }
28 |
29 | public static native int InitEncoder(int i, int j, int k);
30 |
31 | public static native byte[] EncodeFrame(byte abyte0[], long l);
32 |
33 | public static native int DeinitEncoder();
34 |
35 | public static native int getLastEncodeStatus();
36 |
37 | static
38 | {
39 | String libname = "H264Encoder";
40 | try
41 | {
42 | System.loadLibrary(libname);
43 | }
44 | catch(UnsatisfiedLinkError unsatisfiedlinkerror) { }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/core/RtcpPacketUtils.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.core;
20 |
21 | /**
22 | * RTCP utils.
23 | *
24 | * @author hlxn7157
25 | */
26 | public class RtcpPacketUtils {
27 |
28 | /**
29 | * Convert 64 bit long to n bytes.
30 | *
31 | * @param data data
32 | * @param n desired number of bytes to convert the long to.
33 | * @return buffer
34 | */
35 | public static byte[] longToBytes(long data, int n) {
36 | byte buf[] = new byte[n];
37 | for (int i = n - 1; i >= 0; i--) {
38 | buf[i] = (byte)data;
39 | data = data >> 8;
40 | }
41 | return buf;
42 | }
43 |
44 | /**
45 | * Append two byte arrays.
46 | *
47 | * @param pck1 first packet.
48 | * @param pck2 second packet.
49 | * @return concatenated packet.
50 | */
51 | public static byte[] append(byte[] pck1, byte[] pck2) {
52 | byte packet[] = new byte[pck1.length + pck2.length];
53 | for (int i = 0; i < pck1.length; i++)
54 | packet[i] = pck1[i];
55 | for (int i = 0; i < pck2.length; i++)
56 | packet[i + pck1.length] = pck2[i];
57 | return packet;
58 | }
59 | };
60 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/core/RtcpReport.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.core;
20 |
21 | /**
22 | * RTCP report
23 | *
24 | * @author jexa7410
25 | */
26 | public class RtcpReport {
27 | public int ssrc;
28 | public int fractionlost;
29 | public int packetslost;
30 | public long lastseq;
31 | public int jitter;
32 | public long lsr;
33 | public long dlsr;
34 | public long receiptTime;
35 |
36 | public long getDLSR() {
37 | return dlsr;
38 | }
39 |
40 | public int getFractionLost() {
41 | return fractionlost;
42 | }
43 |
44 | public long getJitter() {
45 | return (long) jitter;
46 | }
47 |
48 | public long getLSR() {
49 | return lsr;
50 | }
51 |
52 | public long getNumLost() {
53 | return (long) packetslost;
54 | }
55 |
56 | public long getSSRC() {
57 | return (long) ssrc;
58 | }
59 |
60 | public long getXtndSeqNum() {
61 | return lastseq;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/core/RtcpSdesBlock.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.core;
20 |
21 | /**
22 | * RCTP SDES block
23 | *
24 | * @author jexa7410
25 | */
26 | public class RtcpSdesBlock {
27 | public int ssrc;
28 |
29 | public RtcpSdesItem[] items;
30 | }
31 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/core/RtcpSdesItem.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.core;
20 |
21 | /**
22 | * RCTP SDES item
23 | *
24 | * @author jexa7410
25 | */
26 | public class RtcpSdesItem {
27 | public int type;
28 | public byte[] data;
29 |
30 | public RtcpSdesItem() {
31 | }
32 |
33 | public RtcpSdesItem(int i, String string) {
34 | type = i;
35 | data = string.getBytes();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/core/RtcpStatisticsReceiver.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.core;
20 |
21 | /**
22 | * RTCP packet statistics receiver
23 | *
24 | * @author jexa7410
25 | */
26 | public class RtcpStatisticsReceiver {
27 | /**
28 | * Number of RTCP packets received
29 | */
30 | public int numRtcpPkts = 0;
31 |
32 | /**
33 | * Number of RTCP bytes received
34 | */
35 | public int numRtcpBytes = 0;
36 |
37 | /**
38 | * Number of RTCP SR packets received
39 | */
40 | public int numSrPkts = 0;
41 |
42 | /**
43 | * Number of bad RTCP packets received
44 | */
45 | public int numBadRtcpPkts = 0;
46 |
47 | /**
48 | * Number of unknown RTCP packets received
49 | */
50 | public int numUnknownTypes = 0;
51 |
52 | /**
53 | * Number of malformed RTCP packets received
54 | */
55 | public int numMalformedRtcpPkts = 0;
56 | }
57 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/core/RtcpStatisticsTransmitter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.core;
20 |
21 | /**
22 | * RTCP packet statistics transmitter
23 | *
24 | * @author jexa7410
25 | */
26 | public class RtcpStatisticsTransmitter {
27 | /**
28 | * Total number of packets sent
29 | */
30 | public int numPackets = 0;
31 |
32 | /**
33 | * Total number of bytes sent
34 | */
35 | public int numBytes = 0;
36 | }
37 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/core/RtpStatisticsReceiver.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.core;
20 |
21 | /**
22 | * RTP statistics receiver
23 | *
24 | * @author jexa7410
25 | */
26 | public class RtpStatisticsReceiver {
27 | /**
28 | * Number of RTP packets received
29 | */
30 | public int numPackets = 0;
31 |
32 | /**
33 | * Number of RTP bytes received
34 | */
35 | public int numBytes = 0;
36 |
37 | /**
38 | * Number of bad RTP packet received
39 | */
40 | public int numBadRtpPkts = 0;
41 | }
42 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/core/RtpStatisticsTransmitter.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.core;
20 |
21 | /**
22 | * RTP statistics transmitter
23 | *
24 | * @author jexa7410
25 | */
26 | public class RtpStatisticsTransmitter {
27 | /**
28 | * Total number of packets sent
29 | */
30 | public int numPackets = 0;
31 |
32 | /**
33 | * Total number of bytes sent
34 | */
35 | public int numBytes = 0;
36 | }
37 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/event/RtcpApplicationEvent.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.event;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.core.RtcpAppPacket;
22 |
23 | /**
24 | * RTCP application event
25 | *
26 | * @author jexa7410
27 | */
28 | public class RtcpApplicationEvent extends RtcpEvent {
29 |
30 | /**
31 | * Constructor
32 | *
33 | * @param packet RTCP APP packet
34 | */
35 | public RtcpApplicationEvent(RtcpAppPacket packet) {
36 | super(packet);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/event/RtcpByeEvent.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.event;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.core.RtcpByePacket;
22 |
23 | /**
24 | * RTCP bye event
25 | *
26 | * @author jexa7410
27 | */
28 | public class RtcpByeEvent extends RtcpEvent {
29 |
30 | /**
31 | * Constructor
32 | *
33 | * @param packet RTCP BYE packet
34 | */
35 | public RtcpByeEvent(RtcpByePacket packet) {
36 | super(packet);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/event/RtcpEvent.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.event;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.core.RtcpPacket;
22 |
23 | /**
24 | * Abstract RTCP event
25 | *
26 | * @author jexa7410
27 | */
28 | public abstract class RtcpEvent {
29 | /**
30 | * RTCP packet
31 | */
32 | private RtcpPacket packet;
33 |
34 | /**
35 | * Constructor
36 | *
37 | * @param packet RTCP packet
38 | */
39 | public RtcpEvent(RtcpPacket packet) {
40 | this.packet = packet;
41 | }
42 |
43 | /**
44 | * Returns the RTCP packet
45 | *
46 | * @return Packet
47 | */
48 | public RtcpPacket getPacket() {
49 | return packet;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/event/RtcpEventListener.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.event;
20 |
21 | /**
22 | * RTCP events listener interface
23 | *
24 | * @author jexa7410
25 | */
26 | public interface RtcpEventListener {
27 | /**
28 | * Receive RTCP event
29 | *
30 | * @param event RTCP event
31 | */
32 | void receiveRtcpEvent(RtcpEvent event);
33 | }
34 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/event/RtcpReceiverReportEvent.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.event;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.core.RtcpReceiverReportPacket;
22 |
23 | /**
24 | * RTCP receiver report event
25 | *
26 | * @author jexa7410
27 | */
28 | public class RtcpReceiverReportEvent extends RtcpEvent {
29 |
30 | /**
31 | * Constructor
32 | *
33 | * @param packet RTCP RR packet
34 | */
35 | public RtcpReceiverReportEvent(RtcpReceiverReportPacket packet) {
36 | super(packet);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/event/RtcpSdesEvent.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.event;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.core.RtcpSdesPacket;
22 |
23 | /**
24 | * RTCP session description event
25 | *
26 | * @author jexa7410
27 | */
28 | public class RtcpSdesEvent extends RtcpEvent {
29 |
30 | /**
31 | * Constructor
32 | *
33 | * @param packet RTCP SDES packet
34 | */
35 | public RtcpSdesEvent(RtcpSdesPacket packet) {
36 | super(packet);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/event/RtcpSenderReportEvent.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.event;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.core.RtcpSenderReportPacket;
22 |
23 | /**
24 | * RTCP sender report event
25 | *
26 | * @author jexa7410
27 | */
28 | public class RtcpSenderReportEvent extends RtcpEvent {
29 |
30 | /**
31 | * Constructor
32 | *
33 | * @param packet RTCP SR packet
34 | */
35 | public RtcpSenderReportEvent(RtcpSenderReportPacket packet) {
36 | super(packet);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/format/DummyFormat.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.format;
20 |
21 | /**
22 | * Dummy format
23 | *
24 | * @author jexa7410
25 | */
26 | public class DummyFormat extends Format {
27 |
28 | /**
29 | * Encoding name
30 | */
31 | public static final String ENCODING = "dummy";
32 |
33 | /**
34 | * Payload type
35 | */
36 | public static final int PAYLOAD = 12;
37 |
38 | /**
39 | * Constructor
40 | */
41 | public DummyFormat() {
42 | super(ENCODING, PAYLOAD);
43 | }
44 |
45 | /**
46 | * Get the size of a chunk of data from the source
47 | *
48 | * @return The minimum size of the buffer needed to read a chunk of data
49 | */
50 | public int getDataChunkSize() {
51 | return 0;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/format/Format.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.format;
20 |
21 | /**
22 | * Abstract format
23 | *
24 | * @author jexa7410
25 | */
26 | public abstract class Format {
27 | /**
28 | * Unknown payload
29 | */
30 | public static final int UNKNOWN_PAYLOAD = -1;
31 |
32 | /**
33 | * Codec
34 | */
35 | private String codec;
36 |
37 | /**
38 | * Payload type
39 | */
40 | private int payload;
41 |
42 | /**
43 | * Constructor
44 | *
45 | * @param codec Codec
46 | * @param payload Payload type
47 | */
48 | public Format(String codec, int payload) {
49 | this.codec = codec;
50 | this.payload = payload;
51 | }
52 |
53 | /**
54 | * Get the codec name
55 | *
56 | * @return Name
57 | */
58 | public String getCodec() {
59 | return codec;
60 | }
61 |
62 | /**
63 | * Get the type of payload
64 | *
65 | * @return Payload type
66 | */
67 | public int getPayload() {
68 | return payload;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/format/audio/AudioFormat.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.format.audio;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.format.Format;
22 |
23 | /**
24 | * Audio format
25 | */
26 | public class AudioFormat extends Format {
27 | /**
28 | * Constructor
29 | *
30 | * @param codec Codec
31 | * @param payload Payload type
32 | */
33 | public AudioFormat(String codec, int payload) {
34 | super(codec, payload);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/format/audio/PcmuAudioFormat.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.format.audio;
20 |
21 | /**
22 | * G711 PCMU audio format
23 | *
24 | * @author jexa7410
25 | */
26 | public class PcmuAudioFormat extends AudioFormat {
27 |
28 | /**
29 | * Encoding name
30 | */
31 | public static final String ENCODING = "pcmu";
32 |
33 | /**
34 | * Payload type
35 | */
36 | public static final int PAYLOAD = 0;
37 |
38 | /**
39 | * Constructor
40 | */
41 | public PcmuAudioFormat() {
42 | super(ENCODING, PAYLOAD);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/format/video/H263VideoFormat.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.format.video;
20 |
21 | /**
22 | * H263-2000 (h263++) video format
23 | *
24 | * @author jexa7410
25 | */
26 | public class H263VideoFormat extends VideoFormat {
27 |
28 | /**
29 | * Encoding name
30 | */
31 | public static final String ENCODING = "h263-2000";
32 |
33 | /**
34 | * Payload type
35 | */
36 | public static final int PAYLOAD = 97;
37 |
38 | /**
39 | * Constructor
40 | */
41 | public H263VideoFormat() {
42 | super(ENCODING, PAYLOAD);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/format/video/H264VideoFormat.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.format.video;
20 |
21 | /**
22 | * H264 video format
23 | *
24 | * @author jexa7410
25 | */
26 | public class H264VideoFormat extends VideoFormat {
27 |
28 | /**
29 | * Encoding name
30 | */
31 | public static final String ENCODING = "h264";
32 |
33 | /**
34 | * Payload type
35 | */
36 | public static final int PAYLOAD = 96;
37 |
38 | /**
39 | * Constructor
40 | */
41 | public H264VideoFormat() {
42 | super(ENCODING, PAYLOAD);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/format/video/VideoFormat.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.format.video;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.format.Format;
22 |
23 | /**
24 | * Video format
25 | */
26 | public class VideoFormat extends Format {
27 | /**
28 | * Constructor
29 | *
30 | * @param codec Codec
31 | * @param payload Payload type
32 | */
33 | public VideoFormat(String codec, int payload) {
34 | super(codec, payload);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/media/MediaException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.media;
20 |
21 | /**
22 | * Media exception
23 | *
24 | * @author JM. Auffret
25 | */
26 | public class MediaException extends java.lang.Exception {
27 | static final long serialVersionUID = 1L;
28 |
29 | /**
30 | * Constructor
31 | *
32 | * @param error Error message
33 | */
34 | public MediaException(String error) {
35 | super(error);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/media/MediaInput.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.media;
20 |
21 | /**
22 | * Media input (e.g. camera, microphone)
23 | *
24 | * @author jexa7410
25 | */
26 | public interface MediaInput {
27 | /**
28 | * Open the player
29 | *
30 | * @throws MediaException
31 | */
32 | public void open() throws MediaException;
33 |
34 | /**
35 | * Close the player
36 | */
37 | public void close();
38 |
39 | /**
40 | * Read a media sample (blocking method)
41 | *
42 | * @return Media sample
43 | * @throws MediaException
44 | */
45 | public MediaSample readSample() throws MediaException;
46 | }
47 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/media/MediaOutput.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.media;
20 |
21 |
22 | /**
23 | * Media output (e.g. screen, headset)
24 | *
25 | * @author jexa7410
26 | */
27 | public interface MediaOutput {
28 | /**
29 | * Open the renderer
30 | *
31 | * @throws MediaException
32 | */
33 | public void open() throws MediaException;
34 |
35 | /**
36 | * Close the renderer
37 | */
38 | public void close();
39 |
40 | /**
41 | * Write a media sample
42 | *
43 | * @param sample Media sample
44 | * @throws MediaException
45 | */
46 | public void writeSample(MediaSample sample) throws MediaException;
47 | }
48 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/media/MediaSample.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.media;
20 |
21 | /**
22 | * Media sample
23 | *
24 | * @author jexa7410
25 | */
26 | public class MediaSample {
27 |
28 | /**
29 | * Data
30 | */
31 | private byte[] data;
32 |
33 | /**
34 | * Time stamp
35 | */
36 | private long time;
37 |
38 | /**
39 | * Constructor
40 | *
41 | * @param data Data
42 | * @param time Time stamp
43 | */
44 | public MediaSample(byte[] data, long time) {
45 | this.data = data;
46 | this.time = time;
47 | }
48 |
49 | /**
50 | * Returns the data sample
51 | *
52 | * @return Byte array
53 | */
54 | public byte[] getData() {
55 | return data;
56 | }
57 |
58 | /**
59 | * Returns the length of the data sample
60 | *
61 | * @return Data sample length
62 | */
63 | public int getLength() {
64 | if (data != null) {
65 | return data.length;
66 | } else {
67 | return 0;
68 | }
69 | }
70 |
71 | /**
72 | * Returns the time stamp of the sample
73 | *
74 | * @return Time in microseconds
75 | */
76 | public long getTimeStamp() {
77 | return time;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/stream/ProcessorInputStream.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.stream;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.util.Buffer;
22 |
23 | /**
24 | * Processor input stream
25 | */
26 | public interface ProcessorInputStream {
27 |
28 | /**
29 | * Open the input stream
30 | *
31 | * @throws Exception
32 | */
33 | public void open() throws Exception;
34 |
35 | /**
36 | * Close the input stream
37 | */
38 | public void close();
39 |
40 | /**
41 | * Read from the input stream without blocking
42 | *
43 | * @return Buffer
44 | * @throws Exception
45 | */
46 | public Buffer read() throws Exception;
47 | }
48 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/stream/ProcessorOutputStream.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.stream;
20 |
21 | import com.orangelabs.rcs.core.ims.protocol.rtp.util.Buffer;
22 |
23 | /**
24 | * Processor output stream
25 | */
26 | public interface ProcessorOutputStream {
27 | /**
28 | * Open the output stream
29 | *
30 | * @throws Exception
31 | */
32 | public void open() throws Exception;
33 |
34 | /**
35 | * Close from the output stream
36 | */
37 | public void close();
38 |
39 | /**
40 | * Write to the stream without blocking
41 | *
42 | * @param buffer Input buffer
43 | * @throws Exception
44 | */
45 | public void write(Buffer buffer) throws Exception;
46 | }
47 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/util/Packet.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.util;
20 |
21 | /**
22 | * Generic packet
23 | *
24 | * @author jexa7410
25 | */
26 | public class Packet {
27 | /**
28 | * Data
29 | */
30 | public byte[] data;
31 |
32 | /**
33 | * Packet length
34 | */
35 | public int length;
36 |
37 | /**
38 | * Offset
39 | */
40 | public int offset;
41 |
42 | /**
43 | * Received at
44 | */
45 | public long receivedAt;
46 |
47 | /**
48 | * Constructor
49 | */
50 | public Packet() {
51 | }
52 |
53 | /**
54 | * Constructor
55 | *
56 | * @param packet Packet
57 | */
58 | public Packet(Packet packet) {
59 | data = packet.data;
60 | length = packet.length;
61 | offset = packet.offset;
62 | receivedAt = packet.receivedAt;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/core/ims/protocol/rtp/util/SystemTimeBase.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.core.ims.protocol.rtp.util;
20 |
21 | /**
22 | * Time base
23 | */
24 | public class SystemTimeBase {
25 |
26 | /**
27 | * Offset time (start-up time)
28 | */
29 | private static long offset = System.currentTimeMillis() * 1000000L;
30 |
31 | /**
32 | * Returns a time base value in nanoseconds
33 | *
34 | * @return Time
35 | */
36 | public long getTime() {
37 | return (System.currentTimeMillis() * 1000000L) - offset;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/platform/AndroidFactory.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.platform;
20 |
21 | import android.content.Context;
22 |
23 | // import com.orangelabs.rcs.platform.file.FileFactory;
24 | import com.orangelabs.rcs.platform.network.NetworkFactory;
25 | import com.orangelabs.rcs.platform.registry.RegistryFactory;
26 |
27 | /**
28 | * Android platform
29 | *
30 | * @author jexa7410
31 | */
32 | public class AndroidFactory {
33 | /**
34 | * Android application context
35 | */
36 | private static Context context = null;
37 |
38 | /**
39 | * Returns the application context
40 | *
41 | * @return Context
42 | */
43 | public static Context getApplicationContext() {
44 | return context;
45 | }
46 |
47 | /**
48 | * Load factory
49 | *
50 | * @param context Context
51 | */
52 | public static void setApplicationContext(Context context) {
53 |
54 | AndroidFactory.context = context;
55 | try {
56 |
57 | NetworkFactory.loadFactory("com.orangelabs.rcs.platform.network.AndroidNetworkFactory");
58 | RegistryFactory.loadFactory("com.orangelabs.rcs.platform.registry.AndroidRegistryFactory");
59 |
60 | // FileFactory.loadFactory("com.orangelabs.rcs.platform.file.AndroidFileFactory");
61 |
62 | } catch(FactoryException e) {
63 | e.printStackTrace();
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/platform/FactoryException.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.platform;
20 |
21 | /**
22 | * Factory exception
23 | *
24 | * @author JM. Auffret
25 | */
26 | public class FactoryException extends java.lang.Exception {
27 | static final long serialVersionUID = 1L;
28 |
29 | /**
30 | * Constructor
31 | *
32 | * @param error Error message
33 | */
34 | public FactoryException(String error) {
35 | super(error);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/platform/file/FileDescription.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.platform.file;
20 |
21 | /**
22 | * File description
23 | *
24 | * @author jexa7410
25 | */
26 | public class FileDescription {
27 | /**
28 | * Name
29 | */
30 | private String name;
31 |
32 | /**
33 | * Size
34 | */
35 | private long size = -1;
36 |
37 | /**
38 | * Directory
39 | */
40 | private boolean directory = false;
41 |
42 | /**
43 | * Constructor
44 | */
45 | public FileDescription(String name, long size) {
46 | this.name = name;
47 | this.size = size;
48 | }
49 |
50 | /**
51 | * Constructor
52 | */
53 | public FileDescription(String name, long size, boolean directory) {
54 | this.name = name;
55 | this.size = size;
56 | this.directory = directory;
57 | }
58 |
59 | /**
60 | * Returns the size of the file
61 | *
62 | * @return File size
63 | */
64 | public long getSize() {
65 | return size;
66 | }
67 |
68 | /**
69 | * Returns the name of the file
70 | *
71 | * @return File name
72 | */
73 | public String getName() {
74 | return name;
75 | }
76 |
77 | /**
78 | * Is a directory
79 | *
80 | * @return Boolean
81 | */
82 | public boolean isDirectory() {
83 | return directory;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/platform/logger/AndroidAppender.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.platform.logger;
20 |
21 | import android.util.Log;
22 |
23 | import com.orangelabs.rcs.utils.logger.Appender;
24 | import com.orangelabs.rcs.utils.logger.Logger;
25 |
26 | /**
27 | * Android appender
28 | *
29 | * @author jexa7410
30 | */
31 | public class AndroidAppender extends Appender {
32 | /**
33 | * Constructor
34 | */
35 | public AndroidAppender() {
36 | super();
37 | }
38 |
39 | /**
40 | * Print a trace
41 | *
42 | * @param classname Classname
43 | * @param level Trace level
44 | * @param trace Trace
45 | */
46 | public synchronized void printTrace(String classname, int level, String trace) {
47 | classname = "[RCS][" + classname + "]";
48 |
49 | if (level == Logger.INFO_LEVEL) {
50 | Log.i(classname, trace);
51 | } else
52 | if (level == Logger.WARN_LEVEL) {
53 | Log.w(classname, trace);
54 | } else
55 | if (level == Logger.ERROR_LEVEL) {
56 | Log.e(classname, trace);
57 | } else
58 | if (level == Logger.FATAL_LEVEL) {
59 | Log.e(classname, trace);
60 | } else {
61 | Log.v(classname, trace);
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/platform/network/HttpConnection.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.platform.network;
20 |
21 | import java.io.ByteArrayOutputStream;
22 | import java.io.IOException;
23 |
24 | /**
25 | * HTTP connection
26 | *
27 | * @author jexa7410
28 | */
29 | public interface HttpConnection {
30 | /**
31 | * GET method
32 | */
33 | public final static String GET_METHOD = "GET";
34 |
35 | /**
36 | * POST method
37 | */
38 | public final static String POST_METHOD = "POST";
39 |
40 | /**
41 | * Open the HTTP connection
42 | *
43 | * @param url Remote URL
44 | * @throws IOException
45 | */
46 | public void open(String url) throws IOException;
47 |
48 | /**
49 | * Close the HTTP connection
50 | *
51 | * @throws IOException
52 | */
53 | public void close() throws IOException;
54 |
55 | /**
56 | * HTTP GET request
57 | *
58 | * @return Response
59 | * @throws IOException
60 | */
61 | public ByteArrayOutputStream get() throws IOException;
62 |
63 | /**
64 | * HTTP POST request
65 | *
66 | * @return Response
67 | * @throws IOException
68 | */
69 | public ByteArrayOutputStream post() throws IOException;
70 | }
71 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/platform/network/SocketServerConnection.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.platform.network;
20 |
21 | import java.io.IOException;
22 |
23 | /**
24 | * Socket server connection
25 | *
26 | * @author jexa7410
27 | */
28 | public interface SocketServerConnection {
29 | /**
30 | * Open the socket
31 | *
32 | * @param port Local port
33 | * @throws IOException
34 | */
35 | public void open(int port) throws IOException;
36 |
37 | /**
38 | * Close the socket
39 | *
40 | * @throws IOException
41 | */
42 | public void close() throws IOException;
43 |
44 | /**
45 | * Accept connection
46 | *
47 | * @return Socket connection
48 | * @throws IOException
49 | */
50 | public SocketConnection acceptConnection() throws IOException;
51 | }
52 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/service/api/client/media/IMediaEventListener.aidl:
--------------------------------------------------------------------------------
1 | package com.orangelabs.rcs.service.api.client.media;
2 |
3 | /**
4 | * Media event listener
5 | */
6 | interface IMediaEventListener {
7 | // Media is opened
8 | void mediaOpened();
9 |
10 | // Media is closed
11 | void mediaClosed();
12 |
13 | // Media is started
14 | void mediaStarted();
15 |
16 | // Media is stopped
17 | void mediaStopped();
18 |
19 | // Media has failed
20 | void mediaError(in String error);
21 | }
22 |
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/service/api/client/media/IMediaPlayer.aidl:
--------------------------------------------------------------------------------
1 | package com.orangelabs.rcs.service.api.client.media;
2 |
3 | import com.orangelabs.rcs.service.api.client.media.IMediaEventListener;
4 | import com.orangelabs.rcs.service.api.client.media.MediaCodec;
5 |
6 | /**
7 | * Media RTP player
8 | */
9 | interface IMediaPlayer {
10 | // Open the player
11 | void open(in String remoteHost, in int remotePort);
12 |
13 | // Close the player
14 | void close();
15 |
16 | // Start the player
17 | void start();
18 |
19 | // Stop the player
20 | void stop();
21 |
22 | // Returns the local RTP port
23 | int getLocalRtpPort();
24 |
25 | // Add a media listener
26 | void addListener(in IMediaEventListener listener);
27 |
28 | // Remove media listeners
29 | void removeAllListeners();
30 |
31 | // Get supported media codecs
32 | MediaCodec[] getSupportedMediaCodecs();
33 |
34 | // Get media codec
35 | MediaCodec getMediaCodec();
36 |
37 | // Set media codec
38 | void setMediaCodec(in MediaCodec mediaCodec);
39 | }
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/service/api/client/media/IMediaRenderer.aidl:
--------------------------------------------------------------------------------
1 | package com.orangelabs.rcs.service.api.client.media;
2 |
3 | import com.orangelabs.rcs.service.api.client.media.IMediaEventListener;
4 | import com.orangelabs.rcs.service.api.client.media.MediaCodec;
5 |
6 | /**
7 | * Media RTP renderer
8 | */
9 | interface IMediaRenderer {
10 | // Open the renderer
11 | void open(in String remoteHost, in int remotePort);
12 |
13 | // Close the renderer
14 | void close();
15 |
16 | // Start the renderer
17 | void start();
18 |
19 | // Stop the renderer
20 | void stop();
21 |
22 | // Returns the local RTP port
23 | int getLocalRtpPort();
24 |
25 | // Add a media listener
26 | void addListener(in IMediaEventListener listener);
27 |
28 | // Remove media listeners
29 | void removeAllListeners();
30 |
31 | // Get supported media codecs
32 | MediaCodec[] getSupportedMediaCodecs();
33 |
34 | // Get media codec
35 | MediaCodec getMediaCodec();
36 |
37 | // Set media codec
38 | void setMediaCodec(in MediaCodec mediaCodec);
39 | }
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/service/api/client/media/MediaCodec.aidl:
--------------------------------------------------------------------------------
1 | package com.orangelabs.rcs.service.api.client.media;
2 |
3 | parcelable MediaCodec;
--------------------------------------------------------------------------------
/RtspCamera/src/com/orangelabs/rcs/utils/logger/Appender.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Software Name : RCS IMS Stack
3 | *
4 | * Copyright (C) 2010 France Telecom S.A.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | ******************************************************************************/
18 |
19 | package com.orangelabs.rcs.utils.logger;
20 |
21 | /**
22 | * Appender
23 | *
24 | * @author jexa7410
25 | */
26 | public abstract class Appender {
27 | /**
28 | * Constructor
29 | */
30 | public Appender() {
31 | }
32 |
33 | /**
34 | * Print a trace
35 | *
36 | * @param classname Classname
37 | * @param level Trace level
38 | * @param trace Trace
39 | */
40 | public abstract void printTrace(String classname, int level, String trace);
41 | }
42 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtp/packetizer/AbstractPacketizer.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtp.packetizer;
2 |
3 | import java.io.IOException;
4 | import java.io.InputStream;
5 |
6 | import de.kp.net.rtp.RtpSender;
7 |
8 | abstract public class AbstractPacketizer extends Thread {
9 |
10 | protected InputStream fis;
11 | protected RtpSender rtpSender;
12 | protected boolean running = false;
13 |
14 | public AbstractPacketizer() {
15 | super();
16 | }
17 |
18 | public AbstractPacketizer(Runnable runnable) {
19 | super(runnable);
20 | }
21 |
22 | public AbstractPacketizer(String threadName) {
23 | super(threadName);
24 | }
25 |
26 | public AbstractPacketizer(Runnable runnable, String threadName) {
27 | super(runnable, threadName);
28 | }
29 |
30 | public AbstractPacketizer(ThreadGroup group, Runnable runnable) {
31 | super(group, runnable);
32 | }
33 |
34 | public AbstractPacketizer(ThreadGroup group, String threadName) {
35 | super(group, threadName);
36 | }
37 |
38 | public AbstractPacketizer(ThreadGroup group, Runnable runnable, String threadName) {
39 | super(group, runnable, threadName);
40 | }
41 |
42 | public AbstractPacketizer(ThreadGroup group, Runnable runnable, String threadName, long stackSize) {
43 | super(group, runnable, threadName, stackSize);
44 | }
45 |
46 | public void startStreaming() {
47 | running = true;
48 | start();
49 | }
50 |
51 | public void stopStreaming() {
52 | try {
53 | fis.close();
54 | } catch (IOException e) {
55 |
56 | }
57 | running = false;
58 | }
59 |
60 |
61 |
62 | }
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/api/EntityMessage.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.api;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import de.kp.net.rtsp.client.header.RtspContent;
25 |
26 | public interface EntityMessage {
27 |
28 | public RtspContent getContent();
29 |
30 | public void setContent(RtspContent content);
31 |
32 | public Message getMessage();
33 |
34 | public byte[] getBytes() throws Exception;
35 |
36 | public boolean isEntity();
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/api/MessageFactory.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.api;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import java.net.URISyntaxException;
25 |
26 | import de.kp.net.rtsp.client.header.RtspContent;
27 | import de.kp.net.rtsp.client.header.RtspHeader;
28 | import de.kp.net.rtsp.client.message.MessageBuffer;
29 |
30 | public interface MessageFactory {
31 |
32 | public void incomingMessage(MessageBuffer message) throws Exception;
33 |
34 | public Request outgoingRequest(String uri, Request.Method method, int cseq, RtspHeader... extras) throws URISyntaxException;
35 |
36 | public Request outgoingRequest(RtspContent body, String uri, Request.Method method, int cseq, RtspHeader... extras) throws URISyntaxException;
37 |
38 | public Response outgoingResponse(int code, String message, int cseq, RtspHeader... extras);
39 |
40 | public Response outgoingResponse(RtspContent body, int code, String text, int cseq, RtspHeader... extras);
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/api/Request.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.api;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import java.net.URISyntaxException;
25 |
26 | import de.kp.net.rtsp.client.RtspClient;
27 |
28 | public interface Request extends Message {
29 |
30 | enum Method {
31 | OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, RECORD, TEARDOWN
32 | };
33 |
34 | public void setLine(Method method, String uri) throws URISyntaxException;
35 |
36 | public Method getMethod();
37 |
38 | public String getURI();
39 |
40 | public void handleResponse(RtspClient client, Response response);
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/api/RequestListener.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.api;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import de.kp.net.rtsp.client.RtspClient;
25 |
26 | public interface RequestListener {
27 |
28 | public void onDescriptor(RtspClient client, String descriptor);
29 |
30 | public void onError(RtspClient client, Throwable error);
31 |
32 | public void onFailure(RtspClient client, Request request, Throwable cause);
33 |
34 | public void onSuccess(RtspClient client, Request request, Response response);
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/api/Response.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.api;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | public interface Response extends Message {
25 |
26 | public void setLine(int statusCode, String statusPhrase);
27 |
28 | public int getStatusCode();
29 |
30 | public String getStatusText();
31 | }
32 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/api/Transport.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.api;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import java.io.IOException;
25 | import java.net.URI;
26 |
27 | /**
28 | * This interface defines a transport protocol (TCP, UDP) or method (HTTP
29 | * tunneling). Transport also MUST enqueue a command if a connection is busy at
30 | * the moment it is issued.
31 | */
32 |
33 | public interface Transport {
34 |
35 | public void connect(URI to) throws IOException;
36 |
37 | public void disconnect();
38 |
39 | public void sendMessage(Message message) throws Exception;
40 |
41 | public void setTransportListener(TransportListener listener);
42 |
43 | public void setUserData(Object data);
44 |
45 | public boolean isConnected();
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/api/TransportListener.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.api;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | /**
25 | * Listener for transport events. Implementations of {@link Transport}, when
26 | * calling a listener method, must catch all errors and submit them to the
27 | * error() method.
28 | */
29 | public interface TransportListener {
30 |
31 | public void connected(Transport t) throws Throwable;
32 |
33 | public void error(Transport t, Throwable error);
34 |
35 | public void error(Transport t, Message message, Throwable error);
36 |
37 | public void remoteDisconnection(Transport t) throws Throwable;
38 |
39 | public void dataReceived(Transport t, byte[] data, int size) throws Throwable;
40 |
41 | public void dataSent(Transport t) throws Throwable;
42 | }
43 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/header/CSeqHeader.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.header;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | public class CSeqHeader extends RtspBaseIntegerHeader {
25 | public static final String NAME = "CSeq";
26 |
27 | public CSeqHeader() {
28 | super(NAME);
29 | }
30 |
31 | public CSeqHeader(int cseq) {
32 | super(NAME, cseq);
33 | }
34 |
35 | public CSeqHeader(String line) {
36 | super(line);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/header/ContentEncodingHeader.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.header;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | public class ContentEncodingHeader extends RtspBaseStringHeader {
25 |
26 | public static final String NAME = "Content-Encoding";
27 |
28 | public ContentEncodingHeader() {
29 | super(NAME);
30 | }
31 |
32 | public ContentEncodingHeader(String header) {
33 | super(NAME, header);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/header/ContentLengthHeader.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.header;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | public class ContentLengthHeader extends RtspBaseIntegerHeader {
25 |
26 | public static final String NAME = "Content-Length";
27 |
28 | public ContentLengthHeader() {
29 | super(NAME);
30 | }
31 |
32 | public ContentLengthHeader(int value) {
33 | super(NAME, value);
34 | }
35 |
36 | public ContentLengthHeader(String header) throws Exception {
37 | super(NAME, header);
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/header/ContentTypeHeader.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.header;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | public class ContentTypeHeader extends RtspBaseStringHeader {
25 |
26 | public static final String NAME = "Content-Type";
27 |
28 | public ContentTypeHeader() {
29 | super(NAME);
30 | }
31 |
32 | public ContentTypeHeader(String header) {
33 | super(NAME, header);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/header/RtspBaseIntegerHeader.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.header;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | public class RtspBaseIntegerHeader extends RtspHeader {
25 |
26 | private int value;
27 |
28 | public RtspBaseIntegerHeader(String name) {
29 | super(name);
30 |
31 | String text = getRawValue();
32 | if(text != null) value = Integer.parseInt(text);
33 |
34 | }
35 |
36 | public RtspBaseIntegerHeader(String name, int value) {
37 | super(name);
38 | setValue(value);
39 | }
40 |
41 | public RtspBaseIntegerHeader(String name, String header) throws Exception {
42 | super(header);
43 |
44 | checkName(name);
45 | value = Integer.parseInt(getRawValue());
46 |
47 | }
48 |
49 | public final void setValue(int newValue) {
50 | value = newValue;
51 | setRawValue(String.valueOf(value));
52 | }
53 |
54 | public final int getValue() {
55 | return value;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/header/RtspBaseStringHeader.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.header;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | public class RtspBaseStringHeader extends RtspHeader {
25 |
26 | public RtspBaseStringHeader(String name) {
27 | super(name);
28 | }
29 |
30 | public RtspBaseStringHeader(String name, String header) {
31 | super(header);
32 |
33 | try {
34 | checkName(name);
35 |
36 | } catch(Exception e) {
37 | setName(name);
38 | }
39 |
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/header/RtspContent.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.header;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import de.kp.net.rtsp.client.api.Message;
25 |
26 | public class RtspContent {
27 |
28 | private String type;
29 |
30 | private String encoding;
31 |
32 | private byte[] content;
33 |
34 | public void setDescription(Message message) throws Exception {
35 |
36 | type = message.getHeader(ContentTypeHeader.NAME).getRawValue();
37 | try {
38 | encoding = message.getHeader(ContentEncodingHeader.NAME).getRawValue();
39 |
40 | } catch(Exception e) {
41 | }
42 |
43 | }
44 |
45 | public String getType() {
46 | return type;
47 | }
48 |
49 | public void setType(String type) {
50 | this.type = type;
51 | }
52 |
53 | public String getEncoding() {
54 | return encoding;
55 | }
56 |
57 | public void setEncoding(String encoding) {
58 | this.encoding = encoding;
59 | }
60 |
61 | public byte[] getBytes() {
62 | return content;
63 | }
64 |
65 | public void setBytes(byte[] content) {
66 | this.content = content;
67 | }
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/header/SessionHeader.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.header;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | public class SessionHeader extends RtspBaseStringHeader {
25 |
26 | public static final String NAME = "Session";
27 |
28 | public SessionHeader() {
29 | super(NAME);
30 | }
31 |
32 | public SessionHeader(String header) {
33 | super(NAME, header);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/message/RtspDescriptor.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.message;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 | import java.util.StringTokenizer;
6 |
7 | import de.kp.net.rtsp.RtspConstants;
8 |
9 | public class RtspDescriptor {
10 |
11 | private static String SEP = "\r\n";
12 |
13 | private ArrayList mediaList;
14 |
15 | public RtspDescriptor(String descriptor) {
16 |
17 | // initialize media list
18 | mediaList = new ArrayList();
19 |
20 | RtspMedia mediaItem = null;
21 |
22 | try {
23 | StringTokenizer tokenizer = new StringTokenizer(descriptor, SEP);
24 | while (tokenizer.hasMoreTokens()) {
25 |
26 | String token = tokenizer.nextToken();
27 | if (token.startsWith("m=")) {
28 | // a new media item is detected
29 | mediaItem = new RtspMedia(token);
30 | mediaList.add(mediaItem);
31 |
32 |
33 | } else if (token.startsWith("a=")) {
34 | mediaItem.setAttribute(token);
35 | }
36 |
37 | }
38 |
39 | } catch (Exception e) {
40 | e.printStackTrace();
41 | }
42 |
43 | }
44 |
45 | public List getMediaList() {
46 | return mediaList;
47 | }
48 |
49 | public RtspMedia getFirstVideo() {
50 |
51 | RtspMedia video = null;
52 | for (RtspMedia mediaItem:this.mediaList) {
53 |
54 | if (mediaItem.getMediaType().equals(RtspConstants.SDP_VIDEO_TYPE)) {
55 | video = mediaItem;
56 | break;
57 | }
58 |
59 | }
60 |
61 | return video;
62 |
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/request/RtspDescribeRequest.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.request;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import java.net.URISyntaxException;
25 |
26 | import de.kp.net.rtsp.client.RtspClient;
27 | import de.kp.net.rtsp.client.api.Response;
28 |
29 | public class RtspDescribeRequest extends RtspRequest {
30 |
31 | public RtspDescribeRequest() {
32 | super();
33 | }
34 |
35 | public RtspDescribeRequest(String messageLine) throws URISyntaxException {
36 | super(messageLine);
37 | }
38 |
39 | @Override
40 | public byte[] getBytes() throws Exception {
41 | getHeader("Accept");
42 | return super.getBytes();
43 | }
44 |
45 | @Override
46 | public void handleResponse(RtspClient client, Response response) {
47 | super.handleResponse(client, response);
48 |
49 | try {
50 | client.getRequestListener().onDescriptor(client, new String(response.getEntityMessage().getContent().getBytes()));
51 |
52 | } catch(Exception e) {
53 | client.getRequestListener().onError(client, e);
54 | }
55 |
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/request/RtspOptionsRequest.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.request;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import java.net.URI;
25 | import java.net.URISyntaxException;
26 |
27 | public class RtspOptionsRequest extends RtspRequest {
28 |
29 | public RtspOptionsRequest() {
30 | }
31 |
32 | public RtspOptionsRequest(String line) throws URISyntaxException {
33 | super(line);
34 | }
35 |
36 | @Override
37 | public void setLine(Method method, String uri) throws URISyntaxException {
38 |
39 | setMethod(method);
40 | setURI("*".equals(uri) ? uri : new URI(uri).toString());
41 |
42 | super.setLine(method.toString() + ' ' + uri + ' ' + RTSP_VERSION_TOKEN);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/request/RtspPauseRequest.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.request;
2 |
3 | import java.net.URISyntaxException;
4 |
5 | import de.kp.net.rtsp.client.header.SessionHeader;
6 |
7 | public class RtspPauseRequest extends RtspRequest {
8 |
9 | public RtspPauseRequest() {
10 | }
11 |
12 | public RtspPauseRequest(String messageLine) throws URISyntaxException {
13 | super(messageLine);
14 | }
15 |
16 | @Override
17 | public byte[] getBytes() throws Exception {
18 | getHeader(SessionHeader.NAME);
19 | return super.getBytes();
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/request/RtspPlayRequest.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.request;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import java.net.URISyntaxException;
25 |
26 | import de.kp.net.rtsp.client.header.SessionHeader;
27 |
28 | public class RtspPlayRequest extends RtspRequest {
29 |
30 | public RtspPlayRequest() {
31 | }
32 |
33 | public RtspPlayRequest(String messageLine) throws URISyntaxException {
34 | super(messageLine);
35 | }
36 |
37 | @Override
38 | public byte[] getBytes() throws Exception {
39 | getHeader(SessionHeader.NAME);
40 | return super.getBytes();
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/request/RtspSetupRequest.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.request;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import java.net.URISyntaxException;
25 |
26 | import de.kp.net.rtsp.client.RtspClient;
27 | import de.kp.net.rtsp.client.api.Response;
28 | import de.kp.net.rtsp.client.header.SessionHeader;
29 |
30 | public class RtspSetupRequest extends RtspRequest {
31 | public RtspSetupRequest() {
32 | }
33 |
34 | public RtspSetupRequest(String line) throws URISyntaxException {
35 | super(line);
36 | }
37 |
38 | @Override
39 | public byte[] getBytes() throws Exception {
40 | getHeader("Transport");
41 | return super.getBytes();
42 | }
43 |
44 | @Override
45 | public void handleResponse(RtspClient client, Response response) {
46 |
47 | super.handleResponse(client, response);
48 | try {
49 | if(response.getStatusCode() == 200)
50 | client.setSession((SessionHeader) response.getHeader(SessionHeader.NAME));
51 |
52 | } catch(Exception e) {
53 | client.getRequestListener().onError(client, e);
54 | }
55 |
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/request/RtspTeardownRequest.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.request;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import java.net.URISyntaxException;
25 |
26 | import de.kp.net.rtsp.client.RtspClient;
27 | import de.kp.net.rtsp.client.api.Response;
28 | import de.kp.net.rtsp.client.header.SessionHeader;
29 |
30 | public class RtspTeardownRequest extends RtspRequest {
31 |
32 | public RtspTeardownRequest() {
33 | super();
34 | }
35 |
36 | public RtspTeardownRequest(String messageLine) throws URISyntaxException {
37 | super(messageLine);
38 | }
39 |
40 | @Override
41 | public byte[] getBytes() throws Exception {
42 | getHeader(SessionHeader.NAME);
43 | return super.getBytes();
44 | }
45 |
46 | @Override
47 | public void handleResponse(RtspClient client, Response response) {
48 | super.handleResponse(client, response);
49 |
50 | if(response.getStatusCode() == 200) client.setSession(null);
51 | client.getTransport().disconnect();
52 |
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/client/response/RtspResponse.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.client.response;
2 | /**
3 | * Copyright 2010 Voice Technology Ind. e Com. Ltda.
4 | *
5 | * RTSPClientLib is free software: you can redistribute it and/or
6 | * modify it under the terms of the GNU Lesser General Public License
7 | * as published by the Free Software Foundation, either version 3 of
8 | * the License, or (at your option) any later version.
9 | *
10 | * RTSPClientLib 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
13 | * GNU Lesser General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Lesser General Public License
16 | * along with this software. If not, see .
17 | *
18 | *
19 | * This class has been adapted to the needs of the RtspCamera project
20 | * @author Stefan Krusche (krusche@dr-kruscheundpartner.de)
21 | *
22 | */
23 |
24 | import de.kp.net.rtsp.client.api.Response;
25 | import de.kp.net.rtsp.client.message.RtspMessage;
26 |
27 | public class RtspResponse extends RtspMessage implements Response {
28 |
29 | private int status;
30 | private String text;
31 |
32 | public RtspResponse() {
33 | }
34 |
35 | public RtspResponse(String line) {
36 |
37 | setLine(line);
38 | line = line.substring(line.indexOf(' ') + 1);
39 |
40 | status = Integer.parseInt(line.substring(0, line.indexOf(' ')));
41 | text = line.substring(line.indexOf(' ') + 1);
42 |
43 | }
44 |
45 | @Override
46 | public int getStatusCode() {
47 | return status;
48 | }
49 |
50 | @Override
51 | public String getStatusText() {
52 | return text;
53 | }
54 |
55 | @Override
56 | public void setLine(int statusCode, String statusText) {
57 |
58 | status = statusCode;
59 | text = statusText;
60 |
61 | super.setLine(RTSP_VERSION_TOKEN + ' ' + status + ' ' + text);
62 |
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/server/response/RtspAnnounceResponse.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.server.response;
2 |
3 | public class RtspAnnounceResponse extends RtspResponse {
4 |
5 | public RtspAnnounceResponse(int cseq) {
6 | super(cseq);
7 | }
8 |
9 | protected void generateBody() {
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/server/response/RtspDescribeResponse.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.server.response;
2 |
3 | import java.net.UnknownHostException;
4 |
5 | import de.kp.net.rtsp.RtspConstants.VideoEncoder;
6 |
7 | public class RtspDescribeResponse extends RtspResponse {
8 |
9 | protected String rtpSession = "";
10 | protected String contentBase = "";
11 |
12 | private String fileName;
13 | private VideoEncoder encoder;
14 |
15 | public RtspDescribeResponse(int cseq) {
16 | super(cseq);
17 | }
18 |
19 | protected void generateBody() {
20 |
21 | SDP sdp = new SDP(fileName, encoder);
22 |
23 | String sdpContent = "";
24 | try {
25 | sdpContent = CRLF2 + sdp.getSdp();
26 |
27 | } catch (UnknownHostException e) {
28 | e.printStackTrace();
29 | }
30 |
31 | body += "Content-base: "+contentBase + CRLF
32 | + "Content-Type: application/sdp"+ CRLF
33 | + "Content-Length: "+ sdpContent.length() + sdpContent;
34 |
35 | }
36 |
37 | public String getContentBase() {
38 | return contentBase;
39 | }
40 |
41 | public void setContentBase(String contentBase) {
42 | this.contentBase = contentBase;
43 | }
44 |
45 | public void setFileName(String fileName) {
46 | this.fileName = fileName;
47 | }
48 |
49 | public void setVideoEncoder(VideoEncoder encoder) {
50 | this.encoder = encoder;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/server/response/RtspError.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.server.response;
2 |
3 | public class RtspError extends RtspResponse {
4 |
5 | public RtspError(int cseq) {
6 | super(cseq);
7 | }
8 |
9 | protected void generateBody() {
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/server/response/RtspOptionsResponse.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.server.response;
2 |
3 | public class RtspOptionsResponse extends RtspResponse {
4 |
5 | public RtspOptionsResponse(int cseq) {
6 | super(cseq);
7 | }
8 |
9 | protected void generateBody() {
10 | this.body = "Public:DESCRIBE,SETUP,TEARDOWN,PLAY,PAUSE"/*+SL*/;
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/server/response/RtspPauseResponse.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.server.response;
2 |
3 | public class RtspPauseResponse extends RtspResponse {
4 |
5 | public RtspPauseResponse(int cseq) {
6 | super(cseq);
7 | }
8 |
9 | protected void generateBody() {
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/server/response/RtspPlayResponse.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.server.response;
2 |
3 | public class RtspPlayResponse extends RtspResponse {
4 |
5 | protected String range = "";
6 |
7 | public RtspPlayResponse(int cseq) {
8 | super(cseq);
9 | }
10 |
11 | protected void generateBody() {
12 | this.body += "Session: " + session_id + CRLF + "Range: npt=" + range;
13 | }
14 |
15 | public String getRange() {
16 | return range;
17 | }
18 |
19 | public void setRange(String range) {
20 | this.range = range;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/net/rtsp/server/response/RtspResponseTeardown.java:
--------------------------------------------------------------------------------
1 | package de.kp.net.rtsp.server.response;
2 |
3 | public class RtspResponseTeardown extends RtspResponse {
4 |
5 | public RtspResponseTeardown(int cseq) {
6 | super(cseq);
7 | }
8 |
9 | protected void generar(){
10 | response += getHeader();
11 | response += getBody() + CRLF;
12 | }
13 |
14 | protected void generateBody() {
15 | body += "";
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/RtspCamera/src/de/kp/rtspcamera/MediaConstants.java:
--------------------------------------------------------------------------------
1 | package de.kp.rtspcamera;
2 |
3 | public class MediaConstants {
4 |
5 |
6 | public static boolean H264_CODEC = true;
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/RtspViewer/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/RtspViewer/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 | /gen
3 |
--------------------------------------------------------------------------------
/RtspViewer/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | RtspViewer
4 |
5 |
6 |
7 |
8 |
9 | com.android.ide.eclipse.adt.ResourceManagerBuilder
10 |
11 |
12 |
13 |
14 | com.android.ide.eclipse.adt.PreCompilerBuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.jdt.core.javabuilder
20 |
21 |
22 |
23 |
24 | com.android.ide.eclipse.adt.ApkBuilder
25 |
26 |
27 |
28 |
29 |
30 | com.android.ide.eclipse.adt.AndroidNature
31 | org.eclipse.jdt.core.javanature
32 |
33 |
34 |
--------------------------------------------------------------------------------
/RtspViewer/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/RtspViewer/bin/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/bin/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/RtspViewer/bin/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/bin/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/RtspViewer/bin/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/bin/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/RtspViewer/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/RtspViewer/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}\tools\proguard\proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-10
15 | android.library.reference.1=../RtspCamera
16 |
--------------------------------------------------------------------------------
/RtspViewer/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/RtspViewer/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/RtspViewer/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/RtspViewer/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/RtspViewer/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/RtspViewer/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/RtspViewer/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spex66/RTSP-Camera-for-Android/ce20a50dd019c4dc8485761ee0c7f9f1c9874956/RtspViewer/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/RtspViewer/res/layout/videoview.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/RtspViewer/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello World, RtspViewerActivity!
5 | RtspViewer
6 |
7 |
--------------------------------------------------------------------------------