0

sagmentation fault in media player

Hello ,

I am passing 2 videos in play list. when i press first time play button from screen, media player starts and plays both video very well and without any issue,
but when both videos completed, and i receive the previous screen , from that screen when i press again play button, the first video always plays regular and without any issue but when first one completed , i face the segmentation fault error, my media player chras!! and whole application crash!! in TV also.

please help me to resolve.
Thanks.

CODEBOX
WM 00:05:49:311: [T:6726] firing event of type:onConnectionBandwidthChanged
WM 00:05:49:311: [T:6726] no listeners for event
WM 00:05:49:311: [T:6726] ^^^^^^^^^^^^^^^http://localhost/ItoCFuIk_840K_640x360.mp4^^^^^^^^^^^^^^^
WM 00:05:49:312: [T:6726] playlist start() was called
WM 00:05:49:312: [T:6726] Creating event payload with additional payload of: false
WM 00:05:49:312: [T:6726] firing event of type:onStartPlaylist
WM 00:05:49:312: [T:6726] no listeners for event
WM 00:05:49:312: [T:6726] Fixing to load playlist entry at index: 0
WM 00:05:49:312: [T:6726] Creating event payload with additional payload of: {
index => 0
}
WM 00:05:49:312: [T:6726] firing event of type:onLoadPlaylistEntry
WM 00:05:49:312: [T:6726] no listeners for event
WM 00:05:49:312: [T:6726] fixing to play new playlist entry
WM 00:05:49:312: [T:6726] Creating event payload with additional payload of: {
entry => [KONtx/DreamTV] {Instance-118}
}
WM 00:05:49:312: [T:6726] firing event of type:onProcessPlaylistEntry
WM 00:05:49:313: [T:6726] no listeners for event
WM 00:05:49:313: [T:6726] Creating event payload with additional payload of: false
WM 00:05:49:313: [T:6726] firing event of type:onFindBestStream
WM 00:05:49:313: [T:6726] no listeners for event
WM 00:05:49:313: [T:6726] Connection Bitrate: 107 Margin: 1
WM 00:05:49:313: [T:6726] Selecting stream index: 0 which has no bitrate and has URL: http://localhost/ItoCFuIk_840K_640x360.mp4
WM 00:05:49:313: [T:6726] Creating event payload with additional payload of: false
WM 00:05:49:313: [T:6726] firing event of type:onNewStreamSelected
WM 00:05:49:313: [T:6726] no listeners for event
EM 00:05:49:313: [T:6726] TVPlaybackControl::SetOnStateChanged inFunc POINTER((nil)) this = POINTER(0xaff12460)
EM 00:05:49:313: [T:6726] Checking if id exists 4
EM 00:05:49:313: [T:6726] Destroy Path ID = 4
EM 00:05:49:313: [T:6726] Checking if input id exists 4
EM 00:05:49:313: [T:6726] Checking if input id exists 4
EM 00:05:49:313: [T:6726] Checking if input id exists 4
EM 00:05:49:313: [T:6726] DESTROY NETWORK INPUT ID = 4
EM 00:05:49:313: [T:6726] CREATE NETWORK INPUT ID = 5
EM 00:05:49:313: [T:6726] Checking if input id exists 5
!!STOP PLAYING MEDIA FILE
TV 00:05:49:313: [T:6726] OK POST NOTIFICATION ABOUT NEW PATH NOW path-id = 5
EM 00:05:49:313: [T:6726] PATH CONSTRUCTOR fPath = POINTER(0xb01f3c50)
EM 00:05:49:314: [T:6726] !! RETURNING A PLAYBACKCONTROL OBJECT fControl = POINTER(0xb1a13f88)
EM 00:05:49:314: [T:6726] Checking if id exists 5
EM 00:05:49:314: [T:6726] TVPath::GetControl fControl already created = POINTER(0xb1a13f88) RetainCount = 1
EM 00:05:49:314: [T:6726] TVPlaybackControl::SetOnStateChanged inFunc POINTER(0xb194da48) this = POINTER(0xb1a13f88)
WM 00:05:49:314: [T:6726] Creating event payload with additional payload of: false
WM 00:05:49:314: [T:6726] firing event of type:onPlayPlaylistEntry
WM 00:05:49:314: [T:6726] [KONtx/DreamTV] {ControlVideoTransportOverlayButton-102} :: focus
EM 00:05:49:315: [T:6726] Checking if id exists 5
WM 00:05:49:315: [T:6726] Creating event payload with additional payload of: {
selectedURL => http://localhost/ItoCFuIk_840K_640x360.mp4,
callbackHandler => function () {...},
startIndex => 0
}
WM 00:05:49:315: [T:6726] firing event of type:onStartStreamPlayback
WM 00:05:49:315: [T:6726] no listeners for event
WM 00:05:49:315: [T:6726] setting networkinput to url: http://localhost/ItoCFuIk_840K_640x360.mp4
EM 00:05:49:315: [T:6726] Checking if input id exists 5
!!STOP PLAYING MEDIA FILE
WM 00:05:49:315: [T:6726] starting stream playback





