Changeset 9817


Ignore:
Timestamp:
Dec 24, 2009, 6:01:48 PM (12 years ago)
Author:
charles
Message:

(trunk libT) #2632 "Add streaming capability to libtransmission (but not the Transmission GUI clients)" -- revert this feature due to pushback from devs and users and the 1.80 freeze

Location:
trunk/libtransmission
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r9816 r9817  
    860860        const tr_torrent * tor = t->tor;
    861861        const tr_info * inf = tr_torrentInfo( tor );
    862         const tr_bool isStreaming = tr_torrentIsStreaming( tor );
    863862        struct weighted_piece * pieces;
    864863        int pieceCount;
     
    876875            piece->index = pool[i];
    877876            piece->requestCount = 0;
    878             piece->salt = isStreaming ? piece->index
    879                                       : (tr_piece_index_t)tr_cryptoWeakRandInt( 4096 );
     877            piece->salt = tr_cryptoWeakRandInt( 4096 );
    880878        }
    881879
  • trunk/libtransmission/resume.c

    r9816 r9817  
    4343#define KEY_SPEEDLIMIT_UP       "speed-limit-up"
    4444#define KEY_SPEEDLIMIT_DOWN     "speed-limit-down"
    45 #define KEY_STREAMING           "streaming"
    4645#define KEY_RATIOLIMIT          "ratio-limit"
    4746#define KEY_UPLOADED            "uploaded"
     
    505504    tr_tordbg( tor, "Saving .resume file for \"%s\"", tr_torrentName( tor ) );
    506505
    507     tr_bencInitDict( &top, 34 ); /* arbitrary "big enough" number */
     506    tr_bencInitDict( &top, 33 ); /* arbitrary "big enough" number */
    508507    tr_bencDictAddInt( &top, KEY_ACTIVITY_DATE, tor->activityDate );
    509508    tr_bencDictAddInt( &top, KEY_ADDED_DATE, tor->addedDate );
     
    518517    tr_bencDictAddInt( &top, KEY_BANDWIDTH_PRIORITY, tr_torrentGetPriority( tor ) );
    519518    tr_bencDictAddBool( &top, KEY_PAUSED, !tor->isRunning );
    520     tr_bencDictAddBool( &top, KEY_STREAMING, tr_torrentIsStreaming( tor ) );
    521519    savePeers( &top, tor );
    522520    saveFilePriorities( &top, tor );
     
    612610    }
    613611
    614     if( ( fieldsToLoad & TR_FR_STREAMING )
    615       && tr_bencDictFindBool( &top, KEY_STREAMING, &boolVal ) )
    616     {
    617         tor->isStreaming = boolVal;
    618         fieldsLoaded |= TR_FR_STREAMING;
    619     }
    620 
    621612    if( ( fieldsToLoad & TR_FR_ADDED_DATE )
    622613      && tr_bencDictFindInt( &top, KEY_ADDED_DATE, &i ) )
  • trunk/libtransmission/resume.h

    r9816 r9817  
    3636    TR_FR_DONE_DATE           = ( 1 << 14 ),
    3737    TR_FR_ACTIVITY_DATE       = ( 1 << 15 ),
    38     TR_FR_RATIOLIMIT          = ( 1 << 16 ),
    39     TR_FR_STREAMING           = ( 1 << 17 )
     38    TR_FR_RATIOLIMIT          = ( 1 << 16 )
    4039};
    4140
  • trunk/libtransmission/torrent.c

    r9816 r9817  
    18911891***/
    18921892
    1893 tr_bool
    1894 tr_torrentIsStreaming( const tr_torrent * tor )
    1895 {
    1896     assert( tr_isTorrent( tor ) );
    1897     assert( tr_isBool( tor->isStreaming ) );
    1898 
    1899     return tor->isStreaming;
    1900 }
    1901 
    1902 void
    1903 tr_torrentSetStreaming( tr_torrent * tor, tr_bool isStreaming )
    1904 {
    1905     assert( tr_isTorrent( tor ) );
    1906     assert( tr_isBool( isStreaming ) );
    1907 
    1908     tor->isStreaming = isStreaming;
    1909 }
    1910 
    1911 /***
    1912 ****
    1913 ***/
    1914 
    19151893void
    19161894tr_torrentSetPeerLimit( tr_torrent * tor,
  • trunk/libtransmission/torrent.h

    r9816 r9817  
    227227    void                             * ratio_limit_hit_func_user_data;
    228228
    229     tr_bool                    isStreaming;
    230229    tr_bool                    isRunning;
    231230    tr_bool                    isDeleting;
  • trunk/libtransmission/transmission.h

    r9816 r9817  
    708708uint16_t   tr_sessionGetPeerLimitPerTorrent( const tr_session * );
    709709
     710tr_priority_t   tr_torrentGetPriority( const tr_torrent * );
     711void            tr_torrentSetPriority( tr_torrent *, tr_priority_t );
     712
    710713
    711714/**
     
    10721075tr_bool  tr_torrentUsesSessionLimits  ( const tr_torrent * );
    10731076
    1074 
    1075 tr_priority_t   tr_torrentGetPriority( const tr_torrent * );
    1076 void            tr_torrentSetPriority( tr_torrent *, tr_priority_t );
    1077 
    1078 tr_bool         tr_torrentIsStreaming( const tr_torrent * );
    1079 void            tr_torrentSetStreaming( tr_torrent *, tr_bool );
    10801077
    10811078/****
Note: See TracChangeset for help on using the changeset viewer.