Skip to content

Commit

Permalink
for ossrs#328, fix hds compile error on mac.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Mar 11, 2015
1 parent 03bcfd9 commit da56e4f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion trunk/configure
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
"srs_app_pithy_print" "srs_app_reload" "srs_app_http_api" "srs_app_http_conn" "srs_app_http_hooks"
"srs_app_json" "srs_app_ingest" "srs_app_ffmpeg" "srs_app_utility" "srs_app_dvr" "srs_app_edge"
"srs_app_kbps" "srs_app_heartbeat" "srs_app_empty" "srs_app_http_client"
"srs_app_recv_thread" "srs_app_security" "srs_app_statistic"
"srs_app_recv_thread" "srs_app_security" "srs_app_statistic" "srs_app_hds"
"srs_app_mpegts_udp" "srs_app_rtsp" "srs_app_listener")
# add each modules for app
for SRS_MODULE in $SRS_MODULES; do
Expand Down
6 changes: 6 additions & 0 deletions trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
3C1232E91AAEA5D000CE8F6C /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232E71AAEA5D000CE8F6C /* libcrypto.a */; };
3C1232EA1AAEA5D000CE8F6C /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232E81AAEA5D000CE8F6C /* libssl.a */; };
3C1232ED1AAEA70F00CE8F6C /* libhttp_parser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1232EC1AAEA70F00CE8F6C /* libhttp_parser.a */; };
3C1EE6AE1AB1055800576EE9 /* srs_app_hds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3C1EE6AC1AB1055800576EE9 /* srs_app_hds.cpp */; };
3C663F0E1AB0155100286D8B /* Makefile in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F011AB0155100286D8B /* Makefile */; };
3C663F0F1AB0155100286D8B /* srs_aac_raw_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F021AB0155100286D8B /* srs_aac_raw_publish.c */; };
3C663F101AB0155100286D8B /* srs_audio_raw_publish.c in Sources */ = {isa = PBXBuildFile; fileRef = 3C663F031AB0155100286D8B /* srs_audio_raw_publish.c */; };
Expand Down Expand Up @@ -258,6 +259,8 @@
3C1232F21AAEAC7000CE8F6C /* srs-api */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "srs-api"; path = "../../../etc/init.d/srs-api"; sourceTree = "<group>"; };
3C1232F31AAEAC7000CE8F6C /* srs-demo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "srs-demo"; path = "../../../etc/init.d/srs-demo"; sourceTree = "<group>"; };
3C1232F41AAEAC7000CE8F6C /* srs-demo-19350 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = "srs-demo-19350"; path = "../../../etc/init.d/srs-demo-19350"; sourceTree = "<group>"; };
3C1EE6AC1AB1055800576EE9 /* srs_app_hds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = srs_app_hds.cpp; path = ../../../src/app/srs_app_hds.cpp; sourceTree = "<group>"; };
3C1EE6AD1AB1055800576EE9 /* srs_app_hds.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = srs_app_hds.hpp; path = ../../../src/app/srs_app_hds.hpp; sourceTree = "<group>"; };
3C663F011AB0155100286D8B /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; name = Makefile; path = ../../../research/librtmp/Makefile; sourceTree = "<group>"; };
3C663F021AB0155100286D8B /* srs_aac_raw_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_aac_raw_publish.c; path = ../../../research/librtmp/srs_aac_raw_publish.c; sourceTree = "<group>"; };
3C663F031AB0155100286D8B /* srs_audio_raw_publish.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = srs_audio_raw_publish.c; path = ../../../research/librtmp/srs_audio_raw_publish.c; sourceTree = "<group>"; };
Expand Down Expand Up @@ -433,6 +436,8 @@
3C12325D1AAE81D900CE8F6C /* srs_app_forward.hpp */,
3C12325E1AAE81D900CE8F6C /* srs_app_heartbeat.cpp */,
3C12325F1AAE81D900CE8F6C /* srs_app_heartbeat.hpp */,
3C1EE6AC1AB1055800576EE9 /* srs_app_hds.cpp */,
3C1EE6AD1AB1055800576EE9 /* srs_app_hds.hpp */,
3C1232601AAE81D900CE8F6C /* srs_app_hls.cpp */,
3C1232611AAE81D900CE8F6C /* srs_app_hls.hpp */,
3C1232621AAE81D900CE8F6C /* srs_app_http_api.cpp */,
Expand Down Expand Up @@ -651,6 +656,7 @@
3C12324A1AAE81A400CE8F6C /* srs_rtsp_stack.cpp in Sources */,
3C1232A51AAE81D900CE8F6C /* srs_app_json.cpp in Sources */,
3C12329F1AAE81D900CE8F6C /* srs_app_http_api.cpp in Sources */,
3C1EE6AE1AB1055800576EE9 /* srs_app_hds.cpp in Sources */,
3C663F101AB0155100286D8B /* srs_audio_raw_publish.c in Sources */,
3C663F111AB0155100286D8B /* srs_bandwidth_check.c in Sources */,
3C1232A11AAE81D900CE8F6C /* srs_app_http_conn.cpp in Sources */,
Expand Down
6 changes: 5 additions & 1 deletion trunk/src/app/srs_app_hds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_app_hds.hpp>

#include <unistd.h>
#include <string>
#include <vector>
#include <sys/types.h>
Expand Down Expand Up @@ -462,7 +464,9 @@ int SrsHds::flush_bootstrap()
char *start_afrt = NULL;
int size_afrt = 0;

abst.initialize(start_abst, size);
if ((ret = abst.initialize(start_abst, size)) != ERROR_SUCCESS) {
return ret;
}

// @see video_file_format_spec_v10_1
// page: 46
Expand Down
6 changes: 3 additions & 3 deletions trunk/src/app/srs_app_hds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef SRS_APP_HDS_HPP
#define SRS_APP_HDS_HPP

#include <srs_core.hpp>

#include <list>

class SrsRequest;
class SrsSharedPtrMessage;
class SrsHdsFragment;
class SrsSource;

using namespace std;

class SrsHds
{
public:
Expand All @@ -52,7 +52,7 @@ class SrsHds
void adjust_windows();

private:
list<SrsHdsFragment *> fragments;
std::list<SrsHdsFragment *> fragments;
SrsHdsFragment *currentSegment;
SrsSource *source;
int fragment_index;
Expand Down

0 comments on commit da56e4f

Please sign in to comment.