>>>>> play:2149





>>>>> DetectStreamDimension:1332

>>>>> # 0 audio: not found video: not found
>>>>> # 1 audio: not found video: not found
>>>>> # 2 audio: OK video: not found
>>>>> # 3 audio: OK video: not found
>>>>> # 4 audio: OK video: not found
>>>>> # 5 audio: OK video: not found
>>>>> # 6 audio: OK video: not found
>>>>> # 7 audio: OK video: not found
>>>>> # 8 audio: OK video: not found
>>>>> # 9 audio: OK video: not found
>>>>> #10 audio: OK video: not found
>>>>> #11 audio: OK video: not found
>>>>> #12 audio: OK video: not found
>>>>> #13 audio: OK video: not found
>>>>> #14 audio: OK video: not found
>>>>> #15 audio: OK video: not found
>>>>> #16 audio: OK video: not found
>>>>> #17 audio: OK video: not found
>>>>> #18 audio: OK video: not found
>>>>> #19 audio: OK video: not found
>>>>> #20 audio: OK video: not found
>>>>> #21 audio: OK video: not found
>>>>> #22 audio: OK video: not found
>>>>> #23 audio: OK video: not found
>>>>> #24 audio: OK video: not found
>>>>> #25 audio: OK video: not found
>>>>> #26 audio: OK video: not found
>>>>> #27 audio: OK video: not found
>>>>> #28 audio: OK video: not found
>>>>> #29 audio: OK video: not found
>>>>> #30 audio: OK video: not found
>>>>> #31 audio: OK video: not found
>>>>> #32 audio: OK video: not found
>>>>> #33 audio: OK video: not found
>>>>> #34 audio: OK video: not found
>>>>> #35 audio: OK video: not found
>>>>> #36 audio: OK video: not found
>>>>> #37 audio: OK video: not found


>>>>> Setting up video



CreatePipeline:1389
>>>>> 960x540


!!BEGIN PLAYING MEDIA FILE!!
WM 00:05:49:440: [T:6726] Creating event payload with additional payload of: {
mode => off
}
WM 00:05:49:440: [T:6726] firing event of type:onSetScreensaverMode
WM 00:05:49:440: [T:6726] no listeners for event
WM 00:05:49:440: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Sent HostEvent: setScreensaver
WM 00:05:49:440: [T:6726] ** AppManager.handleChildEvent() Handled @event [object HostEvent]
WM 00:05:49:441: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Got HostEvent response: setScreensaver
WM 00:05:49:441: [T:6726] State Change from 8 to 0
WM 00:05:49:441: [T:6726] Creating event payload with additional payload of: {
newState => 0,
previousState => 8
}
WM 00:05:49:441: [T:6726] firing event of type:onStateChange
WM 00:05:49:441: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Sent HostEvent: addSnippetConfs
WM 00:05:49:441: [T:6726] ** AppManager.handleChildEvent() Handled @event [object HostEvent]
WM 00:05:49:442: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Got HostEvent response: addSnippetConfs
WM 00:05:49:442: [T:6726] Restarting overlayControl fade timer: 10
WM 00:05:49:442: [T:6726] Creating event payload with additional payload of: {
mode => off
}
WM 00:05:49:442: [T:6726] firing event of type:onSetScreensaverMode
WM 00:05:49:442: [T:6726] no listeners for event
WM 00:05:49:442: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Sent HostEvent: setScreensaver
WM 00:05:49:443: [T:6726] ** AppManager.handleChildEvent() Handled @event [object HostEvent]
WM 00:05:49:443: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Got HostEvent response: setScreensaver
Segmentation fault! (SIGSEGV)
----------------- KONFABULATOR SegFaultHandler ---------------


