#include <gpac/mpegts.h>
+#ifdef GPAC_DISABLE_ISOM
+
+#error "Cannot compile MP42TS if GPAC is not built with ISO File Format support"
+
+#else
+
+
#define DEFAULT_PCR_OFFSET 18000
#define UDP_BUFFER_SIZE 0x40000
ifce->sl_config->timestampResolution = 90000;
}
+#ifdef GPAC_DISABLE_ISOM_WRITE
+ fprintf(stdout, "Warning: GPAC was compiled without ISOM Write support, can't set SL Config!\n");
+#else
gf_isom_set_extraction_slc(mp4, track_num, 1, ifce->sl_config);
+#endif
ifce->input_ctrl = mp4_input_ctrl;
if (priv != ifce->input_udta){
return 1;
}
+#endif /*GPAC_DISABLE_ISOM*/
!verbose 3
!include "WinMessages.NSH"
!verbose 4
+\r
+!ifndef WriteEnvStr_RegKey\r
+ !ifdef ALL_USERS\r
+ !define WriteEnvStr_RegKey \\r
+ 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'\r
+ !else\r
+ !define WriteEnvStr_RegKey 'HKCU "Environment"'\r
+ !endif\r
+!endif
; AddToPath - Adds the given dir to the search path.
; Input - head of the stack
; Note - Win9x systems requires reboot
-Function AddToPath
- Exch $0
- Push $1
- Push $2
- Push $3
-
- # don't add if the path doesn't exist
- IfFileExists $0 "" AddToPath_done
-
- ReadEnvStr $1 PATH
- Push "$1;"
- Push "$0;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- Push "$1;"
- Push "$0\;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- GetFullPathName /SHORT $3 $0
- Push "$1;"
- Push "$3;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- Push "$1;"
- Push "$3\;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
-
- Call IsNT
- Pop $1
- StrCmp $1 1 AddToPath_NT
- ; Not on NT
- StrCpy $1 $WINDIR 2
- FileOpen $1 "$1\autoexec.bat" a
- FileSeek $1 -1 END
- FileReadByte $1 $2
- IntCmp $2 26 0 +2 +2 # DOS EOF
- FileSeek $1 -1 END # write over EOF
- FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
- FileClose $1
- SetRebootFlag true
- Goto AddToPath_done
-
- AddToPath_NT:
- ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
- StrCpy $2 $1 1 -1 # copy last char
- StrCmp $2 ";" 0 +2 # if last char == ;
- StrCpy $1 $1 -1 # remove last char
- StrCmp $1 "" AddToPath_NTdoIt
- StrCpy $0 "$1;$0"
- AddToPath_NTdoIt:
- WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
-
- ReadRegStr $1 HKCU "Environment" "PATH"
- StrCpy $2 $1 1 -1 # copy last char
- StrCmp $2 ";" 0 +2 # if last char == ;
- StrCpy $1 $1 -1 # remove last char
- StrCmp $1 "" AddToPath_NTdoIt2
- StrCpy $0 "$1;$0"
- AddToPath_NTdoIt2:
- WriteRegExpandStr HKCU "Environment" "PATH" $0
- SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
- AddToPath_done:
- Pop $3
- Pop $2
- Pop $1
- Pop $0
+Function AddToPath\r
+ Exch $0\r
+ Push $1\r
+ Push $2\r
+ Push $3\r
+ \r
+ # don't add if the path doesn't exist\r
+ IfFileExists "$0\*.*" "" AddToPath_done\r
+ \r
+ ReadEnvStr $1 PATH\r
+ Push "$1;"\r
+ Push "$0;"\r
+ Call StrStr\r
+ Pop $2\r
+ StrCmp $2 "" "" AddToPath_done\r
+ Push "$1;"\r
+ Push "$0\;"\r
+ Call StrStr\r
+ Pop $2\r
+ StrCmp $2 "" "" AddToPath_done\r
+ GetFullPathName /SHORT $3 $0\r
+ Push "$1;"\r
+ Push "$3;"\r
+ Call StrStr\r
+ Pop $2\r
+ StrCmp $2 "" "" AddToPath_done\r
+ Push "$1;"\r
+ Push "$3\;"\r
+ Call StrStr\r
+ Pop $2\r
+ StrCmp $2 "" "" AddToPath_done\r
+ \r
+ Call IsNT\r
+ Pop $1\r
+ StrCmp $1 1 AddToPath_NT\r
+ ; Not on NT\r
+ StrCpy $1 $WINDIR 2\r
+ FileOpen $1 "$1\autoexec.bat" a\r
+ FileSeek $1 -1 END\r
+ FileReadByte $1 $2\r
+ IntCmp $2 26 0 +2 +2 # DOS EOF\r
+ FileSeek $1 -1 END # write over EOF\r
+ FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"\r
+ FileClose $1\r
+ SetRebootFlag true\r
+ Goto AddToPath_done\r
+ \r
+ AddToPath_NT:\r
+ ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"\r
+ StrCpy $2 $1 1 -1 # copy last char\r
+ StrCmp $2 ";" 0 +2 # if last char == ;\r
+ StrCpy $1 $1 -1 # remove last char\r
+ StrCmp $1 "" AddToPath_NTdoIt\r
+ StrCpy $0 "$1;$0"\r
+ AddToPath_NTdoIt:\r
+ WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $0\r
+ SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000\r
+ \r
+ AddToPath_done:\r
+ Pop $3\r
+ Pop $2\r
+ Pop $1\r
+ Pop $0\r
FunctionEnd
; RemoveFromPath - Remove a given dir from the path
; Input: head of the stack
-Function un.RemoveFromPath
- Exch $0
- Push $1
- Push $2
- Push $3
- Push $4
- Push $5
- Push $6
-
- IntFmt $6 "%c" 26 # DOS EOF
-
- Call un.IsNT
- Pop $1
- StrCmp $1 1 unRemoveFromPath_NT
- ; Not on NT
- StrCpy $1 $WINDIR 2
- FileOpen $1 "$1\autoexec.bat" r
- GetTempFileName $4
- FileOpen $2 $4 w
- GetFullPathName /SHORT $0 $0
- StrCpy $0 "SET PATH=%PATH%;$0"
- Goto unRemoveFromPath_dosLoop
-
- unRemoveFromPath_dosLoop:
- FileRead $1 $3
- StrCpy $5 $3 1 -1 # read last char
- StrCmp $5 $6 0 +2 # if DOS EOF
- StrCpy $3 $3 -1 # remove DOS EOF so we can compare
- StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "" unRemoveFromPath_dosLoopEnd
- FileWrite $2 $3
- Goto unRemoveFromPath_dosLoop
- unRemoveFromPath_dosLoopRemoveLine:
- SetRebootFlag true
- Goto unRemoveFromPath_dosLoop
-
- unRemoveFromPath_dosLoopEnd:
- FileClose $2
- FileClose $1
- StrCpy $1 $WINDIR 2
- Delete "$1\autoexec.bat"
- CopyFiles /SILENT $4 "$1\autoexec.bat"
- Delete $4
- Goto unRemoveFromPath_done
-
- unRemoveFromPath_NT:
- ReadRegStr $1 HKCU "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
- StrCpy $5 $1 1 -1 # copy last char
- StrCmp $5 ";" +2 # if last char != ;
- StrCpy $1 "$1;" # append ;
- Push $1
- Push "$0;"
- Call un.StrStr ; Find `$0;` in $1
- Pop $2 ; pos of our dir
- StrCmp $2 "" unRemoveFromPath_done
- ; else, it is in path
- # $0 - path to add
- # $1 - path var
- StrLen $3 "$0;"
- StrLen $4 $2
- StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
- StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
- StrCpy $3 $5$6
-
- StrCpy $5 $3 1 -1 # copy last char
- StrCmp $5 ";" 0 +2 # if last char == ;
- StrCpy $3 $3 -1 # remove last char
-
- WriteRegExpandStr HKCU "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $3
- SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
- unRemoveFromPath_done:
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
+Function un.RemoveFromPath\r
+ Exch $0\r
+ Push $1\r
+ Push $2\r
+ Push $3\r
+ Push $4\r
+ Push $5\r
+ Push $6\r
+ \r
+ IntFmt $6 "%c" 26 # DOS EOF\r
+ \r
+ Call un.IsNT\r
+ Pop $1\r
+ StrCmp $1 1 unRemoveFromPath_NT\r
+ ; Not on NT\r
+ StrCpy $1 $WINDIR 2\r
+ FileOpen $1 "$1\autoexec.bat" r\r
+ GetTempFileName $4\r
+ FileOpen $2 $4 w\r
+ GetFullPathName /SHORT $0 $0\r
+ StrCpy $0 "SET PATH=%PATH%;$0"\r
+ Goto unRemoveFromPath_dosLoop\r
+ \r
+ unRemoveFromPath_dosLoop:\r
+ FileRead $1 $3\r
+ StrCpy $5 $3 1 -1 # read last char\r
+ StrCmp $5 $6 0 +2 # if DOS EOF\r
+ StrCpy $3 $3 -1 # remove DOS EOF so we can compare\r
+ StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine\r
+ StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine\r
+ StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine\r
+ StrCmp $3 "" unRemoveFromPath_dosLoopEnd\r
+ FileWrite $2 $3\r
+ Goto unRemoveFromPath_dosLoop\r
+ unRemoveFromPath_dosLoopRemoveLine:\r
+ SetRebootFlag true\r
+ Goto unRemoveFromPath_dosLoop\r
+ \r
+ unRemoveFromPath_dosLoopEnd:\r
+ FileClose $2\r
+ FileClose $1\r
+ StrCpy $1 $WINDIR 2\r
+ Delete "$1\autoexec.bat"\r
+ CopyFiles /SILENT $4 "$1\autoexec.bat"\r
+ Delete $4\r
+ Goto unRemoveFromPath_done\r
+ \r
+ unRemoveFromPath_NT:\r
+ ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"\r
+ StrCpy $5 $1 1 -1 # copy last char\r
+ StrCmp $5 ";" +2 # if last char != ;\r
+ StrCpy $1 "$1;" # append ;\r
+ Push $1\r
+ Push "$0;"\r
+ Call un.StrStr ; Find `$0;` in $1\r
+ Pop $2 ; pos of our dir\r
+ StrCmp $2 "" unRemoveFromPath_done\r
+ ; else, it is in path\r
+ # $0 - path to add\r
+ # $1 - path var\r
+ StrLen $3 "$0;"\r
+ StrLen $4 $2\r
+ StrCpy $5 $1 -$4 # $5 is now the part before the path to remove\r
+ StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove\r
+ StrCpy $3 $5$6\r
+ \r
+ StrCpy $5 $3 1 -1 # copy last char\r
+ StrCmp $5 ";" 0 +2 # if last char == ;\r
+ StrCpy $3 $3 -1 # remove last char\r
+ \r
+ WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $3\r
+ SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000\r
+ \r
+ unRemoveFromPath_done:\r
+ Pop $6\r
+ Pop $5\r
+ Pop $4\r
+ Pop $3\r
+ Pop $2\r
+ Pop $1\r
+ Pop $0\r
FunctionEnd
###########################################
; Pop $R0
; ($R0 at this point is 1 or 0)
-!macro IsNT un
-Function ${un}IsNT
- Push $0
- ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
- StrCmp $0 "" 0 IsNT_yes
- ; we are not NT.
- Pop $0
- Push 0
- Return
-
- IsNT_yes:
- ; NT!!!
- Pop $0
- Push 1
+!macro IsNT un\r
+Function ${un}IsNT\r
+ Push $0\r
+ ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion\r
+ StrCmp $0 "" 0 IsNT_yes\r
+ ; we are not NT.\r
+ Pop $0\r
+ Push 0\r
+ Return\r
+ \r
+ IsNT_yes:\r
+ ; NT!!!\r
+ Pop $0\r
+ Push 1\r
FunctionEnd
!macroend
!insertmacro IsNT ""
; Pop $R0
; ($R0 at this point is "ass string")
-!macro StrStr un
-Function ${un}StrStr
-Exch $R1 ; st=haystack,old$R1, $R1=needle
- Exch ; st=old$R1,haystack
- Exch $R2 ; st=old$R1,old$R2, $R2=haystack
- Push $R3
- Push $R4
- Push $R5
- StrLen $R3 $R1
- StrCpy $R4 0
- ; $R1=needle
- ; $R2=haystack
- ; $R3=len(needle)
- ; $R4=cnt
- ; $R5=tmp
- loop:
- StrCpy $R5 $R2 $R3 $R4
- StrCmp $R5 $R1 done
- StrCmp $R5 "" done
- IntOp $R4 $R4 + 1
- Goto loop
-done:
- StrCpy $R1 $R2 "" $R4
- Pop $R5
- Pop $R4
- Pop $R3
- Pop $R2
- Exch $R1
-FunctionEnd
-!macroend
-!insertmacro StrStr ""
+!macro StrStr un\r
+Function ${un}StrStr\r
+Exch $R1 ; st=haystack,old$R1, $R1=needle\r
+ Exch ; st=old$R1,haystack\r
+ Exch $R2 ; st=old$R1,old$R2, $R2=haystack\r
+ Push $R3\r
+ Push $R4\r
+ Push $R5\r
+ StrLen $R3 $R1\r
+ StrCpy $R4 0\r
+ ; $R1=needle\r
+ ; $R2=haystack\r
+ ; $R3=len(needle)\r
+ ; $R4=cnt\r
+ ; $R5=tmp\r
+ loop:\r
+ StrCpy $R5 $R2 $R3 $R4\r
+ StrCmp $R5 $R1 done\r
+ StrCmp $R5 "" done\r
+ IntOp $R4 $R4 + 1\r
+ Goto loop\r
+done:\r
+ StrCpy $R1 $R2 "" $R4\r
+ Pop $R5\r
+ Pop $R4\r
+ Pop $R3\r
+ Pop $R2\r
+ Exch $R1\r
+FunctionEnd\r
+!macroend\r
+!insertmacro StrStr ""\r
!insertmacro StrStr "un."
-
fi
if test "$disable_m2ts_mux" = "yes" -o "$disable_m2ts" = "yes" ; then
echo "DISABLE_M2TS=yes" >> config.mak
+else
+ echo "DISABLE_M2TS=no" >> config.mak
fi
echo "GPAC_USE_TINYGL=$has_tinygl" >> config.mak
echo "OGL_INCLS=$INCL3D" >> config.mak
if test "$disable_isoff" = "yes" -o "$disable_isoff_write" = "yes" ; then
- echo "DISABLE_ISOFF=$disable_isoff" >> config.mak
+ echo "DISABLE_ISOFF=yes" >> config.mak
+else
+ echo "DISABLE_ISOFF=no" >> config.mak
fi
echo "HAS_OPENGL=$has_opengl" >> config.mak
/*creates (if needed) a GF_ESD for the given track - THIS IS RESERVED for local playback
only, since the OTI used when emulated is not standard...*/
GF_ESD *gf_media_map_esd(GF_ISOFile *mp4, u32 track);
+#endif
+#ifndef GPAC_DISABLE_ISOM_WRITE
+/*changes pixel aspect ratio for visual tracks if supported. Negative values remove any PAR info*/
+GF_Err gf_media_change_par(GF_ISOFile *file, u32 track, s32 ar_num, s32 ar_den);
#endif
#endif /*GPAC_DISABLE_MEDIA_IMPORT*/
-/*changes pixel aspect ratio for visual tracks if supported. Negative values remove any PAR info*/
-GF_Err gf_media_change_par(GF_ISOFile *file, u32 track, s32 ar_num, s32 ar_den);
-
-
#ifndef GPAC_DISABLE_ISOM_WRITE
/*starts MPD file */
if ((param->msg_type == GF_NETIO_PARSE_HEADER) && !strcmp(param->name, "Content-Type")) {
if (!group->service_mime) {
group->service_mime = gf_strdup(param->value);
- } else if (strcmp(group->service_mime, param->value)) {
+ } else if (stricmp(group->service_mime, param->value)) {
GF_MPD_Representation *rep = gf_list_get(group->adaptation_set->representations, group->active_rep_index);
if (! MPD_GetMimeType(NULL, rep, group->adaptation_set) ) rep->mime_type = gf_strdup(param->value);
rep->disabled = 1;
+ GF_LOG(GF_LOG_WARNING, GF_LOG_MODULE,
+ ("[MPD_IN] Disabling representation since mime does not match: expected %s, but had %s for %s!\n", group->service_mime, param->value, gf_dm_sess_get_resource_name(group->segment_dnload)));
group->force_switch_bandwidth = 1;
gf_dm_sess_abort(group->segment_dnload);
return;
}
}
- if (e == GF_OK || group->segment_must_be_streamed) {
+ if (local_file_name && (e == GF_OK || group->segment_must_be_streamed )) {
gf_mx_p(mpdin->dl_mutex);
assert(group->nb_cached_segments<group->max_cached_segments);
+ assert( local_file_name );
group->cached[group->nb_cached_segments].cache = gf_strdup(local_file_name);
group->cached[group->nb_cached_segments].url = gf_strdup( resource_name );
group->cached[group->nb_cached_segments].start_range = 0;
}
}
-GFINLINE void OGG_SendPackets(OGGReader *read, OGGStream *st, ogg_packet *oggpacket)
+/*GFINLINE*/
+void OGG_SendPackets(OGGReader *read, OGGStream *st, ogg_packet *oggpacket)
{
GF_SLHeader slh;
memset(&slh, 0, sizeof(GF_SLHeader));
The decoder only accepts complete timed text units TTU(1). In band reconfig (TTU(5) is not supported,
nor fragmented TTUs (2, 3, 4).
- UTF16 support should workbut MP4Box does not support it at encoding time.
+ UTF16 support should work but MP4Box does not support it at encoding time.
*/
typedef struct
}
int makedir (newdir)
- char *newdir;
+ const char *newdir;
{
char *buffer ;
char *p;
static void widget_package_extract_file(GF_WidgetPackage *wpack, GF_WidgetPackageResource *res)
{
- u32 i, count;
+ u32 i;
if (wpack->is_zip) {
unz_global_info gi;
break;
}
unzClose(uf);
+#ifndef GPAC_DISABLE_ISOM
} else {
+ u32 count;
GF_ISOFile *isom = gf_isom_open(wpack->package_path, GF_ISOM_OPEN_READ, 0);
if (!isom ) return;
break;
}
gf_isom_close(isom);
+#endif /*GPAC_DISABLE_ISOM*/
}
}
return 0;
}
+
static GF_WidgetPackage *widget_isom_new(GF_WidgetManager *wm, const char *path)
{
+#ifdef GPAC_DISABLE_ISOM
+ GF_LOG(GF_LOG_ERROR, GF_LOG_MODULE, ("[Widgetman] GPAC was compiled without ISO File Format support\n"));
+ return NULL;
+#else
GF_WidgetPackageResource *pack_res;
char szPath[GF_MAX_PATH];
const char *dir;
gf_list_add(wm->term->uri_relocators, wzip);
gf_mx_v(wm->term->net_mx);
return wzip;
+#endif /*GPAC_DISABLE_ISOM*/
}
static GF_WidgetPackage *widget_zip_new(GF_WidgetManager *wm, const char *path)
if (gf_unzip_probe(path)) {
return widget_zip_new(wm, path);
}
+#ifndef GPAC_DISABLE_ISOM
/*ISOFF-based packaged widget */
else if (gf_isom_probe_file(path)) {
return widget_isom_new(wm, path);
}
+#endif
return NULL;
}
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_get_timed_meta_data_info) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_box_new) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_box_del) )
+#ifndef GPAC_DISABLE_ISOM_WRITE
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_box_write) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_box_size) )
+#endif
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_open_progressive) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_get_missing_bytes) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_is_fragmented) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_get_meta_item_info) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_get_meta_type) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_has_meta_xml) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_isom_extract_meta_xml) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_isom_extract_meta_item) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_has_movie) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_has_segment) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_is_single_av) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_3gp_config_update) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_new_text_description) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_new_text_sample) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_isom_delete_text_sample) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_text_reset) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_text_add_text) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_text_add_style) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_set_meta_xml) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_set_meta_xml_memory) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_remove_meta_xml) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_isom_extract_meta_xml) )
-#pragma comment (linker, EXPORT_SYMBOL(gf_isom_extract_meta_item) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_apple_set_tag) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_get_next_alternate_group_id) )
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_set_ipod_compatible) )
/*isomedia_dev.h exports*/
#pragma comment (linker, EXPORT_SYMBOL(gf_isom_parse_texte_sample) )
+#pragma comment (linker, EXPORT_SYMBOL(gf_isom_delete_text_sample) )
#ifndef GPAC_DISABLE_STREAMING
#pragma comment (linker, EXPORT_SYMBOL(gf_rtp_streamer_new) )
#pragma comment (linker, EXPORT_SYMBOL(gf_media_avc_rewrite_samples) )
#endif /*GPAC_DISABLE_MEDIA_IMPORT*/
+#ifndef GPAC_DISABLE_ISOM_WRITE
#pragma comment (linker, EXPORT_SYMBOL(gf_media_change_par) )
-
+#endif
#ifndef GPAC_DISABLE_AV_PARSERS
#pragma comment (linker, EXPORT_SYMBOL(gf_avc_get_sps_info) )
#endif /*GPAC_DISABLE_MEDIA_IMPORT*/
+#ifndef GPAC_DISABLE_ISOM_WRITE
GF_EXPORT
GF_Err gf_media_change_par(GF_ISOFile *file, u32 track, s32 ar_num, s32 ar_den)
{
}
return gf_isom_set_track_layout_info(file, track, tk_w<<16, tk_h<<16, 0, 0, 0);
}
+#endif /*GPAC_DISABLE_ISOM_WRITE*/
}
#ifdef GPAC_HAS_IPV6
+#define MAX_PEER_NAME_LEN 1024
static struct addrinfo *gf_sk_get_ipv6_addr(const char *PeerName, u16 PortNumber, int family, int flags, int sock_type)
{
struct addrinfo *res=NULL;
struct addrinfo hints;
- char node[50], portstring[20], *service, *dest;
-
+ char node[MAX_PEER_NAME_LEN], portstring[20];
+ char *service, *dest;
+ service = dest = NULL;
#ifdef WIN32
if (!wsa_init) {
WSADATA Data;
service = (char *)portstring;
}
if (PeerName) {
- strcpy(node, PeerName);
+ strncpy(node, PeerName, MAX_PEER_NAME_LEN);
if (node[0]=='[') {
node[strlen(node)-1] = 0;
- strcpy(node, &node[1]);
+ strncpy(node, &node[1], MAX_PEER_NAME_LEN);
}
+ node[MAX_PEER_NAME_LEN - 1] = 0;
dest = (char *) node;
}
if (getaddrinfo((const char *)dest, (const char *)service, &hints, &res) != 0) return NULL;