summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp/MyHandler.h
Commit message (Collapse)AuthorAgeFilesLines
* frameworks/av: Fix LOG_NDEBUG compilation issuesLeena Winterrowd2016-04-131-0/+2
| | | | | | Fix compilation issues that appear when enabling LOG_NDEBUG. Change-Id: I87e9e5ac66157759dd6f521fab0dd346089a011a
* rtsp: notify the client when receiving BYE message in RTCPLi Sun2015-10-061-0/+8
| | | | | | | RTSP stack would parse "BYE" message from RTCP packets and notify NuPlayer which will send the notification to the client. Change-Id: I461960f28610f998b71a6e1322fe79f9856c7a92
* rtsp: do not drop early access units of seekable rtspLubin Yin2015-10-061-1/+1
| | | | | | | | | Access units of seekable RTSP will be mapped to normal playtime in RTSPSource, so the negative media time can be adjusted and played normally. Change-Id: I12793dbbf367650e66532195324adb5b5ad8fe85 CRs-Fixed: 866580
* NuPlayer: Fix ANR while resetting RTSP playbacklubiny2015-10-061-0/+11
| | | | | | | | | | - When network is poor, the response of RTSP teardown won't be received in time, so ANR will happen. - With this patch, a teardown message will be sent when timeout expires, in order to avoid ANR. Change-Id: I3f9efd9fefa66104ad452559ced5ff5218d73a66 CRs-Fixed: 650866
* rtsp: Don't post AUTimeout check during pause when EOS is nearingLi Sun2015-10-061-0/+13
| | | | | | | | | | | | | | | | Fix crash issues while repeated pause/resume. The root cause is: While doing repeated pause-resume operation in RTSP streaming, some times, the accessunit timeout check is being posted when the streaming paused, and even after receving the EOS. Due to this check, after the EOS, the number of packets received will be zero and the session gets Teardown while the streaming is paused. Upon resume, it leads to check failure and crash. Cancel the timeout check if pause is not issued to MyHandler when nearing EOS. Change-Id: I897d8e18b0dbc29fc1099e7b3d1b5ccc16426a4d CRs-Fixed: 636312, 676054
* rtsp: Add a property "rtsp.transport.TCP"Surajit Podder2015-10-061-0/+9
| | | | | | | | | | | | | | - Add property "rtsp.transport.TCP" Value "true" - TCP Value "false" - UDP default value - false - This property can be used to test rtsp streaming over TCP directly for network compatibility testing Change-Id: Ic27b440067af49e7e3bcc45d86eb7a17ae9db54f CRs-Fixed: 435538
* RTSP: add RTSP extensions for customization supportLi Sun2015-10-061-1/+5
| | | | | | | | Add extensions for customization support in rtsp stack. Provide default implementations in AVMediaServiceUtils. Change-Id: I67adeb54b35d1f01911625bb9bad27e94ad0caf0
* RTSP: add RTSP extensions for IPV6 supportLi Sun2015-10-061-7/+13
| | | | | | | | | | | Change access modifiers and add overridables in rtsp stack. Make ARTSPConnection/ARTPConnection extensible for IPV6 support. Provide default implementations in AVMediaServiceExensions and AVMediaServiceFactory. Change-Id: Iaa67070d1832d56e0569dabfd8327c1998f04493
* RTSP: clear data/eos status before returning from seekRobert Shih2015-07-161-2/+26
| | | | | | | | | | The original RTSP seek implementation involves pausing and restarting a session. This change clears data/eos status after an rtsp session is paused for a seek, and delays the seek to return after data/eos status are cleared. Bug: 22207372 Change-Id: I1bdf65653f90436f7ee5d7fe85eeadc1598a0d56
* RTSPSource: Do not update time when there are no tracks, i.e., when aborted.Wei Jia2015-05-191-1/+1
| | | | | Bug: 17474566 Change-Id: I0dbd7a6a54edaf5b4fe5bd324d38f791a346b2fd
* RTSP: append track URL to base URLChong Zhang2015-05-041-13/+3
| | | | | bug: 17310253 Change-Id: I6ce8c4740a3509d82323ccc05f82cb842368caee
* libmediaplayerservice: fix warnings, make warnings errors, use clangLajos Molnar2015-04-171-8/+8
| | | | Change-Id: I1b2f6b65c5abbc366068a60b8909104f31b94228
* media: switch to new AMessage handlingLajos Molnar2015-03-051-39/+39
| | | | | Bug: 19607784 Change-Id: I94cddcb81f671422ad4982a23dc4acfe57a9f1aa
* Move AString's StringPrintf out of the way.Elliott Hughes2015-02-041-3/+3
| | | | | | | | | We should come back and replace AString with std::string and switch to the "real" StringPrintf family, but this fixes the ODR violation that was preventing us from booting. Bug: 19265750 Change-Id: I798eb9ca5dd634e44625af5e583439ef9f0cdc35
* MyHandler: set ip address to an invalid one when getsockname() returns error.Wei Jia2014-09-221-1/+3
| | | | | Bug: 17556472 Change-Id: I0387c78727d9a18abddcfdb4b480f4b1412bbc9f
* am f1ac623f: am 4a67fc49: Merge "Implemented support for RTSP 301 Redirect"Andreas Huber2014-03-141-11/+22
|\ | | | | | | | | * commit 'f1ac623fcc6bbda2faff9752cd611182a897afe1': Implemented support for RTSP 301 Redirect
| * Merge "Implemented support for RTSP 301 Redirect"Andreas Huber2014-03-141-11/+22
| |\
| | * Implemented support for RTSP 301 RedirectDavid Williams2012-12-031-11/+22
| | | | | | | | | | | | | | | | | | RTSP 301 (Permament Redirect) support has been implemented. Change-Id: If82ffc87f4e7dcbdf98e0a662a35cc086750fc1b
* | | am f4431278: am 19afb386: Merge "Remove streaming URI from default logs"Marco Nelissen2014-03-121-1/+1
|\ \ \ | |/ / | | | | | | | | | * commit 'f4431278a9613f55ecd944ab2e3eb615b372f269': Remove streaming URI from default logs
| * | Remove streaming URI from default logsDavid Williams2014-03-101-1/+1
| | | | | | | | | | | | | | | | | | Streaming URI should not be visible in default logcat logs Change-Id: I104cc56b5335f8c5621013e4c5be8028f0379833
* | | warnings be gone.Andreas Huber2014-02-111-3/+15
|/ / | | | | | | Change-Id: Ie3bae3f037730e316d7fca12e7a3527973f752ef
* | am 58dd0786: Merge "Send kWhatConnected in onTimeUpdate() before first ↵Chong Zhang2013-09-251-17/+23
|\ \ | | | | | | | | | | | | | | | | | | access unit" into klp-dev * commit '58dd07863571951408b67fa0a7f17cb23606fb1c': Send kWhatConnected in onTimeUpdate() before first access unit
| * | Send kWhatConnected in onTimeUpdate() before first access unitChong Zhang2013-09-241-17/+23
| | | | | | | | | | | | | | | Bug: 10642588 Change-Id: If2b4fbbf250d5307e304f31c7aa4ac480e279484
* | | am af66fae1: am fb949d5d: Merge "Fix crash in MyHandler when sockets are not ↵Andreas Huber2013-08-281-16/+22
|\ \ \ | |/ / |/| | | | | | | | | | | | | | set." * commit 'af66fae15f8c386ad884e5fa83db4eaef4c4f2ee': Fix crash in MyHandler when sockets are not set.
| * | Merge "Fix crash in MyHandler when sockets are not set."Andreas Huber2013-08-281-16/+22
| |\ \
| | * | Fix crash in MyHandler when sockets are not set.Henrik Backlund2012-12-051-16/+22
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -When going quickly in and out of the video view during an rtsp streaming session, a race condition occurs and MyHandler tries to connect to a socket that has been reset. To avoid this, checks are added. - If there are errors during setupTrack 1, it is no use setting up track 2. It will cause new errors. - No assert for socket connect since there is a normal status check already. Change-Id: Ie06221d6c0d78ce0449f76c782ed5120fa646bfd
* | | Fix typo in socket nameChad Brubaker2013-07-231-1/+1
| | | | | | | | | | | | Change-Id: I29171368f1b69333ef7eae53ada2fab94e3e28b9
* | | Add routing sockets for the requesting userChad Brubaker2013-07-191-0/+6
|/ / | | | | | | | | | | | | Mediaserver sockets are now routed as if the connection was in the requesting app in per user routing. Change-Id: I60f4649c3c4145a65264b54c1aa2c6c7741efaba
* | resolved conflicts for merge of c158971f to stage-aosp-masterJean-Baptiste Queru2013-07-081-1/+12
|\ \ | | | | | | | | | Change-Id: I3d77b86f7e616af62a826fc37126706ad8ff6158
| * | Store rtsp accessunit until PLAY response parsedYajun Zeng2013-05-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If RTP accessunit comes earlier than play response, the normal play time mapping posted in func onAccessUnitComplete is wrong. This leads wrong timestamp of the first few frames. This issue is found in the 3 CtsVerifier RTSP streaming cases. Change-Id: I640eea375b1f3f4730238f9d561c3b40ec682395 Signed-off-by: Yajun Zeng <beanz@marvell.com>
| * | Fix for crash if no content in DESCRIBE responseXuefei Chen2013-03-121-0/+3
| |/ | | | | | | | | | | | | | | | | | | If DESCRIBE response is received with status 200 but no content, MyHandler will still set content data for session description parsing. This will cause NULL Pointer crash. This fix checks whether DESCRIBE response has content before parsing session description. Change-Id: I114ae6fd54ce804e61718f62618ca9008425a433
| * Crash in android::MyHandler::parsePlayResponsePatric Frederiksen2012-11-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | This fix handles problems with several asynchronous calls within streaming. This case is when the phone has sent a request to the server and while the response is being sent back by the server the request is aborted by the user. The fix is an if case that checks if we have aborted while waiting for a response from the server. If we have aborted we should ignore the late response instead of continuing. Change-Id: I1264bb992f6abcaee1f10a89479e08b54a95e3c2
* | Identify network servers and clients with a OS version related stringAndreas Huber2013-03-261-16/+2
| | | | | | | | | | | | and put the logic to create that string in one location instead of many... Change-Id: I1f729f2e7376cd3b45eea0e48f7bd10084b41b39
* | am 59ac7b30: am 66abe3ae: Merge "Fix for crash if no content in DESCRIBE ↵Andreas Huber2013-03-151-0/+3
|\ \ | | | | | | | | | | | | | | | | | | response" * commit '59ac7b3056db57e5a8e851b7946a181c5fc34852': Fix for crash if no content in DESCRIBE response
| * | Fix for crash if no content in DESCRIBE responseXuefei Chen2013-03-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If DESCRIBE response is received with status 200 but no content, MyHandler will still set content data for session description parsing. This will cause NULL Pointer crash. This fix checks whether DESCRIBE response has content before parsing session description. Change-Id: I114ae6fd54ce804e61718f62618ca9008425a433
* | | Avoid rebuffering after RTSP pauseRoger Jönsson2013-02-061-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If pausing an RTSP stream, an RTSP Pause request is sent and then if the stream is immediately resumed again, an RTSP Play request will be sent to the server. But the new data after the pause will not be buffered until Sender Reports have arrived again on both channels. Meanwhile the player will resume playback and continue consuming the already existing buffer. This means that there is a risk that the buffer is emptied while waiting for sender reports. This commit simply adds a delay before the RTSP pause request is sent, allowing some additional RTSP buffering that might be needed when the stream is resumed again. Also, if the stream is resumed again before the RTSP pause request is sent, there is no need for any RTSP pause request, hence it is omitted. Change-Id: I928c8bfb5e99a6a146dcda4e51e528973ecbe065
* | | EOS fixes for RTSP streamsjoakim johansson2013-02-061-2/+86
| | | | | | | | | | | | | | | | | | | | | The fix takes care of several near end of stream use cases: seek, pause and fake timestamps. Change-Id: I5f5fa881b1f619dfd5e1afd2af957082345c59eb
* | | RTSP: Parse session level control attribute from SDPMåns Zigher2013-02-061-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | If a=control: is present at session-level in the SDP response, RFC2326:C.1.1 defines the URL to be used for aggregate commands. This includes PLAY and PAUSE but not TEARDOWN. Change-Id: Iaa1dc2271d00df39dc83477a99fda6fbeb73c5b4
* | | Enable pause/resume for RTSP streamingRoger Jönsson2013-02-061-4/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a stream is paused, RTSP Pause is also sent to the server. Otherwise the buffering might continue until the memory runs out. When the stream is resumed, RTSP Play will be sent in order to resume the buffering. Change-Id: I5dc1761140827c532451638c3fd3f34271e5b9ab
* | | RTSP buffering improvementsRoger Jönsson2013-02-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added buffering start and end notifications for RTSP. MEDIA_INFO_BUFFERING_START is sent when buffering is started and MEDIA_INFO_BUFFERING_END is sent when the buffer has filled up. This patch also adds RTSP end of stream handling. EOS is signalled when BYE is received OR when detecting end of stream even if no actual EOS is received. Change-Id: I5cccb6845060ae6afd66d9f735b89da81476cd13
* | | RTSP now properly publishes its "seekable" flags after connectionAndreas Huber2013-02-051-0/+4
| | | | | | | | | | | | | | | | | | | | | has successfully completed and only then signals that preparation is complete. Change-Id: I1a60f718e673fe1462c69369c40eafbed6a14326
* | | Detect live streamsRoger Jönsson2013-02-051-5/+39
| | | | | | | | | | | | | | | | | | | | | The information is used to decide on visibility of pause button and to handle the duration clock correctly. Change-Id: I286ac992fd171c7fc313e429326d38b6fc80e3fb
* | | Added HTTP support for SDP files.Oscar Rydhé2013-02-051-0/+53
|/ / | | | | | | | | | | | | | | | | | | Added support for playing SDP files from http links. Previously, SDP files only worked when started from rtsp links (rtsp://a.b.c/abc.sdp), but they are just as common in http links. patch provided by "Oscar Rydhé <oscar.rydhe@sonyericsson.com>" Change-Id: Ic73af3a9a002009dbe8b04c267a4621bf7fe2f46
* | Crash in android::MyHandler::parsePlayResponsePatric Frederiksen2012-11-271-0/+4
|/ | | | | | | | | | | | This fix handles problems with several asynchronous calls within streaming. This case is when the phone has sent a request to the server and while the response is being sent back by the server the request is aborted by the user. The fix is an if case that checks if we have aborted while waiting for a response from the server. If we have aborted we should ignore the late response instead of continuing. Change-Id: I1264bb992f6abcaee1f10a89479e08b54a95e3c2
* Add new APIs AMessage::(set|find)Buffer to make it safer to passAndreas Huber2012-02-221-8/+5
| | | | | | ABuffer objects through messages. Change-Id: I9f8b4e4c4767d0d70a0105e0c0813b754379b49d
* Starhub RTSP apparently does not establish time on all tracksAndreas Huber2012-01-201-1/+29
| | | | | | | | | | i.e. the "SR" RTCP packet is sent for only one of the two tracks. fake timestamps if that's the case, previously we'd only fake timestamps if we didn't receive _any_ "SR" packets. Change-Id: Id63d4940d453ba6c04c62e02ab9a0ad843936bc1 related-to-bug: 5669027
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-6/+6
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-11/+11
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-15/+15
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* am aa82c39b: am 0ba9380a: Merge "Fix Bitreader "putBits" implementation, ↵Andreas Huber2011-12-091-5/+9
|\ | | | | | | | | | | | | make sure we emulate timestamps" into ics-mr1 * commit 'aa82c39bdb4ad9c1fdcb09f3bea11be5197d3ce6': Fix Bitreader "putBits" implementation, make sure we emulate timestamps