Obtained 19 stack frames [T:6726]:
[T:6726] 19: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN7KFDebug9DumpStackEPKcPv+0x6c) [0x82a0b8c]
[T:6726] 18: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator [0x81cbabf]
[T:6726] 17: [0xb7700420]
[T:6726] 16: /usr/lib/libstdc++.so.6(__dynamic_cast+0x20) [0xb74cc540]
[T:6726] 15: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN20KFNotificationCenter16SendNotificationERK8KFStringN3YWE8SmartPtrINS3_10
RetainableEEEPv+0x155) [0x851ddc5]
[T:6726] 14: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN20KFNotificationAction7PerformEv+0x69) [0x851f039]
[T:6726] 13: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN8KFAction21PerformDelayedActionsENS_4WhenE+0x7f) [0x829791f]
[T:6726] 12: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN21GSAppControllerAction12ProcessEventEv+0x34) [0x8298674]
[T:6726] 11: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN4Glib11ActionEvent12ProcessEventEv+0x18) [0x81b4548]
[T:6726] 10: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator [0x81b338c]
[T:6726] 9: /usr/lib/libglib-2.0.so.0 [0xb7559101]
[T:6726] 8: /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x176) [0xb755acf6]
[T:6726] 7: /usr/lib/libglib-2.0.so.0 [0xb755e0b3]
[T:6726] 6: /usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1e7) [0xb755e497]
[T:6726] 5: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN2FB13Load_internalEPNS_14AppHostIfaceFBE+0x10dc) [0x81d516c]
[T:6726] 4: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN2FB6Widget4LoadEPNS_14AppHostIfaceFBE+0x12) [0x81d6d42]
[T:6726] 3: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(main+0x18d) [0x81dfdfd]
[T:6726] 2: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb72a9450]
[T:6726] 1: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(realloc+0x95) [0x81a78a1]
-------------------------------------------------

Calling next signal handler...

Segmentation fault



[ Please hit Enter to close the terminal ]

by
7 Replies
  • QUOTE (DEEPKUMAR @ Feb 25 2011, 07:47 AM) <{POST_SNAPBACK}>
    Hello ,

    I am passing 2 videos in play list. when i press first time play button from screen, media player starts and plays both video very well and without any issue,
    but when both videos completed, and i receive the previous screen , from that screen when i press again play button, the first video always plays regular and without any issue but when first one completed , i face the segmentation fault error, my media player chras!! and whole application crash!! in TV also.

    please help me to resolve.
    Thanks.

    CODE
    WM 00:05:49:311: [T:6726] firing event of type:onConnectionBandwidthChanged
    WM 00:05:49:311: [T:6726] no listeners for event
    WM 00:05:49:311: [T:6726] ^^^^^^^^^^^^^^^http://localhost/ItoCFuIk_840K_640x360.mp4^^^^^^^^^^^^^^^
    WM 00:05:49:312: [T:6726] playlist start() was called
    WM 00:05:49:312: [T:6726] Creating event payload with additional payload of: false
    WM 00:05:49:312: [T:6726] firing event of type:onStartPlaylist
    WM 00:05:49:312: [T:6726] no listeners for event
    WM 00:05:49:312: [T:6726] Fixing to load playlist entry at index: 0
    WM 00:05:49:312: [T:6726] Creating event payload with additional payload of: {
    index => 0
    }
    WM 00:05:49:312: [T:6726] firing event of type:onLoadPlaylistEntry
    WM 00:05:49:312: [T:6726] no listeners for event
    WM 00:05:49:312: [T:6726] fixing to play new playlist entry
    WM 00:05:49:312: [T:6726] Creating event payload with additional payload of: {
    entry => [KONtx/DreamTV] {Instance-118}
    }
    WM 00:05:49:312: [T:6726] firing event of type:onProcessPlaylistEntry
    WM 00:05:49:313: [T:6726] no listeners for event
    WM 00:05:49:313: [T:6726] Creating event payload with additional payload of: false
    WM 00:05:49:313: [T:6726] firing event of type:onFindBestStream
    WM 00:05:49:313: [T:6726] no listeners for event
    WM 00:05:49:313: [T:6726] Connection Bitrate: 107 Margin: 1
    WM 00:05:49:313: [T:6726] Selecting stream index: 0 which has no bitrate and has URL: http://localhost/ItoCFuIk_840K_640x360.mp4
    WM 00:05:49:313: [T:6726] Creating event payload with additional payload of: false
    WM 00:05:49:313: [T:6726] firing event of type:onNewStreamSelected
    WM 00:05:49:313: [T:6726] no listeners for event
    EM 00:05:49:313: [T:6726] TVPlaybackControl::SetOnStateChanged inFunc POINTER((nil)) this = POINTER(0xaff12460)
    EM 00:05:49:313: [T:6726] Checking if id exists 4
    EM 00:05:49:313: [T:6726] Destroy Path ID = 4
    EM 00:05:49:313: [T:6726] Checking if input id exists 4
    EM 00:05:49:313: [T:6726] Checking if input id exists 4
    EM 00:05:49:313: [T:6726] Checking if input id exists 4
    EM 00:05:49:313: [T:6726] DESTROY NETWORK INPUT ID = 4
    EM 00:05:49:313: [T:6726] CREATE NETWORK INPUT ID = 5
    EM 00:05:49:313: [T:6726] Checking if input id exists 5
    !!STOP PLAYING MEDIA FILE
    TV 00:05:49:313: [T:6726] OK POST NOTIFICATION ABOUT NEW PATH NOW path-id = 5
    EM 00:05:49:313: [T:6726] PATH CONSTRUCTOR fPath = POINTER(0xb01f3c50)
    EM 00:05:49:314: [T:6726] !! RETURNING A PLAYBACKCONTROL OBJECT fControl = POINTER(0xb1a13f88)
    EM 00:05:49:314: [T:6726] Checking if id exists 5
    EM 00:05:49:314: [T:6726] TVPath::GetControl fControl already created = POINTER(0xb1a13f88) RetainCount = 1
    EM 00:05:49:314: [T:6726] TVPlaybackControl::SetOnStateChanged inFunc POINTER(0xb194da48) this = POINTER(0xb1a13f88)
    WM 00:05:49:314: [T:6726] Creating event payload with additional payload of: false
    WM 00:05:49:314: [T:6726] firing event of type:onPlayPlaylistEntry
    WM 00:05:49:314: [T:6726] [KONtx/DreamTV] {ControlVideoTransportOverlayButton-102} :: focus
    EM 00:05:49:315: [T:6726] Checking if id exists 5
    WM 00:05:49:315: [T:6726] Creating event payload with additional payload of: {
    selectedURL => http://localhost/ItoCFuIk_840K_640x360.mp4,
    callbackHandler => function () {...},
    startIndex => 0
    }
    WM 00:05:49:315: [T:6726] firing event of type:onStartStreamPlayback
    WM 00:05:49:315: [T:6726] no listeners for event
    WM 00:05:49:315: [T:6726] setting networkinput to url: http://localhost/ItoCFuIk_840K_640x360.mp4
    EM 00:05:49:315: [T:6726] Checking if input id exists 5
    !!STOP PLAYING MEDIA FILE
    WM 00:05:49:315: [T:6726] starting stream playback





    >>>>> play:2149





    >>>>> DetectStreamDimension:1332

    >>>>> # 0 audio: not found video: not found
    >>>>> # 1 audio: not found video: not found
    >>>>> # 2 audio: OK video: not found
    >>>>> # 3 audio: OK video: not found
    >>>>> # 4 audio: OK video: not found
    >>>>> # 5 audio: OK video: not found
    >>>>> # 6 audio: OK video: not found
    >>>>> # 7 audio: OK video: not found
    >>>>> # 8 audio: OK video: not found
    >>>>> # 9 audio: OK video: not found
    >>>>> #10 audio: OK video: not found
    >>>>> #11 audio: OK video: not found
    >>>>> #12 audio: OK video: not found
    >>>>> #13 audio: OK video: not found
    >>>>> #14 audio: OK video: not found
    >>>>> #15 audio: OK video: not found
    >>>>> #16 audio: OK video: not found
    >>>>> #17 audio: OK video: not found
    >>>>> #18 audio: OK video: not found
    >>>>> #19 audio: OK video: not found
    >>>>> #20 audio: OK video: not found
    >>>>> #21 audio: OK video: not found
    >>>>> #22 audio: OK video: not found
    >>>>> #23 audio: OK video: not found
    >>>>> #24 audio: OK video: not found
    >>>>> #25 audio: OK video: not found
    >>>>> #26 audio: OK video: not found
    >>>>> #27 audio: OK video: not found
    >>>>> #28 audio: OK video: not found
    >>>>> #29 audio: OK video: not found
    >>>>> #30 audio: OK video: not found
    >>>>> #31 audio: OK video: not found
    >>>>> #32 audio: OK video: not found
    >>>>> #33 audio: OK video: not found
    >>>>> #34 audio: OK video: not found
    >>>>> #35 audio: OK video: not found
    >>>>> #36 audio: OK video: not found
    >>>>> #37 audio: OK video: not found


    >>>>> Setting up video



    CreatePipeline:1389
    >>>>> 960x540


    !!BEGIN PLAYING MEDIA FILE!!
    WM 00:05:49:440: [T:6726] Creating event payload with additional payload of: {
    mode => off
    }
    WM 00:05:49:440: [T:6726] firing event of type:onSetScreensaverMode
    WM 00:05:49:440: [T:6726] no listeners for event
    WM 00:05:49:440: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Sent HostEvent: setScreensaver
    WM 00:05:49:440: [T:6726] ** AppManager.handleChildEvent() Handled @event [object HostEvent]
    WM 00:05:49:441: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Got HostEvent response: setScreensaver
    WM 00:05:49:441: [T:6726] State Change from 8 to 0
    WM 00:05:49:441: [T:6726] Creating event payload with additional payload of: {
    newState => 0,
    previousState => 8
    }
    WM 00:05:49:441: [T:6726] firing event of type:onStateChange
    WM 00:05:49:441: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Sent HostEvent: addSnippetConfs
    WM 00:05:49:441: [T:6726] ** AppManager.handleChildEvent() Handled @event [object HostEvent]
    WM 00:05:49:442: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Got HostEvent response: addSnippetConfs
    WM 00:05:49:442: [T:6726] Restarting overlayControl fade timer: 10
    WM 00:05:49:442: [T:6726] Creating event payload with additional payload of: {
    mode => off
    }
    WM 00:05:49:442: [T:6726] firing event of type:onSetScreensaverMode
    WM 00:05:49:442: [T:6726] no listeners for event
    WM 00:05:49:442: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Sent HostEvent: setScreensaver
    WM 00:05:49:443: [T:6726] ** AppManager.handleChildEvent() Handled @event [object HostEvent]
    WM 00:05:49:443: [T:6726] [KONtx/DreamTV] {HostEventManager} :: Got HostEvent response: setScreensaver
    Segmentation fault! (SIGSEGV)
    ----------------- KONFABULATOR SegFaultHandler ---------------


    Obtained 19 stack frames [T:6726]:
    [T:6726] 19: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN7KFDebug9DumpStackEPKcPv+0x6c) [0x82a0b8c]
    [T:6726] 18: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator [0x81cbabf]
    [T:6726] 17: [0xb7700420]
    [T:6726] 16: /usr/lib/libstdc++.so.6(__dynamic_cast+0x20) [0xb74cc540]
    [T:6726] 15: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN20KFNotificationCenter16SendNotificationERK8KFStringN3YWE8SmartPtrINS3_10
    RetainableEEEPv+0x155) [0x851ddc5]
    [T:6726] 14: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN20KFNotificationAction7PerformEv+0x69) [0x851f039]
    [T:6726] 13: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN8KFAction21PerformDelayedActionsENS_4WhenE+0x7f) [0x829791f]
    [T:6726] 12: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN21GSAppControllerAction12ProcessEventEv+0x34) [0x8298674]
    [T:6726] 11: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN4Glib11ActionEvent12ProcessEventEv+0x18) [0x81b4548]
    [T:6726] 10: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator [0x81b338c]
    [T:6726] 9: /usr/lib/libglib-2.0.so.0 [0xb7559101]
    [T:6726] 8: /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x176) [0xb755acf6]
    [T:6726] 7: /usr/lib/libglib-2.0.so.0 [0xb755e0b3]
    [T:6726] 6: /usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1e7) [0xb755e497]
    [T:6726] 5: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN2FB13Load_internalEPNS_14AppHostIfaceFBE+0x10dc) [0x81d516c]
    [T:6726] 4: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(_ZN2FB6Widget4LoadEPNS_14AppHostIfaceFBE+0x12) [0x81d6d42]
    [T:6726] 3: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(main+0x18d) [0x81dfdfd]
    [T:6726] 2: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb72a9450]
    [T:6726] 1: /home/dilip/TVWidgets/Konfabulator-Latest-540/Konfabulator(realloc+0x95) [0x81a78a1]
    -------------------------------------------------

    Calling next signal handler...

    Segmentation fault



    [ Please hit Enter to close the terminal ]


    I would like to share my code for media player file so it is easy to find solution.

    Thanks.
    0
  • QUOTE (DEEPKUMAR @ Feb 25 2011, 08:11 AM) <{POST_SNAPBACK}>
    I would like to share my code for media player file so it is easy to find solution.

    Thanks.

    CODEBOX
    /**

    **/

    var BasicPlayerView = new KONtx.Class({
    ClassName: 'BasicPlayerView',

    Extends: KONtx.system.FullscreenView,

    config: {
    playlist: null //Setup a config value for the playlist
    },

    initView: function() {
    KONtx.mediaplayer.initialize();

    this.dialogs = {};

    this.dialogs.error = new KONtx.dialogs.Alert({
    title: $_('video_error_dialog_title'),
    message: $_('video_error_dialog_message'),
    buttons: [
    { label: $_('dialog_retry_button'), callback: function() {
    KONtx.mediaplayer.playlist.start();
    } },
    { label: $_('dialog_cancel_button'), callback: function() {
    KONtx.application.previousView();
    } },
    ]
    });
    },

    createView: function() {
    this.controls.overlay = new KONtx.control.MediaTransportOverlay().appendTo(this);
    },//end of create view


    focusView: function() {
    this.controls.overlay.focus();
    },

    updateView: function() {

    var dreamtv_video_url = "http://localhost/ItoCFuIk_840K_640x360.mp4";
    var adurl = "http://localhost/me.mp4";

    //var dreamtv_video_url = KONtx.messages.fetch("final_video");
    KONtx.messages.remove("dreamtv_video_url");
    KONtx.messages.store("dreamtv_video_url",dreamtv_video_url)

    if(KONtx.mediaplayer.isPlaylistEntryActive)
    {
    //ENTER INTO THIS CONTROL MEANS YOU PRESS PLAY BUTTON WHILE ONE VIDEO IS ALLREADY PLAYING.
    log("########################################################video is playing and you press update");
    this._myLog("****REGISTER FROM IF****");
    this._registerHandlers();

    } //end of if

    else
    {
    //NEW REQUEST TO PLAY VIDEO

    var now = new Date();
    log(now);

    this._myLog("");
    this._myLog(now);
    this._myLog("_______________NEW VIDEO REQUEST___________________");

    print("dreamtv_video_url:::::::::::::::"+dreamtv_video_url);

    //--------------------------------------------------------------------------------------------------
    //--------code to call the php file that gives the ad, impression will call from server-------------
    //--------------------------------------------------------------------------------------------------

    try
    {

    var request = new XMLHttpRequest();
    var phpurl = KONtx.messages.fetch("ad_url_php_file");

    this._myLog(phpurl);
    this._myLog("open request");
    request.open( "GET", phpurl , false );

    request.send();
    this._myLog("request sent successfully!!!");
    print ("******************request sent");
    print (request.readyState);

    //var adurl = request.responseText;
    KONtx.messages.remove("adurl");
    KONtx.messages.store("adurl",adurl)
    }//end of try block
    catch(e)
    {
    this._myLog("*******************ERROR TO MAKE HTTP REQUEST FOR AD.**************************");
    print ("*******************ERROR**************************");
    print ("*******************ERROR**************************");
    print ("*******************ERROR**************************");
    print ("*******************ERROR**************************");
    print ("*******************ERROR**************************");
    print ("*******************ERROR**************************");
    }

    //--------------------------------------------------------------------------------------------------

    this._arrayfill(KONtx.messages.fetch("adurl"));
    this._myLog("****REGISTER FROM ELSE****");
    this._registerHandlers();
    this._resetViewport();

    } //end of else

    },//end of update view

    _arrayfill: function(url1){
    var playlist = new KONtx.media.Playlist();

    if(url1 === (KONtx.messages.fetch("adurl")))
    {
    KONtx.messages.remove("video_no");
    KONtx.messages.store("video_no",1);
    }
    else
    {
    KONtx.messages.remove("video_no");
    KONtx.messages.store("video_no",2);
    }

    playlist.addEntry(new KONtx.media.PlaylistEntry({
    streams: [
    { url: url1 },
    ]
    }));

    KONtx.mediaplayer.playlist.set(playlist);
    KONtx.mediaplayer.setConnectionBandwidth(KONtx.messages.fetch("bandwidth") || 1);
    this._myLog("^^^^^^^^^^^^^^^"+url1+"^^^^^^^^^^^^^^^");
    KONtx.mediaplayer.playlist.start();

    //this._registerHandlers();
    //this._resetViewport();
    },

    hideView: function() {
    this._myLog("###UNREGISTER FROM HIDE VIEW#####");
    this._unregisterHandlers();
    },

    _myLog: function(s) {

    log(s);
    var r = new XMLHttpRequest();
    r.onreadystatechange = function() {};
    try
    {
    r.open("GET", "http://smeraproductions.com/ecosystem/ads/viziolog.php?output=" + escape(s), true);

    }
    catch(e)
    {
    log(e);
    }
    r.timeout = 10;
    r.send();

    },

    _resetViewport: function() {
    var bounds = KONtx.mediaplayer.getDefaultViewportBounds();
    KONtx.mediaplayer.setViewportBounds(bounds);
    },

    _registerHandlers: function() {
    if(this._boundPlayerHandler) {
    this._myLog("###UNREGISTER FROM REGISTER HANDLERS FUNCTION#####");
    this._unregisterHandlers();
    }
    this._boundPlayerHandler = this._playerDispatcher.subscribeTo(KONtx.mediaplayer, ['onStateChange', 'onPlaylistEnd', 'onStreamLoadError', 'onRewindRemoteKeyPress', 'onFastForwardRemoteKeyPress' , 'onRemoteKeyPress'], this);

    },

    _unregisterHandlers: function() {
    if(this._boundPlayerHandler) {
    this._boundPlayerHandler.unsubscribeFrom(KONtx.mediaplayer, ['onStateChange', 'onPlaylistEnd', 'onStreamLoadError', 'onRewindRemoteKeyPress' , 'onFastForwardRemoteKeyPress' , 'onRemoteKeyPress']);
    this._boundPlayerHandler = null;
    }
    },

    _playerDispatcher: function(event) {
    switch(event.type) {
    case 'onStateChange':

    if(event.payload.newState == KONtx.mediaplayer.constants.states.STOP) {
    this._resetViewport();
    KONtx.application.previousView();
    }

    if(event.payload.newState == KONtx.mediaplayer.constants.states.ERROR) {
    this._myLog("Error");
    new KONtx.dialogs.Alert({
    title: "Error",
    message: "Media Player Error. Please return to Main screen.",
    buttons: [
    { label: 'Return', callback: function() {
    KONtx.mediaplayer.control.stop();
    KONtx.application.previousView();
    } }
    ]
    }).show();
    }


    if(event.payload.newState == KONtx.mediaplayer.constants.states.UNKNOWN) {
    this._myLog("Unknown Error");
    new KONtx.dialogs.Alert({
    title: "Unknown Error",
    message: "Error playing video. Please return to Main screen.",
    buttons: [
    { label: 'Return', callback: function() {
    KONtx.mediaplayer.control.stop();
    KONtx.application.previousView();
    } }
    ]
    }).show();
    }

    break;

    case 'onPlaylistEnd':

    if((KONtx.messages.fetch("video_no") === 1))
    {
    this._myLog("ad over. video going to play!!");
    this.controls.overlay.resetState();
    KONtx.mediaplayer.control.stop();
    this._arrayfill((KONtx.messages.fetch("dreamtv_video_url")));
    }
    else if((KONtx.messages.fetch("video_no") === 2))
    {
    //this.controls.overlay.resetState();
    //KONtx.mediaplayer.control.stop();
    KONtx.application.previousView();
    }
    else
    {
    KONtx.application.previousView();
    }

    break;
    case 'onStreamLoadError':
    this._myLog("StreamLoadError!!");
    this.dialogs.error.show();
    break;
    case 'onRewindRemoteKeyPress':
    //event.preventDefault();
    KONtx.mediaplayer.control.seek(-150);
    break;
    case 'onFastForwardRemoteKeyPress':
    //event.preventDefault();
    KONtx.mediaplayer.control.seek(150);
    break;
    case 'onStopRemoteKeyPress':
    event.preventDefault();
    break;
    default:
    break;
    }
    }

    });
    0
  • QUOTE (DEEPKUMAR @ Feb 25 2011, 07:47 AM) <{POST_SNAPBACK}>
    Hello ,

    I am passing 2 videos in play list. when i press first time play button from screen, media player starts and plays both video very well and without any issue,
    but when both videos completed, and i receive the previous screen , from that screen when i press again play button, the first video always plays regular and without any issue but when first one completed , i face the segmentation fault error, my media player chras!! and whole application crash!! in TV also.

    please help me to resolve.
    Thanks.

    Are you using a patch? If so, which one?
    0
  • QUOTE (Benjamin Toll @ Feb 28 2011, 11:47 AM) <{POST_SNAPBACK}>
    Are you using a patch? If so, which one?

    I am not getting what is patch? can you explain in detail please? i attached the code with my query .
    Thanks.
    0
  • QUOTE (DEEPKUMAR @ Mar 2 2011, 07:30 AM) <{POST_SNAPBACK}>
    I am not getting what is patch? can you explain in detail please? i attached the code with my query .
    Thanks.

    First, try this patch and see if it fixes your issue.
    0
  • QUOTE (Benjamin Toll @ Mar 2 2011, 01:26 PM) <{POST_SNAPBACK}>
    First, try this patch and see if it fixes your issue.

    Hi.. Good news... it is working on simulator also and on TV also.!! feels good..
    Thanks.
    0
  • QUOTE (DEEPKUMAR @ Mar 7 2011, 09:53 AM) <{POST_SNAPBACK}>
    Hi.. Good news... it is working on simulator also and on TV also.!! feels good..
    Thanks.

    :)
    0

Recent Posts

in General - Yahoo! TV Widgets